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.
This commit is contained in:
Andrew Cagney 2003-01-18 15:55:53 +00:00
parent 88e90c405f
commit 4efb68b1ad
31 changed files with 117 additions and 106 deletions

View file

@ -1,3 +1,14 @@
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.
2003-01-17 Andrew Cagney <ac131313@redhat.com> 2003-01-17 Andrew Cagney <ac131313@redhat.com>
* main.c (captured_main): Don't use PTR. * main.c (captured_main): Don't use PTR.

View file

@ -66,7 +66,7 @@ static void val_print_packed_array_elements (struct type *, char *valaddr,
static void adjust_type_signedness (struct type *); 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, static int ada_val_print_1 (struct type *, char *, int, CORE_ADDR,
struct ui_file *, int, int, int, struct ui_file *, int, int, int,
@ -512,7 +512,7 @@ ada_val_print (struct type *type, char *valaddr0, int embedded_offset,
/* Helper for ada_val_print; used as argument to catch_errors to /* Helper for ada_val_print; used as argument to catch_errors to
unmarshal the arguments to ada_val_print_1, which does the work. */ unmarshal the arguments to ada_val_print_1, which does the work. */
static int 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; struct ada_val_print_args *argsp = (struct ada_val_print_args *) args0;
return ada_val_print_1 (argsp->type, argsp->valaddr0, return ada_val_print_1 (argsp->type, argsp->valaddr0,

View file

@ -73,7 +73,7 @@ static void map_breakpoint_numbers (char *, void (*)(struct breakpoint *));
static void ignore_command (char *, int); 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); static void clear_command (char *, int);
@ -108,9 +108,9 @@ static void breakpoint_1 (int, int);
static bpstat bpstat_alloc (struct breakpoint *, bpstat); 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); static void commands_command (char *, int);
@ -140,9 +140,9 @@ typedef struct
} }
args_for_catchpoint_enable; 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); static void maintenance_info_breakpoints (char *, int);
@ -1916,7 +1916,7 @@ bpstat_clear_actions (bpstat bs)
/* Stub for cleaning up our state if we error-out of a breakpoint command */ /* Stub for cleaning up our state if we error-out of a breakpoint command */
/* ARGSUSED */ /* ARGSUSED */
static void static void
cleanup_executing_breakpoints (PTR ignore) cleanup_executing_breakpoints (void *ignore)
{ {
executing_breakpoint_commands = 0; executing_breakpoint_commands = 0;
} }
@ -2331,7 +2331,7 @@ bpstat_print (bpstat bs)
make it pass through catch_errors. */ make it pass through catch_errors. */
static int static int
breakpoint_cond_eval (PTR exp) breakpoint_cond_eval (void *exp)
{ {
struct value *mark = value_mark (); struct value *mark = value_mark ();
int i = !value_true (evaluate_expression ((struct expression *) exp)); int i = !value_true (evaluate_expression ((struct expression *) exp));
@ -2371,7 +2371,7 @@ bpstat_alloc (struct breakpoint *b, bpstat cbs /* Current "bs" value */ )
/* Check watchpoint condition. */ /* Check watchpoint condition. */
static int static int
watchpoint_check (PTR p) watchpoint_check (void *p)
{ {
bpstat bs = (bpstat) p; bpstat bs = (bpstat) p;
struct breakpoint *b; struct breakpoint *b;
@ -6232,7 +6232,7 @@ catch_exception_command_1 (enum exception_event_kind ex_event, char *arg,
inside a catch_errors */ inside a catch_errors */
static int static int
cover_target_enable_exception_callback (PTR arg) cover_target_enable_exception_callback (void *arg)
{ {
args_for_catchpoint_enable *args = arg; args_for_catchpoint_enable *args = arg;
struct symtab_and_line *sal; struct symtab_and_line *sal;
@ -6909,7 +6909,7 @@ delete_command (char *arg, int from_tty)
Unused in this case. */ Unused in this case. */
static int static int
breakpoint_re_set_one (PTR bint) breakpoint_re_set_one (void *bint)
{ {
/* get past catch_errs */ /* get past catch_errs */
struct breakpoint *b = (struct breakpoint *) bint; struct breakpoint *b = (struct breakpoint *) bint;

View file

@ -1228,7 +1228,7 @@ struct source_cleanup_lines_args
}; };
static void static void
source_cleanup_lines (PTR args) source_cleanup_lines (void *args)
{ {
struct source_cleanup_lines_args *p = struct source_cleanup_lines_args *p =
(struct source_cleanup_lines_args *) args; (struct source_cleanup_lines_args *) args;

View file

@ -58,7 +58,7 @@ static struct core_fns *core_vec = NULL;
static void core_files_info (struct target_ops *); static void core_files_info (struct target_ops *);
#ifdef SOLIB_ADD #ifdef SOLIB_ADD
static int solib_add_stub (PTR); static int solib_add_stub (void *);
#endif #endif
static struct core_fns *sniff_core_bfd (bfd *); static struct core_fns *sniff_core_bfd (bfd *);
@ -75,7 +75,7 @@ static void core_close_cleanup (void *ignore);
static void get_core_registers (int); 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 *); static int ignore (CORE_ADDR, char *);
@ -222,7 +222,7 @@ core_close_cleanup (void *ignore)
is really an int * which points to from_tty. */ is really an int * which points to from_tty. */
static int static int
solib_add_stub (PTR from_ttyp) solib_add_stub (void *from_ttyp)
{ {
SOLIB_ADD (NULL, *(int *) from_ttyp, &current_target, auto_solib_add); SOLIB_ADD (NULL, *(int *) from_ttyp, &current_target, auto_solib_add);
re_enable_breakpoints_in_shlibs (); re_enable_breakpoints_in_shlibs ();
@ -234,7 +234,7 @@ solib_add_stub (PTR from_ttyp)
list of threads in a core file. */ list of threads in a core file. */
static void 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; int thread_id;
asection *reg_sect = (asection *) reg_sect_arg; asection *reg_sect = (asection *) reg_sect_arg;

View file

@ -4008,7 +4008,7 @@ bfd_lookup_symbol (bfd *abfd, const char *symname)
if (storage_needed > 0) if (storage_needed > 0)
{ {
symbol_table = (asymbol **) xmalloc (storage_needed); 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); number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
for (i = 0; i < number_of_symbols; i++) for (i = 0; i < number_of_symbols; i++)

View file

@ -638,7 +638,7 @@ dbx_symfile_init (struct objfile *objfile)
/* Allocate struct to keep track of the symfile */ /* Allocate struct to keep track of the symfile */
objfile->sym_stab_info = (struct dbx_symfile_info *) objfile->sym_stab_info = (struct dbx_symfile_info *)
xmmalloc (objfile->md, sizeof (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_TEXT_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".text");
DBX_DATA_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".data"); DBX_DATA_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".data");
@ -690,8 +690,8 @@ dbx_symfile_init (struct objfile *objfile)
if (val < 0) if (val < 0)
perror_with_name (name); perror_with_name (name);
memset ((PTR) size_temp, 0, sizeof (size_temp)); memset (size_temp, 0, sizeof (size_temp));
val = bfd_bread ((PTR) size_temp, sizeof (size_temp), sym_bfd); val = bfd_bread (size_temp, sizeof (size_temp), sym_bfd);
if (val < 0) if (val < 0)
{ {
perror_with_name (name); perror_with_name (name);
@ -924,7 +924,7 @@ fill_symbuf (bfd *sym_bfd)
count = sizeof (symbuf); count = sizeof (symbuf);
} }
nbytes = bfd_bread ((PTR) symbuf, count, sym_bfd); nbytes = bfd_bread (symbuf, count, sym_bfd);
if (nbytes < 0) if (nbytes < 0)
perror_with_name (bfd_get_filename (sym_bfd)); perror_with_name (bfd_get_filename (sym_bfd));
else if (nbytes == 0) else if (nbytes == 0)
@ -1025,7 +1025,7 @@ find_corresponding_bincl_psymtab (char *name, int instance)
static void static void
free_bincl_list (struct objfile *objfile) free_bincl_list (struct objfile *objfile)
{ {
xmfree (objfile->md, (PTR) bincl_list); xmfree (objfile->md, bincl_list);
bincls_allocated = 0; bincls_allocated = 0;
} }
@ -1676,7 +1676,7 @@ read_dbx_symtab (struct objfile *objfile)
psymtab_include_list = (char **) psymtab_include_list = (char **)
alloca ((includes_allocated *= 2) * alloca ((includes_allocated *= 2) *
sizeof (char *)); sizeof (char *));
memcpy ((PTR) psymtab_include_list, (PTR) orig, memcpy (psymtab_include_list, orig,
includes_used * sizeof (char *)); includes_used * sizeof (char *));
} }
continue; continue;
@ -2100,7 +2100,7 @@ read_dbx_symtab (struct objfile *objfile)
(struct partial_symtab **) (struct partial_symtab **)
alloca ((dependencies_allocated *= 2) alloca ((dependencies_allocated *= 2)
* sizeof (struct partial_symtab *)); * sizeof (struct partial_symtab *));
memcpy ((PTR) dependency_list, (PTR) orig, memcpy (dependency_list, orig,
(dependencies_used (dependencies_used
* sizeof (struct partial_symtab *))); * sizeof (struct partial_symtab *)));
#ifdef DEBUG_INFO #ifdef DEBUG_INFO

View file

@ -245,8 +245,8 @@ enum auto_boolean
struct cleanup struct cleanup
{ {
struct cleanup *next; struct cleanup *next;
void (*function) (PTR); void (*function) (void *);
PTR arg; void *arg;
}; };
@ -967,7 +967,7 @@ extern int catch_exceptions (struct ui_out *uiout,
This function is superseeded by catch_exceptions(). */ 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); extern int catch_errors (catch_errors_ftype *, void *, char *, return_mask);
/* Template to catch_errors() that wraps calls to command /* Template to catch_errors() that wraps calls to command

View file

@ -32,7 +32,7 @@
/* Type of function passed to bfd_map_over_sections. */ /* 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. */ /* Packet escape character used by Densan monitor. */

View file

@ -621,7 +621,7 @@ dwarf2_invalid_attrib_class_complaint (const char *arg1, const char *arg2)
/* local function prototypes */ /* local function prototypes */
static void dwarf2_locate_sections (bfd *, asection *, PTR); static void dwarf2_locate_sections (bfd *, asection *, void *);
#if 0 #if 0
static void dwarf2_build_psymtabs_easy (struct objfile *, int); static void dwarf2_build_psymtabs_easy (struct objfile *, int);
@ -644,7 +644,7 @@ char *dwarf2_read_section (struct objfile *, file_ptr, unsigned int);
static void dwarf2_read_abbrevs (bfd *abfd, struct comp_unit_head *cu_header); 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, static struct abbrev_info *dwarf2_lookup_abbrev (unsigned int,
const struct comp_unit_head *cu_header); const struct comp_unit_head *cu_header);
@ -855,7 +855,7 @@ static struct type *dwarf2_fundamental_type (struct objfile *, int);
/* memory allocation interface */ /* 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); static struct dwarf_block *dwarf_alloc_block (void);
@ -902,7 +902,7 @@ dwarf2_has_info (bfd *abfd)
in. */ in. */
static void 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)) if (STREQ (sectp->name, INFO_SECTION))
{ {
@ -3507,7 +3507,7 @@ dwarf2_read_abbrevs (bfd *abfd, struct comp_unit_head *cu_header)
/* ARGSUSED */ /* ARGSUSED */
static void static void
dwarf2_empty_abbrev_table (PTR ptr_to_abbrevs_table) dwarf2_empty_abbrev_table (void *ptr_to_abbrevs_table)
{ {
int i; int i;
struct abbrev_info *abbrev, *next; struct abbrev_info *abbrev, *next;
@ -6700,7 +6700,7 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
/* ARGSUSED */ /* ARGSUSED */
static void static void
dwarf2_free_tmp_obstack (PTR ignore) dwarf2_free_tmp_obstack (void *ignore)
{ {
obstack_free (&dwarf2_tmp_obstack, NULL); obstack_free (&dwarf2_tmp_obstack, NULL);
} }

View file

@ -360,7 +360,7 @@ static const struct language_defn *cu_language_defn;
/* Forward declarations of static functions so we don't have to worry /* Forward declarations of static functions so we don't have to worry
about ordering within this file. */ about ordering within this file. */
static void free_utypes (PTR); static void free_utypes (void *);
static int attribute_size (unsigned int); static int attribute_size (unsigned int);
@ -772,7 +772,7 @@ alloc_utype (DIE_REF die_ref, struct type *utypep)
SYNOPSIS SYNOPSIS
static void free_utypes (PTR dummy) static void free_utypes (void *dummy)
DESCRIPTION DESCRIPTION
@ -782,7 +782,7 @@ alloc_utype (DIE_REF die_ref, struct type *utypep)
*/ */
static void static void
free_utypes (PTR dummy) free_utypes (void *dummy)
{ {
xfree (utypes); xfree (utypes);
utypes = NULL; utypes = NULL;
@ -2212,7 +2212,7 @@ read_ofile_symtab (struct partial_symtab *pst)
if (LNFOFF (pst)) if (LNFOFF (pst))
{ {
if (bfd_seek (abfd, LNFOFF (pst), SEEK_SET) || if (bfd_seek (abfd, LNFOFF (pst), SEEK_SET) ||
(bfd_bread ((PTR) lnsizedata, sizeof (lnsizedata), abfd) (bfd_bread (lnsizedata, sizeof (lnsizedata), abfd)
!= sizeof (lnsizedata))) != sizeof (lnsizedata)))
{ {
error ("can't read DWARF line number table size"); error ("can't read DWARF line number table size");

View file

@ -55,7 +55,7 @@ void (*file_changed_hook) (char *);
/* Prototypes for local functions */ /* 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); static void exec_close (int);
@ -65,7 +65,7 @@ static void set_section_command (char *, int);
static void exec_files_info (struct target_ops *); 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 *); static int ignore (CORE_ADDR, char *);
@ -366,7 +366,7 @@ file_command (char *arg, int from_tty)
we cast it back to its proper type. */ we cast it back to its proper type. */
static void 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; struct section_table **table_pp = (struct section_table **) table_pp_char;
flagword aflag; flagword aflag;
@ -405,7 +405,7 @@ build_section_table (bfd *some_bfd, struct section_table **start,
} }
static void 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_and_bfd *vmap_bfd = (struct vmap_and_bfd *) arg3;
struct vmap *vp; struct vmap *vp;
@ -485,7 +485,7 @@ xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
int res; int res;
struct section_table *p; struct section_table *p;
CORE_ADDR nextsectaddr, memend; 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; asection *section = NULL;
if (len <= 0) if (len <= 0)

View file

@ -184,7 +184,7 @@ typedef struct
} }
args_for_find_stub; 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 */ static int is_pa_2 = 0; /* False */
@ -373,7 +373,7 @@ internalize_unwinds (struct objfile *objfile, struct unwind_table_entry *table,
if (TARGET_PTR_BIT == 64 && text_offset == 0) if (TARGET_PTR_BIT == 64 && text_offset == 0)
{ {
bfd_map_over_sections (objfile->obfd, 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 /* ?!? Mask off some low bits. Should this instead subtract
out the lowest section's filepos or something like that? out the lowest section's filepos or something like that?
@ -574,7 +574,7 @@ read_unwind_info (struct objfile *objfile)
obj_private->so_info = NULL; obj_private->so_info = NULL;
obj_private->dp = 0; 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 = (obj_private_data_t *) objfile->obj_private;
obj_private->unwind_info = ui; obj_private->unwind_info = ui;
@ -2032,7 +2032,7 @@ find_stub_with_shl_get (struct minimal_symbol *function, CORE_ADDR handle)
/* Cover routine for find_stub_with_shl_get to pass to catch_errors */ /* Cover routine for find_stub_with_shl_get to pass to catch_errors */
static int 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_for_find_stub *args = args_untyped;
args->return_val = find_stub_with_shl_get (args->msym, args->solib_handle); args->return_val = find_stub_with_shl_get (args->msym, args->solib_handle);
@ -4300,7 +4300,7 @@ initialize_hp_cxx_exception_support (void)
args.return_val = 0; args.return_val = 0;
recurse++; 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); RETURN_MASK_ALL);
eh_notify_callback_addr = args.return_val; eh_notify_callback_addr = args.return_val;
recurse--; recurse--;

View file

@ -1664,7 +1664,7 @@ hpread_symfile_init (struct objfile *objfile)
asection *vt_section, *slt_section, *lntt_section, *gntt_section; asection *vt_section, *slt_section, *lntt_section, *gntt_section;
/* Allocate struct to keep track of the symfile */ /* Allocate struct to keep track of the symfile */
objfile->sym_private = (PTR) objfile->sym_private =
xmmalloc (objfile->md, sizeof (struct hpread_symfile_info)); xmmalloc (objfile->md, sizeof (struct hpread_symfile_info));
memset (objfile->sym_private, 0, sizeof (struct hpread_symfile_info)); memset (objfile->sym_private, 0, sizeof (struct hpread_symfile_info));
@ -1959,7 +1959,7 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline)
psymtab_include_list = (char **) psymtab_include_list = (char **)
alloca ((includes_allocated *= 2) * alloca ((includes_allocated *= 2) *
sizeof (char *)); sizeof (char *));
memcpy ((PTR) psymtab_include_list, (PTR) orig, memcpy (psymtab_include_list, orig,
includes_used * sizeof (char *)); includes_used * sizeof (char *));
} }
continue; continue;

View file

@ -114,7 +114,7 @@ void _initialize_infcmd (void);
#define GO_USAGE "Usage: go <location>\n" #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 \ #define ERROR_NO_INFERIOR \
if (!target_has_execution) error ("The program is not being run."); if (!target_has_execution) error ("The program is not being run.");
@ -953,7 +953,7 @@ signal_command (char *signum_exp, int from_tty)
pointed to by arg (which is really a bpstat *). */ pointed to by arg (which is really a bpstat *). */
static void static void
breakpoint_auto_delete_contents (PTR arg) breakpoint_auto_delete_contents (void *arg)
{ {
breakpoint_auto_delete (*(bpstat *) arg); breakpoint_auto_delete (*(bpstat *) arg);
} }

View file

@ -2950,7 +2950,7 @@ parse_partial_symbols (struct objfile *objfile)
psymtab_include_list = (char **) psymtab_include_list = (char **)
alloca ((includes_allocated *= 2) * alloca ((includes_allocated *= 2) *
sizeof (char *)); sizeof (char *));
memcpy ((PTR) psymtab_include_list, (PTR) orig, memcpy (psymtab_include_list, orig,
includes_used * sizeof (char *)); includes_used * sizeof (char *));
} }
continue; continue;

View file

@ -52,11 +52,11 @@ static int open_existing_mapped_file (char *, long, int);
static int open_mapped_file (char *filename, long mtime, int flags); 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) */ #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. /* Externally visible variables that are owned by this module.
See declarations in objfile.h for more info. */ See declarations in objfile.h for more info. */
@ -82,7 +82,7 @@ int mapped_symbol_files; /* Try to use mapped symbol files */
the end of the table (objfile->sections_end). */ the end of the table (objfile->sections_end). */
static void 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 objfile *objfile = (struct objfile *) objfile_p_char;
struct obj_section section; struct obj_section section;
@ -178,7 +178,7 @@ allocate_objfile (bfd *abfd, int flags)
flags); flags);
if (fd >= 0) if (fd >= 0)
{ {
PTR md; void *md;
if ((md = map_to_file (fd)) == NULL) if ((md = map_to_file (fd)) == NULL)
{ {
@ -900,13 +900,13 @@ open_mapped_file (char *filename, long mtime, int flags)
return (fd); return (fd);
} }
static PTR static void *
map_to_file (int fd) map_to_file (int fd)
{ {
PTR md; void *md;
CORE_ADDR mapto; CORE_ADDR mapto;
md = mmalloc_attach (fd, (PTR) 0); md = mmalloc_attach (fd, 0);
if (md != NULL) if (md != NULL)
{ {
mapto = (CORE_ADDR) mmalloc_getkey (md, 1); mapto = (CORE_ADDR) mmalloc_getkey (md, 1);
@ -919,7 +919,7 @@ map_to_file (int fd)
else if (mapto != (CORE_ADDR) NULL) else if (mapto != (CORE_ADDR) NULL)
{ {
/* This mapping file needs to be remapped at "mapto" */ /* This mapping file needs to be remapped at "mapto" */
md = mmalloc_attach (fd, (PTR) mapto); md = mmalloc_attach (fd, mapto);
} }
else else
{ {
@ -931,10 +931,10 @@ map_to_file (int fd)
address selected by mmap, we must truncate it before trying address selected by mmap, we must truncate it before trying
to do an attach at the address we want. */ to do an attach at the address we want. */
ftruncate (fd, 0); ftruncate (fd, 0);
md = mmalloc_attach (fd, (PTR) mapto); md = mmalloc_attach (fd, mapto);
if (md != NULL) if (md != NULL)
{ {
mmalloc_setkey (md, 1, (PTR) mapto); mmalloc_setkey (md, 1, mapto);
} }
} }
} }

View file

@ -328,7 +328,7 @@ struct objfile
the memory mapped malloc() package to manage storage for this objfile's the memory mapped malloc() package to manage storage for this objfile's
data. NULL if we are not. */ data. NULL if we are not. */
PTR md; void *md;
/* The file descriptor that was used to obtain the mmalloc descriptor /* The file descriptor that was used to obtain the mmalloc descriptor
for this objfile. If we call mmalloc_detach with the malloc descriptor for this objfile. If we call mmalloc_detach with the malloc descriptor
@ -359,7 +359,7 @@ struct objfile
typically a pointer to malloc'd memory. The symbol reader's finish typically a pointer to malloc'd memory. The symbol reader's finish
function is responsible for freeing the memory thusly allocated. */ function is responsible for freeing the memory thusly allocated. */
PTR sym_private; void *sym_private;
/* Hook for target-architecture-specific information. This must /* Hook for target-architecture-specific information. This must
point to memory allocated on one of the obstacks in this objfile, point to memory allocated on one of the obstacks in this objfile,

View file

@ -42,7 +42,7 @@
static int ocd_read_bytes (CORE_ADDR memaddr, char *myaddr, int len); 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); static int readchar (int timeout);
@ -171,7 +171,7 @@ ocd_close (int quitting)
/* Stub for catch_errors. */ /* Stub for catch_errors. */
static int static int
ocd_start_remote (PTR dummy) ocd_start_remote (void *dummy)
{ {
unsigned char buf[10], *p; unsigned char buf[10], *p;
int pktlen; int pktlen;

View file

@ -1355,20 +1355,20 @@ bfd_copy (bfd *from_bfd, bfd *to_bfd)
for (i = 0; (i + NUMCPYBYTES) < p->_cooked_size; i += NUMCPYBYTES) 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)) (bfd_size_type) NUMCPYBYTES))
{ {
error ("bfd_get_section_contents\n"); 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)) (bfd_size_type) NUMCPYBYTES))
{ {
error ("bfd_set_section_contents\n"); 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_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)); (bfd_size_type) (p->_cooked_size - i));
} }
} }

View file

@ -1283,13 +1283,13 @@ mips_request (int cmd,
} }
static void static void
mips_initialize_cleanups (PTR arg) mips_initialize_cleanups (void *arg)
{ {
mips_initializing = 0; mips_initializing = 0;
} }
static void static void
mips_exit_cleanups (PTR arg) mips_exit_cleanups (void *arg)
{ {
mips_exiting = 0; mips_exiting = 0;
} }

