This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Alternate approach to keeping convenience variables
- From: Eli Zaretskii <eliz at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Cc: Andrew STUBBS <andrew dot stubbs at st dot com>
- Date: Sat, 10 Dec 2005 11:06:53 +0200
- Subject: Re: [RFC] Alternate approach to keeping convenience variables
- References: <4381DC75.80800@st.com> <8f2776cb0511212138g2adef40cr1632365c00e3bebc@mail.gmail.com> <43835114.5060401@st.com> <20051209205923.GA21331@nevyn.them.org>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Fri, 9 Dec 2005 15:59:23 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Jim Blandy <jimb@red-bean.com>, gdb-patches@sources.redhat.com
>
> The tracepoint.c change is necessary for default.exp. To see why, try
> this:
> $ gdb
> (gdb) show convenience
> $trace_frame = -1
> $tpnum = 0
>
> vs.
> $ gdb /bin/ls
> (gdb) show convenience
> No debugger convenience variables now defined.
> Convenience variables have names starting with "$";
> use "set" as in "set $foo = 5" to define them.
>
> If you want the inconsistency resolve the other way round, please
> holler.
I understand that, with your change, GDB will behave as in the second
example, even if no executable file was loaded yet, yes? If so, I'm
for this change: I think GDB shouldn't show tracepoint-related
variables unless tracepoints are actually being used.
> How does this look?
Looks good to me, thanks. A few minor comments:
. copy_type_recursive looks very much like a kind of deep copy. Is
it? If so, perhaps we should call the function accordingly.
. Do you think we need to add or change anything in the manual as
result of this patch?
. How about adding a few words in gdbint.texinfo to describe the
strategy of your solution?