This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[obish] ARI cleanups
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Wed, 05 Nov 2003 21:50:44 -0500
- Subject: [obish] ARI cleanups
FYI,
The attached:
- deletes the unused macro VX_NUM_REGS
- deletes the unused declaration of
generic_cannot_extract_struct_value_address
- s/sec_ptr/struct bfd_section */ and a few s/bfd/struct bfd/s.
- eliminates a badly formed multi-line string
- Converts a function to ISO C!
committed,
Andrew
2003-11-05 Andrew Cagney <cagney@redhat.com>
* xcoffread.c (find_linenos): Replace "sec_ptr" and "bfd" with
"struct bfd_section" and "struct bfd".
* target.h (struct section_table): Ditto.
* rs6000-nat.c (xcoff_relocate_core): Ditto.
* solib-svr4.c (elf_locate_base): Ditto.
* pa64solib.c (dld_cache_t): Ditto.
* objfiles.h (struct obj_section): Ditto.
* objfiles.c (add_to_objfile_sections): Ditto.
* exec.c (bfdsec_to_vmap): Ditto.
(add_to_section_table): Ditto.
(build_section_table): Ditto.
* corelow.c (get_core_register_section): Ditto.
* coffread.c (find_linenos): Ditto.
* elfread.c (elf_interpreter): Delete #if0'd function.
* mips-tdep.c (mips_dump_tdep): Delete code prinint VX_NUM_REGS.
* config/sparc/tm-vxsparc.h (VX_NUM_REGS): Delete macro.
* config/mips/tm-vxmips.h (VX_NUM_REGS): Delete macro.
* config/m68k/tm-vx68.h (VX_NUM_REGS): Delete macro.
* arch-utils.h (generic_cannot_extract_struct_value_address):
Delete declaration.
* wince.c (_initialize_wince): Fix multi-line string.
* ia64-tdep.c (floatformat_valid): Convert to ISO C.
Index: coffread.c
===================================================================
RCS file: /cvs/src/src/gdb/coffread.c,v
retrieving revision 1.47
diff -u -r1.47 coffread.c
--- coffread.c 5 Nov 2003 15:30:35 -0000 1.47
+++ coffread.c 6 Nov 2003 02:34:56 -0000
@@ -470,7 +470,7 @@
mainline code can read the whole thing for efficiency. */
static void
-find_linenos (bfd *abfd, sec_ptr asect, void *vpinfo)
+find_linenos (bfd *abfd, struct bfd_section *asect, void *vpinfo)
{
struct coff_symfile_info *info;
int size, count;
Index: corelow.c
===================================================================
RCS file: /cvs/src/src/gdb/corelow.c,v
retrieving revision 1.32
diff -u -r1.32 corelow.c
--- corelow.c 29 Oct 2003 20:59:07 -0000 1.32
+++ corelow.c 6 Nov 2003 02:34:56 -0000
@@ -432,7 +432,7 @@
int required)
{
char section_name[100];
- sec_ptr section;
+ struct bfd_section *section;
bfd_size_type size;
char *contents;
Index: elfread.c
===================================================================
RCS file: /cvs/src/src/gdb/elfread.c,v
retrieving revision 1.36
diff -u -r1.36 elfread.c
--- elfread.c 31 Oct 2003 22:47:48 -0000 1.36
+++ elfread.c 6 Nov 2003 02:35:33 -0000
@@ -104,35 +104,6 @@
}
}
-#if 0 /* Currently unused */
-
-char *
-elf_interpreter (bfd *abfd)
-{
- sec_ptr interp_sec;
- unsigned size;
- char *interp = NULL;
-
- interp_sec = bfd_get_section_by_name (abfd, ".interp");
- if (interp_sec)
- {
- size = bfd_section_size (abfd, interp_sec);
- interp = alloca (size);
- if (bfd_get_section_contents (abfd, interp_sec, interp, (file_ptr) 0,
- size))
- {
- interp = savestring (interp, size - 1);
- }
- else
- {
- interp = NULL;
- }
- }
- return (interp);
-}
-
-#endif
-
static struct minimal_symbol *
record_minimal_symbol_and_info (char *name, CORE_ADDR address,
enum minimal_symbol_type ms_type, char *info, /* FIXME, is this really char *? */
Index: exec.c
===================================================================
RCS file: /cvs/src/src/gdb/exec.c,v
retrieving revision 1.33
diff -u -r1.33 exec.c
--- exec.c 3 Nov 2003 14:44:08 -0000 1.33
+++ exec.c 6 Nov 2003 02:35:41 -0000
@@ -57,8 +57,6 @@
/* Prototypes for local functions */
-static void add_to_section_table (bfd *, sec_ptr, void *);
-
static void exec_close (int);
static void file_command (char *, int);
@@ -67,8 +65,6 @@
static void exec_files_info (struct target_ops *);
-static void bfdsec_to_vmap (bfd *, sec_ptr, void *);
-
static int ignore (CORE_ADDR, char *);
static void init_exec_ops (void);
@@ -338,7 +334,8 @@
we cast it back to its proper type. */
static void
-add_to_section_table (bfd *abfd, sec_ptr asect, void *table_pp_char)
+add_to_section_table (bfd *abfd, struct bfd_section *asect,
+ void *table_pp_char)
{
struct section_table **table_pp = (struct section_table **) table_pp_char;
flagword aflag;
@@ -359,7 +356,7 @@
Returns 0 if OK, 1 on error. */
int
-build_section_table (bfd *some_bfd, struct section_table **start,
+build_section_table (struct bfd *some_bfd, struct section_table **start,
struct section_table **end)
{
unsigned count;
@@ -377,7 +374,7 @@
}
static void
-bfdsec_to_vmap (bfd *abfd, sec_ptr sect, void *arg3)
+bfdsec_to_vmap (struct bfd *abfd, struct bfd_section *sect, void *arg3)
{
struct vmap_and_bfd *vmap_bfd = (struct vmap_and_bfd *) arg3;
struct vmap *vp;
Index: ia64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/ia64-tdep.c,v
retrieving revision 1.102
diff -u -r1.102 ia64-tdep.c
--- ia64-tdep.c 5 Nov 2003 20:32:42 -0000 1.102
+++ ia64-tdep.c 6 Nov 2003 02:35:58 -0000
@@ -315,9 +315,7 @@
}
static int
-floatformat_valid (fmt, from)
- const struct floatformat *fmt;
- const char *from;
+floatformat_valid (const struct floatformat *fmt, const char *from)
{
return 1;
}
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.242
diff -u -r1.242 mips-tdep.c
--- mips-tdep.c 5 Nov 2003 16:42:34 -0000 1.242
+++ mips-tdep.c 6 Nov 2003 02:36:34 -0000
@@ -6480,11 +6480,6 @@
fprintf_unfiltered (file,
"mips_dump_tdep: VM_MIN_ADDRESS = %ld\n",
(long) VM_MIN_ADDRESS);
-#ifdef VX_NUM_REGS
- fprintf_unfiltered (file,
- "mips_dump_tdep: VX_NUM_REGS = %d (used?)\n",
- VX_NUM_REGS);
-#endif
fprintf_unfiltered (file,
"mips_dump_tdep: ZERO_REGNUM = %d\n",
ZERO_REGNUM);
Index: objfiles.c
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.c,v
retrieving revision 1.39
diff -u -r1.39 objfiles.c
--- objfiles.c 29 Oct 2003 18:29:07 -0000 1.39
+++ objfiles.c 6 Nov 2003 02:39:13 -0000
@@ -60,8 +60,6 @@
#endif /* defined(USE_MMALLOC) && defined(HAVE_MMAP) */
-static void add_to_objfile_sections (bfd *, sec_ptr, void *);
-
static void objfile_alloc_data (struct objfile *objfile);
static void objfile_free_data (struct objfile *objfile);
@@ -89,7 +87,8 @@
the end of the table (objfile->sections_end). */
static void
-add_to_objfile_sections (bfd *abfd, sec_ptr asect, void *objfile_p_char)
+add_to_objfile_sections (struct bfd *abfd, struct bfd_section *asect,
+ void *objfile_p_char)
{
struct objfile *objfile = (struct objfile *) objfile_p_char;
struct obj_section section;
Index: objfiles.h
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.h,v
retrieving revision 1.27
diff -u -r1.27 objfiles.h
--- objfiles.h 29 Oct 2003 18:29:07 -0000 1.27
+++ objfiles.h 6 Nov 2003 02:39:14 -0000
@@ -178,7 +178,7 @@
addresses. */
CORE_ADDR offset;
- sec_ptr the_bfd_section; /* BFD section pointer */
+ struct bfd_section *the_bfd_section; /* BFD section pointer */
/* Objfile this section is part of. */
struct objfile *objfile;
Index: pa64solib.c
===================================================================
RCS file: /cvs/src/src/gdb/pa64solib.c,v
retrieving revision 1.18
diff -u -r1.18 pa64solib.c
--- pa64solib.c 23 Oct 2003 03:01:55 -0000 1.18
+++ pa64solib.c 6 Nov 2003 02:39:20 -0000
@@ -109,7 +109,7 @@
{
CORE_ADDR dld_flags_addr;
LONGEST dld_flags;
- sec_ptr dyninfo_sect;
+ struct bfd_section *dyninfo_sect;
int have_read_dld_descriptor;
int is_valid;
CORE_ADDR load_map;
Index: rs6000-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-nat.c,v
retrieving revision 1.35
diff -u -r1.35 rs6000-nat.c
--- rs6000-nat.c 23 Oct 2003 03:01:55 -0000 1.35
+++ rs6000-nat.c 6 Nov 2003 02:42:07 -0000
@@ -1067,7 +1067,7 @@
void
xcoff_relocate_core (struct target_ops *target)
{
- sec_ptr ldinfo_sec;
+ struct bfd_section *ldinfo_sec;
int offset = 0;
LdInfo *ldi;
struct vmap *vp;
Index: solib-svr4.c
===================================================================
RCS file: /cvs/src/src/gdb/solib-svr4.c,v
retrieving revision 1.38
diff -u -r1.38 solib-svr4.c
--- solib-svr4.c 31 Oct 2003 21:13:45 -0000 1.38
+++ solib-svr4.c 6 Nov 2003 02:42:08 -0000
@@ -425,7 +425,7 @@
static CORE_ADDR
elf_locate_base (void)
{
- sec_ptr dyninfo_sect;
+ struct bfd_section *dyninfo_sect;
int dyninfo_sect_size;
CORE_ADDR dyninfo_addr;
char *buf;
Index: target.h
===================================================================
RCS file: /cvs/src/src/gdb/target.h,v
retrieving revision 1.51
diff -u -r1.51 target.h
--- target.h 31 Oct 2003 19:19:51 -0000 1.51
+++ target.h 6 Nov 2003 02:42:09 -0000
@@ -1154,7 +1154,7 @@
CORE_ADDR addr; /* Lowest address in section */
CORE_ADDR endaddr; /* 1+highest address in section */
- sec_ptr the_bfd_section;
+ struct bfd_section *the_bfd_section;
bfd *bfd; /* BFD file pointer */
};
Index: wince.c
===================================================================
RCS file: /cvs/src/src/gdb/wince.c,v
retrieving revision 1.25
diff -u -r1.25 wince.c
--- wince.c 10 Oct 2003 07:13:11 -0000 1.25
+++ wince.c 6 Nov 2003 02:42:13 -0000
@@ -1997,7 +1997,8 @@
add_show_from_set
(add_set_cmd ((char *) "remoteaddhost", class_support, var_boolean,
(char *) &remote_add_host,
- (char *) "Set whether to add this host to remote stub arguments for\n
+ (char *) "\
+Set whether to add this host to remote stub arguments for\n\
debugging over a network.", &setlist),
&showlist);
Index: xcoffread.c
===================================================================
RCS file: /cvs/src/src/gdb/xcoffread.c,v
retrieving revision 1.35
diff -u -r1.35 xcoffread.c
--- xcoffread.c 6 Oct 2003 19:27:13 -0000 1.35
+++ xcoffread.c 6 Nov 2003 02:42:19 -0000
@@ -193,8 +193,6 @@
static void xcoff_symfile_offsets (struct objfile *,
struct section_addr_info *addrs);
-static void find_linenos (bfd *, sec_ptr, void *);
-
static char *coff_getfilename (union internal_auxent *, struct objfile *);
static void read_symbol (struct internal_syment *, int);
@@ -1699,7 +1697,7 @@
* mainline code can read the whole thing for efficiency.
*/
static void
-find_linenos (bfd *abfd, sec_ptr asect, void *vpinfo)
+find_linenos (struct bfd *abfd, struct bfd_section *asect, void *vpinfo)
{
struct coff_symfile_info *info;
int size, count;
@@ -2881,7 +2879,7 @@
/* Read the .debug section, if present. */
{
- sec_ptr secp;
+ struct bfd_section *secp;
bfd_size_type length;
char *debugsec = NULL;
Index: config/m68k/tm-vx68.h
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/tm-vx68.h,v
retrieving revision 1.9
diff -u -r1.9 tm-vx68.h
--- config/m68k/tm-vx68.h 2 Oct 2003 20:28:31 -0000 1.9
+++ config/m68k/tm-vx68.h 6 Nov 2003 02:42:19 -0000
@@ -72,10 +72,6 @@
#define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
-/* Number of registers in a ptrace_getregs call. */
-
-#define VX_NUM_REGS (18)
-
/* Number of registers in a ptrace_getfpregs call. */
#define VX_SIZE_FPREGS (8 * DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) \
Index: config/mips/tm-vxmips.h
===================================================================
RCS file: /cvs/src/src/gdb/config/mips/tm-vxmips.h,v
retrieving revision 1.2
diff -u -r1.2 tm-vxmips.h
--- config/mips/tm-vxmips.h 5 Jun 2002 19:18:25 -0000 1.2
+++ config/mips/tm-vxmips.h 6 Nov 2003 02:42:19 -0000
@@ -21,9 +21,3 @@
#include "mips/tm-mips.h"
#include "config/tm-vxworks.h"
-
-/* FIXME: These are almost certainly wrong. */
-
-/* Number of registers in a ptrace_getregs call. */
-
-#define VX_NUM_REGS (NUM_REGS)
Index: config/sparc/tm-vxsparc.h
===================================================================
RCS file: /cvs/src/src/gdb/config/sparc/tm-vxsparc.h,v
retrieving revision 1.2
diff -u -r1.2 tm-vxsparc.h
--- config/sparc/tm-vxsparc.h 5 Jun 2002 19:18:29 -0000 1.2
+++ config/sparc/tm-vxsparc.h 6 Nov 2003 02:42:20 -0000
@@ -22,12 +22,6 @@
#include "sparc/tm-spc-em.h"
#include "config/tm-vxworks.h"
-/* FIXME: These are almost certainly wrong. */
-
-/* Number of registers in a ptrace_getregs call. */
-
-#define VX_NUM_REGS (NUM_REGS)
-
/* Number of registers in a ptrace_getfpregs call. */
/* #define VX_SIZE_FPREGS (don't know how many) */