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: Why no hwatch command in gdb ?


> Date: Thu, 10 Mar 2011 11:34:09 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: gdb@sourceware.org
> 
> > "does not work well now" means ?
> 
> GNU gdb (GDB) 7.2.50.20110310-cvs
> This GDB was configured as "x86_64-unknown-linux-gnu".
> (gdb) watch gdb_stdout
> Hardware watchpoint 2: gdb_stdout
> (gdb) watch gdb_stderr
> Hardware watchpoint 3: gdb_stderr
> (gdb) watch gdb_stdlog
> Hardware watchpoint 4: gdb_stdlog
> (gdb) watch gdb_stdin
> Hardware watchpoint 5: gdb_stdin
> (gdb) watch gdb_stdtargin
> Hardware watchpoint 6: gdb_stdtargin
> (gdb) continue 
> Continuing.
> Warning:
> Could not insert hardware watchpoint 5.
> Could not insert hardware breakpoints:
> You may have requested too many hardware breakpoints/watchpoints.
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Well, you did, didn't you?

If you expect GDB to know up front that they are too many, this is
hard to impossible with today's architecture, because only when the
watchpoints are inserted by the target, it is possible to know whether
there are enough resources for that.

(At least that's how things were back when I hacked x86 watchpoints.)


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