new user: SIGSEGV: interpretation of error message

Hi,

I am new user of pgdbg and have problems to interpreat the answer of the debugger to my first trial:

I have made a command ‘run’ after having launched pgdbg:
$ pgdbg preprecol.a
pgdbg> run

and the answer is:
libm.so.6 loaded by ld-linux-x86-64.so.2.
libc.so.6 loaded by ld-linux-x86-64.so.2.
Signalled SIGSEGV at 0x438E03, function fio_usw_write
438E03: F B6 3 movzbl (%rbx),%eax

I have no idea how to interpreat that, at which line of the code to search for which problem?

Anyone can help me?

Thanking you in advance for your help.

Damien Sirjacobs
GHER - Univ. Liège

“Signalled SIGSEGV” means that your program got an exception caused by an invalid memory access.

To find the line of code you can try using the ‘stacktrace’ command, in the GUI by selecting the Window|Stack menu item, or in the command line interface by typing ‘stack’. Depending on what happened with the bad memory access you may or may not get something useful from this command.

If you don’t get anything useful, you can try setting some breakpoints in your program (using the ‘break’ command using a line number as the argument) or by clicking in the ‘Events’ column in the source pane of the GUI. Then run to each breakpoint to narrow down where the problem is occurring.

Since your application is in fio_usw_write it looks like it is blowing up in a Fortran runtime call that is trying to do a write, so I’d look for a PRINT or WRITE statement. It is probably trying to write an array with an out-of-bounds subscript or something like that.

Good luck finding your problem!