public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@arm.com>
To: Andrew Burgess <aburgess@redhat.com>, Tom Tromey <tom@tromey.com>,
	Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 2/2] gdb/testsuite: new test for recent dwarf reader issue
Date: Mon, 19 Dec 2022 13:20:27 +0000	[thread overview]
Message-ID: <5a78504a-8652-55c6-75ff-db6e0ab06690@arm.com> (raw)
In-Reply-To: <877cys29o6.fsf@redhat.com>

On 12/15/22 11:22, Andrew Burgess wrote:
> Luis Machado <luis.machado@arm.com> writes:
> 
>> Hi Andrew,
>>
>> On 12/9/22 19:24, Andrew Burgess via Gdb-patches wrote:
>>> Tom Tromey <tom@tromey.com> writes:
>>>
>>>>>>>>> "Andrew" == Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> writes:
>>>>
>>>> Thank you for doing this.
>>>>
>>>> Andrew>   - However, GDB checks each partial symbol using multiple languages,
>>>> Andrew>     not just the current language (C in this case), so, when GDB
>>>> Andrew>     checks using the C++ language, the symbol name is first demangled,
>>>> Andrew>     the code that does this can be found
>>>> Andrew>     lookup_name_info::language_lookup_name.  As the demangled form of
>>>> Andrew>     'signed int' is just 'int', GDB then looks for any symbols with
>>>> Andrew>     the name 'int', most partial symtabs will contain such a symbol,
>>>> Andrew>     so GDB ends up expanding pretty much every symtab.
>>>>
>>>> It's a pedantic point but what happens here is name canonicalization,
>>>> not demangling.  Demangling is just used to refer to the translation
>>>> from a name like "_Zmumble" to "something::else" -- that is, the input
>>>> is a linkage name and the output is a C++ name.  Canonicalization takes
>>>> a C++ name as input and returns the standard form, basically dealing
>>>> with the fact that C++ (and as we discovered, C) has multiple possible
>>>> spellings for some symbols.
>>>
>>> Please, be pedantic.  My goal here was to better understand this code,
>>> there's no point me understanding it wrong.
>>>
>>> I'll reword that paragraph.
>>>
>>> Thanks for taking a look.
>>>
>>> Andrew
>>>
>>
>> I'm not saying you should investigate this, as it is a new test, but I'm getting a lot of these messages for this test:
>>
>> ERROR: internal buffer is full.
> 
> Happy to take a look at the problem.
> 
> I guess the issue is coming from the gdb_test_multiple that I use in the
> new test script.
> 
> I'm tried to write patterns that match and discard all the lines as they
> arrive from GDB.  I guess you are seeing a pattern that I am not for
> some reason.
> 
> Could you run just this test and attach the gdb.log file and I'll take a
> look.  I probably just need to tweak one of the patterns a little.
> 
> Thanks,
> Andrew
> 

I briefly looked into this. The problem seems to arise from the fact that sometimes we don't have multiple lines for the "info sources" output.

Some sections are output in a single line. For example, one of them has 133K characters. But each entry seems to be separated by a comma character:

./elf/./elf/rtld.c, ./elf/../include/rtld-malloc.h, ./elf/../sysdeps/generic/ldsodefs.h, ./elf/../sysdeps/aarch64/dl-machine.h, ...

It might be best (for the testsuite) if gdb outputs this data across more lines.

  reply	other threads:[~2022-12-19 13:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08 15:38 [PATCH 0/2] New test for slow DWARF " Andrew Burgess
2022-12-08 15:38 ` [PATCH 1/2] gdb/testsuite: fix readnow detection Andrew Burgess
2022-12-08 15:38 ` [PATCH 2/2] gdb/testsuite: new test for recent dwarf reader issue Andrew Burgess
2022-12-09 18:18   ` Tom Tromey
2022-12-09 19:24     ` Andrew Burgess
2022-12-14 14:47       ` Luis Machado
2022-12-15 11:22         ` Andrew Burgess
2022-12-19 13:20           ` Luis Machado [this message]
2022-12-19 13:52             ` Andrew Burgess
2022-12-20  8:43               ` tdevries
2022-12-20 10:32                 ` Andrew Burgess
2022-12-20 13:20                   ` Andrew Burgess
2022-12-20 14:04                     ` Luis Machado
2022-12-20 14:54                     ` tdevries
2022-12-24 16:05                       ` Andrew Burgess
2022-12-09 18:18 ` [PATCH 0/2] New test for slow DWARF " Tom Tromey
2022-12-14 10:25   ` Andrew Burgess

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=5a78504a-8652-55c6-75ff-db6e0ab06690@arm.com \
    --to=luis.machado@arm.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).