public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Keith Seitz <keiths@redhat.com>
Cc: Tom Tromey <tromey@adacore.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH] Allow 'ptype/o' for assembly
Date: Wed, 09 Nov 2022 08:28:32 -0700	[thread overview]
Message-ID: <87tu382llr.fsf@tromey.com> (raw)
In-Reply-To: <cdbb5d9d-6a4a-fdad-d216-7391da148c7f@redhat.com> (Keith Seitz's message of "Tue, 8 Nov 2022 13:19:57 -0800")

>> PR exp/28359 points out that 'ptype/o' does not work when the current
>> language is "asm".

Keith> I hesitate to bring this up, but...

Keith> Why would the current language matter in this case?
Keith> [I understand that the print options are set before
Keith> the expression is evaluated...]

Keith> Since we have the type of the symbol, couldn't we
Keith> simply use that? Maybe it's not worth being so
Keith> pedantic?

Ordinarily this would be fine, but for non-C languages it's sometimes
useful to "set lang c" and see what the C type-printer thinks.  For
example, in Ada there are "fat pointers" that are really just a kind of
struct.  Ada will always print these as ordinary access types, but it
can be handy to look under the hood and see that it's really a struct
type.

Maybe there's some better way to do this kind of thing.  Like we could
add "ptype/c" for "C style printing".

Keith> In any case, it LGTM. I recommend you approve your patch.

Thanks.

Tom

  reply	other threads:[~2022-11-09 15:28 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 [this message]
2022-11-11 19:50     ` Philippe Waroquiers
2022-11-14 13:32       ` Tom Tromey
2022-11-14 20:05         ` Philippe Waroquiers
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=87tu382llr.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).