This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] Display exact entered expression for watchpoints
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Pierre Muller <muller at ics dot u-strasbg dot fr>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 14 Nov 2002 14:53:20 -0500
- Subject: Re: [RFC] Display exact entered expression for watchpoints
- References: <5.0.2.1.2.20021114112441.032c9fb0@ics.u-strasbg.fr>
On Thu, Nov 14, 2002 at 12:00:18PM +0100, Pierre Muller wrote:
> When I watch a memory location,
> I almost always use hexadecimal notation.
>
> For instance lets say that I want to watch
> the memory containing the value of gdb_stderr
> On my linux box
> (top-gdb)p &gdb_stderr
> returns
> $1 = (struct ui_file **) 0x823b5cc
> (ok, here I could simply use 'watch gdb_stderr,
> but in some other cases like dynamically allocated memory I can't).
> if I enter
> (top-gdb) watch *0x823b5cc
> Hardware watchpoint 3: *136558028
> (top-gdb) inf b
> Num Type Disp Enb Address What
> 1 breakpoint keep y 0x080f0d79 in internal_error
> at ../../src/origdb/utils.c:810
> 2 breakpoint keep y 0x080783eb in info_command
> at ../../src/origdb/cli/cli-cmds.c:202
> silent
> return
> 3 hw watchpoint keep y *136558028
> (top-gdb)
>
>
> After my patch, I get
> (top-gdb) watch *0x823b5cc
> Hardware watchpoint 3: *0x823b5cc
> (top-gdb) inf b
> Num Type Disp Enb Address What
> 1 breakpoint keep y 0x080f0d79 in internal_error
> at ../../src/origdb/utils.c:810
> 2 breakpoint keep y 0x080783eb in info_command
> at ../../src/origdb/cli/cli-cmds.c:202
> silent
> return
> 3 hw watchpoint keep y *0x823b5cc
>
>
> I really prefer the later,
I like this behavior a lot better too; I see the number and get
hopelessly confused as to what I'm watching :) Michael, Jim, do you
think this will cause any problems? Watch doesn't take an implicit
argument the way that break does, so a string should always be
available.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer