Accessing Debug Registers in Linux
- From: "WahJava" <spamtrap@xxxxxxxxxx>
- Date: Thu, 29 Sep 2005 18:50:02 +0000 (UTC)
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 !!
.
- Follow-Ups:
- Re: Accessing Debug Registers in Linux
- From: Robert Redelmeier
- Re: Accessing Debug Registers in Linux
- Prev by Date: Linux asm code
- Next by Date: Re: c++ inline assembler and oop
- Previous by thread: Linux asm code
- Next by thread: Re: Accessing Debug Registers in Linux
- Index(es):
Relevant Pages
|