Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Keith Seitz <keiths@redhat.com>, Carl Love <cel@us.ibm.com>,
	Lancelot SIX <lsix@lancelotsix.com>
Cc: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
	gdb-patches@sourceware.org, Rogerio Alves <rogealve@br.ibm.com>
Subject: Re: [PATCH] Fix gdb.cp/no-dmgl-verbose.exp test
Date: Fri, 29 Apr 2022 18:26:42 +0100	[thread overview]
Message-ID: <77a0bb58-c434-de4a-1707-f65a7c438a79@palves.net> (raw)
In-Reply-To: <31261461-8f2a-8919-c882-3601a9adefd9@palves.net>

On 2022-04-29 18:20, Pedro Alves wrote:
> On 2022-04-29 18:09, Keith Seitz wrote:
>> On 4/29/22 09:57, Pedro Alves wrote:
>>> On 2022-04-29 16:48, Carl Love via Gdb-patches wrote:
>>>> On Fri, 2022-04-29 at 09:14 +0000, Lancelot SIX wrote:
>>>
>>> So the file is called gdb.cp/no-dmgl-verbose.exp.  "no-dmgl" most certainly means "no demangle".
>>>
>>> How is that related to "no demangle verbose" ?  A mystery.
>>
>> I believe I remember some history of this...
>>
>> When I did the physname work years ago, a maintainer objected that the
>> recorded physname for a function which takes a std::string was
>> "reduced" to "std::string<blah blah blah>" instead of recording (and
>> thus subsequently printing) "std::string" like other tools do. [He
>> speciifcally mentioned "nm".]
>>
>> The "no-dmgl-verbose" refers to the demangler option, DMGL_VERBOSE,
>> which I originally used when computing physnames. I believe this test's
>> intention was to make sure that DMGL_VERBOSE didn't creep back into the
>> code.
>>
>> [Background: At the time, the compiler did not output sufficient debuginfo
>> for a bunch of symbols, such as ctors. Thus the physname computation
>> was a way to "fill-in" this missing/necessary information.]
>>
>> There's a number of other workarounds for this "std::string"
>> vs "std::string<blah blah blah>" (and others) in cp-support.c.
>> See "ignore_typedefs". [Pardon if my explanation is imprecise.
>> This was a looong time ago.]
> 
> Thanks Keith!
> 
> That leads to this:
> 
>  https://sourceware.org/pipermail/gdb-patches/2011-July/thread.html

Sigh, wrong url, obviously.  I meant, this:

 https://sourceware.org/pipermail/gdb-patches/2011-June/083081.html

Pedro Alves

> 
> The "Test loading symbols from unrelocated C++ object files." intro is found in
> 
>  gdb.cp/cp-relocate.exp:# Test loading symbols from unrelocated C++ object files.
> 
> so I guess that Jan copied that testcase, and didn't update the intro.  The "unrelocated"
> aspect seems like not important for the test.
> 
> Note how Jan says:
> 
> "After Keith's fix of GDB PR 12266 GDB should resolve mostly any form
> (typedefed/untypedefed etc.) of the user entered function parameters."
> 
> I believe that should be true today, and GDB should be able to set a breakpoint
> on the typedef'ed f(std::string), no?  I find it very hard to believe that Jan
> didn't notice that the
> 
>  gdb_breakpoint {'f(std::string)'}
> 
> call was failing back then.  From the message, it very much seems like it was
> passing back then.  And then, the other test:
> 
>  gdb_test {break 'f(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'} \
>  	 {Function ".*" not defined\.} \
>  	 "DMGL_VERBOSE-demangled f(std::string) is not defined"
> 
> means that "std::basic_string<char, std::char_traits<char>, std::allocator<char> >" is what
> you get when you demangle the function's linkage name with DMGL_VERBOSE, which is different
> from what you get if you demangle without DMGL_VERBOSE, and this test is thus making sure that
> such a demangled name is not defined.
> 
> The proposed change completely turns the testcase on its head.


  reply	other threads:[~2022-04-29 17:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29  1:28 Carl Love via Gdb-patches
2022-04-29  9:14 ` Lancelot SIX via Gdb-patches
2022-04-29 15:48   ` Carl Love via Gdb-patches
2022-04-29 16:45     ` Bruno Larsen via Gdb-patches
2022-04-29 16:57     ` Pedro Alves
2022-04-29 17:09       ` Keith Seitz via Gdb-patches
2022-04-29 17:20         ` Pedro Alves
2022-04-29 17:26           ` Pedro Alves [this message]
2022-04-29 18:40           ` Pedro Alves
2022-04-29 19:13             ` Carl Love via Gdb-patches
2022-04-30  0:56               ` [PATCH] Fix "b func(std::string)", use DMGL_VERBOSE (was: Re: [PATCH] Fix gdb.cp/no-dmgl-verbose.exp test) Pedro Alves
2022-04-30  2:54                 ` Carl Love via Gdb-patches
2022-04-30 21:11                 ` Lancelot SIX via Gdb-patches
2022-05-02 15:46                   ` Pedro Alves
2022-05-05 18:53                     ` Pedro Alves
2022-04-30  1:00             ` [PATCH] Fix gdb.cp/no-dmgl-verbose.exp test Pedro Alves
2022-04-29 17:23         ` Lancelot SIX via Gdb-patches

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=77a0bb58-c434-de4a-1707-f65a7c438a79@palves.net \
    --to=pedro@palves.net \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=cel@us.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    --cc=lsix@lancelotsix.com \
    --cc=rogealve@br.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