From: Tom Tromey <tom@tromey.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Tom Tromey <tom@tromey.com>,
Xavier Roirand <roirand@adacore.com>,
gdb-patches@sourceware.org
Subject: Re: [RFC] expected behavior for "bt" command used with "set language ..." ?
Date: Wed, 24 Jan 2018 21:30:00 -0000 [thread overview]
Message-ID: <87fu6vhrld.fsf@tromey.com> (raw)
In-Reply-To: <20180123115152.26mi46zogpbuodn7@adacore.com> (Joel Brobecker's message of "Tue, 23 Jan 2018 15:51:52 +0400")
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> I don't really have a strong opinion on this. But I thought I'd mention
Joel> that using a language to dump the value of a variable described using
Joel> another language can be a bit iffy, and lead to fairly mysterious
Joel> errors. If I was a fan of FUD, I might even say it can lead to crashes,
Joel> if the code is not careful enough. For instance, who knows what it's
Joel> going to look like asking Ada to print come C++ stuff, or vice-versa...
To provide some context, I've sometimes had to "set lang c" to
investigate what is really going on. I can't recall ever wanting to do
this for "bt", but certainly I've done it many times with "print".
Overall I think that gdb's model of unified types implies that languages
ought to pass whatever they don't know on to the C printers. However,
of course it's difficult to know if this really happens in all cases.
Joel> As a user, the few times I have forced the language was to execute
Joel> one command (eg: print this Ada variable using pure C), and I tend
Joel> to switch back to "auto" asap.
Yep.
Joel> That being said, it looks like this is the behavior we've had for
Joel> quite a while, now, so it confirms the current approach probably
Joel> is not that much of any issue (if at all). Hence the lack of strong
Joel> opinion :).
Joel> For now, we'll go ahead with what Tom suggests.
FWIW I also don't have a very strong opinion about this.
Tom
next prev parent reply other threads:[~2018-01-24 21:30 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
2018-01-23 11:52 ` Joel Brobecker
2018-01-23 13:32 ` Matt Rice
2018-01-24 21:30 ` Tom Tromey [this message]
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=87fu6vhrld.fsf@tromey.com \
--to=tom@tromey.com \
--cc=brobecker@adacore.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