This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Watchpoint on an unloaded shared library(2)
On Mon, Dec 29, 2008 at 09:13:17AM +0400, Joel Brobecker wrote:
> > a) Print b->exp_string and b->cond_string.
> > We might make some effort to display it like as its expression is
> > valid for annotations... I have no idea whether it is worthwhile
> > to try.
>
> I think that this is the best we can do (print exp_string).
> I personally wouldn't worry about trying to massage the string
> into something that would look like we're printing an expression.
> I'm not even sure why we use "print_expression (b->exp) rather
> than printing exp_string directly - perhaps someone does?
I don't know, but it drives me nuts. This causes:
(gdb) break *0x10000000
Breakpoint 1 at 0x10000000
(gdb) watch *0x10000000
Watchpoint 2: *268435456
(gdb) info break
Num Type Disp Enb Address What
1 breakpoint keep y 0x10000000
2 watchpoint keep y *268435456
I'm sure there are some cases which are more ambiguous if you print
the string, but I'd risk some ambiguity to get rid of that :-)
--
Daniel Jacobowitz
CodeSourcery