2

I am debugging my c code using gdb on ubuntu 12.04 and below is the command for that:

msz@ubuntu:~$ gdb m core

After running the above command, i get following message:

warning: Can't read pathname for load map: Input/output error.

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff8cdfe000
Core was generated by `./m'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000000000400962 in matmultunopt ()

What are the meanings of these two warnings? what can be concluded from the last line i.e

#0  0x0000000000400962 in matmultunopt ()

Of course it gives some hint that there is a some issue in matmultunopt (), but what is :

#0  0x0000000000400962

and what are the warning actually telling me ?

UPADTE

Now i did this using -g and got the following message:

warning: Can't read pathname for load map: Input/output error.

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fffde2c8000
Core was generated by `./m'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000000000400962 in matmultunopt (matrix1=0x3, matrix2=0xd7d030, 
    resultant=0xd7d050, rows1=2, colmns1=2, rows2=2, colmns2=2)
    at mattmgpuf1.c:115
115         {   double a = matrix1[i*rows2 + k];

Still, I am unable to understand the meaning of the given line:

 #0  0x0000000000400962 in matmultunopt (matrix1=0x3, matrix2=0xd7d030, 
        resultant=0xd7d050, rows1=2, colmns1=2, rows2=2, colmns2=2)
3
  • Did you compile m with symbols? (option -g to gcc) Had there been enough diskspace to write the full core. What does ulimit -a tell you about the maximum core size? Commented Jan 8, 2014 at 7:50
  • Shouldn't the call to gdb be: gdb ./m core? Commented Jan 8, 2014 at 7:53
  • Does the build of m match the build which created the core. Or did you recompile m after the core had been created by a previous version of m. Commented Jan 8, 2014 at 7:56

1 Answer 1

2

The debugger's output explained:

#0  0x0000000000400962 in matmultunopt (matrix1=0x3, matrix2=0xd7d030, resultant=0xd7d050, rows1=2, colmns1=2, rows2=2, colmns2=2) at mattmgpuf1.c:115
^^  ^----------------^    ^----------^  ^---------------------------------------------------------------------------------------^     ^--------------^
|   |                     |             |                                                                                             |
|   |                     |             |                                                                                             +-- source file name and line where the program stopped
|   |                     |             +-- current function's parameters and their values
|   |                     +-- current function
|   +-- program address
+-- stack/call level
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.