Sysprogs forums › Forums › VisualGDB › break points issue
- This topic has 6 replies, 3 voices, and was last updated 11 years, 3 months ago by sdgsdg.
-
AuthorPosts
-
September 17, 2013 at 09:58 #644sdgsdgParticipant
Hi,
I’m using setup like
Linux dev system for building source, Linux test system to launch program, Windows system for VisualGDB with Visualstudio 2008.
I can launch app and run it. But when I try to put breakpoint I get mapping issue. Trying to resolve symbols also does not help. Error I see is “currently loaded gdb symbols have no record of filed called…..”
The program I’m trying to debug has deep hierarchical code structure, and I can map directories properly for file sync.I tried a simple program which has similar setup for debug but it’s just a single .cpp (in same directory as executable) file and I could debug it properly.
What may be issue here, and how to resolve this.
Thanks in advance.
September 17, 2013 at 20:50 #2633ketParticipantHi,
First of all make sure that all of the code is built in debug mode with symbols. If your project depends on libraries that you want to debug as well, these libraries must also be built with symbols.
Secondly, have you tried the breakpoints diagnostic tool to fix the path mapping? It is described in the breakpoint problem diagnosing tutorial (relevant from point 19 onwards):
http://visualgdb.com/tutorials/linux/bp-diag/September 18, 2013 at 16:44 #2634sdgsdgParticipantYes its debug build and I can debug in gdb.
Also if I put assertion I can debug step by step in visual gdb and even I can trace call stack but I can’t set breakpoint 🙁Does visual gdb takes relative path or exact code paths from symbols?
September 18, 2013 at 20:32 #2635ketParticipantHi,
VisualGDB first tries to use the full path when setting breakpoints. If that fails, then the path from ‘info sources’ is used.
To analyze the breakpoint issue further please give us a full GDB log. So please enable diagnostic logging in the GDB settings page of VisualGDB Project Properties. Then start debugging, replicate your scenario i.e. try to set a breakpoint, stop debugging, send us the gdb log file from your project directory.
September 19, 2013 at 04:51 #2636sdgsdgParticipantSeems not able to local file on test system where I’m running program, whereas when test button shows pass on file sync option in vgdb settings.
Resolve bp also shows similar error ie no record of file.-break-insert -f /root/main.cpp:382
&”No source file named /root/main.cpp.n”
^done,bkpt={number=”5″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”“,pending=”/root/main.cpp:382″,times=”0″,original-location=”/root/main.cpp:382”}
-break-info 5
^done,BreakpointTable={nr_rows=”1″,nr_cols=”6″,hdr=[{width=”7″,alignment=”-1″,col_name=”number”,colhdr=”Num”},{width=”14″,alignment=”-1″,col_name=”type”,colhdr=”Type”},{width=”4″,alignment=”-1″,col_name=”disp”,colhdr=”Disp”},{width=”3″,alignment=”-1″,col_name=”enabled”,colhdr=”Enb”},{width=”10″,alignment=”-1″,col_name=”addr”,colhdr=”Address”},{width=”40″,alignment=”2″,col_name=”what”,colhdr=”What”}],body=[bkpt={number=”5″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”“,pending=”/root/main.cpp:382″,times=”0″,original-location=”/root/main.cpp:382”}]}
-break-after 5 0
^doneSeptember 20, 2013 at 04:07 #2637supportKeymasterHi,
Looks like your file path mapping is wrong. Please run the “bt” command once stopped inside main.cpp to see what path GDB reports. Please provide the output of the “bt” command here so that we could advise you further.
September 20, 2013 at 11:33 #2638sdgsdgParticipantSeems I found solution and problem in visual gdb, it searches for exact paths and not relative (even if it’s selected as relative).
When I tweaked my test system dir mapping same as dev system things started working.eg dev system path is /home/sdgsdg/test and if I mount it at test system as /root/tmp/sdgsdg/test things does not work.
This is how you can repro issue.
On Linux dev system write a simple program and put output in some different directory than source file (ie testout). Then map it on another Linux test system with some different dir mapping as I have mentioned with sshfs, map source from Dev system on Win system. Now run visual gdb bp see does not hit.
If out file is in same dir as source then it’s not seen. -
AuthorPosts
- You must be logged in to reply to this topic.