After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 541362 - Breakpoints are set in the wrong file
Breakpoints are set in the wrong file
Status: RESOLVED NOTGNOME
Product: anjuta
Classification: Applications
Component: plugins: gdb
SVN TRUNK
Other Linux
: Normal normal
: ---
Assigned To: Sébastien Granjoux
Anjuta maintainers
: 605673 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-07-03 09:04 UTC by Johannes Schmid
Modified: 2009-12-31 17:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Log file (9.72 KB, application/x-gzip)
2008-07-05 10:25 UTC, Johannes Schmid
Details

Description Johannes Schmid 2008-07-03 09:04:41 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.
Comment 1 Sébastien Granjoux 2008-07-04 19:30:33 UTC
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.
Comment 2 Sébastien Granjoux 2008-07-04 20:54:57 UTC
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
Comment 3 Johannes Schmid 2008-07-05 10:25:41 UTC
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
Comment 4 Johannes Schmid 2008-07-05 10:30:32 UTC
I noticed that it works for other lines. If I set a breakpoint at line 238 it works. Strange!
Comment 5 Sébastien Granjoux 2008-07-05 10:40:44 UTC
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).
Comment 6 Sébastien Granjoux 2008-07-20 20:47:55 UTC
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.
Comment 7 Sébastien Granjoux 2009-01-22 21:54:04 UTC
I have bug report in gdb bug database here:
http://sourceware.org/bugzilla/show_bug.cgi?id=9583
Comment 8 Johannes Schmid 2009-11-21 17:50:39 UTC
Thanks for fixing this in gdb! I will close this bug now as it is/was no anjuta bug!
Comment 9 Sébastien Granjoux 2009-12-31 17:42:28 UTC
*** Bug 605673 has been marked as a duplicate of this bug. ***