* Breakpoint doesn't take in account full name in gdb 6.8
@ 2008-07-24 21:44 Sébastien Granjoux
2008-07-25 8:00 ` Vladimir Prus
0 siblings, 1 reply; 3+ messages in thread
From: Sébastien Granjoux @ 2008-07-24 21:44 UTC (permalink / raw)
To: gdb
Hello,
Gdb 6.8 breakpoints don't take care of the path of the source files.
I'm debugging a program which includes several source files having the
same name (in different directories). The program is compiled with
debugging information including the full path and gdb 6.6 was working
fine on this. Now, when I set a breakpoint in one of these files, the
program stopped in the first file found even if I have set the
breakpoint in another file.
I was using mi2 interpreter and I get the following:
gdb -interpreter=mi2 /usr/local/bin/anjuta
(gdb)
-break-insert -f
/home/seb/Programmation/Anjuta/anjuta/plugins/debug-manager/plugin.c:232
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",
pending="/home/seb/Programmation/Anjuta/anjuta/plugins/debug-manager/plugin.c:232",
times="0"}
(gdb)
-exec-run
^running
(gdb)
*stopped,reason="breakpoint-hit",bkptno="1",thread-id="1",
frame={addr="0xb5532c72",func="atp_plugin_class_init",
args=[{name="klass",value="0x8607488"}],file="plugin.c",
fullname="/home/seb/Programmation/Anjuta/anjuta/plugins/tools/plugin.c",line="232"}
(gdb)
-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="0xb57917dd",times="1"}]}
I have tried without using mi2 commands and get the same result. Tell me
if you need more information about this bug.
Sébastien
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Breakpoint doesn't take in account full name in gdb 6.8
2008-07-24 21:44 Breakpoint doesn't take in account full name in gdb 6.8 Sébastien Granjoux
@ 2008-07-25 8:00 ` Vladimir Prus
2008-07-25 18:22 ` Sébastien Granjoux
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Prus @ 2008-07-25 8:00 UTC (permalink / raw)
To: gdb
Sébastien Granjoux wrote:
> Hello,
>
> Gdb 6.8 breakpoints don't take care of the path of the source files.
>
> I'm debugging a program which includes several source files having the
> same name (in different directories). The program is compiled with
> debugging information including the full path and gdb 6.6 was working
> fine on this. Now, when I set a breakpoint in one of these files, the
> program stopped in the first file found even if I have set the
> breakpoint in another file.
>
> I was using mi2 interpreter and I get the following:
>
> gdb -interpreter=mi2 /usr/local/bin/anjuta
>
> (gdb)
> -break-insert -f
> /home/seb/Programmation/Anjuta/anjuta/plugins/debug-manager/plugin.c:232
....
> *stopped,reason="breakpoint-hit",bkptno="1",thread-id="1",
> frame={addr="0xb5532c72",func="atp_plugin_class_init",
> args=[{name="klass",value="0x8607488"}],file="plugin.c",
> fullname="/home/seb/Programmation/Anjuta/anjuta/plugins/tools/plugin.c",line="232"}
What functions are at the location where you've set breakpoint, and at the location
where GDB has stopped.
> (gdb)
> -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="0xb57917dd",times="1"}]}
What is the output of "info break"?
- Volodya
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Breakpoint doesn't take in account full name in gdb 6.8
2008-07-25 8:00 ` Vladimir Prus
@ 2008-07-25 18:22 ` Sébastien Granjoux
0 siblings, 0 replies; 3+ messages in thread
From: Sébastien Granjoux @ 2008-07-25 18:22 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb
Hi,
Vladimir Prus a écrit :
> What functions are at the location where you've set breakpoint, and at the location
> where GDB has stopped.
I have set the breakpoint at
/home/seb/Programmation/Anjuta/anjuta/plugins/debug-manager/plugin.c:232
in a function named value_added_project_root_uri.
Gdb stops at /home/seb/Programmation/Anjuta/anjuta/plugins/tools/plugin.c
in a function named atp_plugin_class_init
> What is the output of "info break"?
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE> 0xb57c27dd
breakpoint already hit 1 time
1.1 y 0xb57c27dd in file_manager_activate
at plugin.c:232
1.2 y 0xb57a0350 in on_refresh_idle
at plugin.c:232
1.3 y 0xb5563c72 in atp_plugin_class_init
at plugin.c:232
It seems that gdb has put a breakpoint in every file named plugin.c. In
Anjuta most plugin have a the main file named plugin.c and are loaded
dynamically. When gdb stops all plugins have not been loaded. I have run
"info break" when all plugins have been loaded I get:
Num Type Disp Enb Address What
1 breakpoint keep y <MULTIPLE> 0xb57c17dd
breakpoint already hit 1 time
1.1 y 0xb57c17dd in file_manager_activate
at plugin.c:232
1.2 y 0xb579f350 in on_refresh_idle
at plugin.c:232
1.3 y 0xb5562c72 in atp_plugin_class_init
at plugin.c:232
1.4 y 0xb429bcfd in value_added_fm_current_file
at plugin.c:232
1.5 y 0xb1e0a733 in ipreferences_merge
at plugin.c:232
1.6 y 0xb34462c8 in ilanguage_get_from_mime_type
at plugin.c:232
1.7 y 0xb1d6fc73 in skip_iter_to_previous_line
at plugin.c:232
I would expect even more breakpoints, as I have 20 plugins loaded and
most of them have a plugin.c file.
Sébastien
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-25 17:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-24 21:44 Breakpoint doesn't take in account full name in gdb 6.8 Sébastien Granjoux
2008-07-25 8:00 ` Vladimir Prus
2008-07-25 18:22 ` Sébastien Granjoux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox