This is the mail archive of the gdb-patches@sourceware.org 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]

Fix gdbserver build


Hui Zhu wrote on the gdb@ list:
> gcc -c  -Wall -g    -I. -I../../../src/gdb/gdbserver
> -I../../../src/gdb/gdbserver/../common
> -I../../../src/gdb/gdbserver/../regformats
> -I../../../src/gdb/gdbserver/../../include
> ../../../src/gdb/gdbserver/linux-low.c -DUSE_THREAD_DB
> ../../../src/gdb/gdbserver/linux-low.c: In function
> 'usr_store_inferior_registers':
> ../../../src/gdb/gdbserver/linux-low.c:2011: error: 'pid' undeclared
> (first use in this function)
> ../../../src/gdb/gdbserver/linux-low.c:2011: error: (Each undeclared
> identifier is reported only once
> ../../../src/gdb/gdbserver/linux-low.c:2011: error: for each function
> it appears in.)
> make[4]: *** [linux-low.o] Error 1

Ah, the wonders of conditional compilation...

Sorry that I missed this.  Fixed as below.

-- 
Pedro Alves

2009-04-02  Pedro Alves  <pedro@codesourcery.com>

	* linux-low.c (usr_store_inferior_registers): Declare local `pid'
	variable.

---
 gdb/gdbserver/linux-low.c |    1 +
 1 file changed, 1 insertion(+)

Index: src/gdb/gdbserver/linux-low.c
===================================================================
--- src.orig/gdb/gdbserver/linux-low.c	2009-04-03 12:26:31.000000000 +0100
+++ src/gdb/gdbserver/linux-low.c	2009-04-03 12:27:25.000000000 +0100
@@ -1985,6 +1985,7 @@ usr_store_inferior_registers (int regno)
   CORE_ADDR regaddr;
   int i, size;
   char *buf;
+  int pid;
 
   if (regno >= 0)
     {


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