This is the mail archive of the gdb-patches@sources.redhat.com 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]

Hardware Watchpoint/Breakpoints and Remote Protocol


The support for Hardware Watchpoints and Breakpoints in the remote protocol is currently unusable. The code is all there (mostly) but it can never be activated because it is forced to think all targets have no resources to support these. Currently there is no way to make the remote protocol think anything other.

Attached is a patch that creates two commands from GDB to allow the number of Hardware Watchpoints and Breakpoints supported by a remote target to be set to something other than zero. Doing this makes them work good.

Ideally, the target would be interogated to find out what it supports, but that is a bigger harder patch and would require much greater work than this simple fix. (Arguably for little real gain).

Its also not very accurate, because sometimes hardware allows (for example) different numbers of watchpoints, depending on the type of watchpoints that have been set. (The MPC8XX watchpoint unit for example).

Comments welcome, it works excellent for me using Motorola MPC862 Hardware watchpoint support, and a BDM interface communicating to GDB with the remote protocol over TCPIP.

The patch was made against a version of GDB just prior to V5.3, but it applies to V5.3 fine.

Regards,
Steven

Attachment: patch-enable-hw-remote-features
Description: application/java-vm


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