Fix dw2-ifort-parameter.exp on PPC64
On PPC64, 'func' and 'main' are function descriptors and don't point to the actual code. Thus the usage of these symbols in the DWARF assembler source was broken. The patch introduces new labels func_start and func_end for this purpose.
This commit is contained in:
parent
288c211f8c
commit
646f441776
|
@ -1,3 +1,11 @@
|
||||||
|
2014-03-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
||||||
|
|
||||||
|
* gdb.dwarf2/dw2-ifort-parameter.c (func): Define labels
|
||||||
|
'func_start' and 'func_end' for the beginning and end of the
|
||||||
|
function code, respectively.
|
||||||
|
* gdb.dwarf2/dw2-ifort-parameter.exp: Use 'func_start' and
|
||||||
|
'func_end' instead of 'func' and 'main'.
|
||||||
|
|
||||||
2014-03-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
2014-03-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
||||||
|
|
||||||
* gdb.dwarf2/dw2-ifort-parameter-debug.S: Remove.
|
* gdb.dwarf2/dw2-ifort-parameter-debug.S: Remove.
|
||||||
|
|
|
@ -18,11 +18,17 @@
|
||||||
int value = 0xdeadf00d;
|
int value = 0xdeadf00d;
|
||||||
int *ptr = &value;
|
int *ptr = &value;
|
||||||
|
|
||||||
void
|
asm (".section \".text\"");
|
||||||
|
asm (".balign 8");
|
||||||
|
asm ("func_start: .globl func_start");
|
||||||
|
|
||||||
|
static void
|
||||||
func (void)
|
func (void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
asm ("func_end: .globl func_end");
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,14 +29,14 @@ set asm_file [standard_output_file $srcfile2]
|
||||||
Dwarf::assemble $asm_file {
|
Dwarf::assemble $asm_file {
|
||||||
declare_labels int_label
|
declare_labels int_label
|
||||||
|
|
||||||
extern main func ptr
|
extern func_start func_end ptr
|
||||||
|
|
||||||
cu {} {
|
cu {} {
|
||||||
compile_unit {
|
compile_unit {
|
||||||
{name file1.txt}
|
{name file1.txt}
|
||||||
{language @DW_LANG_C}
|
{language @DW_LANG_C}
|
||||||
{low_pc func addr}
|
{low_pc func_start addr}
|
||||||
{high_pc main addr}
|
{high_pc func_end addr}
|
||||||
} {
|
} {
|
||||||
int_label: base_type {
|
int_label: base_type {
|
||||||
{name int}
|
{name int}
|
||||||
|
@ -47,8 +47,8 @@ Dwarf::assemble $asm_file {
|
||||||
subprogram {
|
subprogram {
|
||||||
{external 1 flag}
|
{external 1 flag}
|
||||||
{name func}
|
{name func}
|
||||||
{low_pc func addr}
|
{low_pc func_start addr}
|
||||||
{high_pc main addr}
|
{high_pc func_end addr}
|
||||||
} {
|
} {
|
||||||
formal_parameter {
|
formal_parameter {
|
||||||
{name param}
|
{name param}
|
||||||
|
|
Loading…
Reference in New Issue