This is the mail archive of the
mailing list for the GDB project.
i386 debugging registers
- To: gdb at sourceware dot cygnus dot com
- Subject: i386 debugging registers
- From: Mark Kettenis <kettenis at wins dot uva dot nl>
- Date: Mon, 12 Jun 2000 01:22:06 +0200
- CC: nsd at cygnus dot com, Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de, rjl at sco dot com, eliz at gnu dot org, cfg at cygnus dot com, jtc at redback dot com, jimb at cygnus dot com
While trying to build a generic layer for implementing hardware
watchpoint for the various i386 native ports, I found myself starting
to implement some sort of register cache for the debugging registers.
Instead actually doing so, I wondered whether it would be a good idea
to add the debug registers to the standard register cache.
* It makes my life easier :-)
* They are, you know, erh... registers.
* Some people might actually want to fiddle with them, especially
with the control register which has some bits that control the
* It might confuse our users. Fiddling with the debug registers
might interfere with the hardware watchpoint support. For example,
Assigning to one of the address registers will probably make GDB
forget about some hardware watchpoints and produce some weird
warnings. It will also likely cause some spurious SIGTRAPS.
* The exact effect of modifying the debugging registers is somewhat
dependent on the underlying OS. To make sure GDB's hardware
watchpoints work as expected, some additional frobbing of the
debugging might be necessary in the code that actually fetches
and/or stores the registers. The user will see those frobbed
registers instead of the real ones.