This is the mail archive of the gdb-patches@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] |
If I understand you correctly, this commands are only useful in gdbserver+valgrind. If gdb is running in normal remote target, using `set remote hardware-watchpoint-length-limit' will make GDB work incorrectly.
Interesting remark. Waiting for the legal papers to be signed, it made me work a little bit more, and allowed me to find a bug in the current gdbserver hw watchpoint handling on x86 : linux-x86-low.c:511: A problem internal to GDBserver has been detected. Assertion `DR_FIRSTADDR <= regnum && regnum < DR_LASTADDR' failed. I am attaching a new version of the patch which fixes this problem + attaching the test program.
I think the current behaviour is inconsistent (whatever the gdbserver) and the patch is making it more consistent.
Currently: the user can configure the nr of remote hw watchpoints (default unlimited). GDB tries to place the watchpoints, and if it fails, the user can then decide what to do (e.g. delete some watchpoints, switch to software watchpoints, etc). For a too long watchpoint, GDB silently switches to software watchpoints, which is I find surprising : it will then run (hundreds of times?) slower without warning.
With the patch, a too long watchpoint will be handled similarly to too many watchpoints. The user can then decide what to do for too long watchpoints e.g. switch to software watchpoints, disable or delete some watchpoints, ...
If you enable remote hw points debugging, you will see that after having deleted all watchpoints, some debug registers are still set. The patch fixes this by adding a rollback.
Question: is there somewhere a 'how to test gdbserver for dummies' ? I read the gdb internal doc, and could only find a reference to setting GDBSERVER=... variable when doing make check, but that does not run the gdbserver tests (I believe). I took a look at dejagnu documentation, but that is not for a dummy like me :). In the meantime, I have only done limited manual tests.
Attachment:
s.c
Description: Binary data
Attachment:
set-lenght-limit-5.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |