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: Hardware breakpoint limitation issue during the gdb regression test


On Thu, 09 Aug 2012 12:30:27 +0200, Mark Kettenis wrote:
> No, x86 has even less hardware breakpoints (4).  But it will fall back
> to using software breakpoints.

It will not.

But in fact it is better this way as even suggested by Markus Metzger as if
GDB drops to using software watchpoints the debugging just "locks up" and user
does not know why.

(gdb) start
(gdb) l 1,1
1	long v1, v2, v3, v4, v5;
(gdb) watch v1
Hardware watchpoint 2: v1
(gdb) watch v2
Hardware watchpoint 3: v2
(gdb) watch v3
Hardware watchpoint 4: v3
(gdb) watch v4
Hardware watchpoint 5: v4
(gdb) watch v5
Hardware watchpoint 6: v5
(gdb) info breakpoints 
Num     Type           Disp Enb Address            What
2       hw watchpoint  keep y                      v1
3       hw watchpoint  keep y                      v2
4       hw watchpoint  keep y                      v3
5       hw watchpoint  keep y                      v4
6       hw watchpoint  keep y                      v5
(gdb) c
Continuing.
Warning:
Could not insert hardware watchpoint 5.
Could not insert hardware breakpoints:
You may have requested too many hardware breakpoints/watchpoints.


It is more a bug that in this case no error message is given:

(gdb) l 2,2
2	long a[5];
(gdb) watch a
Watchpoint 2: a


Regards,
Jan


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