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: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail 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 at sourceware dot org
- Date: Fri, 8 Dec 2017 11:34:52 +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>
On 12/08/2017 09:44 AM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:
>
>> @@ -4309,22 +4309,16 @@ minsym_found (struct linespec_state *self, struct objfile *objfile,
>> struct minimal_symbol *msymbol,
>> std::vector<symtab_and_line> *result)
>> {
>> - struct gdbarch *gdbarch = get_objfile_arch (objfile);
>> - CORE_ADDR pc;
>> struct symtab_and_line sal;
>>
>> - if (msymbol_is_text (msymbol))
>> - {
>> - sal = find_pc_sect_line (MSYMBOL_VALUE_ADDRESS (objfile, msymbol),
>> - (struct obj_section *) 0, 0);
>> - sal.section = MSYMBOL_OBJ_SECTION (objfile, msymbol);
>
> This line is removed, so that sal.section can be null. It causes
> PR 22567. How is the patch below?
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 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.)
Pedro Alves