From: Andreas Schwab <schwab@suse.de>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [commit/Ada] Add handling of "ptype TYPE_NAME.FIELD0.[...].FIELDN" expressions
Date: Sun, 06 Jan 2008 09:11:00 -0000 [thread overview]
Message-ID: <je7iins4iy.fsf@sykes.suse.de> (raw)
In-Reply-To: <20080106043437.GI5975@adacore.com> (Joel Brobecker's message of "Sat\, 5 Jan 2008 20\:34\:37 -0800")
Joel Brobecker <brobecker@adacore.com> writes:
>> > (gdb) ptype circle.pos
>> > Invalid attempt to select from type: "circle.pos".
>> >
>> > The attached patch enhances the debugger to able to do the above.
>>
>> Is this actually valid in Ada? You can't do this in C, which is why
>> GDB doesn't handle it for ptype.
>
> Actually, it isn't. But it seemed like a natural extension...
For C you can use this:
(gdb) ptype ((circle)0).pos
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2008-01-06 9:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-04 15:14 Joel Brobecker
2008-01-05 13:58 ` Eli Zaretskii
2008-01-05 14:59 ` Joel Brobecker
2008-01-05 18:53 ` Daniel Jacobowitz
2008-01-06 4:35 ` Joel Brobecker
2008-01-06 9:11 ` Andreas Schwab [this message]
2008-01-07 14:48 ` Joel Brobecker
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=je7iins4iy.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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