[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb
Subject:    Re: p 'CV::m(int)' vs p CV::m(int)
From:       Keith Seitz <keiths () redhat ! com>
Date:       2016-07-21 18:17:08
Message-ID: 579111A4.2010703 () redhat ! com
[Download RAW message or body]

On 07/15/2016 06:49 AM, Yao Qi wrote:
> Hi,
> I just notice that p 'CV::m(int)' is different p CV::m(int), (with and
> without single quote).  Where do we document p 'CV::m(int)'?  I see
> https://sourceware.org/gdb/onlinedocs/gdb/Variables.html
> but it is about using single quote before "::".   However, the usage
> like 'CV::m(int)' isn't documented there.

I was hoping someone with more history on this hack would speak up, but
it doesn't appear that anyone is going to fess up to this. Therefore,
having expended a considerable amount of energy on removing this hack, I
offer my $.00002 (USD).

IIRC this originated as a way of bypassing the parser sometime after C++
"support" was added to GDB. Rather like a "literal," the whole token is
taken verbatim. We look for *exactly* that literal in the symbol table.
Much easier than fixing the parser bugs!

I have tried over the past several years to slowly remove the need for
such hacks. [Linespec had a similar hack, which now only exists for
backward "compatibility," i.e., maintaining previous buggy behavior.]

I would really prefer we stop broadcasting this workaround and encourage
users to file bugs, and, of course, for developers to (continue to) fix
them!

Keith

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic