From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20746 invoked by alias); 8 Mar 2015 20:04:06 -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 20730 invoked by uid 89); 8 Mar 2015 20:04:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pa0-f46.google.com Received: from mail-pa0-f46.google.com (HELO mail-pa0-f46.google.com) (209.85.220.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 08 Mar 2015 20:04:02 +0000 Received: by pabli10 with SMTP id li10so67189861pab.13 for ; Sun, 08 Mar 2015 13:04:01 -0700 (PDT) X-Received: by 10.70.125.162 with SMTP id mr2mr35502497pdb.21.1425845041065; Sun, 08 Mar 2015 13:04:01 -0700 (PDT) Received: from seba.sebabeach.org.gmail.com (173-13-178-53-sfba.hfc.comcastbusiness.net. [173.13.178.53]) by mx.google.com with ESMTPSA id 7sm7984760pdj.16.2015.03.08.13.03.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Mar 2015 13:04:00 -0700 (PDT) From: Doug Evans To: Andy Wingo Cc: gdb-patches , Alexander Smundak , Pedro Alves Subject: Re: Frame sniffers in Python/Guile/* References: <87d24r4jgx.fsf@igalia.com> Date: Sun, 08 Mar 2015 20:04:00 -0000 In-Reply-To: <87d24r4jgx.fsf@igalia.com> (Andy Wingo's message of "Mon, 02 Mar 2015 14:28:14 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00202.txt.bz2 Andy Wingo writes: > [...] > > And so on. From what I can tell, all of this is because there is no > selected frame. I recognize that this situation reflects reality in > some way -- we're still building the selected frame -- but is there any > way that we could have GDB be in a more "normal" state while the unwind > callback is running? I think one gets into trouble if one tries to apply the word "normal" to gdb. :-) Things like selected_frame and get_current_arch are annoying, global state generally is. Anything you can do untangle the need for global state will be welcome. But as you've observed, this is a bit of a special case. Sometimes the architecture depends on the frame. And until we know the architecture we don't know what the registers are. And so on. I don't have any simple suggestions. Maybe others will. A lot of times improving/fixing gdb requires first improving/fixing several other parts first. Welcome to gdb. :-)