diff options
author | Carl Love <cel@us.ibm.com> | 2021-11-19 18:33:51 +0000 |
---|---|---|
committer | Carl Love <cel@us.ibm.com> | 2021-12-06 13:49:20 -0600 |
commit | a85885ff7ec52a8fe4a0b1008bcde20ff13c54d0 (patch) | |
tree | dc1cc1632e4b93d1692c8789f0d4a58e2b31b77d | |
parent | b082698c5cb9c076628476b132a140ca78e9c03b (diff) | |
download | gdb-a85885ff7ec52a8fe4a0b1008bcde20ff13c54d0.zip gdb-a85885ff7ec52a8fe4a0b1008bcde20ff13c54d0.tar.gz gdb-a85885ff7ec52a8fe4a0b1008bcde20ff13c54d0.tar.bz2 |
gdb: Add PowerPC support to gdb.dwarf2/frame-inlined-in-outer-frame
This patch adds an #elif defined for PowerPC to setup the exit_0 macro.
This patch addes the needed macro definitionald logic to handle both elfV1
and elfV2.
The patch has been successfully tested on both PowerPC BE, Powerpc LE and
X86_64 with no regressions.
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.S | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.S b/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.S index 9fb6e7b..224b50b 100644 --- a/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.S +++ b/gdb/testsuite/gdb.dwarf2/frame-inlined-in-outer-frame.S @@ -65,6 +65,16 @@ swi 0x0 .endm +#elif defined __powerpc64__ + +# define RETURN_ADDRESS_REGNO 65 + +.macro exit_0 + li 0, __NR_exit /* r0 - contains system call number */ + li 3, 0 /* r3 - contains first argument for sys call */ + sc +.endm + #else # error "Unsupported architecture" #endif @@ -90,6 +100,20 @@ 16 } */ +#if defined __powerpc64__ +# if _CALL_ELF == 2 +.abiversion 2 /* Tell gdb what ELF version to use. */ +# else +.abiversion 1 /* Tell gdb what ELF version to use. */ +.align 2 +.section ".opd", "aw" +.align 3 +.quad ._start,.TOC.@tocbase,0 +.previous +.type ._start,@function +._start: +# endif +#endif .global _start _start: .cfi_startproc |