This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Avoid error from multiple runs in windows gcc


The patch below has been checked in.  It fixes a long-standing problem
where typing "run" more than once caused this error:

"error return /netrel/src/gdb-20041228-1/gdb/win32-nat.c:2038 was 6"

cgf

2005-01-23  Christopher Faylor  <cgf@timesys.com>

	* win32-nat.c: Update copyright year.
	(child_init_thread_list): Set thread linked list point to NULL so that
	it won't be reused after clearing.

Index: win32-nat.c
===================================================================
RCS file: /cvs/uberbaum/gdb/win32-nat.c,v
retrieving revision 1.102
diff -u -p -r1.102 win32-nat.c
--- win32-nat.c	12 Jan 2005 18:31:34 -0000	1.102
+++ win32-nat.c	23 Jan 2005 05:09:12 -0000
@@ -1,6 +1,6 @@
 /* Target-vector operations for controlling win32 child processes, for GDB.
 
-   Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+   Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
 
    Contributed by Cygnus Solutions, A Red Hat Company.
@@ -300,6 +300,7 @@ child_init_thread_list (void)
       (void) CloseHandle (here->h);
       xfree (here);
     }
+  thread_head.next = NULL;
 }
 
 /* Delete a thread from the list of threads */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]