This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix setting-breakpoints regression on PPC64 (function descriptors)
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>, Jan Kratochvil <jan dot kratochvil at redhat dot com>, Simon Marchi <simon dot marchi at ericsson dot com>, Keith Seitz <keiths at redhat dot com>, GDB Patches <gdb-patches at sourceware dot org>
- Date: Fri, 8 Dec 2017 16:57:07 +0000
- Subject: Re: [PATCH] Fix setting-breakpoints regression on PPC64 (function descriptors)
- Authentication-results: sourceware.org; auth=none
- References: <20171126163756.1515ED802F9@oc3748833570.ibm.com> <0bea6805-b8eb-da2c-07f6-0f1ee917c7b5@redhat.com> <867etxpn9k.fsf@gmail.com> <19d93119-75cb-435c-9ddb-1f42f6ac8e69@redhat.com>
On Fri, Dec 8, 2017 at 11:34 AM, Pedro Alves <palves@redhat.com> wrote:
> That's fine with me. I guess we end up with the wrong section
> in the function descriptor / PPC64 case (".opd" instead of some kind
> of ".text" where the resolved function lives), but it shouldn't
> matter, since the old code did that as well, AFAICT.
I tested the patch on gcc110, there is no regression. I pushed it in.
>
> (I noticed that get_sal_arch doesn't consider sal.objfile, probably
> because it predates addition of the 'obfile' field. We could probably
> fill in / use that field more, but we don't need to do that now.)
I noticed that too, but one thing I am not sure is that sal.objfile is
*only* used for probe,
/* The probe associated with this symtab_and_line. */
probe *prob = NULL;
/* If PROBE is not NULL, then this is the objfile in which the probe
originated. */
struct objfile *objfile = NULL;
so can we use it in other cases (when probe is not used)? I don't
know. If so, are sal.objfile and sal.section->objfile different or same?
I need to look at the code there.
--
Yao (齐尧)