]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/testsuite/ChangeLog
Reading signal handler frame in AIX
authorSangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Thu, 1 Nov 2018 10:23:59 +0000 (06:23 -0400)
committerSangamesh Mallayya <sangamesh.swamy@in.ibm.com>
Thu, 1 Nov 2018 10:23:59 +0000 (06:23 -0400)
commitcdcda965ea4c70c80b9f8c294597e991417ff9d5
tree76fbd8536e17add42587a6d4147f85a976b29447
parent38642de318119d116c47eaff52ad9a7edb032c11
Reading signal handler frame in AIX

In AIX if gdb is debugging an application which has a signal handler
and reaches the signal handler frame, then we need to read the back
chain address from sigcontext saved on the stack, similarly the LR.

As backchain at an offset 0 will be 0, because we will have a
sigconext saved after the minimum stack size. So the correct
backchain will be at an offset after minimum stack and the LR at
an offset 8 will be of the signal millicode address.
If the back chain pointer is NULL and the LR field is in the kernel
segment(ex. 0x00004a14) then we can probably assume we are in a
signal  handler.

sample output

(gdb) bt
0  sig_handle_aix (signo=11) at aix-sighandle.c:7
1  0x0000000000004a94 in ?? ()
(gdb)

expected output

(gdb) bt
0  sig_handle_aix (signo=11) at aix-sighandle.c:7
1  <signal handler called>
2  0x0000000100000748 in foo () at aix-sighandle.c:14
3  0x000000010000079c in main () at aix-sighandle.c:19

gdb/ChangeLog:

2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>

* rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
(SIG_FRAME_LR_OFFSET64): New define.
(SIG_FRAME_FP_OFFSET64): New define.
(aix_sighandle_frame_cache): New Function.
(aix_sighandle_frame_this_id): New Function.
(aix_sighandle_frame_prev_register): New Function.
(aix_sighandle_frame_sniffer): New Function.
(aix_sighandle_frame_unwind): New global variable.
(rs6000_aix_init_osabi): Install new frame unwinder.

gdb/testsuite/ChangeLog:

2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>

* gdb.arch/aix-sighandle.c: New file.
* gdb.arch/aix-sighandle.exp: New file.
gdb/ChangeLog
gdb/rs6000-aix-tdep.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.arch/aix-sighandle.c [new file with mode: 0644]
gdb/testsuite/gdb.arch/aix-sighandle.exp [new file with mode: 0644]