This is the mail archive of the gdb-patches@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]

Re: [RFC] Alternate approach to keeping convenience variables


> 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?


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