mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
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:
parent
88e90c405f
commit
4efb68b1ad
@ -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>
|
||||
|
||||
* main.c (captured_main): Don't use PTR.
|
||||
|
@ -66,7 +66,7 @@ static void val_print_packed_array_elements (struct type *, char *valaddr,
|
||||
|
||||
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 @@ ada_val_print (struct type *type, char *valaddr0, int embedded_offset,
|
||||
/* 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,
|
||||
|
@ -73,7 +73,7 @@ static void map_breakpoint_numbers (char *, void (*)(struct breakpoint *));
|
||||
|
||||
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 void breakpoint_1 (int, int);
|
||||
|
||||
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 @@ typedef struct
|
||||
}
|
||||
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 @@ bpstat_clear_actions (bpstat bs)
|
||||
/* 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 @@ bpstat_print (bpstat bs)
|
||||
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 @@ bpstat_alloc (struct breakpoint *b, bpstat cbs /* Current "bs" value */ )
|
||||
/* Check watchpoint condition. */
|
||||
|
||||
static int
|
||||
watchpoint_check (PTR p)
|
||||
watchpoint_check (void *p)
|
||||
{
|
||||
bpstat bs = (bpstat) p;
|
||||
struct breakpoint *b;
|
||||
@ -6232,7 +6232,7 @@ catch_exception_command_1 (enum exception_event_kind ex_event, char *arg,
|
||||
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 @@ delete_command (char *arg, int from_tty)
|
||||
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;
|
||||
|
@ -1228,7 +1228,7 @@ struct source_cleanup_lines_args
|
||||
};
|
||||
|
||||
static void
|
||||
source_cleanup_lines (PTR args)
|
||||
source_cleanup_lines (void *args)
|
||||
{
|
||||
struct source_cleanup_lines_args *p =
|
||||
(struct source_cleanup_lines_args *) args;
|
||||
|
@ -58,7 +58,7 @@ static struct core_fns *core_vec = NULL;
|
||||
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 core_close_cleanup (void *ignore);
|
||||
|
||||
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 @@ core_close_cleanup (void *ignore)
|
||||
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 @@ solib_add_stub (PTR from_ttyp)
|
||||
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;
|
||||
|
@ -4008,7 +4008,7 @@ bfd_lookup_symbol (bfd *abfd, const char *symname)
|
||||
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++)
|
||||
|
@ -638,7 +638,7 @@ dbx_symfile_init (struct objfile *objfile)
|
||||
/* 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 @@ dbx_symfile_init (struct objfile *objfile)
|
||||
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 @@ fill_symbuf (bfd *sym_bfd)
|
||||
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 @@ find_corresponding_bincl_psymtab (char *name, int instance)
|
||||
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 @@ read_dbx_symtab (struct objfile *objfile)
|
||||
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 @@ read_dbx_symtab (struct objfile *objfile)
|
||||
(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
|
||||
|
@ -245,8 +245,8 @@ enum auto_boolean
|
||||
struct cleanup
|
||||
{
|
||||
struct cleanup *next;
|
||||
void (*function) (PTR);
|
||||
PTR arg;
|
||||
void (*function) (void *);
|
||||
void *arg;
|
||||
};
|
||||
|
||||
|
||||
@ -967,7 +967,7 @@ extern int catch_exceptions (struct ui_out *uiout,
|
||||
|
||||
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
|
||||
|
@ -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. */
|
||||
|
||||
|
@ -621,7 +621,7 @@ dwarf2_invalid_attrib_class_complaint (const char *arg1, const char *arg2)
|
||||
|
||||
/* 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 @@ 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_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 @@ static struct type *dwarf2_fundamental_type (struct objfile *, int);
|
||||
|
||||
/* 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 @@ dwarf2_has_info (bfd *abfd)
|
||||
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 @@ dwarf2_read_abbrevs (bfd *abfd, struct comp_unit_head *cu_header)
|
||||
|
||||
/* 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 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
|
||||
|
||||
/* ARGSUSED */
|
||||
static void
|
||||
dwarf2_free_tmp_obstack (PTR ignore)
|
||||
dwarf2_free_tmp_obstack (void *ignore)
|
||||
{
|
||||
obstack_free (&dwarf2_tmp_obstack, NULL);
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ static const struct language_defn *cu_language_defn;
|
||||
/* 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 @@ alloc_utype (DIE_REF die_ref, struct type *utypep)
|
||||
|
||||
SYNOPSIS
|
||||
|
||||
static void free_utypes (PTR dummy)
|
||||
static void free_utypes (void *dummy)
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
@ -782,7 +782,7 @@ alloc_utype (DIE_REF die_ref, struct type *utypep)
|
||||
*/
|
||||
|
||||
static void
|
||||
free_utypes (PTR dummy)
|
||||
free_utypes (void *dummy)
|
||||
{
|
||||
xfree (utypes);
|
||||
utypes = NULL;
|
||||
@ -2212,7 +2212,7 @@ read_ofile_symtab (struct partial_symtab *pst)
|
||||
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");
|
||||
|
10
gdb/exec.c
10
gdb/exec.c
@ -55,7 +55,7 @@ void (*file_changed_hook) (char *);
|
||||
|
||||
/* 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 set_section_command (char *, int);
|
||||
|
||||
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 @@ file_command (char *arg, int from_tty)
|
||||
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 @@ build_section_table (bfd *some_bfd, struct section_table **start,
|
||||
}
|
||||
|
||||
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 @@ xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
|
||||
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)
|
||||
|
@ -184,7 +184,7 @@ typedef struct
|
||||
}
|
||||
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 @@ internalize_unwinds (struct objfile *objfile, struct unwind_table_entry *table,
|
||||
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 @@ read_unwind_info (struct objfile *objfile)
|
||||
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 @@ 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 */
|
||||
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 @@ initialize_hp_cxx_exception_support (void)
|
||||
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--;
|
||||
|
@ -1664,7 +1664,7 @@ hpread_symfile_init (struct objfile *objfile)
|
||||
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 @@ hpread_build_psymtabs (struct objfile *objfile, int mainline)
|
||||
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;
|
||||
|
@ -114,7 +114,7 @@ void _initialize_infcmd (void);
|
||||
|
||||
#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 @@ signal_command (char *signum_exp, int from_tty)
|
||||
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);
|
||||
}
|
||||
|
@ -2950,7 +2950,7 @@ parse_partial_symbols (struct objfile *objfile)
|
||||
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;
|
||||
|
@ -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 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 @@ int mapped_symbol_files; /* Try to use mapped symbol files */
|
||||
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 @@ allocate_objfile (bfd *abfd, int flags)
|
||||
flags);
|
||||
if (fd >= 0)
|
||||
{
|
||||
PTR md;
|
||||
void *md;
|
||||
|
||||
if ((md = map_to_file (fd)) == NULL)
|
||||
{
|
||||
@ -900,13 +900,13 @@ open_mapped_file (char *filename, long mtime, int flags)
|
||||
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 @@ map_to_file (int fd)
|
||||
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 @@ map_to_file (int fd)
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ struct objfile
|
||||
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 @@ struct objfile
|
||||
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,
|
||||
|
@ -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 @@ ocd_close (int quitting)
|
||||
/* Stub for catch_errors. */
|
||||
|
||||
static int
|
||||
ocd_start_remote (PTR dummy)
|
||||
ocd_start_remote (void *dummy)
|
||||
{
|
||||
unsigned char buf[10], *p;
|
||||
int pktlen;
|
||||
|
@ -1355,20 +1355,20 @@ bfd_copy (bfd *from_bfd, bfd *to_bfd)
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
@ -1283,13 +1283,13 @@ mips_request (int cmd,
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ static void sds_fetch_registers (int);
|
||||
|
||||
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 @@ sds_close (int quitting)
|
||||
/* Stub for catch_errors. */
|
||||
|
||||
static int
|
||||
sds_start_remote (PTR dummy)
|
||||
sds_start_remote (void *dummy)
|
||||
{
|
||||
int c;
|
||||
unsigned char buf[200];
|
||||
|
@ -638,7 +638,7 @@ struct find_sect_args
|
||||
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;
|
||||
|
||||
|
@ -197,7 +197,7 @@ bfd_lookup_symbol (bfd *abfd, char *symname)
|
||||
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 @@ bfd_lookup_symbol (bfd *abfd, char *symname)
|
||||
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++)
|
||||
|
10
gdb/solib.c
10
gdb/solib.c
@ -57,7 +57,7 @@ static int solib_cleanup_queued = 0; /* make_run_cleanup called */
|
||||
|
||||
/* 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 @@ solib_open (char *in_pathname, char **found_pathname)
|
||||
*/
|
||||
|
||||
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 @@ free_so (struct so_list *so)
|
||||
/* 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 @@ update_solib_list (int from_tty, struct target_ops *target)
|
||||
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 @@ clear_solib (void)
|
||||
}
|
||||
|
||||
static void
|
||||
do_clear_solib (PTR dummy)
|
||||
do_clear_solib (void *dummy)
|
||||
{
|
||||
solib_cleanup_queued = 0;
|
||||
clear_solib ();
|
||||
|
@ -165,12 +165,12 @@ struct print_args_args
|
||||
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;
|
||||
|
@ -411,7 +411,7 @@ entry_point_address (void)
|
||||
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 @@ syms_from_objfile (struct objfile *objfile, struct section_addr_info *addrs,
|
||||
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 @@ init_psymbol_list (struct objfile *objfile, int total_symbols)
|
||||
|
||||
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
|
||||
|
@ -252,7 +252,7 @@ extern struct partial_symtab *allocate_psymtab (char *, struct objfile *);
|
||||
|
||||
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 *);
|
||||
|
||||
|
@ -78,7 +78,7 @@ struct print_symbol_args
|
||||
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 @@ free_symtab_block (struct objfile *objfile, struct block *b)
|
||||
{
|
||||
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 @@ free_symtab (register struct symtab *s)
|
||||
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 @@ free_symtab (register struct symtab *s)
|
||||
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_symtab (register struct symtab *s)
|
||||
|
||||
/* 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 @@ dump_psymtab (struct objfile *objfile, struct partial_symtab *psymtab,
|
||||
" 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 @@ Arguments missing: an output file name and an optional symbol file name");
|
||||
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;
|
||||
|
@ -289,13 +289,13 @@ v850ice_wndproc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
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;
|
||||
|
@ -193,7 +193,7 @@ static void xcoff_symfile_finish (struct objfile *);
|
||||
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 @@ struct find_targ_sec_arg
|
||||
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 @@ read_symbol_lineno (int symno)
|
||||
* 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 @@ scan_xcoff_symtab (struct objfile *objfile)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user