From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Tom Tromey <tromey@adacore.com>
Cc: Keith Seitz <keiths@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Allow 'ptype/o' for assembly
Date: Mon, 14 Nov 2022 21:05:15 +0100 [thread overview]
Message-ID: <3b90f6cdce3f8d4c3ca348e24cfa75fb645fbaf3.camel@skynet.be> (raw)
In-Reply-To: <874jv1y83v.fsf@tromey.com>
On Mon, 2022-11-14 at 06:32 -0700, Tom Tromey wrote:
> > > > > > "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:
>
> Philippe> At work, I relatively often use ptype/o for Ada types.
> Philippe> As it only works in C mode, as part of our zillions of site aliases,
> Philippe> we have added:
> Philippe> alias Wc = with language c -- with annotate 0 --
> Philippe> (where annotate 0 avoids spurious language switch messages in the output).
>
> Philippe> So, waiting for Adacore to implement ptype/o for Ada (hint hint :)),
> Philippe> we use e.g.
> Philippe> (gdb) Wc ptype/o sometype
>
> I've considered it, and maybe the basics aren't too hard to do, but I
> didn't really know what to do with types that have a dynamic layout.
> Here the offsets would maybe have to be symbolic (which I'd suppose is a
> pain to implement) and holes couldn't really be determined.
Effectively, Ada types can have a very rich/sophisticated layout.
When I really need to have a in depth look at a complex type representation,
the compiler option -gnatR3 produces this (including the symbolic offsets
where needed, and "formulas" to compute offsets).
>
> Maybe gdb could just print a warning in this scenario and drop the '/o'
> modifier. That might be easier to do.
Currently, ptype /o an_ada_type just prints the type, without the offsets.
I have no problem with this behaviour, but producing a warning that /o
is ignored in Ada mode will not harm).
Thanks
Philippe
next prev parent reply other threads:[~2022-11-14 20:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 20:14 Tom Tromey
2022-11-08 21:19 ` Keith Seitz
2022-11-09 15:28 ` Tom Tromey
2022-11-11 19:50 ` Philippe Waroquiers
2022-11-14 13:32 ` Tom Tromey
2022-11-14 20:05 ` Philippe Waroquiers [this message]
2022-11-09 14:47 ` Andrew Burgess
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=3b90f6cdce3f8d4c3ca348e24cfa75fb645fbaf3.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
--cc=tromey@adacore.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).