GNOME Bugzilla – Bug 541362
Breakpoints are set in the wrong file
Last modified: 2009-12-31 17:42:28 UTC
I tried to debug anjuta and set a breakpoint at plugins/language-support-cpp-java/plugin.c:1695 but apparently the breakpoint is set in some other plugin.c file. Seems like the debugger plugin doesn't get all the files with the same name right.
I have tried this with your latest patch for bug #541313 and I don't see a problem here. As the breakpoint uses the saved signal that you have fixed. It's possible that you have fixed this one too at the same time. Could you check again ? Else, could you tell me exactly how do you set the breakpoints ? and what do you see ? I have loaded 9 plugin.c files from different plugins and set a breakpoint in each of them using the editor context menu Add Breakpoint without seeing anything strange.
I have put here a breakpoint in plugins/debug-manager/plugin.c:232 and it stopped at the expected address. I don't really see how it could get the wrong file. Anyway it doesn't seem to be linked to bug #541313. Could you: - set ANJUTA_LOG=2 ("export ANJUTA=2"). - run anjuta storing the output in a log file ("anjuta > debug.log") - set the breakpoint - run the debugger until it stops at a wrong breakpoint - send me (or put it here) the log file debug.log
Created attachment 114017 [details] Log file Here you are: - Started anjuta - Set breakpoint at debug-manager/plugin.c:232 - Run->Debug Program - Program stops with cursor jumping to tools/plugin.c:232 - Abort anjuta with Ctrl-C
I noticed that it works for other lines. If I set a breakpoint at line 238 it works. Strange!
Thanks for the log file. It seems that the problems comes from gdb. I'm using an older version here 6.6. In the log file anjuta generates the right command: -break-insert "\"/home/jhs/devel/anjuta-trunk/plugins/debug-manager/plugin.c\":232" The reply from gdb is a bit strange, I don't understand why there is MULTIPLE in address. ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<MULTIPLE>",addr="0xb567ec9a",times="0"} Anyway, I need to install this version of gdb to understand exactly what's happen. It will probably take me some time, especially as I'm currently working on something else (the build plugin).
I have tried here and get this bug with gdb 6.8. I think, gdb doesn't take in account the file path anymore for breakpoints. So in your case, if you change the line number and reach this line first in the right file it will work. It's quite annoying but I think it is a bug in gdb. I have send a bug report and I'm now waiting to see if I get some comments.
I have bug report in gdb bug database here: http://sourceware.org/bugzilla/show_bug.cgi?id=9583
Thanks for fixing this in gdb! I will close this bug now as it is/was no anjuta bug!
*** Bug 605673 has been marked as a duplicate of this bug. ***