From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53714 invoked by alias); 11 Sep 2015 18:49:51 -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 53704 invoked by uid 89); 11 Sep 2015 18:49:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-wi0-f177.google.com Received: from mail-wi0-f177.google.com (HELO mail-wi0-f177.google.com) (209.85.212.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 11 Sep 2015 18:49:49 +0000 Received: by wicfx3 with SMTP id fx3so68113052wic.0 for ; Fri, 11 Sep 2015 11:49:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8jhheRnpXxwqSDAxkanhy0P15GktixAZid/+CIR6B4g=; b=Jn+5y8a8xHGm8IB/Tn4xUEiFB57Sfn6n/Yeb6GrykJqR/XQ9dZ54SmXGgXYdMfmSqV d3ilUPehrxt3i06LMTSksHOicsFXhdLytNFDenVXCB2u01bnHCvnYbo797vfMZGpPuJY GrOII6OXS4Y/FWJuh8sjbYYydOGWYK6wVDcnOmgXzy0hELyhxFCTQ2OvzKYm7M49MtG7 iDvFPA2KGt5TDft/y1ZiAzVLD6E+1yz7CuxhAQfIYPhtsQEo39ZkB5qsiCmIn4msEvtx 3t2XuJwJKIlgpzwQCsqQJ4Os7vuARsKTwTnWb6ZeUsjMq6u6gEC+pEYvRVBpCNrdjpEN Tvjg== X-Gm-Message-State: ALoCoQnKpSS+poCc9Mnt6KHgHetlXFG9g0/rfKcC2jFI7khcplMd7Wly/Lkw484Jwz+CfoylSWdt X-Received: by 10.180.8.200 with SMTP id t8mr7221152wia.34.1441997386394; Fri, 11 Sep 2015 11:49:46 -0700 (PDT) Received: from localhost (host81-131-206-173.range81-131.btcentralplus.com. [81.131.206.173]) by smtp.gmail.com with ESMTPSA id mz12sm461441wic.4.2015.09.11.11.49.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Sep 2015 11:49:45 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 0/9] Changes to frame selection. Date: Fri, 11 Sep 2015 18:49:00 -0000 Message-Id: X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00248.txt.bz2 This series of patches makes changes to how frames are selected. This effects the 'frame', 'select-frame', and 'info frame' commands. If you only select frame by the gdb assigned frame number then nothing should change for you. If you select frames by frame address, or create temporary frames by specifying addresses then you'll need to use a slightly longer command in the future. These changes have been discussed before at a high level: https://sourceware.org/ml/gdb-patches/2015-07/msg00241.html https://sourceware.org/ml/gdb/2014-11/msg00028.html There's even a related bug: https://sourceware.org/bugzilla/show_bug.cgi?id=18074 The idea is to remove some of the over-loading in the frame selection of the commands like 'frame'. Currently the parameters passed to 'frame' are first treated as a frame number, then as an address to look for, and finally, if that all fails, a frame is created using the parameter as an address. After this patch series we now have the following commands: (gdb) frame level NUMBER # Find frame at level NUMBER (gdb) frame NUMBER # Same as 'frame level NUMBER' (gdb) frame address ADDRESS # Find frame by stack ADDRESS (gdb) frame function NAME # Find frame by function NAME (gdb) frame create STACK-ADDRESS # Create frame at STACK-ADDRESS (gdb) frame create STACK-ADDRESS PC-ADDRESS # Create frame at STACK-ADDRESS # and PC-ADDRESS [ The use of 'frame level' made sense to me, but I can change this to 'frame number' if folk feel strongly. ] The functions that find a frame will now error if a matching frame can't be found. This patch series includes two patches posted here: https://sourceware.org/ml/gdb-patches/2015-07/msg00626.html they never got reviewed, and the versions in this patch series replace the older versions. All feedback welcome. Thanks, Andrew --- Andrew Burgess (9): gdb: Check the selected-frame in frame_find_by_id. gdb: Select a frame for frame_info. gdb: Make use of safe-ctype.h header. gdb/doc: Restructure frame command documentation. gdb: Fix bug with dbx style func command. gdb: Avoid unneeded calls to parse_frame_specification. gdb: Simplify parse_frame_specification. gdb: Split func_command into two parts. gdb: Change how frames are selected for 'frame' and 'info frame'. gdb/ChangeLog | 76 ++++++ gdb/NEWS | 6 + gdb/doc/ChangeLog | 14 + gdb/doc/gdb.texinfo | 349 +++++++++++++------------ gdb/frame.c | 39 ++- gdb/frame.h | 4 + gdb/mi/mi-cmd-stack.c | 16 +- gdb/stack.c | 476 ++++++++++++++++++++++++---------- gdb/stack.h | 2 +- gdb/testsuite/ChangeLog | 23 ++ gdb/testsuite/gdb.base/dbx.exp | 6 +- gdb/testsuite/gdb.base/frame-cmds.c | 52 ++++ gdb/testsuite/gdb.base/frame-cmds.exp | 36 +++ gdb/testsuite/gdb.mi/mi-var-frame.c | 34 +++ gdb/testsuite/gdb.mi/mi-var-frame.exp | 81 ++++++ 15 files changed, 902 insertions(+), 312 deletions(-) create mode 100644 gdb/testsuite/gdb.base/frame-cmds.c create mode 100644 gdb/testsuite/gdb.base/frame-cmds.exp create mode 100644 gdb/testsuite/gdb.mi/mi-var-frame.c create mode 100644 gdb/testsuite/gdb.mi/mi-var-frame.exp -- 2.5.1