This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Adding support for reading signal hanlder frame in AIX


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]