Debugging a problem

Programming, for all ages and all languages.
Post Reply
mariuszp
Member
Member
Posts: 587
Joined: Sat Oct 16, 2010 3:38 pm

Debugging a problem

Post 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?
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: Debugging a problem

Post 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.
mariuszp
Member
Member
Posts: 587
Joined: Sat Oct 16, 2010 3:38 pm

Re: Debugging a problem

Post 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 :)
Post Reply