Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

Debug Exception Handling in Linux

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


strack at Mathematik

May 7, 2012, 6:03 AM

Post #1 of 1 (47 views)
Permalink
Debug Exception Handling in Linux

Hello,

I'm trying to single-step processes in a HVM Linux guest using Xen on Intel VT. Especially i've changed the Ether patch for Xen to be able to handle Linux guests. My Problem is that every single step the RIP stored in the VMCS points to kernel instructions (>0xC0000000) and thus only kernel instructions are stepped. To achieve single-stepping, both the exception bitmap and the rflags are masked with the trap flag, debug register 6's 14th bit is set (single-stepping) and the exception is send to the guest using

vmx_inject_hw_exception(v, TRAP_debug, VMX_DELIVER_NO_ERROR_CODE);

Has anybody a clue why the RIP points to kernel instructions or where the userland RIP is stored at this time? To avoid misunderstandings, i'm not searching for Xen specific answers. It would be very helpful if you could enlight me how the linux kernel handles debug exceptions or where the userland RIP is stored.

Kind regards
Christian

PS: Please add my address to CC

---
Ether patch: http://ether.gtisc.gatech.edu/source.html--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.