[PATCH/Obvious] Fix error in last ARI fix for gnu-nat.h

Pierre Muller
2009-04-21T11:26:57Z

I missed to add a continuation line in the proc_debug macro in gnu-nat.h

Committed as obvious fix.

I discovered this while looking at the
THREAD_STATE_* macros (listed in ARI).

These macros are all defined only once in
config/i386/nm-i386gnu.h
and used only in gnu-nat.c source
unconditionally. This probably means that gnu hurd can only
be compiled for i386 processor anyhow...
Which in turn, means that we could probably move the stuff
from gnu-nat.c to i386gnu-nat.c

I can send a patch for this, but
I will not be able to test compilation,
as this would require access to gnu HURD.

Pierre Muller
Pascal language support maintainer for GDB

Index: gnu-nat.h
===================================================================
RCS file: /cvs/src/src/gdb/gnu-nat.h,v
retrieving revision 1.10
diff -u -p -r1.10 gnu-nat.h
--- gnu-nat.h 17 Apr 2009 15:44:28 -0000 1.10
+++ gnu-nat.h 21 Apr 2009 07:29:32 -0000
@@ -89,7 +89,7 @@ extern char *proc_string (struct proc *p
#define proc_debug(_proc, msg, args...) \
do { struct proc *__proc = (_proc); \
debug ("{proc %d/%d %s}: " msg, \
- __proc_pid (__proc), __proc->tid,
+ __proc_pid (__proc), __proc->tid, \
host_address_to_string (__proc) , ##args); } while (0)

extern int gnu_debug_flag;

For info, here is the old wrong patch, that I committed :

> Index: src/gdb/gnu-nat.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/gnu-nat.h,v
> retrieving revision 1.9
> diff -u -p -r1.9 gnu-nat.h
> --- src/gdb/gnu-nat.h 3 Jan 2009 05:57:51 -0000 1.9
> +++ src/gdb/gnu-nat.h 16 Apr 2009 23:42:58 -0000
> @@ -88,8 +88,9 @@ extern char *proc_string (struct proc *p
>
> #define proc_debug(_proc, msg, args...) \
> do { struct proc *__proc = (_proc); \
> - debug ("{proc %d/%d %p}: " msg, \
> - __proc_pid (__proc), __proc->tid, __proc , ##args); } while
> (0)
> + debug ("{proc %d/%d %s}: " msg, \
> + __proc_pid (__proc), __proc->tid,
> + host_address_to_string (__proc) , ##args); } while (0)
>
> extern int gnu_debug_flag;
>