Address of instruction causing SIGSEGV in external program
Posted
by karramba
on Stack Overflow
See other posts from Stack Overflow
or by karramba
Published on 2010-06-15T21:52:19Z
Indexed on
2010/06/15
22:22 UTC
Read the original article
Hit count: 212
I want to get address of instruction that causes external program to SIGSEGV. I tried using ptrace for this, but I'm getting EIP from kernel space (probably default signal handler?). How GDB is able to get the correct EIP?
Is there a way to make GDB provide this information using some API?
edit: I don't have sources of the program, only binary executable. I need automation, so I can't simply use "run", "info registers" in GDB. I want to implement "info registers" in my own mini-debugger :)
© Stack Overflow or respective owner