From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33327 invoked by alias); 24 Jan 2018 21:30:59 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 33213 invoked by uid 89); 24 Jan 2018 21:30:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*r:cmsmtp, opinion X-HELO: gateway24.websitewelcome.com Received: from gateway24.websitewelcome.com (HELO gateway24.websitewelcome.com) (192.185.51.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 24 Jan 2018 21:30:56 +0000 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 881DF5233C for ; Wed, 24 Jan 2018 15:30:55 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id eSdDeTEWaBUMKeSdDeYlMQ; Wed, 24 Jan 2018 15:30:55 -0600 Received: from 71-218-90-63.hlrn.qwest.net ([71.218.90.63]:43686 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eeSdD-002lHX-6k; Wed, 24 Jan 2018 15:30:55 -0600 From: Tom Tromey To: Joel Brobecker Cc: Tom Tromey , Xavier Roirand , gdb-patches@sourceware.org Subject: Re: [RFC] expected behavior for "bt" command used with "set language ..." ? References: <87vafxk3us.fsf@tromey.com> <20180123115152.26mi46zogpbuodn7@adacore.com> Date: Wed, 24 Jan 2018 21:30:00 -0000 In-Reply-To: <20180123115152.26mi46zogpbuodn7@adacore.com> (Joel Brobecker's message of "Tue, 23 Jan 2018 15:51:52 +0400") Message-ID: <87fu6vhrld.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Source-L: No X-Exim-ID: 1eeSdD-002lHX-6k X-Source-Sender: 71-218-90-63.hlrn.qwest.net (pokyo) [71.218.90.63]:43686 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-01/txt/msg00493.txt.bz2 >>>>> "Joel" == Joel Brobecker 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