How to find location in code from address
I have a program that I get a SEGV fault from. It only happens once in a while on a customer site so connecting to a debugger is not an option.
I have captured the Address of the segmentation fault using segaction.
Is there anyway to use this address to determine where in my code the SEGV occurred?
Re: How to find location in code from address
Quote:
Is there anyway to use this address to determine where in my code the SEGV occurred?
I don't know how you could use this information. I think the address is an actual memory address, not a relative one, so it would depend on the environment on the customer machine at the time the crash occurred. In addition, the debug vs. release mode memory layouts are likely to be different because of the additional code the compiler and linker add to support debugging.
Re: How to find location in code from address
Quote:
Originally Posted by
weaver4
I have a program that I get a SEGV fault from.
Linux? Is the program writing a core file on crash? You could possibly use the core file. You may need to set the core file size ulimit greater than zero to get one, and it would probably help if the user was running a debug build
https://unix.stackexchange.com/quest...n-linux/202443