This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/18074] crash using "info frame"


https://sourceware.org/bugzilla/show_bug.cgi?id=18074

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
(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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]