Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Nenad Vukicevic <nenad@intrepid.com>
To: gdb@sourceware.org
Subject: Re: gdb 7.0.1 - non-stop and/or detach-on-fork not working
Date: Tue, 22 Dec 2009 22:28:00 -0000	[thread overview]
Message-ID: <4B314802.3040405@intrepid.com> (raw)
In-Reply-To: <4B3134EF.6020409@intrepid.com>

Sorry for the mistake. I upgraded instead to the latest snapshot and 
everything is in
order.

Nenad

On 12/22/2009 1:06 PM, Nenad Vukicevic wrote:
> 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)


      reply	other threads:[~2009-12-22 22:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-22 21:07 Nenad Vukicevic
2009-12-22 22:28 ` Nenad Vukicevic [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B314802.3040405@intrepid.com \
    --to=nenad@intrepid.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox