Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Breakpoint duplication over new inferiors
@ 2011-05-03  9:31 Kevin Pouget
  2011-05-03 10:22 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Pouget @ 2011-05-03  9:31 UTC (permalink / raw)
  To: gdb

Hello,

I'd like to understand how breakpoints are supposed to be duplicated
when a new inferior is started/attached (in my cases)/forked.

Namely, with a code like:
>
> 1    int main() {
> 2        if (fork()) {
> 3            send (0,0,0);
> 4        } else {
> 5            recv(0,0,0) ;
> 6        }
> 7    }

and
>
> (gdb) b main
> Breakpoint 1 at 0x400558: file fork.c, line 2.
> (gdb) b send
> Breakpoint 2 at 0x400448
> (gdb) set detach-on-fork off
> (gdb) run
> ...
> (gdb) info breakpoint
> Num     Type           Disp Enb Address            What
> 1       breakpoint     keep y   <MULTIPLE>
>     breakpoint already hit 1 time
> 1.1                         y     0x0000000000400558 in main at fork.c:2 inf 2
> 1.2                         y     0x0000000000400558 in main at fork.c:2 inf 1
> 2       breakpoint     keep y   0x0000003cbd0e1a60 <send> inf 1

it seems that `libc' breakpoints are not correctly duplicated.
According to my investigation, the difference occurs in
> breakpoint.c:addr_string_to_sals -- sals = decode_line_1 (&s, 1, (struct symtab *) NULL, 0, NULL);

which doesn't return two locations, but only one ...
is it a bug? any idea what to do to solve it?


cordially,

Kevin


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-03 13:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-03  9:31 Breakpoint duplication over new inferiors Kevin Pouget
2011-05-03 10:22 ` Pedro Alves
2011-05-03 13:20   ` Kevin Pouget

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox