خرید بک لینک

Hi there!

I want to apologize if this question is very stupid.

I want to debug a program with 'gdb' and the program has been compiled using this instruction in 'gcc':

Code:

gcc -g test.c -o test
Then I copied the executable file to another machine, but gdb can not find the sources. This is the output when I try to set a break point:

Code:

Reading symbols from test...done. 
(gdb) break test.c:7 
Breakpoint 1 at 0x8048426: file test.c, line 7. 
(gdb) start  
Temporary breakpoint 2 at 0x8048426: file test.c, line 7. 
Starting program: /home/user/test  
 
Breakpoint 1, main () at test.c:7 
7    test.c: No such file or directory.
Is there a way to see the source code of a program that has been compiled from another machine in gdb?

Or is it mandatory to have the source code in the same machine as gdb?

Thank you very much!

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 1 فروردين 1395 ساعت: 23:08

صفحه بندی