This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[ob] Fix gdbserver build with old compilers
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Fri, 3 Mar 2006 09:49:36 -0500
- Subject: [ob] Fix gdbserver build with old compilers
Oopsie. I'm usually careful about this mistake, but I definitely
missed one.
--
Daniel Jacobowitz
CodeSourcery
2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
* remote-utils.c (prepare_resume_reply): Move declaration
of gdb_id_from_wait to the top of the block.
Index: gdbserver/remote-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/remote-utils.c,v
retrieving revision 1.27
diff -u -p -r1.27 remote-utils.c
--- gdbserver/remote-utils.c 23 Dec 2005 18:11:55 -0000 1.27
+++ gdbserver/remote-utils.c 3 Mar 2006 14:48:07 -0000
@@ -681,9 +681,11 @@ prepare_resume_reply (char *buf, char st
if (using_threads)
{
+ unsigned int gdb_id_from_wait;
+
/* FIXME right place to set this? */
thread_from_wait = ((struct inferior_list_entry *)current_inferior)->id;
- unsigned int gdb_id_from_wait = thread_to_gdb_id (current_inferior);
+ gdb_id_from_wait = thread_to_gdb_id (current_inferior);
if (debug_threads)
fprintf (stderr, "Writing resume reply for %ld\n\n", thread_from_wait);