Bug 7602

Summary: -var-create needs both frame and func
Product: gdb Reporter: ac131313
Component: miAssignee: Not yet assigned to anyone <unassigned>
Severity: normal CC: ac131313, gdb-prs, tromey
Priority: P3    
Version: unknown   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description ac131313 2002-04-17 15:18:01 UTC
[Converted from Gnats 497]

(Given GDB currently isn't very good at debugging optomized code, the probably of seeing this is very low - you need a frameless non-leaf function.)

To correctly identify a frame both the ``frame addr'' and the ``frame func'' are needed.  The ``frame func'' is used to break the case where two frames have the same ``frame addr''.

The command -var-create only takes a frame.  This means that it currently can't always correctly identify the current frame.

The command should be extended (option?) to also take the function (of course this requires the corresponding print frame code to print a addr/func pair when displaying frames.

Comment 1 ac131313 2003-03-31 14:32:34 UTC
From: Andrew Cagney <ac131313@redhat.com>
To: gdb-gnats@sources.redhat.com
Subject: Re: mi/497: -var-create needs both frame and func
Date: Mon, 31 Mar 2003 09:32:34 -0500

 GDB now has a frame ID and that contains both the frame and the func.
Comment 2 Tom Tromey 2023-08-31 17:23:28 UTC
Sounds like this was fixed 20 years ago.