This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH v2] Bug 17394: we cannot put a break-point at a global function for ASM file
- From: "mihail dot nistor at freescale dot com" <mihail dot nistor at freescale dot com>
- To: Keith Seitz <keiths at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 1 Oct 2014 18:07:10 +0000
- Subject: RE: [PATCH v2] Bug 17394: we cannot put a break-point at a global function for ASM file
- Authentication-results: sourceware.org; auth=none
- References: <1410954786-17690-1-git-send-email-mihail dot nistor at freescale dot com> <542459B9 dot 9090705 at redhat dot com> <23ca9e13576840e280392b69e5cc7de8 at BN1PR0301MB0628 dot namprd03 dot prod dot outlook dot com> <7dec43bc41e044fcbba3289ca7cb2697 at BN1PR0301MB0628 dot namprd03 dot prod dot outlook dot com> <542B0854 dot 6050804 at redhat dot com>
Thank you for everything. I'm looking forward to receiving the final approval so that the patch may be submitted.
Best regards,
Mihai
-----Original Message-----
From: Keith Seitz [mailto:keiths@redhat.com]
Sent: Tuesday, September 30, 2014 10:45 PM
To: Nistor Mihail-MNISTOR1; gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Bug 17394: we cannot put a break-point at a global function for ASM file
On 09/28/2014 09:08 AM, mihail.nistor@freescale.com wrote:
> -----Original Message-----
> From: Nistor Mihail-MNISTOR1
> Sent: Sunday, September 28, 2014 6:47 PM
> To: Keith Seitz; gdb-patches@sourceware.org
> Cc: Nistor Mihail-MNISTOR1
> Subject: RE: [PATCH v2] Bug 17394: we cannot put a break-point at a
> global function for ASM file
>
> Your changes look very well, I have one little observation regarding the filtering condition when we need to get information from minimal symbol.
> Scenario: We can mix objects that were compiled/assembled by different vendors and the third party assembler provides debug information and it doesn't have this limitation. An application may contain more than one file that have the same name. We cannot put a breakpoint at a function in all objects that have the same name if an object that comes from ASM file has debug info and is linked before the objects assembled with the GNU-GAS. In the new test case I have tried to emulate the third party assembler behavior in the break-asm-file1.s.
>
That makes sense to me. FWIW, here is a combined patch which I think a maintainer should give a final look over.
Thank you for the patch!
Keith
gdb/ChangeLog:
2014-09-30 Keith Seitz <keiths@redhat.com>
Mihail-Marian Nistor <mihail.nistor@freescale.com>
PR gdb/17394
* linespec.c (struct collect_minsyms): Add new member `symtab'.
(add_minsym): Handle cases where info.symtab is non-NULL.
(search_minsyms_for_name): Add new parameter `symtab'.
Handle limiting searches to a specific symtab.
(add_matching_symtabs_to_info): Search through minimal symbols
for language_asm files for which no new symbols are found.
gdb/testsuite/ChangeLog:
2014-09-30 Mihail-Marian Nistor <mihail.nistor@freescale.com>
PR gdb/17394
* gdb.linespec/break-asm-file.c: New file.
* gdb.linespec/break-asm-file.exp: New file.
* gdb.linespec/break-asm-file0.s: New file.
* gdb.linespec/break-asm-file1.s: New file.