From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76786 invoked by alias); 3 Mar 2015 15:04:02 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 76737 invoked by uid 48); 3 Mar 2015 15:04:01 -0000 From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/18074] crash using "info frame" Date: Tue, 03 Mar 2015 16:21:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q1/txt/msg00372.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18074 --- Comment #2 from Tom Tromey --- (In reply to Pedro Alves from comment #1) > "frame ADDR" / "info frame ADDR" are very broken at several levels, IMO. Yeah. Also the docs could use a little love :-) > Even though in your case, you explicitly wanted a frame at an address, the > fact that the user can typo a frame number and GDB ends up creating a new > frame on the spot is quite misleading. It should be an explicit switch for > "create frame if you can't find it in the frame frame", IMO: Good idea. > In addition, I think I'd expect "bt" after "frame ADDR" to attempt to > backtracing starting at that created frame. [...] > Maybe parse_frame_specification should override current_frame. But it isn't > that simple: we also need to handle the cases where gdb switches > thread/frame behind the user's back temporarily, and then restores them > (do_restore_current_thread_cleanup / restore_selected_frame use), in which > case we'd need to restore that cooked up frame. It didn't even occur to me that "frame ADDR" might affect gdb's state. I was viewing it as purely a "playing around" command, where I might try something and see if the results look sensible. I would not mind a separate command to change gdb's state. Like "bt assuming ADDR" or "frame remember ADDR" or, well, whatever spelling seems good. -- You are receiving this mail because: You are on the CC list for the bug.