This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Adding support for reading signal hanlder frame in AIX
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: sangamesh dot swamy at in dot ibm dot com (Sangamesh Mallayya)
- Cc: gdb-patches at sourceware dot org, Ulrich dot Weigand at de dot ibm dot com (Ulrich Weigand), edelsohn at us dot ibm dot com (David Edelsohn), sanrathi at in dot ibm dot com (Sanket Rathi)
- Date: Mon, 15 Jan 2018 17:26:56 +0100 (CET)
- Subject: Re: [PATCH] Adding support for reading signal hanlder frame in AIX
- Authentication-results: sourceware.org; auth=none
Sangamesh Mallayya wrote:
> Attached patch adds support for reading signal handler frame in AIX.
Thanks for working on this!
However, you should not patch AIX-specific code into the generic
PowerPC code in rs6000-tdep.c. Instead, you should create
code to handle AIX signal frames in rs0000-aix-tdep.c.
To do so, you'll want to call something like
tramp_frame_prepend_unwinder (gdbarch, ... your handler ...);
in the rs6000_aix_init_osabi function. For guidance, you may want to
look at ppc-linux-tdep.c:ppc_linux_init_abi, which already does
the same thing to handle Linux signal frames.
Note that rs6000-aix-tdep.c already defines the SIG_FRAME_* constants.
You should also be able to easily distinguish the 32-bit and 64-bit
cases by just checking tdep->wordsize; no need to export a new global
from xcoffread.c.
As an added bonus, it would be great if you could convert the test
case you had in your email into an actual new test in the GDB test suite,
to help prevent regressing on this support in the future :-)
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com