Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* gdb 7.0.1 - non-stop and/or detach-on-fork not working
@ 2009-12-22 21:07 Nenad Vukicevic
  2009-12-22 22:28 ` Nenad Vukicevic
  0 siblings, 1 reply; 2+ messages in thread
From: Nenad Vukicevic @ 2009-12-22 21:07 UTC (permalink / raw)
  To: gdb

Has there been any change in this area since 7.0.50 12/02/09 snapshot?

I am using these options:

set target-async on
set non-stop on
set detach-on-fork off

and have a simple app that forks two processes. 7.0.1 fails to break on
already established breakpoints.

Any idea what might went wrong?

Nenad

Here are the logs from 7.0.50 and 7.0.1 runs:


-------------------------------------------------------------------------------
gdb-7.0.50.20091202

Breakpoint 1 at 0x4006c3: file t.c, line 55.
Breakpoint 2 at 0x40062c: file t.c, line 11.
Breakpoint 3 at 0x400653: file t.c, line 25.
Breakpoint 4 at 0x4006af: file t.c, line 48.
(gdb) r
Starting program: /a/gdb-7.0.50.20091202/wrk/gdb/test/t

Breakpoint 1, main () at t.c:55
55        int cnt = 0;
(gdb) c
Continuing.
Start...
[New process 5719]
Created 5719

Breakpoint 2, child_proc1 () at t.c:11
11        int cnt = 0;
(gdb) [New process 5720]
Created 5720

Breakpoint 3, child_proc2 () at t.c:25
25        int cnt = 0;

Breakpoint 4, main_proc () at t.c:48
48        sleep(1000);
info threads
   3 process 5720  child_proc2 () at t.c:25
   2 process 5719  child_proc1 () at t.c:11
* 1 process 5689  main_proc () at t.c:48
(gdb) info breakpoints
Num     Type           Disp Enb Address            What
1       breakpoint     keep y <MULTIPLE>
         breakpoint already hit 1 time
1.1                         y     0x00000000004006c3 in main at t.c:55 inf 3
1.2                         y     0x00000000004006c3 in main at t.c:55 inf 2
1.3                         y     0x00000000004006c3 in main at t.c:55 inf 1
2       breakpoint     keep y <MULTIPLE>
         breakpoint already hit 1 time
2.1                         y     0x000000000040062c in child_proc1 at 
t.c:11 inf 3
2.2                         y     0x000000000040062c in child_proc1 at 
t.c:11 inf 2
2.3                         y     0x000000000040062c in child_proc1 at 
t.c:11 inf 1
3       breakpoint     keep y <MULTIPLE>
         breakpoint already hit 1 time
3.1                         y     0x0000000000400653 in child_proc2 at 
t.c:25 inf 3
3.2                         y     0x0000000000400653 in child_proc2 at 
t.c:25 inf 2
3.3                         y     0x0000000000400653 in child_proc2 at 
t.c:25 inf 1
4       breakpoint     keep y <MULTIPLE>
         breakpoint already hit 1 time
4.1                         y     0x00000000004006af in main_proc at 
t.c:48 inf 3
4.2                         y     0x00000000004006af in main_proc at 
t.c:48 inf 2
4.3                         y     0x00000000004006af in main_proc at 
t.c:48 inf

------------------------------------------------------------------------------
gdb-7.0.1

Breakpoint 1 at 0x4006c3: file t.c, line 55.
Breakpoint 2 at 0x40062c: file t.c, line 11.
Breakpoint 3 at 0x400653: file t.c, line 25.
Breakpoint 4 at 0x4006af: file t.c, line 48.
(gdb) r
Starting program: /a/gdb-7.0.1/wrk/gdb/test/t

Breakpoint 1, main () at t.c:55
55        int cnt = 0;
(gdb) c&
Continuing.
(gdb) Start...
[New process 10321]
Created 10321
[New process 10322]
Created 10322

Breakpoint 4, main_proc () at t.c:48
48        sleep(1000);
info threads
   3 process 10322  0x0000003db44a42d6 in fork () from /lib64/libc.so.6
   2 process 10321  0x0000003db44a42d6 in fork () from /lib64/libc.so.6
* 1 process 10291  main_proc () at t.c:48
(gdb) info break
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x00000000004006c3 in main at t.c:55
         breakpoint already hit 1 time
2       breakpoint     keep y   0x000000000040062c in child_proc1 at t.c:11
3       breakpoint     keep y   0x0000000000400653 in child_proc2 at t.c:25
4       breakpoint     keep y   0x00000000004006af in main_proc at t.c:48
         breakpoint already hit 1 time
(gdb) thread apply all c

Thread 3 (process 10322):
Continuing.

Thread 2 (process 10321):
Continuing.

Thread 1 (process 10291):
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x0000003db44a41b0 in __nanosleep_nocancel () from /lib64/libc.so.6
(gdb)
Program received signal SIGINT, Interrupt.
0x0000003db44a41b0 in __nanosleep_nocancel () from /lib64/libc.so.6

Program received signal SIGINT, Interrupt.
0x0000003db44a41b0 in __nanosleep_nocancel () from /lib64/libc.so.6
info thread
   3 process 10322  0x0000003db44a41b0 in __nanosleep_nocancel () from 
/lib64/libc.so.6
   2 process 10321  0x0000003db44a41b0 in __nanosleep_nocancel () from 
/lib64/libc.so.6
* 1 process 10291  0x0000003db44a41b0 in __nanosleep_nocancel () from 
/lib64/libc.so.6
(gdb) info break
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x00000000004006c3 in main at t.c:55
         breakpoint already hit 1 time
2       breakpoint     keep y   0x000000000040062c in child_proc1 at t.c:11
3       breakpoint     keep y   0x0000000000400653 in child_proc2 at t.c:25
4       breakpoint     keep y   0x00000000004006af in main_proc at t.c:48
         breakpoint already hit 1 time
(gdb)


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

end of thread, other threads:[~2009-12-22 22:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-22 21:07 gdb 7.0.1 - non-stop and/or detach-on-fork not working Nenad Vukicevic
2009-12-22 22:28 ` Nenad Vukicevic

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