View file

@ -66,7 +66,7 @@ static void sds_fetch_registers (int);
static void sds_resume (ptid_t, int, enum target_signal); 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); static void sds_open (char *, int);
@ -160,7 +160,7 @@ sds_close (int quitting)
/* Stub for catch_errors. */ /* Stub for catch_errors. */
static int static int
sds_start_remote (PTR dummy) sds_start_remote (void *dummy)
{ {
int c; int c;
unsigned char buf[200]; unsigned char buf[200];

View file

@ -638,7 +638,7 @@ struct find_sect_args
static void find_sect (bfd *, asection *, void *); static void find_sect (bfd *, asection *, void *);
static 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; struct find_sect_args *args = (struct find_sect_args *) obj;

View file

@ -197,7 +197,7 @@ bfd_lookup_symbol (bfd *abfd, char *symname)
if (storage_needed > 0) if (storage_needed > 0)
{ {
symbol_table = (asymbol **) xmalloc (storage_needed); 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); number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
for (i = 0; i < number_of_symbols; i++) for (i = 0; i < number_of_symbols; i++)
@ -224,7 +224,7 @@ bfd_lookup_symbol (bfd *abfd, char *symname)
if (storage_needed > 0) if (storage_needed > 0)
{ {
symbol_table = (asymbol **) xmalloc (storage_needed); 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); number_of_symbols = bfd_canonicalize_dynamic_symtab (abfd, symbol_table);
for (i = 0; i < number_of_symbols; i++) for (i = 0; i < number_of_symbols; i++)

View file

@ -57,7 +57,7 @@ static int solib_cleanup_queued = 0; /* make_run_cleanup called */
/* Local function prototypes */ /* 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 /* 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. */ shared libraries with an absolute filename for loading. */
@ -207,7 +207,7 @@ solib_open (char *in_pathname, char **found_pathname)
*/ */
static int static int
solib_map_sections (PTR arg) solib_map_sections (void *arg)
{ {
struct so_list *so = (struct so_list *) arg; /* catch_errors bogon */ struct so_list *so = (struct so_list *) arg; /* catch_errors bogon */
char *filename; char *filename;
@ -324,7 +324,7 @@ free_so (struct so_list *so)
/* A small stub to get us past the arg-passing pinhole of catch_errors. */ /* A small stub to get us past the arg-passing pinhole of catch_errors. */
static int static int
symbol_add_stub (PTR arg) symbol_add_stub (void *arg)
{ {
register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */ register struct so_list *so = (struct so_list *) arg; /* catch_errs bogon */
struct section_addr_info *sap; struct section_addr_info *sap;
@ -387,7 +387,7 @@ update_solib_list (int from_tty, struct target_ops *target)
symbols now! */ symbols now! */
if (attach_flag && if (attach_flag &&
symfile_objfile == NULL) 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", "Error reading attached process's symbol file.\n",
RETURN_MASK_ALL); RETURN_MASK_ALL);
@ -755,7 +755,7 @@ clear_solib (void)
} }
static void static void
do_clear_solib (PTR dummy) do_clear_solib (void *dummy)
{ {
solib_cleanup_queued = 0; solib_cleanup_queued = 0;
clear_solib (); clear_solib ();

View file

@ -165,12 +165,12 @@ struct print_args_args
struct ui_file *stream; 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. */ /* Pass the args the way catch_errors wants them. */
static int static int
print_args_stub (PTR args) print_args_stub (void *args)
{ {
int numargs; int numargs;
struct print_args_args *p = (struct print_args_args *) args; struct print_args_args *p = (struct print_args_args *) args;

View file

@ -411,7 +411,7 @@ entry_point_address (void)
lowest-addressed loadable section. */ lowest-addressed loadable section. */
void void
find_lowest_section (bfd *abfd, asection *sect, PTR obj) find_lowest_section (bfd *abfd, asection *sect, void *obj)
{ {
asection **lowest = (asection **) obj; asection **lowest = (asection **) obj;
@ -648,7 +648,7 @@ syms_from_objfile (struct objfile *objfile, struct section_addr_info *addrs,
lower_sect = bfd_get_section_by_name (objfile->obfd, ".text"); lower_sect = bfd_get_section_by_name (objfile->obfd, ".text");
if (lower_sect == NULL) if (lower_sect == NULL)
bfd_map_over_sections (objfile->obfd, find_lowest_section, bfd_map_over_sections (objfile->obfd, find_lowest_section,
(PTR) &lower_sect); &lower_sect);
if (lower_sect == NULL) if (lower_sect == NULL)
warning ("no loadable sections found in added symbol-file %s", warning ("no loadable sections found in added symbol-file %s",
objfile->name); objfile->name);
@ -2483,11 +2483,11 @@ init_psymbol_list (struct objfile *objfile, int total_symbols)
if (objfile->global_psymbols.list) 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) 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 /* Current best guess is that approximately a twentieth

View file

@ -252,7 +252,7 @@ extern struct partial_symtab *allocate_psymtab (char *, struct objfile *);
extern void discard_psymtab (struct partial_symtab *); 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 *); extern bfd *symfile_bfd_open (char *);

View file

@ -78,7 +78,7 @@ struct print_symbol_args
struct ui_file *outfile; struct ui_file *outfile;
}; };
static int print_symbol (PTR); static int print_symbol (void *);
static void free_symtab_block (struct objfile *, struct block *); static void free_symtab_block (struct objfile *, struct block *);
@ -98,10 +98,10 @@ free_symtab_block (struct objfile *objfile, struct block *b)
{ {
next_sym = sym->hash_next; next_sym = sym->hash_next;
xmfree (objfile->md, SYMBOL_NAME (sym)); 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. /* Free all the storage associated with the struct symtab <- S.
@ -135,7 +135,7 @@ free_symtab (register struct symtab *s)
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
free_symtab_block (s->objfile, BLOCKVECTOR_BLOCK (bv, i)); free_symtab_block (s->objfile, BLOCKVECTOR_BLOCK (bv, i));
/* Free the blockvector itself. */ /* Free the blockvector itself. */
xmfree (s->objfile->md, (PTR) bv); xmfree (s->objfile->md, bv);
/* Also free the linetable. */ /* Also free the linetable. */
case free_linetable: case free_linetable:
@ -143,7 +143,7 @@ free_symtab (register struct symtab *s)
or by some other symtab, except for our linetable. or by some other symtab, except for our linetable.
Free that now. */ Free that now. */
if (LINETABLE (s)) if (LINETABLE (s))
xmfree (s->objfile->md, (PTR) LINETABLE (s)); xmfree (s->objfile->md, LINETABLE (s));
break; break;
} }
@ -153,12 +153,12 @@ free_symtab (register struct symtab *s)
/* Free source-related stuff */ /* Free source-related stuff */
if (s->line_charpos != NULL) if (s->line_charpos != NULL)
xmfree (s->objfile->md, (PTR) s->line_charpos); xmfree (s->objfile->md, s->line_charpos);
if (s->fullname != NULL) if (s->fullname != NULL)
xmfree (s->objfile->md, s->fullname); xmfree (s->objfile->md, s->fullname);
if (s->debugformat != NULL) if (s->debugformat != NULL)
xmfree (s->objfile->md, s->debugformat); xmfree (s->objfile->md, s->debugformat);
xmfree (s->objfile->md, (PTR) s); xmfree (s->objfile->md, s);
} }
void void
@ -368,7 +368,7 @@ dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab,
" Full symtab was read (at "); " Full symtab was read (at ");
gdb_print_host_address (psymtab->symtab, outfile); gdb_print_host_address (psymtab->symtab, outfile);
fprintf_filtered (outfile, " by function at "); 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"); fprintf_filtered (outfile, ")\n");
} }
@ -565,7 +565,7 @@ Arguments missing: an output file name and an optional symbol file name");
1 for success. */ 1 for success. */
static int static int
print_symbol (PTR args) print_symbol (void *args)
{ {
struct symbol *symbol = ((struct print_symbol_args *) args)->symbol; struct symbol *symbol = ((struct print_symbol_args *) args)->symbol;
int depth = ((struct print_symbol_args *) args)->depth; int depth = ((struct print_symbol_args *) args)->depth;

View file

@ -289,13 +289,13 @@ v850ice_wndproc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
result = TRUE; result = TRUE;
break; break;
case STATE_CHANGE_STEPI: 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)) RETURN_MASK_ALL))
printf_unfiltered ("stepi errored\n"); printf_unfiltered ("stepi errored\n");
result = TRUE; result = TRUE;
break; break;
case STATE_CHANGE_NEXTI: 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)) RETURN_MASK_ALL))
printf_unfiltered ("nexti errored\n"); printf_unfiltered ("nexti errored\n");
result = TRUE; result = TRUE;

