Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: sangamesh.swamy@in.ibm.com (Sangamesh Mallayya)
Cc: gdb-patches@sourceware.org,
	Ulrich.Weigand@de.ibm.com (Ulrich Weigand),
	       edelsohn@us.ibm.com (David Edelsohn),
	       sanrathi@in.ibm.com (Sanket Rathi)
Subject: Re: [PATCH] Adding support for reading signal hanlder frame in AIX
Date: Mon, 15 Jan 2018 16:27:00 -0000	[thread overview]
Message-ID: <20180115162656.D896DD804E4@oc3748833570.ibm.com> (raw)
In-Reply-To: <OFFEA6F7CE.B2E29B77-ON65258216.0013560E-65258216.0014653C@notes.na.collabserv.com> from "Sangamesh Mallayya" at Jan 15, 2018 03:42:47 AM

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


      parent reply	other threads:[~2018-01-15 16:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15  3:42 Sangamesh Mallayya
2018-01-15 10:23 ` Yao Qi
2018-01-15 10:54   ` Sangamesh Mallayya
2018-01-15 16:27 ` Ulrich Weigand [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180115162656.D896DD804E4@oc3748833570.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=edelsohn@us.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sangamesh.swamy@in.ibm.com \
    --cc=sanrathi@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox