This is the mail archive of the 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]

i386 debugging registers


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
   instruction pipeline.


 * 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.



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