Accessing Debug Registers in Linux



Hi devs,
I want to understand software debugging in OSs. So, I've found that
Debuggers in Windows uses Debug API + Thread Context Functions to do
the debugging. e.g. Changing value of debug registers in privilege
level 3 is not allowed, so for providing hardware debug support they
use Thread Context Routines, to retrieve the current context structure,
and then modifying only the debug registers, and finally superimposing
the Context structure. The Context structure is different for different
architectures and is available in WinNT.h in Win32 SDK.

But my problem, how it happens in Linux. In Linux, context structure,
i.e. ucontext (or similar) is defined asm/ucontext.h header file, and
it doesn't includes space for Debug Registers present in IA32(e)
processors. So, how does GDB (GNU Debugger) provides hardware debugging
support.

Thanx in advance,
Ashish Shukla alias Wah Java !!

Wah Java !!

.



Relevant Pages

  • How to debug a TSP by running TAPISRV.EXE under Win2K SP4
    ... Everything I read about debugging a TSP by ... that says "On Windows Server 2003 family, Windows XP, and Windows ... TAPISRV runs within the context of Svchost.exe. ... How can I debug my C++ TSP by attaching to ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Office or InDesign breaks VS 2005 debugging?
    ... Given tha I was using and debugging the sub-projects in this solution before ... some getting used to) and the debug symbols for the child project are no ...
    (microsoft.public.vsnet.debugging)
  • Re: GetThreadContext and debug register problem
    ... debugger while my app is executing. ... debugger could go into debug mode is setting debug registers and generating ... CONTEXT structure, and then pass it to SetThreadContext. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Cant Debug COM Interface
    ... When I start to debug the application the DLL is ... a com client in vb.net which is referencing the interface of the COM Server ... If I use this application as Host application I can debug without ... For debugging I can start the ...
    (microsoft.public.vsnet.debugging)
  • Re: C++ Workable Mainframe Debuggers
    ... you have to be able to read assembler to do ... IBM Debug Tool for z/OS is available. ... You can license Debug Tool as MLC or, in the form of the Debug Tool ... For graphical debugging use Rational Developer for System z (or ...
    (bit.listserv.ibm-main)