diff options
author | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2014-03-07 12:23:47 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2014-03-12 16:22:19 +0100 |
commit | 646f4417760ab12c0d955dabf821d8737d94335a (patch) | |
tree | 385101ebf48b111ef7f0b93e4c38c862939622ce /gdb/testsuite/gdb.dwarf2 | |
parent | 288c211f8c66a8d065cfd59f110e2fbc33ccce25 (diff) | |
download | gdb-646f4417760ab12c0d955dabf821d8737d94335a.zip gdb-646f4417760ab12c0d955dabf821d8737d94335a.tar.gz gdb-646f4417760ab12c0d955dabf821d8737d94335a.tar.bz2 |
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.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2')
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp | 10 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c index 361c44d..4474814 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c +++ b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.c @@ -18,11 +18,17 @@ int value = 0xdeadf00d; int *ptr = &value; -void +asm (".section \".text\""); +asm (".balign 8"); +asm ("func_start: .globl func_start"); + +static void func (void) { } +asm ("func_end: .globl func_end"); + int main (void) { diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp index d11de9e..026e071 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp @@ -29,14 +29,14 @@ set asm_file [standard_output_file $srcfile2] Dwarf::assemble $asm_file { declare_labels int_label - extern main func ptr + extern func_start func_end ptr cu {} { compile_unit { {name file1.txt} {language @DW_LANG_C} - {low_pc func addr} - {high_pc main addr} + {low_pc func_start addr} + {high_pc func_end addr} } { int_label: base_type { {name int} @@ -47,8 +47,8 @@ Dwarf::assemble $asm_file { subprogram { {external 1 flag} {name func} - {low_pc func addr} - {high_pc main addr} + {low_pc func_start addr} + {high_pc func_end addr} } { formal_parameter { {name param} |