This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: [RFA] Re: x86 linux GDB and SIGALRM
- To: Mark Kettenis <kettenis at wins dot uva dot nl>
- Subject: Re: [RFA] Re: x86 linux GDB and SIGALRM
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- Date: 01 May 2000 16:05:09 -0500
- Cc: jlarmour at redhat dot co dot uk, gdb at sourceware dot cygnus dot com, gdb-patches at sourceware dot cygnus dot com, ezannoni at cygnus dot com
- References: <38DBF46A.8EABE9BF@redhat.co.uk> <38DF3159.DF837D7D@cygnus.com><200003271020.MAA25618@landau.wins.uva.nl><38F245CE.A2B7B5D0@redhat.co.uk><200005011853.e41Ir7N06091@delius.kettenis.local>
I last changed this code to allow GDB to step over calls to
pthread_create properly. If you can still do a "next" over a call to
pthread_create after your change, I have no further comments. The
test gdb.threads/linux-dp.exp ought to run on Linux and verify that
this works.
> [ There is a comment right before this code by JimB, so maybe you want
> to comment on this Jim. ]
>
> I think I've found the bug that's causing the problem Jonathan was
> seeing. This patch restores the behaviour of GDB 4.18. GDB 4.18 was
> released before handle_inferior_event() was introduced. At the point
> of the check_sigtramp2() call there was a "goto check_sigtramp2".
> Since in the old situation after the check_sigtramp2 code the
> keep_going label would be reached, I think that the we should call
> keep_going() here and return.
>
> If we don't this we'll land in the breakpoint handling code. The
> breakpoint handling code has the side-effect of cancelling any single
> stepping and stopping right away. Now if we single step, but the
> OS arranges to actually pass us a pending signal before actually
> stepping (which is what happens on Linux/i386), we'll never step and
> we see the behaviour that Jonathan observed.
>
> [ Perhaps I should modify the comment a bit, now that the code
> actually does keep_going. ]
>
> Mark
>
>
> 2000-05-01 Mark Kettenis <kettenis@gnu.org>
>
> * infrun.c (handle_inferior_event): Add missing call to keep_going
> and missing return when handling an ordinary signal from the
> inferior.
>
>
> Index: infrun.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/infrun.c,v
> retrieving revision 1.8
> diff -u -p -r1.8 infrun.c
> --- infrun.c 2000/04/20 11:00:34 1.8
> +++ infrun.c 2000/05/01 18:43:13
> @@ -2274,6 +2274,8 @@ handle_inferior_event (struct execution_
> the HP-UX maintainer to furnish a fix that doesn't break other
> platforms. --JimB, 20 May 1999 */
> check_sigtramp2 (ecs);
> + keep_going (ecs);
> + return;
> }
>
> /* Handle cases caused by hitting a breakpoint. */
>