![]() |
| |||||||
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 |
| Registered User Join Date: Apr 2007
Posts: 282
| Source code in on machine A, binary is on machine B, is there a way for GDB to refer Source code in on machine A, its binary is on machine B. Binary was complied using -g option. When I debug it using gdb, it only shows the line number, not the code content at the line. Is there a way for GDB to refer source code at machine B during debug? Thank you! |
| meili100 is offline | |
| | #2 |
| Registered User Join Date: Mar 2003
Posts: 3,898
| |
| Codeplug is offline | |
| | #3 | |
| Registered User Join Date: Apr 2007
Posts: 282
| Quote: Suppose code on A machine is at 129.1.1.1:/home/test/code/ I am debugging on B machine. I launched gdb example_test (gdb) set substitute-path /home/test/code/ 129.1.1.1:/home/test/code/ No symbol "substitute" in current context. It seems "dir" or "set substitute-path" is just referring code on the same machine, but not between 2 machines? | |
| meili100 is offline | |
| | #4 |
| Kernel hacker Join Date: Jul 2007 Location: Farncombe, Surrey, England
Posts: 15,686
| Unless you can use NFS to mount a directory on machine A onto machine B, you have to copy the source from one to the other. It can be a real pain to do that, but it's unfortunately not possible to solve in any other way. [At least, I can't think of any other way]. -- Mats
__________________ Compilers can produce warnings - make the compiler programmers happy: Use them! Please don't PM me for help - and no, I don't do help over instant messengers. |
| matsp is offline | |
| | #5 |
| Registered User Join Date: Apr 2007
Posts: 282
| Thank you! One more question: why "set substitute-path" doesn't work in my gdb? (gdb) set substitute-path No symbol "substitute" in current context. |
| meili100 is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Search for patterns in source code | MiamiCuse | General Discussions | 3 | 10-23-2005 11:28 PM |
| learning to work with SDKs & source code out there... | psasidisrcum | C++ Programming | 3 | 05-14-2005 09:26 PM |
| Linux source code | afreedboy | Linux Programming | 6 | 06-25-2004 10:12 AM |
| fopen(); | GanglyLamb | C Programming | 8 | 11-03-2002 12:39 PM |
| C source code for int25 or code help | Unregistered | C Programming | 0 | 09-26-2001 02:04 AM |