public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Xavier Roirand <roirand@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] expected behavior for "bt" command used with "set language ..." ?
Date: Fri, 19 Jan 2018 20:09:00 -0000	[thread overview]
Message-ID: <87vafxk3us.fsf@tromey.com> (raw)
In-Reply-To: <dac19f88-9639-baf1-fa19-3ae115d197a2@adacore.com> (Xavier	Roirand's message of "Wed, 17 Jan 2018 18:17:16 +0100")

>>>>> "Xavier" == Xavier Roirand <roirand@adacore.com> writes:

Xavier> When printing one frame arguments, should we do it using the language
Xavier> of the frame, and it may be different for each frame in a single "bt"
Xavier> command or should we leave things as they are, and possibly allow the
Xavier> "bt" command to display weird values for frame arguments or even
Xavier> worse, crash GDB because the user set language manually so he has to
Xavier> know what he's doing ?

I tend to think the answer should be:

* If the language is "auto", then use each frame's language; otherwise
* If the user specified a particular language, use that language for
  everything.

Xavier> This can also probably be done by adding frame language parameter to a
Xavier> lot of language specific functions for each language and finally to
Xavier> value_cast but this second solution requires a huge amount of work.

That would be good to have but I don't think it ought to be tied to this
particular project.  Certainly plenty of other code already just sets
and resets the global.

Tom

  reply	other threads:[~2018-01-19 20:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17 17:17 Xavier Roirand
2018-01-19 20:09 ` Tom Tromey [this message]
2018-01-23 11:52   ` Joel Brobecker
2018-01-23 13:32     ` Matt Rice
2018-01-24 21:30     ` Tom Tromey
2018-01-25 12:13     ` Pedro Alves

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=87vafxk3us.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=roirand@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).