Getting fault address from a SIGSEGV
Hi all,
For a project I'm working on, I would need to get the fault address of
a ptraced child, whose SIGSEGV I've caught. I've tried to dig in UML source code to get how this is done, but I get lost after having followed the chain segv_handler <- sig_info <- sig_handler_common_tt <- "r = &TASK_REGS(get_current())->tt;", since there the status I was looking for is stored in the thread_struct.regs, but I don't know where in the code such status is filled, and so where such information is taken from :-)
Hope you can light my way through the code ;-)
Signature · 15 lines
Mat/tia Belletti - Graduate student @ cs.unibo.it ICQ: 33292311 - email: [email protected] IRC: RedGlow - site(s): http://mbellett.web.cs.unibo.it/ [email protected]/Gaim - Linux user 299762 @ machine 213003 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 2 lines · [email protected] said:
but I don't know where in the code such status is filled, and so where such information is taken from :-)
On x86 (and x86_64), the fault address is sigcontext.cr2, the access type is stored in .err, and the CPU fault type is in .trapno.
Jeff
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel