This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] ARI cleanups
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 05 Jan 2004 14:54:44 -0500
- Subject: [commit] ARI cleanups
Hello,
This fixes a number of coding (and dead code) nits identified by the ARI
(http://sources.redhat.com/gdb/current/ari/).
committed,
Andrew
2004-01-05 Andrew Cagney <cagney@redhat.com>
* libunwind-frame.h (struct frame_id): Add opaque declaration,
move to start of file.
* i386-tdep.h (struct regcache): Add opaque declaration.
* config/ia64/nm-linux.h (struct target_ops): Add opaque
declaration.
* ia64-tdep.c (ia64_find_proc_info_x): Do not use __FUNCTION__.
(ia64_gdbarch_init): Use "GNU/Linux" in comment.
* win32-nat.c (fake_create_process): Use ISO C style definition.
* stabsread.c (define_symbol): Delete #ifndef
DEPRECATED_USE_REGISTER_NOT_ARG wrapper around
stabs_argument_has_addr call, macro never defined.
Index: i386-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.h,v
retrieving revision 1.34
diff -u -r1.34 i386-tdep.h
--- i386-tdep.h 28 Dec 2003 19:45:35 -0000 1.34
+++ i386-tdep.h 5 Jan 2004 19:20:29 -0000
@@ -27,6 +27,7 @@
struct gdbarch;
struct reggroup;
struct regset;
+struct regcache;
/* GDB's i386 target supports both the 32-bit Intel Architecture
(IA-32) and the 64-bit AMD x86-64 architecture. Internally it uses
Index: ia64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ia64-tdep.c,v
retrieving revision 1.106
diff -u -r1.106 ia64-tdep.c
--- ia64-tdep.c 13 Dec 2003 03:51:56 -0000 1.106
+++ ia64-tdep.c 5 Jan 2004 19:20:30 -0000
@@ -2480,9 +2480,9 @@
return -UNW_ENOINFO;
if (gdbarch_debug >= 1)
- fprintf_unfiltered (gdb_stdlog, "%s: %lx -> "
+ fprintf_unfiltered (gdb_stdlog, "ia64_find_proc_info_x: %lx -> "
"(name=`%s',segbase=%lx,start=%lx,end=%lx,gp=%lx,"
- "length=%lu,data=%p)\n", __FUNCTION__,
+ "length=%lu,data=%p)\n",
ip, (char *)di.u.ti.name_ptr,
di.u.ti.segbase, di.start_ip, di.end_ip,
di.gp, di.u.ti.table_len, di.u.ti.table_data);
@@ -2494,9 +2494,9 @@
return ret;
if (gdbarch_debug >= 1)
- fprintf_unfiltered (gdb_stdlog, "%s: %lx -> "
+ fprintf_unfiltered (gdb_stdlog, "ia64_find_proc_info_x: %lx -> "
"(name=`%s',segbase=%lx,start=%lx,end=%lx,gp=%lx,"
- "length=%lu,data=%lx)\n", __FUNCTION__,
+ "length=%lu,data=%lx)\n",
ip, (char *)di.u.rti.name_ptr,
di.u.rti.segbase, di.start_ip, di.end_ip,
di.gp, di.u.rti.table_len, di.u.rti.table_data);
@@ -3356,12 +3356,14 @@
0, "builtin_type_ia64_ext", NULL);
TYPE_FLOATFORMAT (builtin_type_ia64_ext) = &floatformat_ia64_ext;
- /* According to the ia64 specs, instructions that store long double floats
- in memory use a long-double format different than that used in the floating
- registers. The memory format matches the x86 extended float format which is
- 80 bits. An OS may choose to use this format (e.g. Linux) or choose to use
- a different format for storing long doubles (e.g. HPUX). In the latter case,
- the setting of the format may be moved/overridden in an OS-specific tdep file. */
+ /* According to the ia64 specs, instructions that store long double
+ floats in memory use a long-double format different than that
+ used in the floating registers. The memory format matches the
+ x86 extended float format which is 80 bits. An OS may choose to
+ use this format (e.g. GNU/Linux) or choose to use a different
+ format for storing long doubles (e.g. HPUX). In the latter case,
+ the setting of the format may be moved/overridden in an
+ OS-specific tdep file. */
set_gdbarch_long_double_format (gdbarch, &floatformat_i387_ext);
set_gdbarch_short_bit (gdbarch, 16);
Index: libunwind-frame.h
===================================================================
RCS file: /cvs/src/src/gdb/libunwind-frame.h,v
retrieving revision 1.2
diff -u -r1.2 libunwind-frame.h
--- libunwind-frame.h 13 Dec 2003 03:51:56 -0000 1.2
+++ libunwind-frame.h 5 Jan 2004 19:20:30 -0000
@@ -23,12 +23,13 @@
#ifdef HAVE_LIBUNWIND_H
+struct frame_info;
+struct frame_id;
+
#ifndef LIBUNWIND_FRAME_H
#define LIBUNWIND_FRAME_H 1
#include "libunwind.h"
-
-struct frame_info;
struct libunwind_descr
{
Index: stabsread.c
===================================================================
RCS file: /cvs/src/src/gdb/stabsread.c,v
retrieving revision 1.69
diff -u -r1.69 stabsread.c
--- stabsread.c 5 Dec 2003 00:45:39 -0000 1.69
+++ stabsread.c 5 Jan 2004 19:20:35 -0000
@@ -1118,13 +1118,8 @@
if (local_symbols
&& local_symbols->nsyms > 0
-#ifndef DEPRECATED_USE_REGISTER_NOT_ARG
- /* DEPRECATED_USE_REGISTER_NOT_ARG is only defined by
- the SPARC. */
&& gdbarch_stabs_argument_has_addr (current_gdbarch,
- SYMBOL_TYPE (sym))
-#endif
- )
+ SYMBOL_TYPE (sym)))
{
struct symbol *prev_sym;
prev_sym = local_symbols->symbol[local_symbols->nsyms - 1];
Index: win32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.86
diff -u -r1.86 win32-nat.c
--- win32-nat.c 26 Dec 2003 14:56:45 -0000 1.86
+++ win32-nat.c 5 Jan 2004 19:20:37 -0000
@@ -1215,7 +1215,7 @@
/* Called in pathological case where Windows fails to send a
CREATE_PROCESS_DEBUG_EVENT after an attach. */
DWORD
-fake_create_process ()
+fake_create_process (void)
{
current_process_handle = OpenProcess (PROCESS_ALL_ACCESS, FALSE,
current_event.dwProcessId);
Index: config/ia64/nm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/ia64/nm-linux.h,v
retrieving revision 1.11
diff -u -r1.11 nm-linux.h
--- config/ia64/nm-linux.h 14 Nov 2003 20:49:23 -0000 1.11
+++ config/ia64/nm-linux.h 5 Jan 2004 19:20:38 -0000
@@ -22,6 +22,8 @@
#ifndef NM_LINUX_H
#define NM_LINUX_H
+struct target_ops;
+
#include "config/nm-linux.h"
/* Note: It seems likely that we'll have to eventually define