View file

@ -193,7 +193,7 @@ static void xcoff_symfile_finish (struct objfile *);
static void static void
xcoff_symfile_offsets (struct objfile *, struct section_addr_info *addrs); 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 *); static char *coff_getfilename (union internal_auxent *, struct objfile *);
@ -237,7 +237,7 @@ struct find_targ_sec_arg
static void find_targ_sec (bfd *, asection *, void *); static void find_targ_sec (bfd *, asection *, void *);
static 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 find_targ_sec_arg *args = (struct find_targ_sec_arg *) obj;
struct objfile *objfile = args->objfile; struct objfile *objfile = args->objfile;
@ -1699,7 +1699,7 @@ gotit:
* mainline code can read the whole thing for efficiency. * mainline code can read the whole thing for efficiency.
*/ */
static void 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; struct coff_symfile_info *info;
int size, count; int size, count;
@ -2554,7 +2554,7 @@ scan_xcoff_symtab (struct objfile *objfile)
psymtab_include_list = (char **) psymtab_include_list = (char **)
alloca ((includes_allocated *= 2) * alloca ((includes_allocated *= 2) *
sizeof (char *)); sizeof (char *));
memcpy ((PTR) psymtab_include_list, (PTR) orig, memcpy (psymtab_include_list, orig,
includes_used * sizeof (char *)); includes_used * sizeof (char *));
} }
continue; continue;