This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] PTR free zone
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 18 Jan 2003 10:14:14 -0500
- Subject: [commit] PTR free zone
Hello,
This eliminates PTR (well ok, almost, utils.c needs a few) from GDB.
just committing,
Andrew
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* ada-valprint.c: Eliminate PTR.
* breakpoint.c, corelow.c, cris-tdep.c, dbxread.c: Ditto.
* defs.h, dve3900-rom.c, dwarf2read.c, dwarfread.c: Ditto.
* exec.c, hppa-tdep.c, hpread.c, infcmd.c, mdebugread.c: Ditto.
* objfiles.c, objfiles.h, ocd.c, remote-es.c: Ditto.
* remote-mips.c, remote-sds.c, remote-vx.c: Ditto.
* solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto.
* symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
Index: ada-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/ada-valprint.c,v
retrieving revision 1.5
diff -u -r1.5 ada-valprint.c
--- ada-valprint.c 8 Sep 2002 17:43:49 -0000 1.5
+++ ada-valprint.c 18 Jan 2003 03:09:38 -0000
@@ -66,7 +66,7 @@
static void adjust_type_signedness (struct type *);
-static int ada_val_print_stub (PTR args0);
+static int ada_val_print_stub (void *args0);
static int ada_val_print_1 (struct type *, char *, int, CORE_ADDR,
struct ui_file *, int, int, int,
@@ -512,7 +512,7 @@
/* Helper for ada_val_print; used as argument to catch_errors to
unmarshal the arguments to ada_val_print_1, which does the work. */
static int
-ada_val_print_stub (PTR args0)
+ada_val_print_stub (void * args0)
{
struct ada_val_print_args *argsp = (struct ada_val_print_args *) args0;
return ada_val_print_1 (argsp->type, argsp->valaddr0,
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.106
diff -u -r1.106 breakpoint.c
--- breakpoint.c 15 Jan 2003 00:48:37 -0000 1.106
+++ breakpoint.c 18 Jan 2003 03:11:10 -0000
@@ -73,7 +73,7 @@
static void ignore_command (char *, int);
-static int breakpoint_re_set_one (PTR);
+static int breakpoint_re_set_one (void *);
static void clear_command (char *, int);
@@ -108,9 +108,9 @@
static bpstat bpstat_alloc (struct breakpoint *, bpstat);
-static int breakpoint_cond_eval (PTR);
+static int breakpoint_cond_eval (void *);
-static void cleanup_executing_breakpoints (PTR);
+static void cleanup_executing_breakpoints (void *);
static void commands_command (char *, int);
@@ -140,9 +140,9 @@
}
args_for_catchpoint_enable;
-static int watchpoint_check (PTR);
+static int watchpoint_check (void *);
-static int cover_target_enable_exception_callback (PTR);
+static int cover_target_enable_exception_callback (void *);
static void maintenance_info_breakpoints (char *, int);
@@ -1916,7 +1916,7 @@
/* Stub for cleaning up our state if we error-out of a breakpoint command */
/* ARGSUSED */
static void
-cleanup_executing_breakpoints (PTR ignore)
+cleanup_executing_breakpoints (void *ignore)
{
executing_breakpoint_commands = 0;
}
@@ -2331,7 +2331,7 @@
make it pass through catch_errors. */
static int
-breakpoint_cond_eval (PTR exp)
+breakpoint_cond_eval (void *exp)
{
struct value *mark = value_mark ();
int i = !value_true (evaluate_expression ((struct expression *) exp));
@@ -2371,7 +2371,7 @@
/* Check watchpoint condition. */
static int
-watchpoint_check (PTR p)
+watchpoint_check (void *p)
{
bpstat bs = (bpstat) p;
struct breakpoint *b;
@@ -6232,7 +6232,7 @@
inside a catch_errors */
static int
-cover_target_enable_exception_callback (PTR arg)
+cover_target_enable_exception_callback (void *arg)
{
args_for_catchpoint_enable *args = arg;
struct symtab_and_line *sal;
@@ -6909,7 +6909,7 @@
Unused in this case. */
static int
-breakpoint_re_set_one (PTR bint)
+breakpoint_re_set_one (void *bint)
{
/* get past catch_errs */
struct breakpoint *b = (struct breakpoint *) bint;
Index: corelow.c
===================================================================
RCS file: /cvs/src/src/gdb/corelow.c,v
retrieving revision 1.28
diff -u -r1.28 corelow.c
--- corelow.c 12 Dec 2002 01:39:34 -0000 1.28
+++ corelow.c 18 Jan 2003 03:11:11 -0000
@@ -58,7 +58,7 @@
static void core_files_info (struct target_ops *);
#ifdef SOLIB_ADD
-static int solib_add_stub (PTR);
+static int solib_add_stub (void *);
#endif
static struct core_fns *sniff_core_bfd (bfd *);
@@ -75,7 +75,7 @@
static void get_core_registers (int);
-static void add_to_thread_list (bfd *, asection *, PTR);
+static void add_to_thread_list (bfd *, asection *, void *);
static int ignore (CORE_ADDR, char *);
@@ -222,7 +222,7 @@
is really an int * which points to from_tty. */
static int
-solib_add_stub (PTR from_ttyp)
+solib_add_stub (void *from_ttyp)
{
SOLIB_ADD (NULL, *(int *) from_ttyp, ¤t_target, auto_solib_add);
re_enable_breakpoints_in_shlibs ();
@@ -234,7 +234,7 @@
list of threads in a core file. */
static void
-add_to_thread_list (bfd *abfd, asection *asect, PTR reg_sect_arg)
+add_to_thread_list (bfd *abfd, asection *asect, void *reg_sect_arg)
{
int thread_id;
asection *reg_sect = (asection *) reg_sect_arg;
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.44
diff -u -r1.44 cris-tdep.c
--- cris-tdep.c 9 Jan 2003 18:53:20 -0000 1.44
+++ cris-tdep.c 18 Jan 2003 03:11:34 -0000
@@ -4008,7 +4008,7 @@
if (storage_needed > 0)
{
symbol_table = (asymbol **) xmalloc (storage_needed);
- back_to = make_cleanup (free, (PTR) symbol_table);
+ back_to = make_cleanup (free, symbol_table);
number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
for (i = 0; i < number_of_symbols; i++)
Index: dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.39
diff -u -r1.39 dbxread.c
--- dbxread.c 14 Jan 2003 00:15:05 -0000 1.39
+++ dbxread.c 18 Jan 2003 03:12:16 -0000
@@ -638,7 +638,7 @@
/* Allocate struct to keep track of the symfile */
objfile->sym_stab_info = (struct dbx_symfile_info *)
xmmalloc (objfile->md, sizeof (struct dbx_symfile_info));
- memset ((PTR) objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info));
+ memset (objfile->sym_stab_info, 0, sizeof (struct dbx_symfile_info));
DBX_TEXT_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".text");
DBX_DATA_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".data");
@@ -690,8 +690,8 @@
if (val < 0)
perror_with_name (name);
- memset ((PTR) size_temp, 0, sizeof (size_temp));
- val = bfd_bread ((PTR) size_temp, sizeof (size_temp), sym_bfd);
+ memset (size_temp, 0, sizeof (size_temp));
+ val = bfd_bread (size_temp, sizeof (size_temp), sym_bfd);
if (val < 0)
{
perror_with_name (name);
@@ -924,7 +924,7 @@
count = sizeof (symbuf);
}
- nbytes = bfd_bread ((PTR) symbuf, count, sym_bfd);
+ nbytes = bfd_bread (symbuf, count, sym_bfd);
if (nbytes < 0)
perror_with_name (bfd_get_filename (sym_bfd));
else if (nbytes == 0)
@@ -1025,7 +1025,7 @@
static void
free_bincl_list (struct objfile *objfile)
{
- xmfree (objfile->md, (PTR) bincl_list);
+ xmfree (objfile->md, bincl_list);
bincls_allocated = 0;
}
@@ -1676,7 +1676,7 @@
psymtab_include_list = (char **)
alloca ((includes_allocated *= 2) *
sizeof (char *));
- memcpy ((PTR) psymtab_include_list, (PTR) orig,
+ memcpy (psymtab_include_list, orig,
includes_used * sizeof (char *));
}
continue;
@@ -2100,7 +2100,7 @@
(struct partial_symtab **)
alloca ((dependencies_allocated *= 2)
* sizeof (struct partial_symtab *));
- memcpy ((PTR) dependency_list, (PTR) orig,
+ memcpy (dependency_list, orig,
(dependencies_used
* sizeof (struct partial_symtab *)));
#ifdef DEBUG_INFO
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.108
diff -u -r1.108 defs.h
--- defs.h 13 Jan 2003 18:00:16 -0000 1.108
+++ defs.h 18 Jan 2003 03:12:47 -0000
@@ -245,8 +245,8 @@
struct cleanup
{
struct cleanup *next;
- void (*function) (PTR);
- PTR arg;
+ void (*function) (void *);
+ void *arg;
};
@@ -967,7 +967,7 @@
This function is superseeded by catch_exceptions(). */
-typedef int (catch_errors_ftype) (PTR);
+typedef int (catch_errors_ftype) (void *);
extern int catch_errors (catch_errors_ftype *, void *, char *, return_mask);
/* Template to catch_errors() that wraps calls to command
Index: dve3900-rom.c
===================================================================
RCS file: /cvs/src/src/gdb/dve3900-rom.c,v
retrieving revision 1.9
diff -u -r1.9 dve3900-rom.c
--- dve3900-rom.c 17 Dec 2002 23:13:31 -0000 1.9
+++ dve3900-rom.c 18 Jan 2003 03:13:07 -0000
@@ -32,7 +32,7 @@
/* Type of function passed to bfd_map_over_sections. */
-typedef void (*section_map_func) (bfd * abfd, asection * sect, PTR obj);
+typedef void (*section_map_func) (bfd * abfd, asection * sect, void *obj);
/* Packet escape character used by Densan monitor. */
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.78
diff -u -r1.78 dwarf2read.c
--- dwarf2read.c 11 Dec 2002 20:55:37 -0000 1.78
+++ dwarf2read.c 18 Jan 2003 03:14:09 -0000
@@ -621,7 +621,7 @@
/* local function prototypes */
-static void dwarf2_locate_sections (bfd *, asection *, PTR);
+static void dwarf2_locate_sections (bfd *, asection *, void *);
#if 0
static void dwarf2_build_psymtabs_easy (struct objfile *, int);
@@ -644,7 +644,7 @@
static void dwarf2_read_abbrevs (bfd *abfd, struct comp_unit_head *cu_header);
-static void dwarf2_empty_abbrev_table (PTR);
+static void dwarf2_empty_abbrev_table (void *);
static struct abbrev_info *dwarf2_lookup_abbrev (unsigned int,
const struct comp_unit_head *cu_header);
@@ -855,7 +855,7 @@
/* memory allocation interface */
-static void dwarf2_free_tmp_obstack (PTR);
+static void dwarf2_free_tmp_obstack (void *);
static struct dwarf_block *dwarf_alloc_block (void);
@@ -902,7 +902,7 @@
in. */
static void
-dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, PTR ignore_ptr)
+dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr)
{
if (STREQ (sectp->name, INFO_SECTION))
{
@@ -3507,7 +3507,7 @@
/* ARGSUSED */
static void
-dwarf2_empty_abbrev_table (PTR ptr_to_abbrevs_table)
+dwarf2_empty_abbrev_table (void *ptr_to_abbrevs_table)
{
int i;
struct abbrev_info *abbrev, *next;
@@ -6700,7 +6700,7 @@
/* ARGSUSED */
static void
-dwarf2_free_tmp_obstack (PTR ignore)
+dwarf2_free_tmp_obstack (void *ignore)
{
obstack_free (&dwarf2_tmp_obstack, NULL);
}
Index: dwarfread.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarfread.c,v
retrieving revision 1.19
diff -u -r1.19 dwarfread.c
--- dwarfread.c 14 Jan 2003 00:49:03 -0000 1.19
+++ dwarfread.c 18 Jan 2003 03:16:59 -0000
@@ -360,7 +360,7 @@
/* Forward declarations of static functions so we don't have to worry
about ordering within this file. */
-static void free_utypes (PTR);
+static void free_utypes (void *);
static int attribute_size (unsigned int);
@@ -772,7 +772,7 @@
SYNOPSIS
- static void free_utypes (PTR dummy)
+ static void free_utypes (void *dummy)
DESCRIPTION
@@ -782,7 +782,7 @@
*/
static void
-free_utypes (PTR dummy)
+free_utypes (void *dummy)
{
xfree (utypes);
utypes = NULL;
@@ -2212,7 +2212,7 @@
if (LNFOFF (pst))
{
if (bfd_seek (abfd, LNFOFF (pst), SEEK_SET) ||
- (bfd_bread ((PTR) lnsizedata, sizeof (lnsizedata), abfd)
+ (bfd_bread (lnsizedata, sizeof (lnsizedata), abfd)
!= sizeof (lnsizedata)))
{
error ("can't read DWARF line number table size");
Index: exec.c
===================================================================
RCS file: /cvs/src/src/gdb/exec.c,v
retrieving revision 1.26
diff -u -r1.26 exec.c
--- exec.c 23 Dec 2002 23:36:39 -0000 1.26
+++ exec.c 18 Jan 2003 03:21:24 -0000
@@ -55,7 +55,7 @@
/* Prototypes for local functions */
-static void add_to_section_table (bfd *, sec_ptr, PTR);
+static void add_to_section_table (bfd *, sec_ptr, void *);
static void exec_close (int);
@@ -65,7 +65,7 @@
static void exec_files_info (struct target_ops *);
-static void bfdsec_to_vmap (bfd *, sec_ptr, PTR);
+static void bfdsec_to_vmap (bfd *, sec_ptr, void *);
static int ignore (CORE_ADDR, char *);
@@ -366,7 +366,7 @@
we cast it back to its proper type. */
static void
-add_to_section_table (bfd *abfd, sec_ptr asect, PTR table_pp_char)
+add_to_section_table (bfd *abfd, sec_ptr asect, void *table_pp_char)
{
struct section_table **table_pp = (struct section_table **) table_pp_char;
flagword aflag;
@@ -405,7 +405,7 @@
}
static void
-bfdsec_to_vmap (bfd *abfd, sec_ptr sect, PTR arg3)
+bfdsec_to_vmap (bfd *abfd, sec_ptr sect, void *arg3)
{
struct vmap_and_bfd *vmap_bfd = (struct vmap_and_bfd *) arg3;
struct vmap *vp;
@@ -485,7 +485,7 @@
int res;
struct section_table *p;
CORE_ADDR nextsectaddr, memend;
- int (*xfer_fn) (bfd *, sec_ptr, PTR, file_ptr, bfd_size_type);
+ int (*xfer_fn) (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
asection *section = NULL;
if (len <= 0)
Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.46
diff -u -r1.46 hppa-tdep.c
--- hppa-tdep.c 5 Jan 2003 01:39:54 -0000 1.46
+++ hppa-tdep.c 18 Jan 2003 03:26:37 -0000
@@ -184,7 +184,7 @@
}
args_for_find_stub;
-static int cover_find_stub_with_shl_get (PTR);
+static int cover_find_stub_with_shl_get (void *);
static int is_pa_2 = 0; /* False */
@@ -373,7 +373,7 @@
if (TARGET_PTR_BIT == 64 && text_offset == 0)
{
bfd_map_over_sections (objfile->obfd,
- record_text_segment_lowaddr, (PTR) NULL);
+ record_text_segment_lowaddr, NULL);
/* ?!? Mask off some low bits. Should this instead subtract
out the lowest section's filepos or something like that?
@@ -574,7 +574,7 @@
obj_private->so_info = NULL;
obj_private->dp = 0;
- objfile->obj_private = (PTR) obj_private;
+ objfile->obj_private = obj_private;
}
obj_private = (obj_private_data_t *) objfile->obj_private;
obj_private->unwind_info = ui;
@@ -2032,7 +2032,7 @@
/* Cover routine for find_stub_with_shl_get to pass to catch_errors */
static int
-cover_find_stub_with_shl_get (PTR args_untyped)
+cover_find_stub_with_shl_get (void *args_untyped)
{
args_for_find_stub *args = args_untyped;
args->return_val = find_stub_with_shl_get (args->msym, args->solib_handle);
@@ -4300,7 +4300,7 @@
args.return_val = 0;
recurse++;
- catch_errors (cover_find_stub_with_shl_get, (PTR) &args, message,
+ catch_errors (cover_find_stub_with_shl_get, &args, message,
RETURN_MASK_ALL);
eh_notify_callback_addr = args.return_val;
recurse--;
Index: hpread.c
===================================================================
RCS file: /cvs/src/src/gdb/hpread.c,v
retrieving revision 1.31
diff -u -r1.31 hpread.c
--- hpread.c 12 Jan 2003 11:49:14 -0000 1.31
+++ hpread.c 18 Jan 2003 03:27:49 -0000
@@ -1664,7 +1664,7 @@
asection *vt_section, *slt_section, *lntt_section, *gntt_section;
/* Allocate struct to keep track of the symfile */
- objfile->sym_private = (PTR)
+ objfile->sym_private =
xmmalloc (objfile->md, sizeof (struct hpread_symfile_info));
memset (objfile->sym_private, 0, sizeof (struct hpread_symfile_info));
@@ -1959,7 +1959,7 @@
psymtab_include_list = (char **)
alloca ((includes_allocated *= 2) *
sizeof (char *));
- memcpy ((PTR) psymtab_include_list, (PTR) orig,
+ memcpy (psymtab_include_list, orig,
includes_used * sizeof (char *));
}
continue;
Index: infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.70
diff -u -r1.70 infcmd.c
--- infcmd.c 15 Jan 2003 00:48:38 -0000 1.70
+++ infcmd.c 18 Jan 2003 03:28:17 -0000
@@ -114,7 +114,7 @@
#define GO_USAGE "Usage: go <location>\n"
-static void breakpoint_auto_delete_contents (PTR);
+static void breakpoint_auto_delete_contents (void *);
#define ERROR_NO_INFERIOR \
if (!target_has_execution) error ("The program is not being run.");
@@ -953,7 +953,7 @@
pointed to by arg (which is really a bpstat *). */
static void
-breakpoint_auto_delete_contents (PTR arg)
+breakpoint_auto_delete_contents (void *arg)
{
breakpoint_auto_delete (*(bpstat *) arg);
}
Index: mdebugread.c
===================================================================
RCS file: /cvs/src/src/gdb/mdebugread.c,v
retrieving revision 1.38
diff -u -r1.38 mdebugread.c
--- mdebugread.c 14 Jan 2003 00:15:05 -0000 1.38
+++ mdebugread.c 18 Jan 2003 03:31:00 -0000
@@ -2950,7 +2950,7 @@
psymtab_include_list = (char **)
alloca ((includes_allocated *= 2) *
sizeof (char *));
- memcpy ((PTR) psymtab_include_list, (PTR) orig,
+ memcpy (psymtab_include_list, orig,
includes_used * sizeof (char *));
}
continue;
Index: objfiles.c
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.c,v
retrieving revision 1.22
diff -u -r1.22 objfiles.c
--- objfiles.c 29 Jul 2002 22:55:26 -0000 1.22
+++ objfiles.c 18 Jan 2003 03:31:19 -0000
@@ -52,11 +52,11 @@
static int open_mapped_file (char *filename, long mtime, int flags);
-static PTR map_to_file (int);
+static void *map_to_file (int);
#endif /* defined(USE_MMALLOC) && defined(HAVE_MMAP) */
-static void add_to_objfile_sections (bfd *, sec_ptr, PTR);
+static void add_to_objfile_sections (bfd *, sec_ptr, void *);
/* Externally visible variables that are owned by this module.
See declarations in objfile.h for more info. */
@@ -82,7 +82,7 @@
the end of the table (objfile->sections_end). */
static void
-add_to_objfile_sections (bfd *abfd, sec_ptr asect, PTR objfile_p_char)
+add_to_objfile_sections (bfd *abfd, sec_ptr asect, void *objfile_p_char)
{
struct objfile *objfile = (struct objfile *) objfile_p_char;
struct obj_section section;
@@ -178,7 +178,7 @@
flags);
if (fd >= 0)
{
- PTR md;
+ void *md;
if ((md = map_to_file (fd)) == NULL)
{
@@ -900,13 +900,13 @@
return (fd);
}
-static PTR
+static void *
map_to_file (int fd)
{
- PTR md;
+ void *md;
CORE_ADDR mapto;
- md = mmalloc_attach (fd, (PTR) 0);
+ md = mmalloc_attach (fd, 0);
if (md != NULL)
{
mapto = (CORE_ADDR) mmalloc_getkey (md, 1);
@@ -919,7 +919,7 @@
else if (mapto != (CORE_ADDR) NULL)
{
/* This mapping file needs to be remapped at "mapto" */
- md = mmalloc_attach (fd, (PTR) mapto);
+ md = mmalloc_attach (fd, mapto);
}
else
{
@@ -931,10 +931,10 @@
address selected by mmap, we must truncate it before trying
to do an attach at the address we want. */
ftruncate (fd, 0);
- md = mmalloc_attach (fd, (PTR) mapto);
+ md = mmalloc_attach (fd, mapto);
if (md != NULL)
{
- mmalloc_setkey (md, 1, (PTR) mapto);
+ mmalloc_setkey (md, 1, mapto);
}
}
}
Index: objfiles.h
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.h,v
retrieving revision 1.15
diff -u -r1.15 objfiles.h
--- objfiles.h 5 Aug 2002 16:17:41 -0000 1.15
+++ objfiles.h 18 Jan 2003 03:31:29 -0000
@@ -328,7 +328,7 @@
the memory mapped malloc() package to manage storage for this objfile's
data. NULL if we are not. */
- PTR md;
+ void *md;
/* The file descriptor that was used to obtain the mmalloc descriptor
for this objfile. If we call mmalloc_detach with the malloc descriptor
@@ -359,7 +359,7 @@
typically a pointer to malloc'd memory. The symbol reader's finish
function is responsible for freeing the memory thusly allocated. */
- PTR sym_private;
+ void *sym_private;
/* Hook for target-architecture-specific information. This must
point to memory allocated on one of the obstacks in this objfile,
Index: ocd.c
===================================================================
RCS file: /cvs/src/src/gdb/ocd.c,v
retrieving revision 1.23
diff -u -r1.23 ocd.c
--- ocd.c 29 Nov 2002 19:40:30 -0000 1.23
+++ ocd.c 18 Jan 2003 03:32:06 -0000
@@ -42,7 +42,7 @@
static int ocd_read_bytes (CORE_ADDR memaddr, char *myaddr, int len);
-static int ocd_start_remote (PTR dummy);
+static int ocd_start_remote (void *dummy);
static int readchar (int timeout);
@@ -171,7 +171,7 @@
/* Stub for catch_errors. */
static int
-ocd_start_remote (PTR dummy)
+ocd_start_remote (void *dummy)
{
unsigned char buf[10], *p;
int pktlen;
Index: remote-es.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-es.c,v
retrieving revision 1.24
diff -u -r1.24 remote-es.c
--- remote-es.c 14 Nov 2002 20:37:29 -0000 1.24
+++ remote-es.c 18 Jan 2003 03:35:47 -0000
@@ -1355,20 +1355,20 @@
for (i = 0; (i + NUMCPYBYTES) < p->_cooked_size; i += NUMCPYBYTES)
{
- if (!bfd_get_section_contents (from_bfd, p, (PTR) buf, (file_ptr) i,
+ if (!bfd_get_section_contents (from_bfd, p, buf, (file_ptr) i,
(bfd_size_type) NUMCPYBYTES))
{
error ("bfd_get_section_contents\n");
}
- if (!bfd_set_section_contents (to_bfd, new, (PTR) buf, (file_ptr) i,
+ if (!bfd_set_section_contents (to_bfd, new, buf, (file_ptr) i,
(bfd_size_type) NUMCPYBYTES))
{
error ("bfd_set_section_contents\n");
}
}
- bfd_get_section_contents (from_bfd, p, (PTR) buf, (file_ptr) i,
+ bfd_get_section_contents (from_bfd, p, buf, (file_ptr) i,
(bfd_size_type) (p->_cooked_size - i));
- bfd_set_section_contents (to_bfd, new, (PTR) buf, (file_ptr) i,
+ bfd_set_section_contents (to_bfd, new, buf, (file_ptr) i,
(bfd_size_type) (p->_cooked_size - i));
}
}
Index: remote-mips.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-mips.c,v
retrieving revision 1.30
diff -u -r1.30 remote-mips.c
--- remote-mips.c 29 Nov 2002 19:40:30 -0000 1.30
+++ remote-mips.c 18 Jan 2003 03:50:54 -0000
@@ -1283,13 +1283,13 @@
}
static void
-mips_initialize_cleanups (PTR arg)
+mips_initialize_cleanups (void *arg)
{
mips_initializing = 0;
}
static void
-mips_exit_cleanups (PTR arg)
+mips_exit_cleanups (void *arg)
{
mips_exiting = 0;
}
Index: remote-sds.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-sds.c,v
retrieving revision 1.23
diff -u -r1.23 remote-sds.c
--- remote-sds.c 14 Nov 2002 20:37:29 -0000 1.23
+++ remote-sds.c 18 Jan 2003 03:55:14 -0000
@@ -66,7 +66,7 @@
static void sds_resume (ptid_t, int, enum target_signal);
-static int sds_start_remote (PTR);
+static int sds_start_remote (void *);
static void sds_open (char *, int);
@@ -160,7 +160,7 @@
/* Stub for catch_errors. */
static int
-sds_start_remote (PTR dummy)
+sds_start_remote (void *dummy)
{
int c;
unsigned char buf[200];
Index: remote-vx.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-vx.c,v
retrieving revision 1.22
diff -u -r1.22 remote-vx.c
--- remote-vx.c 17 Dec 2002 00:39:07 -0000 1.22
+++ remote-vx.c 18 Jan 2003 03:55:17 -0000
@@ -638,7 +638,7 @@
static void find_sect (bfd *, asection *, void *);
static void
-find_sect (bfd *abfd, asection *sect, PTR obj)
+find_sect (bfd *abfd, asection *sect, void *obj)
{
struct find_sect_args *args = (struct find_sect_args *) obj;
Index: solib-svr4.c
===================================================================
RCS file: /cvs/src/src/gdb/solib-svr4.c,v
retrieving revision 1.28
diff -u -r1.28 solib-svr4.c
--- solib-svr4.c 21 Dec 2002 06:43:24 -0000 1.28
+++ solib-svr4.c 18 Jan 2003 04:09:14 -0000
@@ -197,7 +197,7 @@
if (storage_needed > 0)
{
symbol_table = (asymbol **) xmalloc (storage_needed);
- back_to = make_cleanup (xfree, (PTR) symbol_table);
+ back_to = make_cleanup (xfree, symbol_table);
number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
for (i = 0; i < number_of_symbols; i++)
@@ -224,7 +224,7 @@
if (storage_needed > 0)
{
symbol_table = (asymbol **) xmalloc (storage_needed);
- back_to = make_cleanup (xfree, (PTR) symbol_table);
+ back_to = make_cleanup (xfree, symbol_table);
number_of_symbols = bfd_canonicalize_dynamic_symtab (abfd, symbol_table);
for (i = 0; i < number_of_symbols; i++)
Index: solib.c
===================================================================
RCS file: /cvs/src/src/gdb/solib.c,v
retrieving revision 1.52
diff -u -r1.52 solib.c
--- solib.c 13 Jan 2003 18:00:16 -0000 1.52
+++ solib.c 18 Jan 2003 04:10:21 -0000
@@ -57,7 +57,7 @@
/* Local function prototypes */
-static void do_clear_solib (PTR);
+static void do_clear_solib (void *);
/* If non-zero, this is a prefix that will be added to the front of the name
shared libraries with an absolute filename for loading. */
@@ -207,7 +207,7 @@
*/
static int
-solib_map_sections (PTR arg)
+solib_map_sections (void *arg)
{
struct so_list *so = (struct so_list *) arg; /* catch_errors bogon */
char *filename;
@@ -324,7 +324,7 @@
/* A small stub to get us past the arg-passing pinhole of catch_errors. */
static int
-symbol_add_stub (PTR arg)
+symbol_add_stub (void *arg)
{
register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
struct section_addr_info *sap;
@@ -387,7 +387,7 @@
symbols now! */
if (attach_flag &&
symfile_objfile == NULL)
- catch_errors (TARGET_SO_OPEN_SYMBOL_FILE_OBJECT, (PTR) &from_tty,
+ catch_errors (TARGET_SO_OPEN_SYMBOL_FILE_OBJECT, &from_tty,
"Error reading attached process's symbol file.\n",
RETURN_MASK_ALL);
@@ -755,7 +755,7 @@
}
static void
-do_clear_solib (PTR dummy)
+do_clear_solib (void *dummy)
{
solib_cleanup_queued = 0;
clear_solib ();
Index: stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.61
diff -u -r1.61 stack.c
--- stack.c 14 Jan 2003 00:07:42 -0000 1.61
+++ stack.c 18 Jan 2003 04:11:28 -0000
@@ -165,12 +165,12 @@
struct ui_file *stream;
};
-static int print_args_stub (PTR);
+static int print_args_stub (void *);
/* Pass the args the way catch_errors wants them. */
static int
-print_args_stub (PTR args)
+print_args_stub (void *args)
{
int numargs;
struct print_args_args *p = (struct print_args_args *) args;
Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.77
diff -u -r1.77 symfile.c
--- symfile.c 14 Jan 2003 00:49:04 -0000 1.77
+++ symfile.c 18 Jan 2003 04:20:09 -0000
@@ -411,7 +411,7 @@
lowest-addressed loadable section. */
void
-find_lowest_section (bfd *abfd, asection *sect, PTR obj)
+find_lowest_section (bfd *abfd, asection *sect, void *obj)
{
asection **lowest = (asection **) obj;
@@ -648,7 +648,7 @@
lower_sect = bfd_get_section_by_name (objfile->obfd, ".text");
if (lower_sect == NULL)
bfd_map_over_sections (objfile->obfd, find_lowest_section,
- (PTR) &lower_sect);
+ &lower_sect);
if (lower_sect == NULL)
warning ("no loadable sections found in added symbol-file %s",
objfile->name);
@@ -2483,11 +2483,11 @@
if (objfile->global_psymbols.list)
{
- xmfree (objfile->md, (PTR) objfile->global_psymbols.list);
+ xmfree (objfile->md, objfile->global_psymbols.list);
}
if (objfile->static_psymbols.list)
{
- xmfree (objfile->md, (PTR) objfile->static_psymbols.list);
+ xmfree (objfile->md, objfile->static_psymbols.list);
}
/* Current best guess is that approximately a twentieth
Index: symfile.h
===================================================================
RCS file: /cvs/src/src/gdb/symfile.h,v
retrieving revision 1.14
diff -u -r1.14 symfile.h
--- symfile.h 17 Oct 2002 21:16:12 -0000 1.14
+++ symfile.h 18 Jan 2003 04:20:09 -0000
@@ -252,7 +252,7 @@
extern void discard_psymtab (struct partial_symtab *);
-extern void find_lowest_section (bfd *, asection *, PTR);
+extern void find_lowest_section (bfd *, asection *, void *);
extern bfd *symfile_bfd_open (char *);
Index: symmisc.c
===================================================================
RCS file: /cvs/src/src/gdb/symmisc.c,v
retrieving revision 1.13
diff -u -r1.13 symmisc.c
--- symmisc.c 9 Dec 2002 00:59:26 -0000 1.13
+++ symmisc.c 18 Jan 2003 04:22:19 -0000
@@ -78,7 +78,7 @@
struct ui_file *outfile;
};
-static int print_symbol (PTR);
+static int print_symbol (void *);
static void free_symtab_block (struct objfile *, struct block *);
@@ -98,10 +98,10 @@
{
next_sym = sym->hash_next;
xmfree (objfile->md, SYMBOL_NAME (sym));
- xmfree (objfile->md, (PTR) sym);
+ xmfree (objfile->md, sym);
}
}
- xmfree (objfile->md, (PTR) b);
+ xmfree (objfile->md, b);
}
/* Free all the storage associated with the struct symtab <- S.
@@ -135,7 +135,7 @@
for (i = 0; i < n; i++)
free_symtab_block (s->objfile, BLOCKVECTOR_BLOCK (bv, i));
/* Free the blockvector itself. */
- xmfree (s->objfile->md, (PTR) bv);
+ xmfree (s->objfile->md, bv);
/* Also free the linetable. */
case free_linetable:
@@ -143,7 +143,7 @@
or by some other symtab, except for our linetable.
Free that now. */
if (LINETABLE (s))
- xmfree (s->objfile->md, (PTR) LINETABLE (s));
+ xmfree (s->objfile->md, LINETABLE (s));
break;
}
@@ -153,12 +153,12 @@
/* Free source-related stuff */
if (s->line_charpos != NULL)
- xmfree (s->objfile->md, (PTR) s->line_charpos);
+ xmfree (s->objfile->md, s->line_charpos);
if (s->fullname != NULL)
xmfree (s->objfile->md, s->fullname);
if (s->debugformat != NULL)
xmfree (s->objfile->md, s->debugformat);
- xmfree (s->objfile->md, (PTR) s);
+ xmfree (s->objfile->md, s);
}
void
@@ -368,7 +368,7 @@
" Full symtab was read (at ");
gdb_print_host_address (psymtab->symtab, outfile);
fprintf_filtered (outfile, " by function at ");
- gdb_print_host_address ((PTR) psymtab->read_symtab, outfile);
+ gdb_print_host_address (psymtab->read_symtab, outfile);
fprintf_filtered (outfile, ")\n");
}
@@ -565,7 +565,7 @@
1 for success. */
static int
-print_symbol (PTR args)
+print_symbol (void *args)
{
struct symbol *symbol = ((struct print_symbol_args *) args)->symbol;
int depth = ((struct print_symbol_args *) args)->depth;
Index: v850ice.c
===================================================================
RCS file: /cvs/src/src/gdb/v850ice.c,v
retrieving revision 1.14
diff -u -r1.14 v850ice.c
--- v850ice.c 14 Nov 2002 20:37:29 -0000 1.14
+++ v850ice.c 18 Jan 2003 04:29:49 -0000
@@ -289,13 +289,13 @@
result = TRUE;
break;
case STATE_CHANGE_STEPI:
- if (!catch_errors ((catch_errors_ftype *) ice_stepi, (PTR) (int) lParam, "",
+ if (!catch_errors ((catch_errors_ftype *) ice_stepi, (int) lParam, "",
RETURN_MASK_ALL))
printf_unfiltered ("stepi errored\n");
result = TRUE;
break;
case STATE_CHANGE_NEXTI:
- if (!catch_errors ((catch_errors_ftype *) ice_nexti, (PTR) (int) lParam, "",
+ if (!catch_errors ((catch_errors_ftype *) ice_nexti, (int) lParam, "",
RETURN_MASK_ALL))
printf_unfiltered ("nexti errored\n");
result = TRUE;
Index: xcoffread.c
===================================================================
RCS file: /cvs/src/src/gdb/xcoffread.c,v
retrieving revision 1.24
diff -u -r1.24 xcoffread.c
--- xcoffread.c 14 Jan 2003 00:15:05 -0000 1.24
+++ xcoffread.c 18 Jan 2003 04:35:15 -0000
@@ -193,7 +193,7 @@
static void
xcoff_symfile_offsets (struct objfile *, struct section_addr_info *addrs);
-static void find_linenos (bfd *, sec_ptr, PTR);
+static void find_linenos (bfd *, sec_ptr, void *);
static char *coff_getfilename (union internal_auxent *, struct objfile *);
@@ -237,7 +237,7 @@
static void find_targ_sec (bfd *, asection *, void *);
static void
-find_targ_sec (bfd *abfd, asection *sect, PTR obj)
+find_targ_sec (bfd *abfd, asection *sect, void *obj)
{
struct find_targ_sec_arg *args = (struct find_targ_sec_arg *) obj;
struct objfile *objfile = args->objfile;
@@ -1699,7 +1699,7 @@
* mainline code can read the whole thing for efficiency.
*/
static void
-find_linenos (bfd *abfd, sec_ptr asect, PTR vpinfo)
+find_linenos (bfd *abfd, sec_ptr asect, void *vpinfo)
{
struct coff_symfile_info *info;
int size, count;
@@ -2554,7 +2554,7 @@
psymtab_include_list = (char **)
alloca ((includes_allocated *= 2) *
sizeof (char *));
- memcpy ((PTR) psymtab_include_list, (PTR) orig,
+ memcpy (psymtab_include_list, orig,
includes_used * sizeof (char *));
}
continue;
Index: cli/cli-script.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-script.c,v
retrieving revision 1.14
diff -u -r1.14 cli-script.c
--- cli/cli-script.c 27 Aug 2002 01:09:09 -0000 1.14
+++ cli/cli-script.c 18 Jan 2003 04:36:21 -0000
@@ -1228,7 +1228,7 @@
};
static void
-source_cleanup_lines (PTR args)
+source_cleanup_lines (void *args)
{
struct source_cleanup_lines_args *p =
(struct source_cleanup_lines_args *) args;