Page 1 of 1

Debugging a problem

Posted: Wed Mar 19, 2014 4:20 pm
by mariuszp
My OS seems to crash whenever there are two processes running, and I want to debug the problem. I know the address of the instruction that causes this problem, but I wonder how I could convert that address into a source filename and line number (perhaps by passing the -ggdb option to GCC and somehow extracting it from the ELF?)

Does anyone know if and how that's possible?

Re: Debugging a problem

Posted: Wed Mar 19, 2014 4:29 pm
by sortie
You may wish to use objdump -dSL that dumps the assembly, the source input line and the line number. A bit of grep magic will reduce the noise to what you are looking for.

Re: Debugging a problem

Posted: Wed Mar 19, 2014 4:35 pm
by mariuszp
sortie wrote:You may wish to use objdump -dSL that dumps the assembly, the source input line and the line number. A bit of grep magic will reduce the noise to what you are looking for.
Thank you, that helped :)