This is the mail archive of the gdb@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: conditional breakpoint with (char* ) string condition


Daniel Jacobowitz <drow@false.org> writes:
> On Mon, May 15, 2006 at 11:50:30AM -0700, Jim Blandy wrote:
>> 
>> Daniel Jacobowitz <drow@false.org> writes:
>> > On Fri, May 12, 2006 at 11:00:16AM -0700, Jim Blandy wrote:
>> >> Should we establish a convention of starting GDB-provided convenience
>> >> variable names with _, to avoid conflicting with script variables?
>> >> Thus, $_strcmp and $_strlen?
>> >
>> > Or should they have a $gdb_ prefix?  Or $_gdb_?
>> 
>> Or $this_is_a_gdb_variable_20060515_GNU_prvt_ISO_IEC_9989:1999_?  :)
>> (There must be some way to get a UUID and 'http' in there...)
>
> Hey, I was serious about $gdb_...

Oh.  Sorry.  I thought you were mocking my suggestion.

I guess I feel like we're encroaching on the user's space no matter
what we do, so we might as well make it terse.  And there are are $_
variables defined by GDB already, I think.  But I'd be happy with '_'
or 'gdb_'.

>> Hey, maybe we could just take over some prefix like $- that doesn't
>> conflict with the user and register namespace at all.
>
> Nice try :-)
>
> (gdb) p 2
> $1 = 2
> (gdb) p $-1
> $2 = 1

Darn.  I'd forgotten $ is a token all by itself.


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