* Expected output of gdb.cp/no-dmgl-verbose.exp
@ 2021-04-12 18:16 Luis Machado
2021-04-12 18:45 ` Keith Seitz
0 siblings, 1 reply; 5+ messages in thread
From: Luis Machado @ 2021-04-12 18:16 UTC (permalink / raw)
To: gdb, jan.kratochvil
I'm trying to determine why this particular test is failing (for both
aarch64-linux and x86_64-linux on Ubuntu 18.04/20.04) and what the
expected outcome is.
In my case, the only symbol I see for function "f" is the following:
"f(std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >)"
There is no "f(std::string)" nor "f(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >)" symbol.
Given we've done quite a few changes to how demangling is applied and
how we match the names, I wonder if this test is no longer meaningful.
Does anyone know?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Expected output of gdb.cp/no-dmgl-verbose.exp
2021-04-12 18:16 Expected output of gdb.cp/no-dmgl-verbose.exp Luis Machado
@ 2021-04-12 18:45 ` Keith Seitz
2021-04-12 18:55 ` Luis Machado
0 siblings, 1 reply; 5+ messages in thread
From: Keith Seitz @ 2021-04-12 18:45 UTC (permalink / raw)
To: Luis Machado, gdb
On 4/12/21 11:16 AM, Luis Machado via Gdb wrote:
> I'm trying to determine why this particular test is failing (for both
> aarch64-linux and x86_64-linux on Ubuntu 18.04/20.04) and what the
> expected outcome is.
>
> In my case, the only symbol I see for function "f" is the following:
>
> "f(std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >)"
>
> There is no "f(std::string)" nor "f(std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >)" symbol.
>
Wow, such a long time ago! IIRC...
This test was written to ensure that "std::string" was used
instead of "std::basic_string<...>" (which is now called something
else again). Something about "that's what nm and other tools tell users,
so we should not mention the symbol's real (linkage) name, either."
The "no-dmgl-verbose" refers to the DMGL_VERBOSE option
of the demangler, which does this.
There is even special logic in our typedef-replacing machinery to
enforce this. [NOTE: `ignore_typedefs' in cp-support.c is also "out-
of-date" wrt to this naming change. So none of that has likely been
"working" for many years, but then at very quick glance, "nm -C" doesn't
do this anymore, either.]
I was against it then, so I certainly do not mind getting rid of this test
or limiting it to C++ installations that typedef the "older" std::basic_string<...>
to std::string.
Keith
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Expected output of gdb.cp/no-dmgl-verbose.exp
2021-04-12 18:45 ` Keith Seitz
@ 2021-04-12 18:55 ` Luis Machado
2021-04-12 20:07 ` David Blaikie
2021-04-13 8:57 ` Tom de Vries
0 siblings, 2 replies; 5+ messages in thread
From: Luis Machado @ 2021-04-12 18:55 UTC (permalink / raw)
To: Keith Seitz, gdb
On 4/12/21 3:45 PM, Keith Seitz wrote:
> On 4/12/21 11:16 AM, Luis Machado via Gdb wrote:
>> I'm trying to determine why this particular test is failing (for both
>> aarch64-linux and x86_64-linux on Ubuntu 18.04/20.04) and what the
>> expected outcome is.
>>
>> In my case, the only symbol I see for function "f" is the following:
>>
>> "f(std::__cxx11::basic_string<char, std::char_traits<char>,
>> std::allocator<char> >)"
>>
>> There is no "f(std::string)" nor "f(std::basic_string<char,
>> std::char_traits<char>, std::allocator<char> >)" symbol.
>>
>
> Wow, such a long time ago! IIRC...
Indeed. I vaguely remember that, back in ~2011 IIRC. But obviously not
enough to figure out what was going on.
>
> This test was written to ensure that "std::string" was used
> instead of "std::basic_string<...>" (which is now called something
> else again). Something about "that's what nm and other tools tell users,
> so we should not mention the symbol's real (linkage) name, either."
>
> The "no-dmgl-verbose" refers to the DMGL_VERBOSE option
> of the demangler, which does this.
>
> There is even special logic in our typedef-replacing machinery to
> enforce this. [NOTE: `ignore_typedefs' in cp-support.c is also "out-
> of-date" wrt to this naming change. So none of that has likely been
> "working" for many years, but then at very quick glance, "nm -C" doesn't
> do this anymore, either.]
Ah, that makes it much more clear. Thanks for the explanation.
>
> I was against it then, so I certainly do not mind getting rid of this test
> or limiting it to C++ installations that typedef the "older" std::basic_string<...>
> to std::string.
I think keeping it may be more confusing than useful. I'll propose its
removal on gdb-patches@ and we'll see where we go from there.
Thanks Keith.
>
> Keith
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Expected output of gdb.cp/no-dmgl-verbose.exp
2021-04-12 18:55 ` Luis Machado
@ 2021-04-12 20:07 ` David Blaikie
2021-04-13 8:57 ` Tom de Vries
1 sibling, 0 replies; 5+ messages in thread
From: David Blaikie @ 2021-04-12 20:07 UTC (permalink / raw)
To: Luis Machado; +Cc: Keith Seitz, gdb
FWIW - at least some Clang folks are working on adding a
"preferred_name" attribute ( https://reviews.llvm.org/D91311 ) which
would be used to help tools understand that std::basic_string<char,
... is best known as std::string. Perhaps we'll end up with a
DW_AT_preferred_name attribute in DWARF to make this more explicit/not
needing consumers to guess or otherwise encode heuristically which
names should be used.
On Mon, Apr 12, 2021 at 1:02 PM Luis Machado via Gdb <gdb@sourceware.org> wrote:
>
> On 4/12/21 3:45 PM, Keith Seitz wrote:
> > On 4/12/21 11:16 AM, Luis Machado via Gdb wrote:
> >> I'm trying to determine why this particular test is failing (for both
> >> aarch64-linux and x86_64-linux on Ubuntu 18.04/20.04) and what the
> >> expected outcome is.
> >>
> >> In my case, the only symbol I see for function "f" is the following:
> >>
> >> "f(std::__cxx11::basic_string<char, std::char_traits<char>,
> >> std::allocator<char> >)"
> >>
> >> There is no "f(std::string)" nor "f(std::basic_string<char,
> >> std::char_traits<char>, std::allocator<char> >)" symbol.
> >>
> >
> > Wow, such a long time ago! IIRC...
>
> Indeed. I vaguely remember that, back in ~2011 IIRC. But obviously not
> enough to figure out what was going on.
>
> >
> > This test was written to ensure that "std::string" was used
> > instead of "std::basic_string<...>" (which is now called something
> > else again). Something about "that's what nm and other tools tell users,
> > so we should not mention the symbol's real (linkage) name, either."
> >
> > The "no-dmgl-verbose" refers to the DMGL_VERBOSE option
> > of the demangler, which does this.
> >
> > There is even special logic in our typedef-replacing machinery to
> > enforce this. [NOTE: `ignore_typedefs' in cp-support.c is also "out-
> > of-date" wrt to this naming change. So none of that has likely been
> > "working" for many years, but then at very quick glance, "nm -C" doesn't
> > do this anymore, either.]
>
> Ah, that makes it much more clear. Thanks for the explanation.
>
> >
> > I was against it then, so I certainly do not mind getting rid of this test
> > or limiting it to C++ installations that typedef the "older" std::basic_string<...>
> > to std::string.
>
> I think keeping it may be more confusing than useful. I'll propose its
> removal on gdb-patches@ and we'll see where we go from there.
>
> Thanks Keith.
>
> >
> > Keith
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Expected output of gdb.cp/no-dmgl-verbose.exp
2021-04-12 18:55 ` Luis Machado
2021-04-12 20:07 ` David Blaikie
@ 2021-04-13 8:57 ` Tom de Vries
1 sibling, 0 replies; 5+ messages in thread
From: Tom de Vries @ 2021-04-13 8:57 UTC (permalink / raw)
To: Luis Machado, Keith Seitz, gdb
On 4/12/21 8:55 PM, Luis Machado via Gdb wrote:
> On 4/12/21 3:45 PM, Keith Seitz wrote:
>> On 4/12/21 11:16 AM, Luis Machado via Gdb wrote:
>>> I'm trying to determine why this particular test is failing (for both
>>> aarch64-linux and x86_64-linux on Ubuntu 18.04/20.04) and what the
>>> expected outcome is.
>>>
>>> In my case, the only symbol I see for function "f" is the following:
>>>
>>> "f(std::__cxx11::basic_string<char, std::char_traits<char>,
>>> std::allocator<char> >)"
>>>
>>> There is no "f(std::string)" nor "f(std::basic_string<char,
>>> std::char_traits<char>, std::allocator<char> >)" symbol.
>>>
>>
>> Wow, such a long time ago! IIRC...
>
> Indeed. I vaguely remember that, back in ~2011 IIRC. But obviously not
> enough to figure out what was going on.
>
>>
>> This test was written to ensure that "std::string" was used
>> instead of "std::basic_string<...>" (which is now called something
>> else again). Something about "that's what nm and other tools tell users,
>> so we should not mention the symbol's real (linkage) name, either."
>>
>> The "no-dmgl-verbose" refers to the DMGL_VERBOSE option
>> of the demangler, which does this.
>>
>> There is even special logic in our typedef-replacing machinery to
>> enforce this. [NOTE: `ignore_typedefs' in cp-support.c is also "out-
>> of-date" wrt to this naming change. So none of that has likely been
>> "working" for many years, but then at very quick glance, "nm -C" doesn't
>> do this anymore, either.]
>
> Ah, that makes it much more clear. Thanks for the explanation.
>
>>
>> I was against it then, so I certainly do not mind getting rid of this
>> test
>> or limiting it to C++ installations that typedef the "older"
>> std::basic_string<...>
>> to std::string.
>
> I think keeping it may be more confusing than useful. I'll propose its
> removal on gdb-patches@ and we'll see where we go from there.
>
The FAIL was mentioned here:
https://sourceware.org/bugzilla/show_bug.cgi?id=19436#c7
Thanks,
- Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-04-13 8:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 18:16 Expected output of gdb.cp/no-dmgl-verbose.exp Luis Machado
2021-04-12 18:45 ` Keith Seitz
2021-04-12 18:55 ` Luis Machado
2021-04-12 20:07 ` David Blaikie
2021-04-13 8:57 ` Tom de Vries
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).