new user: SIGSEGV: interpretation of error message


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: loaded by loaded by
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!