This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug mi/9583] -break-insert failed when several source files have the same name
- From: "seb dot sfo at free dot fr" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 18 Jan 2009 21:48:56 -0000
- Subject: [Bug mi/9583] -break-insert failed when several source files have the same name
- References: <20080720111801.9583.seb.sfo@free.fr>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From seb dot sfo at free dot fr 2009-01-18 21:48 -------
(In reply to comment #3)
> 1) The breakpoint locations are from different files (I guess we already knew
> that).
Yes, for me it looks like that gdb put a breakpoint in each file named plugin.c
without taking care of the file path.
> 2) The file plugins/language-manager/plugin.c isn't one of those files.
>
> > info break
> > Num Type Disp Enb Address What
> > 1 breakpoint keep y <MULTIPLE> 0xb5203453
> ^^^^^^^^^^
I don't see a problem here, this is breakpoint 1.1 in info break output. As, I
have said, I haven't put the breakpoint in exactly the same program so the
breakpoints addresses are a bit different comparing to my first log.
> 3) The hexaecimal address on the above line. This is the only line that
> -break-list outputs and in your earlier log it looks like
> and the addr field is duplicated.
For this program the output of -break-list is
-break-list
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="1",type="breakpoint",disp="keep",enabled="y",addr="<MULTIPLE>",addr="0xb5203453",times="1"}]}
It looks quite similar with 2 address field too.
> I don't see how this can happen in the gdb code. Are you sure this is vanilla
> gdb?
I'm quite sure, I have compiled it from the gdb-6.8.tar.bz2. The last entry in
the ChangeLog file is:
2008-03-27 Joel Brobecker <brobecker@adacore.com>
* NEWS: Replace "Changes since GDB 6.7" into changes in GDB 6.8".
> What does "show version" say? e.g for me: GNU gdb (GDB) 6.8.50.20090116-cvs
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
> Is it possible to set a breakpoint after plugins/language-manager/plugin.c:232
> has loaded and and do "info break" to see if this results in a normal
> breakpoint at the rght place?
It's not very easy to do but I will do it if you think that it's useful.
I have tried to continue after the first break too see if gdb put others
breakpoints. It was a bit difficult to do because the first breakpoints is hit a
lots of time. So at the end, I have disabled it and stop the program when all
plugins have been loaded. I get the following result for info break
info break
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE> 0xb5206453
breakpoint already hit 333 times
1.1 y 0xb5206453 in ilanguage_get_from_mime_type at
plugin.c:232
1.2 y 0xb4fce0ca in deactivate_plugin at plugin.c:232
1.3 y 0xb4fc3447 in value_added_fm_current_file at
plugin.c:232
1.4 y 0xb333cd83 in skip_iter_to_previous_line at
plugin.c:232
2 breakpoint keep y <MULTIPLE> 0xb5ccff7b
2.1 y 0xb5ccff7b in
project_manager_plugin_instance_init at plugin.c:1648
2.2 y 0xb5a6c600 in prefs_init at plugin.c:1648
done
(gdb)
So, we get more breakpoints (which is expected has more plugins have been
loaded). I get the strange behavior on both breakpoints. gdb hasn't put any of
the two expected breakpoints.
The first breakpoint plugins/debug-manager/plugin.c:232 should be in a function
named value_added_project_root_uri.
The second one plugins/language-support-cpp-java/plugin.c:1648 should be in a
function named on_value_added_current_editor.
Both plugin are loaded at that time.
In order to check this, I have tried to set one of the original breakpoint
-break-insert
/home/seb2008.1/Programmation/Anjuta/anjuta/plugins/debug-manager/plugin.c:232
done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="<MULTIPLE>",addr="0xb5206453",times="0"}
(gdb)
info break
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE> 0xb5206453
breakpoint already hit 333 times
1.1 y 0xb5206453 in ilanguage_get_from_mime_type at
plugin.c:232
1.2 y 0xb4fce0ca in deactivate_plugin at plugin.c:232
1.3 y 0xb4fc3447 in value_added_fm_current_file at
plugin.c:232
1.4 y 0xb333cd83 in skip_iter_to_previous_line at
plugin.c:232
2 breakpoint keep y <MULTIPLE> 0xb5ccff7b
2.1 y 0xb5ccff7b in
project_manager_plugin_instance_init at plugin.c:1648
2.2 y 0xb5a6c600 in prefs_init at plugin.c:1648
3 breakpoint keep y <MULTIPLE> 0xb5206453
3.1 y 0xb5206453 in ilanguage_get_from_mime_type at
plugin.c:232
3.2 y 0xb4fce0ca in deactivate_plugin at plugin.c:232
3.3 y 0xb4fc3447 in value_added_fm_current_file at
plugin.c:232
3.4 y 0xb333cd83 in skip_iter_to_previous_line at
plugin.c:232
done
The breakpoint stays quite strange.
info line
/home/seb2008.1/Programmation/Anjuta/anjuta/plugins/debug-manager/plugin.c:232
Line 232 of "plugin.c" starts at address 0xb5206453
<ilanguage_get_from_mime_type+35> and ends at 0xb520645f
<ilanguage_get_from_mime_type+47>.
/home/seb/Programmation/Anjuta/anjuta/plugins/language-manager/plugin.c:232:5683:beg:0xb5206453
info line get a wrong result.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=9583
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.