From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 8/9] class-local typedef substitutions
Date: Wed, 31 Oct 2012 19:18:00 -0000 [thread overview]
Message-ID: <5091795B.7020506@redhat.com> (raw)
In-Reply-To: <87sjabrx4g.fsf@fleche.redhat.com>
On 09/21/2012 08:31 PM, Tom Tromey wrote:
> Tom> This patch implements class-local typedef substitutions for the C++
> Tom> type printer. That is, when printing a type, gdb will now look at
> Tom> template argument names (if any) and typedefs defined in the class
> Tom> body, and substitute those names when printing type names.
>
> More testing revealed an oddity in this code (a latent bug exposed by
> the subsequent Python patch); and the fix I chose required some changes
> to some MI test cases as well. The particular change was that
> previously gdb could emit "long int" but now it will emit just "long" --
> I consider this to be an ok (perhaps even preferable) change.
I'm confused and curious at why such a change would be necessary. I
couldn't find it from a quick look over the patch.
Can you expand a little? Does this also affect the CLI?
Why expect both long and "long int"? Is this compiler / debug format
dependent, perhaps?
> mi_list_varobj_children {struct_declarations.long_array --all-values} {
> - {struct_declarations.long_array.0 0 0 "long int" 1234}
> - {struct_declarations.long_array.1 1 0 "long int" 2345}
> - {struct_declarations.long_array.2 2 0 "long int" 3456}
> - {struct_declarations.long_array.3 3 0 "long int" 4567}
> - {struct_declarations.long_array.4 4 0 "long int" 5678}
> - {struct_declarations.long_array.5 5 0 "long int" 6789}
> - {struct_declarations.long_array.6 6 0 "long int" 7890}
> - {struct_declarations.long_array.7 7 0 "long int" 8901}
> - {struct_declarations.long_array.8 8 0 "long int" 9012}
> - {struct_declarations.long_array.9 9 0 "long int" 1234}
> - {struct_declarations.long_array.10 10 0 "long int" 3456}
> - {struct_declarations.long_array.11 11 0 "long int" 5678}
> + {struct_declarations.long_array.0 0 0 "long( int)?" 1234}
> + {struct_declarations.long_array.1 1 0 "long( int)?" 2345}
> + {struct_declarations.long_array.2 2 0 "long( int)?" 3456}
> + {struct_declarations.long_array.3 3 0 "long( int)?" 4567}
> + {struct_declarations.long_array.4 4 0 "long( int)?" 5678}
> + {struct_declarations.long_array.5 5 0 "long( int)?" 6789}
> + {struct_declarations.long_array.6 6 0 "long( int)?" 7890}
> + {struct_declarations.long_array.7 7 0 "long( int)?" 8901}
> + {struct_declarations.long_array.8 8 0 "long( int)?" 9012}
> + {struct_declarations.long_array.9 9 0 "long( int)?" 1234}
> + {struct_declarations.long_array.10 10 0 "long( int)?" 3456}
> + {struct_declarations.long_array.11 11 0 "long( int)?" 5678}
> } "listing of names and values of children"
> mi_list_varobj_children "psnp->long_ptr" {
> - {{psnp->long_ptr.\*psnp->long_ptr} {\*psnp->long_ptr} 1 {long int \*\*\*}}
> + {{psnp->long_ptr.\*psnp->long_ptr} {\*psnp->long_ptr} 1 {long( int)? \*\*\*}}
> } "get children of psnp->long_ptr"
>
--
Pedro Alves
next prev parent reply other threads:[~2012-10-31 19:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-07 18:51 Tom Tromey
2012-09-08 8:00 ` Eli Zaretskii
2012-09-21 19:32 ` Tom Tromey
2012-10-31 19:18 ` Pedro Alves [this message]
2012-11-01 21:01 ` Tom Tromey
2012-11-02 20:52 ` Tom Tromey
2012-11-05 20:26 ` Tom Tromey
2012-11-05 20:52 ` Eli Zaretskii
2012-11-06 15:14 ` Tom Tromey
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=5091795B.7020506@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.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