mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 18:14:13 +08:00
* breakpoint.c, buildsym.c, c-exp.y, coffread.c, command.c,
core.c, cplus-dem.c, dbxread.c, dwarfread.c, elfread.c, environ.c, eval.c, findvar.c, gdbtypes.c, hppabsd-tdep.c, hppahpux-tdep.c, i386-tdep.c, ieee-float.c, infcmd.c, inflow.c, infptrace.c, infrun.c, m2-exp.y, mipsread.c, objfiles.c, parse.c, procfs.c, putenv.c, remote-mm.c, remote-vx.c, solib.c, sparc-tdep.c, sparc-xdep.c, stack.c, symfile.c, symtab.c, symtab.h, target.c, tm-i386v.h, tm-sparc.h, utils.c, valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Remove "(void)" casts from function calls where the return value is ignored, in accordance with GNU coding standards.
This commit is contained in:
parent
4c7c6bab1f
commit
4ed3a9ea66
@ -1,3 +1,17 @@
|
||||
Fri Jul 3 20:18:26 1992 Fred Fish (fnf@cygnus.com)
|
||||
|
||||
* breakpoint.c, buildsym.c, c-exp.y, coffread.c, command.c,
|
||||
core.c, cplus-dem.c, dbxread.c, dwarfread.c, elfread.c, environ.c,
|
||||
eval.c, findvar.c, gdbtypes.c, hppabsd-tdep.c, hppahpux-tdep.c,
|
||||
i386-tdep.c, ieee-float.c, infcmd.c, inflow.c, infptrace.c,
|
||||
infrun.c, m2-exp.y, mipsread.c, objfiles.c, parse.c, procfs.c,
|
||||
putenv.c, remote-mm.c, remote-vx.c, solib.c, sparc-tdep.c,
|
||||
sparc-xdep.c, stack.c, symfile.c, symtab.c, symtab.h, target.c,
|
||||
tm-i386v.h, tm-sparc.h, utils.c, valarith.c, valops.c, valprint.c,
|
||||
values.c, xcoffread.c:
|
||||
Remove "(void)" casts from function calls where the return value
|
||||
is ignored, in accordance with GNU coding standards.
|
||||
|
||||
Fri Jul 3 00:00:49 1992 John Gilmore (gnu at cygnus.com)
|
||||
|
||||
* dbxread.c (process_one_symbol): Ignore N_MAIN, N_ENDM for Solaris.
|
||||
|
@ -391,8 +391,8 @@ read_memory_nobpt (memaddr, myaddr, len)
|
||||
bptlen -= (membpt + bptlen) - (memaddr + len);
|
||||
}
|
||||
|
||||
(void) memcpy (myaddr + membpt - memaddr,
|
||||
b->shadow_contents + bptoffset, bptlen);
|
||||
memcpy (myaddr + membpt - memaddr,
|
||||
b->shadow_contents + bptoffset, bptlen);
|
||||
|
||||
if (membpt > memaddr)
|
||||
{
|
||||
@ -577,7 +577,7 @@ bpstat_copy (bs)
|
||||
for (; bs != NULL; bs = bs->next)
|
||||
{
|
||||
tmp = (bpstat) xmalloc (sizeof (*tmp));
|
||||
(void) memcpy (tmp, bs, sizeof (*tmp));
|
||||
memcpy (tmp, bs, sizeof (*tmp));
|
||||
if (p == NULL)
|
||||
/* This is the first thing in the chain. */
|
||||
retval = tmp;
|
||||
@ -1209,7 +1209,7 @@ set_raw_breakpoint (sal)
|
||||
register struct breakpoint *b, *b1;
|
||||
|
||||
b = (struct breakpoint *) xmalloc (sizeof (struct breakpoint));
|
||||
(void) memset (b, 0, sizeof (*b));
|
||||
memset (b, 0, sizeof (*b));
|
||||
b->address = sal.pc;
|
||||
b->symtab = sal.symtab;
|
||||
b->line_number = sal.line;
|
||||
@ -1802,7 +1802,7 @@ get_catch_sals (this_level_only)
|
||||
|
||||
bl = blockvector_for_pc (BLOCK_END (block) - 4, &index);
|
||||
blocks_searched = (char *) alloca (BLOCKVECTOR_NBLOCKS (bl) * sizeof (char));
|
||||
(void) memset (blocks_searched, 0, BLOCKVECTOR_NBLOCKS (bl) * sizeof (char));
|
||||
memset (blocks_searched, 0, BLOCKVECTOR_NBLOCKS (bl) * sizeof (char));
|
||||
|
||||
while (block != 0)
|
||||
{
|
||||
@ -2250,7 +2250,7 @@ breakpoint_re_set ()
|
||||
ALL_BREAKPOINTS_SAFE (b, temp)
|
||||
{
|
||||
sprintf (message, message1, b->number); /* Format possible error msg */
|
||||
(void) catch_errors (breakpoint_re_set_one, (char *) b, message);
|
||||
catch_errors (breakpoint_re_set_one, (char *) b, message);
|
||||
}
|
||||
|
||||
create_longjmp_breakpoint("longjmp");
|
||||
|
@ -220,7 +220,7 @@ dbx_lookup_type (typenums)
|
||||
type_vector = (struct type **)
|
||||
xrealloc ((char *) type_vector,
|
||||
(type_vector_length * sizeof (struct type *)));
|
||||
(void) memset (&type_vector[old_len], 0,
|
||||
memset (&type_vector[old_len], 0,
|
||||
(type_vector_length - old_len) * sizeof (struct type *));
|
||||
}
|
||||
return &type_vector[index];
|
||||
@ -243,7 +243,7 @@ dbx_lookup_type (typenums)
|
||||
f->length *= 2;
|
||||
f->vector = (struct type **)
|
||||
xrealloc ((char *) f->vector, f->length * sizeof (struct type *));
|
||||
(void) memset (&f->vector[f_orig_length], 0,
|
||||
memset (&f->vector[f_orig_length], 0,
|
||||
(f->length - f_orig_length) * sizeof (struct type *));
|
||||
}
|
||||
return &f->vector[index];
|
||||
@ -968,7 +968,7 @@ void
|
||||
buildsym_new_init ()
|
||||
{
|
||||
/* Empty the hash table of global syms looking for values. */
|
||||
(void) memset (global_sym_chain, 0, sizeof global_sym_chain);
|
||||
memset (global_sym_chain, 0, sizeof global_sym_chain);
|
||||
|
||||
buildsym_init ();
|
||||
}
|
||||
@ -2842,7 +2842,7 @@ read_array_type (pp, type, objfile)
|
||||
/* Create range type. */
|
||||
range_type = (struct type *)
|
||||
obstack_alloc (&objfile -> type_obstack, sizeof (struct type));
|
||||
(void) memset (range_type, 0, sizeof (struct type));
|
||||
memset (range_type, 0, sizeof (struct type));
|
||||
TYPE_OBJFILE (range_type) = objfile;
|
||||
TYPE_CODE (range_type) = TYPE_CODE_RANGE;
|
||||
TYPE_TARGET_TYPE (range_type) = index_type;
|
||||
@ -2922,7 +2922,7 @@ read_enum_type (pp, type, objfile)
|
||||
n = read_number (pp, ',');
|
||||
|
||||
sym = (struct symbol *) obstack_alloc (&objfile -> symbol_obstack, sizeof (struct symbol));
|
||||
(void) memset (sym, 0, sizeof (struct symbol));
|
||||
memset (sym, 0, sizeof (struct symbol));
|
||||
SYMBOL_NAME (sym) = name;
|
||||
SYMBOL_CLASS (sym) = LOC_CONST;
|
||||
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
|
||||
@ -3282,7 +3282,7 @@ read_range_type (pp, typenums, objfile)
|
||||
result_type = (struct type *)
|
||||
obstack_alloc (&objfile -> type_obstack,
|
||||
sizeof (struct type));
|
||||
(void) memset (result_type, 0, sizeof (struct type));
|
||||
memset (result_type, 0, sizeof (struct type));
|
||||
TYPE_OBJFILE (result_type) = objfile;
|
||||
TYPE_LENGTH (result_type) = nbits / TARGET_CHAR_BIT;
|
||||
TYPE_CODE (result_type) = TYPE_CODE_INT;
|
||||
@ -3394,7 +3394,7 @@ read_range_type (pp, typenums, objfile)
|
||||
|
||||
result_type = (struct type *)
|
||||
obstack_alloc (&objfile -> type_obstack, sizeof (struct type));
|
||||
(void) memset (result_type, 0, sizeof (struct type));
|
||||
memset (result_type, 0, sizeof (struct type));
|
||||
TYPE_OBJFILE (result_type) = objfile;
|
||||
|
||||
TYPE_CODE (result_type) = TYPE_CODE_RANGE;
|
||||
@ -3409,7 +3409,7 @@ read_range_type (pp, typenums, objfile)
|
||||
TYPE_FIELDS (result_type) =
|
||||
(struct field *) obstack_alloc (&objfile -> type_obstack,
|
||||
2 * sizeof (struct field));
|
||||
(void) memset (TYPE_FIELDS (result_type), 0, 2 * sizeof (struct field));
|
||||
memset (TYPE_FIELDS (result_type), 0, 2 * sizeof (struct field));
|
||||
TYPE_FIELD_BITPOS (result_type, 0) = n2;
|
||||
TYPE_FIELD_BITPOS (result_type, 1) = n3;
|
||||
|
||||
@ -3497,7 +3497,7 @@ read_args (pp, end, objfile)
|
||||
else if (TYPE_CODE (types[n-1]) != TYPE_CODE_VOID)
|
||||
{
|
||||
rval = (struct type **) xmalloc ((n + 1) * sizeof (struct type *));
|
||||
(void) memset (rval + n, 0, sizeof (struct type *));
|
||||
memset (rval + n, 0, sizeof (struct type *));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1221,7 +1221,7 @@ yylex ()
|
||||
{
|
||||
char *err_copy = (char *) alloca (p - tokstart + 1);
|
||||
|
||||
(void) memcpy (err_copy, tokstart, p - tokstart);
|
||||
memcpy (err_copy, tokstart, p - tokstart);
|
||||
err_copy[p - tokstart] = 0;
|
||||
error ("Invalid number \"%s\".", err_copy);
|
||||
}
|
||||
|
@ -324,7 +324,7 @@ coff_lookup_type (index)
|
||||
type_vector = (struct type **)
|
||||
xrealloc ((char *) type_vector,
|
||||
type_vector_length * sizeof (struct type *));
|
||||
(void) memset (&type_vector[old_vector_length], 0,
|
||||
memset (&type_vector[old_vector_length], 0,
|
||||
(type_vector_length - old_vector_length) * sizeof(struct type *));
|
||||
}
|
||||
return &type_vector[index];
|
||||
@ -918,14 +918,14 @@ read_coff_symtab (symtab_offset, nsyms, objfile)
|
||||
nlist_stream_global = stream;
|
||||
nlist_nsyms_global = nsyms;
|
||||
last_source_file = 0;
|
||||
(void) memset (opaque_type_chain, 0, sizeof opaque_type_chain);
|
||||
memset (opaque_type_chain, 0, sizeof opaque_type_chain);
|
||||
|
||||
if (type_vector) /* Get rid of previous one */
|
||||
free ((PTR)type_vector);
|
||||
type_vector_length = 160;
|
||||
type_vector = (struct type **)
|
||||
xmalloc (type_vector_length * sizeof (struct type *));
|
||||
(void) memset (type_vector, 0, type_vector_length * sizeof (struct type *));
|
||||
memset (type_vector, 0, type_vector_length * sizeof (struct type *));
|
||||
|
||||
coff_start_symtab ();
|
||||
|
||||
@ -1057,7 +1057,7 @@ read_coff_symtab (symtab_offset, nsyms, objfile)
|
||||
break;
|
||||
}
|
||||
}
|
||||
(void) process_coff_symbol (cs, &main_aux, objfile);
|
||||
process_coff_symbol (cs, &main_aux, objfile);
|
||||
break;
|
||||
|
||||
case C_FCN:
|
||||
@ -1164,7 +1164,7 @@ read_coff_symtab (symtab_offset, nsyms, objfile)
|
||||
break;
|
||||
|
||||
default:
|
||||
(void) process_coff_symbol (cs, &main_aux, objfile);
|
||||
process_coff_symbol (cs, &main_aux, objfile);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1318,7 +1318,7 @@ init_stringtab (chan, offset)
|
||||
if (stringtab == NULL)
|
||||
return -1;
|
||||
|
||||
(void) memcpy (stringtab, &length, sizeof length);
|
||||
memcpy (stringtab, &length, sizeof length);
|
||||
if (length == sizeof length) /* Empty table -- just the count */
|
||||
return 0;
|
||||
|
||||
@ -1425,7 +1425,7 @@ init_lineno (chan, offset, size)
|
||||
return -1;
|
||||
|
||||
/* Terminate it with an all-zero sentinel record */
|
||||
(void) memset (linetab + size, 0, local_linesz);
|
||||
memset (linetab + size, 0, local_linesz);
|
||||
|
||||
make_cleanup (free, linetab); /* Be sure it gets de-allocated. */
|
||||
return 0;
|
||||
@ -1484,7 +1484,7 @@ patch_type (type, real_type)
|
||||
TYPE_FIELDS (target) = (struct field *)
|
||||
obstack_alloc (¤t_objfile -> type_obstack, field_size);
|
||||
|
||||
(void) memcpy (TYPE_FIELDS (target), TYPE_FIELDS (real_target), field_size);
|
||||
memcpy (TYPE_FIELDS (target), TYPE_FIELDS (real_target), field_size);
|
||||
|
||||
if (TYPE_NAME (real_target))
|
||||
{
|
||||
@ -1575,7 +1575,7 @@ process_coff_symbol (cs, aux, objfile)
|
||||
#endif
|
||||
struct type *temptype;
|
||||
|
||||
(void) memset (sym, 0, sizeof (struct symbol));
|
||||
memset (sym, 0, sizeof (struct symbol));
|
||||
name = cs->c_name;
|
||||
name = (name[0] == '_' ? name + offset : name);
|
||||
SYMBOL_NAME (sym) = obstack_copy0 (&objfile->symbol_obstack, name, strlen (name));
|
||||
@ -1594,7 +1594,7 @@ process_coff_symbol (cs, aux, objfile)
|
||||
struct type *new = (struct type *)
|
||||
obstack_alloc (&objfile->symbol_obstack, sizeof (struct type));
|
||||
|
||||
(void) memcpy (new, lookup_function_type (decode_function_type (cs, cs->c_type, aux)),
|
||||
memcpy (new, lookup_function_type (decode_function_type (cs, cs->c_type, aux)),
|
||||
sizeof(struct type));
|
||||
SYMBOL_TYPE (sym) = new;
|
||||
in_function_type = SYMBOL_TYPE(sym);
|
||||
@ -1792,7 +1792,7 @@ decode_type (cs, c_type, aux)
|
||||
type = (struct type *)
|
||||
obstack_alloc (¤t_objfile -> type_obstack,
|
||||
sizeof (struct type));
|
||||
(void) memset (type, 0, sizeof (struct type));
|
||||
memset (type, 0, sizeof (struct type));
|
||||
TYPE_OBJFILE (type) = current_objfile;
|
||||
|
||||
base_type = decode_type (cs, new_c_type, aux);
|
||||
@ -2103,7 +2103,7 @@ coff_read_enum_type (index, length, lastsym)
|
||||
{
|
||||
case C_MOE:
|
||||
sym = (struct symbol *) xmalloc (sizeof (struct symbol));
|
||||
(void) memset (sym, 0, sizeof (struct symbol));
|
||||
memset (sym, 0, sizeof (struct symbol));
|
||||
|
||||
SYMBOL_NAME (sym) = savestring (name, strlen (name));
|
||||
SYMBOL_CLASS (sym) = LOC_CONST;
|
||||
|
@ -235,7 +235,7 @@ add_show_from_set (setcmd, list)
|
||||
struct cmd_list_element *showcmd =
|
||||
(struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element));
|
||||
|
||||
(void) memcpy (showcmd, setcmd, sizeof (struct cmd_list_element));
|
||||
memcpy (showcmd, setcmd, sizeof (struct cmd_list_element));
|
||||
delete_cmd (showcmd->name, list);
|
||||
showcmd->type = show_cmd;
|
||||
|
||||
|
@ -180,7 +180,7 @@ core_open (filename, from_tty)
|
||||
|
||||
/* Add symbols and section mappings for any shared libraries */
|
||||
#ifdef SOLIB_ADD
|
||||
(void) catch_errors (solib_add_stub, (char *)from_tty, (char *)0);
|
||||
catch_errors (solib_add_stub, (char *)from_tty, (char *)0);
|
||||
#endif
|
||||
|
||||
/* Now, set up the frame cache, and print the top of stack */
|
||||
|
@ -343,7 +343,7 @@ cplus_demangle (mangled, options)
|
||||
|
||||
if ((mangled != NULL) && (*mangled != '\0'))
|
||||
{
|
||||
(void) memset ((char *) work, 0, sizeof (work));
|
||||
memset ((char *) work, 0, sizeof (work));
|
||||
work -> options = options;
|
||||
|
||||
string_init (&decl);
|
||||
|
@ -424,7 +424,7 @@ add_new_header_file (name, instance)
|
||||
header_files[i].length = 10;
|
||||
header_files[i].vector
|
||||
= (struct type **) xmalloc (10 * sizeof (struct type *));
|
||||
(void) memset (header_files[i].vector, 0, 10 * sizeof (struct type *));
|
||||
memset (header_files[i].vector, 0, 10 * sizeof (struct type *));
|
||||
|
||||
add_this_object_header_file (i);
|
||||
}
|
||||
@ -1813,7 +1813,7 @@ process_one_symbol (type, desc, valu, name, offset, objfile)
|
||||
}
|
||||
break; /* Ignore repeated SOs */
|
||||
}
|
||||
(void) end_symtab (valu, 0, 0, objfile);
|
||||
end_symtab (valu, 0, 0, objfile);
|
||||
}
|
||||
start_symtab (name, NULL, valu);
|
||||
break;
|
||||
@ -1872,7 +1872,7 @@ process_one_symbol (type, desc, valu, name, offset, objfile)
|
||||
int i;
|
||||
struct symbol *sym =
|
||||
(struct symbol *) xmmalloc (objfile -> md, sizeof (struct symbol));
|
||||
(void) memset (sym, 0, sizeof *sym);
|
||||
memset (sym, 0, sizeof *sym);
|
||||
SYMBOL_NAME (sym) = savestring (name, strlen (name));
|
||||
SYMBOL_CLASS (sym) = LOC_BLOCK;
|
||||
SYMBOL_NAMESPACE (sym) = (enum namespace)((long)
|
||||
|
@ -596,7 +596,7 @@ read_lexical_block_scope (dip, thisdie, enddie, objfile)
|
||||
{
|
||||
register struct context_stack *new;
|
||||
|
||||
(void) push_context (0, dip -> at_low_pc);
|
||||
push_context (0, dip -> at_low_pc);
|
||||
process_dies (thisdie + dip -> die_length, enddie, objfile);
|
||||
new = pop_context ();
|
||||
if (local_symbols != NULL)
|
||||
@ -694,7 +694,7 @@ alloc_utype (die_ref, utypep)
|
||||
utypep = (struct type *)
|
||||
obstack_alloc (¤t_objfile -> type_obstack,
|
||||
sizeof (struct type));
|
||||
(void) memset (utypep, 0, sizeof (struct type));
|
||||
memset (utypep, 0, sizeof (struct type));
|
||||
TYPE_OBJFILE (utypep) = current_objfile;
|
||||
}
|
||||
*typep = utypep;
|
||||
@ -1112,7 +1112,7 @@ decode_subscr_data (scan, end)
|
||||
typep = (struct type *)
|
||||
obstack_alloc (¤t_objfile -> type_obstack,
|
||||
sizeof (struct type));
|
||||
(void) memset (typep, 0, sizeof (struct type));
|
||||
memset (typep, 0, sizeof (struct type));
|
||||
TYPE_OBJFILE (typep) = current_objfile;
|
||||
TYPE_CODE (typep) = TYPE_CODE_ARRAY;
|
||||
TYPE_LENGTH (typep) = TYPE_LENGTH (nexttype);
|
||||
@ -1191,7 +1191,7 @@ dwarf_read_array_type (dip)
|
||||
{
|
||||
if ((utype = lookup_utype (dip -> die_ref)) == NULL)
|
||||
{
|
||||
(void) alloc_utype (dip -> die_ref, type);
|
||||
alloc_utype (dip -> die_ref, type);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1230,7 +1230,7 @@ read_tag_pointer_type (dip)
|
||||
if ((utype = lookup_utype (dip -> die_ref)) == NULL)
|
||||
{
|
||||
utype = lookup_pointer_type (type);
|
||||
(void) alloc_utype (dip -> die_ref, utype);
|
||||
alloc_utype (dip -> die_ref, utype);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1294,7 +1294,7 @@ read_subroutine_type (dip, thisdie, enddie)
|
||||
/* This is the first reference to one of these types. Make
|
||||
a new one and place it in the user defined types. */
|
||||
ftype = lookup_function_type (type);
|
||||
(void) alloc_utype (dip -> die_ref, ftype);
|
||||
alloc_utype (dip -> die_ref, ftype);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1449,7 +1449,7 @@ enum_type (dip, objfile)
|
||||
/* Handcraft a new symbol for this enum member. */
|
||||
sym = (struct symbol *) obstack_alloc (&objfile->symbol_obstack,
|
||||
sizeof (struct symbol));
|
||||
(void) memset (sym, 0, sizeof (struct symbol));
|
||||
memset (sym, 0, sizeof (struct symbol));
|
||||
SYMBOL_NAME (sym) = create_name (list -> field.name,
|
||||
&objfile->symbol_obstack);
|
||||
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
|
||||
@ -1576,7 +1576,7 @@ read_file_scope (dip, thisdie, enddie, objfile)
|
||||
numutypes = (enddie - thisdie) / 4;
|
||||
utypes = (struct type **) xmalloc (numutypes * sizeof (struct type *));
|
||||
back_to = make_cleanup (free, utypes);
|
||||
(void) memset (utypes, 0, numutypes * sizeof (struct type *));
|
||||
memset (utypes, 0, numutypes * sizeof (struct type *));
|
||||
start_symtab (dip -> at_name, NULL, dip -> at_low_pc);
|
||||
decode_line_numbers (lnbase);
|
||||
process_dies (thisdie + dip -> die_length, enddie, objfile);
|
||||
@ -1679,7 +1679,7 @@ process_dies (thisdie, enddie, objfile)
|
||||
read_tag_pointer_type (&di);
|
||||
break;
|
||||
default:
|
||||
(void) new_symbol (&di, objfile);
|
||||
new_symbol (&di, objfile);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2516,7 +2516,7 @@ new_symbol (dip, objfile)
|
||||
{
|
||||
sym = (struct symbol *) obstack_alloc (&objfile -> symbol_obstack,
|
||||
sizeof (struct symbol));
|
||||
(void) memset (sym, 0, sizeof (struct symbol));
|
||||
memset (sym, 0, sizeof (struct symbol));
|
||||
SYMBOL_NAME (sym) = create_name (dip -> at_name, &objfile->symbol_obstack);
|
||||
/* default assumptions */
|
||||
SYMBOL_NAMESPACE (sym) = VAR_NAMESPACE;
|
||||
@ -2974,7 +2974,7 @@ create_name (name, obstackp)
|
||||
|
||||
length = strlen (name) + 1;
|
||||
newname = (char *) obstack_alloc (obstackp, length);
|
||||
(void) strcpy (newname, name);
|
||||
strcpy (newname, name);
|
||||
return (newname);
|
||||
}
|
||||
|
||||
@ -3033,7 +3033,7 @@ basicdieinfo (dip, diep, objfile)
|
||||
struct objfile *objfile;
|
||||
{
|
||||
curdie = dip;
|
||||
(void) memset (dip, 0, sizeof (struct dieinfo));
|
||||
memset (dip, 0, sizeof (struct dieinfo));
|
||||
dip -> die = diep;
|
||||
dip -> die_ref = dbroff + (diep - dbbase);
|
||||
dip -> die_length = target_to_host (diep, SIZEOF_DIE_LENGTH, GET_UNSIGNED,
|
||||
|
@ -350,7 +350,7 @@ elf_symfile_read (objfile, addr, mainline)
|
||||
/* Now process debugging information, which is contained in
|
||||
special ELF sections. We first have to find them... */
|
||||
|
||||
(void) memset ((char *) &ei, 0, sizeof (ei));
|
||||
memset ((char *) &ei, 0, sizeof (ei));
|
||||
bfd_map_over_sections (abfd, elf_locate_sections, (PTR) &ei);
|
||||
if (ei.dboffset && ei.lnoffset)
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ alloc_type (objfile)
|
||||
type = (struct type *) obstack_alloc (&objfile -> type_obstack,
|
||||
sizeof (struct type));
|
||||
}
|
||||
(void) memset ((char *)type, 0, sizeof (struct type));
|
||||
memset ((char *)type, 0, sizeof (struct type));
|
||||
|
||||
/* Initialize the fields that might not be zero. */
|
||||
|
||||
@ -362,7 +362,7 @@ smash_to_member_type (type, domain, to_type)
|
||||
|
||||
objfile = TYPE_OBJFILE (type);
|
||||
|
||||
(void) memset ((char *)type, 0, sizeof (struct type));
|
||||
memset ((char *)type, 0, sizeof (struct type));
|
||||
TYPE_OBJFILE (type) = objfile;
|
||||
TYPE_TARGET_TYPE (type) = to_type;
|
||||
TYPE_DOMAIN_TYPE (type) = domain;
|
||||
@ -388,7 +388,7 @@ smash_to_method_type (type, domain, to_type, args)
|
||||
|
||||
objfile = TYPE_OBJFILE (type);
|
||||
|
||||
(void) memset ((char *)type, 0, sizeof (struct type));
|
||||
memset ((char *)type, 0, sizeof (struct type));
|
||||
TYPE_OBJFILE (type) = objfile;
|
||||
TYPE_TARGET_TYPE (type) = to_type;
|
||||
TYPE_DOMAIN_TYPE (type) = domain;
|
||||
@ -930,7 +930,7 @@ lookup_fundamental_type (objfile, typeid)
|
||||
nbytes = FT_NUM_MEMBERS * sizeof (struct type *);
|
||||
objfile -> fundamental_types = (struct type **)
|
||||
obstack_alloc (&objfile -> type_obstack, nbytes);
|
||||
(void) memset ((char *)objfile -> fundamental_types, 0, nbytes);
|
||||
memset ((char *)objfile -> fundamental_types, 0, nbytes);
|
||||
}
|
||||
typep = objfile -> fundamental_types + typeid;
|
||||
if ((type = *typep) == NULL)
|
||||
|
@ -251,7 +251,7 @@ vtophys(space, addr)
|
||||
}
|
||||
#ifdef MACHKERNELDEBUG
|
||||
else if (kerneltype == OS_MACH) {
|
||||
(void) mach_vtophys(space, addr, &phys);
|
||||
mach_vtophys(space, addr, &phys);
|
||||
}
|
||||
#endif
|
||||
#if 0
|
||||
@ -439,7 +439,7 @@ setup_kernel_debugging()
|
||||
panicstr = kvread(ksym_lookup("panicstr"));
|
||||
if (panicstr == ~0)
|
||||
return;
|
||||
(void) kernel_core_file_hook(panicstr, buf, sizeof(buf));
|
||||
kernel_core_file_hook(panicstr, buf, sizeof(buf));
|
||||
for (cp = buf; cp < &buf[sizeof(buf)] && *cp; cp++)
|
||||
if (!isascii(*cp) || (!isprint(*cp) && !isspace(*cp)))
|
||||
*cp = '?';
|
||||
|
@ -251,7 +251,7 @@ vtophys(space, addr)
|
||||
}
|
||||
#ifdef MACHKERNELDEBUG
|
||||
else if (kerneltype == OS_MACH) {
|
||||
(void) mach_vtophys(space, addr, &phys);
|
||||
mach_vtophys(space, addr, &phys);
|
||||
}
|
||||
#endif
|
||||
#if 0
|
||||
@ -439,7 +439,7 @@ setup_kernel_debugging()
|
||||
panicstr = kvread(ksym_lookup("panicstr"));
|
||||
if (panicstr == ~0)
|
||||
return;
|
||||
(void) kernel_core_file_hook(panicstr, buf, sizeof(buf));
|
||||
kernel_core_file_hook(panicstr, buf, sizeof(buf));
|
||||
for (cp = buf; cp < &buf[sizeof(buf)] && *cp; cp++)
|
||||
if (!isascii(*cp) || (!isprint(*cp) && !isspace(*cp)))
|
||||
*cp = '?';
|
||||
|
@ -77,7 +77,7 @@ double_to_ieee_extended (ext_format, from, to)
|
||||
unsigned long mant0, mant1, exponent;
|
||||
unsigned char tobytes[8];
|
||||
|
||||
(void) memset (to, 0, TOTALSIZE);
|
||||
memset (to, 0, TOTALSIZE);
|
||||
if (dfrom == 0)
|
||||
return; /* Result is zero */
|
||||
if (dfrom != dfrom) {
|
||||
|
@ -528,7 +528,7 @@ The expression which contained the function call has been discarded.");
|
||||
|
||||
/* On return, the stack dummy has been popped already. */
|
||||
|
||||
(void) memcpy (buffer, stop_registers, sizeof stop_registers);
|
||||
memcpy (buffer, stop_registers, sizeof stop_registers);
|
||||
}
|
||||
|
||||
/* Proceed until we reach a different source line with pc greater than
|
||||
|
@ -987,7 +987,7 @@ yylex ()
|
||||
{
|
||||
char *err_copy = (char *) alloca (p - tokstart + 1);
|
||||
|
||||
(void) memcpy (err_copy, tokstart, p - tokstart);
|
||||
memcpy (err_copy, tokstart, p - tokstart);
|
||||
err_copy[p - tokstart] = 0;
|
||||
error ("Invalid number \"%s\".", err_copy);
|
||||
}
|
||||
|
@ -386,7 +386,7 @@ xzalloc(size)
|
||||
{
|
||||
PTR p = xmalloc (size);
|
||||
|
||||
(void) memset (p, 0, size);
|
||||
memset (p, 0, size);
|
||||
return p;
|
||||
}
|
||||
|
||||
@ -1280,7 +1280,7 @@ data: /* Common code for symbols describing data */
|
||||
is the displacement from the procedure`s start
|
||||
address of the end of this block. */
|
||||
BLOCK_END(top_stack->cur_block) = sh->value + top_stack->procadr;
|
||||
(void) shrink_block(top_stack->cur_block, top_stack->cur_st);
|
||||
shrink_block(top_stack->cur_block, top_stack->cur_st);
|
||||
} else complain (&stEnd_complaint, (char *)sh->sc);
|
||||
|
||||
pop_parse_stack(); /* restore previous lexical context */
|
||||
|
@ -95,7 +95,7 @@ allocate_objfile (abfd, mapped)
|
||||
if (((mapto = map_to_address ()) == 0) ||
|
||||
((md = mmalloc_attach (fd, (void *) mapto)) == NULL))
|
||||
{
|
||||
(void) close (fd);
|
||||
close (fd);
|
||||
}
|
||||
else if ((objfile = (struct objfile *) mmalloc_getkey (md, 0)) != NULL)
|
||||
{
|
||||
@ -121,7 +121,7 @@ allocate_objfile (abfd, mapped)
|
||||
the first malloc. See comments in init_malloc() and mmcheck(). */
|
||||
init_malloc (md);
|
||||
objfile = (struct objfile *) xmmalloc (md, sizeof (struct objfile));
|
||||
(void) memset (objfile, 0, sizeof (struct objfile));
|
||||
memset (objfile, 0, sizeof (struct objfile));
|
||||
objfile -> md = md;
|
||||
objfile -> mmfd = fd;
|
||||
objfile -> flags |= OBJF_MAPPED;
|
||||
@ -166,7 +166,7 @@ allocate_objfile (abfd, mapped)
|
||||
if (objfile == NULL)
|
||||
{
|
||||
objfile = (struct objfile *) xmalloc (sizeof (struct objfile));
|
||||
(void) memset (objfile, 0, sizeof (struct objfile));
|
||||
memset (objfile, 0, sizeof (struct objfile));
|
||||
objfile -> md = NULL;
|
||||
obstack_full_begin (&objfile -> psymbol_obstack, 0, 0, xmalloc, free,
|
||||
(void *) 0, 0);
|
||||
@ -302,7 +302,7 @@ free_objfile (objfile)
|
||||
mmfd = objfile -> mmfd;
|
||||
mmalloc_detach (objfile -> md);
|
||||
objfile = NULL;
|
||||
(void) close (mmfd);
|
||||
close (mmfd);
|
||||
}
|
||||
|
||||
#endif /* !defined(NO_MMALLOC) && defined(HAVE_MMAP) */
|
||||
|
@ -219,7 +219,7 @@ write_exp_string (str)
|
||||
xrealloc ((char *) expout, (sizeof (struct expression)
|
||||
+ (expout_size * sizeof (union exp_element))));
|
||||
}
|
||||
(void) memcpy ((char *) &expout->elts[expout_ptr - lenelt], str.ptr, len);
|
||||
memcpy ((char *) &expout->elts[expout_ptr - lenelt], str.ptr, len);
|
||||
((char *) &expout->elts[expout_ptr - lenelt])[len] = 0;
|
||||
write_exp_elt_longcst ((LONGEST) len);
|
||||
}
|
||||
@ -231,7 +231,7 @@ char *
|
||||
copy_name (token)
|
||||
struct stoken token;
|
||||
{
|
||||
(void) memcpy (namecopy, token.ptr, token.length);
|
||||
memcpy (namecopy, token.ptr, token.length);
|
||||
namecopy[token.length] = 0;
|
||||
return namecopy;
|
||||
}
|
||||
@ -251,7 +251,7 @@ prefixify_expression (expr)
|
||||
temp = (struct expression *) alloca (len);
|
||||
|
||||
/* Copy the original expression into temp. */
|
||||
(void) memcpy (temp, expr, len);
|
||||
memcpy (temp, expr, len);
|
||||
|
||||
prefixify_subexp (temp, expr, inpos, outpos);
|
||||
}
|
||||
@ -481,7 +481,7 @@ prefixify_subexp (inexpr, outexpr, inend, outbeg)
|
||||
/* Copy the final operator itself, from the end of the input
|
||||
to the beginning of the output. */
|
||||
inend -= oplen;
|
||||
(void) memcpy (&outexpr->elts[outbeg], &inexpr->elts[inend],
|
||||
memcpy (&outexpr->elts[outbeg], &inexpr->elts[inend],
|
||||
oplen * sizeof (union exp_element));
|
||||
outbeg += oplen;
|
||||
|
||||
|
54
gdb/procfs.c
54
gdb/procfs.c
@ -514,7 +514,7 @@ lookupname (transp, val, prefix)
|
||||
free (locbuf);
|
||||
}
|
||||
locbuf = xmalloc (strlen (prefix) + 16);
|
||||
(void) sprintf (locbuf, "%s %u", prefix, val);
|
||||
sprintf (locbuf, "%s %u", prefix, val);
|
||||
name = locbuf;
|
||||
}
|
||||
return (name);
|
||||
@ -539,7 +539,7 @@ sigcodename (sip)
|
||||
}
|
||||
if (name == NULL)
|
||||
{
|
||||
(void) sprintf (locbuf, "sigcode %u", sip -> si_signo);
|
||||
sprintf (locbuf, "sigcode %u", sip -> si_signo);
|
||||
name = locbuf;
|
||||
}
|
||||
return (name);
|
||||
@ -597,7 +597,7 @@ syscallname (syscallnum)
|
||||
}
|
||||
else
|
||||
{
|
||||
(void) sprintf (locbuf, "syscall %u", syscallnum);
|
||||
sprintf (locbuf, "syscall %u", syscallnum);
|
||||
rtnval = locbuf;
|
||||
}
|
||||
return (rtnval);
|
||||
@ -1123,7 +1123,7 @@ unconditionally_kill_inferior ()
|
||||
int signo;
|
||||
|
||||
signo = SIGKILL;
|
||||
(void) ioctl (pi.fd, PIOCKILL, &signo);
|
||||
ioctl (pi.fd, PIOCKILL, &signo);
|
||||
close_proc_file (&pi);
|
||||
wait ((int *) 0);
|
||||
}
|
||||
@ -1228,10 +1228,10 @@ store_inferior_registers (regno)
|
||||
{
|
||||
if (regno != -1)
|
||||
{
|
||||
(void) ioctl (pi.fd, PIOCGREG, &pi.gregset);
|
||||
ioctl (pi.fd, PIOCGREG, &pi.gregset);
|
||||
}
|
||||
fill_gregset (&pi.gregset, regno);
|
||||
(void) ioctl (pi.fd, PIOCSREG, &pi.gregset);
|
||||
ioctl (pi.fd, PIOCSREG, &pi.gregset);
|
||||
|
||||
#if defined (FP0_REGNUM)
|
||||
|
||||
@ -1241,10 +1241,10 @@ store_inferior_registers (regno)
|
||||
|
||||
if (regno != -1)
|
||||
{
|
||||
(void) ioctl (pi.fd, PIOCGFPREG, &pi.fpregset);
|
||||
ioctl (pi.fd, PIOCGFPREG, &pi.fpregset);
|
||||
}
|
||||
fill_fpregset (&pi.fpregset, regno);
|
||||
(void) ioctl (pi.fd, PIOCSFPREG, &pi.fpregset);
|
||||
ioctl (pi.fd, PIOCSFPREG, &pi.fpregset);
|
||||
|
||||
#endif /* FP0_REGNUM */
|
||||
|
||||
@ -1285,7 +1285,7 @@ inferior_proc_init (pid)
|
||||
}
|
||||
else
|
||||
{
|
||||
(void) memset ((char *) &pi.prrun, 0, sizeof (pi.prrun));
|
||||
memset ((char *) &pi.prrun, 0, sizeof (pi.prrun));
|
||||
prfillset (&pi.prrun.pr_trace);
|
||||
proc_signal_handling_change ();
|
||||
prfillset (&pi.prrun.pr_fault);
|
||||
@ -1391,7 +1391,7 @@ proc_set_exec_trap ()
|
||||
auto char procname[32];
|
||||
int fd;
|
||||
|
||||
(void) sprintf (procname, PROC_NAME_FMT, getpid ());
|
||||
sprintf (procname, PROC_NAME_FMT, getpid ());
|
||||
if ((fd = open (procname, O_RDWR)) < 0)
|
||||
{
|
||||
perror (procname);
|
||||
@ -1429,11 +1429,11 @@ proc_set_exec_trap ()
|
||||
{
|
||||
long pr_flags;
|
||||
pr_flags = PR_FORK;
|
||||
(void) ioctl (fd, PIOCRESET, &pr_flags);
|
||||
ioctl (fd, PIOCRESET, &pr_flags);
|
||||
}
|
||||
#else
|
||||
#if defined (PIOCRFORK) /* Original method */
|
||||
(void) ioctl (fd, PIOCRFORK, NULL);
|
||||
ioctl (fd, PIOCRFORK, NULL);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
@ -1651,15 +1651,15 @@ attach (pid)
|
||||
/* Remember some things about the inferior that we will, or might, change
|
||||
so that we can restore them when we detach. */
|
||||
|
||||
(void) ioctl (pi.fd, PIOCGTRACE, &pi.saved_trace);
|
||||
(void) ioctl (pi.fd, PIOCGHOLD, &pi.saved_sighold);
|
||||
(void) ioctl (pi.fd, PIOCGFAULT, &pi.saved_fltset);
|
||||
(void) ioctl (pi.fd, PIOCGENTRY, &pi.saved_entryset);
|
||||
(void) ioctl (pi.fd, PIOCGEXIT, &pi.saved_exitset);
|
||||
ioctl (pi.fd, PIOCGTRACE, &pi.saved_trace);
|
||||
ioctl (pi.fd, PIOCGHOLD, &pi.saved_sighold);
|
||||
ioctl (pi.fd, PIOCGFAULT, &pi.saved_fltset);
|
||||
ioctl (pi.fd, PIOCGENTRY, &pi.saved_entryset);
|
||||
ioctl (pi.fd, PIOCGEXIT, &pi.saved_exitset);
|
||||
|
||||
/* Set up trace and fault sets, as gdb expects them. */
|
||||
|
||||
(void) memset (&pi.prrun, 0, sizeof (pi.prrun));
|
||||
memset (&pi.prrun, 0, sizeof (pi.prrun));
|
||||
prfillset (&pi.prrun.pr_trace);
|
||||
proc_signal_handling_change ();
|
||||
prfillset (&pi.prrun.pr_fault);
|
||||
@ -1750,7 +1750,7 @@ detach (signal)
|
||||
if (signal || !pi.was_stopped ||
|
||||
query ("Was stopped when attached, make it runnable again? "))
|
||||
{
|
||||
(void) memset (&pi.prrun, 0, sizeof (pi.prrun));
|
||||
memset (&pi.prrun, 0, sizeof (pi.prrun));
|
||||
pi.prrun.pr_flags = PRCFAULT;
|
||||
if (ioctl (pi.fd, PIOCRUN, &pi.prrun))
|
||||
{
|
||||
@ -1980,7 +1980,7 @@ set_proc_siginfo (pip, signo)
|
||||
}
|
||||
else
|
||||
{
|
||||
(void) memset ((char *) &newsiginfo, 0, sizeof (newsiginfo));
|
||||
memset ((char *) &newsiginfo, 0, sizeof (newsiginfo));
|
||||
sip = &newsiginfo;
|
||||
sip -> si_signo = signo;
|
||||
sip -> si_code = 0;
|
||||
@ -2144,8 +2144,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
|
||||
}
|
||||
else
|
||||
{
|
||||
(void) memcpy ((char *) &pi.gregset, core_reg_sect,
|
||||
sizeof (pi.gregset));
|
||||
memcpy ((char *) &pi.gregset, core_reg_sect, sizeof (pi.gregset));
|
||||
supply_gregset (&pi.gregset);
|
||||
}
|
||||
}
|
||||
@ -2157,8 +2156,7 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
|
||||
}
|
||||
else
|
||||
{
|
||||
(void) memcpy ((char *) &pi.fpregset, core_reg_sect,
|
||||
sizeof (pi.fpregset));
|
||||
memcpy ((char *) &pi.fpregset, core_reg_sect, sizeof (pi.fpregset));
|
||||
#if defined (FP0_REGNUM)
|
||||
supply_fpregset (&pi.fpregset);
|
||||
#endif
|
||||
@ -2189,7 +2187,7 @@ proc_init_failed (why)
|
||||
char *why;
|
||||
{
|
||||
print_sys_errmsg (pi.pathname, errno);
|
||||
(void) kill (pi.pid, SIGKILL);
|
||||
kill (pi.pid, SIGKILL);
|
||||
close_proc_file (&pi);
|
||||
error (why);
|
||||
/* NOTREACHED */
|
||||
@ -2221,7 +2219,7 @@ close_proc_file (pip)
|
||||
pip -> pid = 0;
|
||||
if (pip -> valid)
|
||||
{
|
||||
(void) close (pip -> fd);
|
||||
close (pip -> fd);
|
||||
}
|
||||
pip -> fd = -1;
|
||||
if (pip -> pathname)
|
||||
@ -2263,7 +2261,7 @@ open_proc_file (pid, pip)
|
||||
pip -> valid = 0;
|
||||
if (pip -> valid)
|
||||
{
|
||||
(void) close (pip -> fd);
|
||||
close (pip -> fd);
|
||||
}
|
||||
if (pip -> pathname == NULL)
|
||||
{
|
||||
@ -2844,7 +2842,7 @@ info_proc (args, from_tty)
|
||||
{
|
||||
pid = pii.pid;
|
||||
pip = &pii;
|
||||
(void) memset (&pii, 0, sizeof (pii));
|
||||
memset (&pii, 0, sizeof (pii));
|
||||
if (!open_proc_file (pid, pip))
|
||||
{
|
||||
perror_with_name (pip -> pathname);
|
||||
|
@ -100,7 +100,7 @@ putenv( entry )
|
||||
if ( new_environ == (char **) NULL )
|
||||
return( -1 );
|
||||
|
||||
(void) memcpy ((char *) new_environ, (char *) environ, size*PSIZE );
|
||||
memcpy ((char *) new_environ, (char *) environ, size*PSIZE );
|
||||
|
||||
new_environ[size] = entry;
|
||||
new_environ[size+1] = NULL;
|
||||
|
@ -1084,7 +1084,7 @@ int from_tty;
|
||||
/* You may need to do an init_target_mm() */
|
||||
/* init_target_mm(?,?,?,?,?,?,?,?); */
|
||||
immediate_quit--;
|
||||
/* (void) symbol_file_add (arg_string, from_tty, text_addr, 0, 0); */
|
||||
/* symbol_file_add (arg_string, from_tty, text_addr, 0, 0); */
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -712,7 +712,7 @@ vx_load_command (arg_string, from_tty)
|
||||
immediate_quit--;
|
||||
|
||||
/* FIXME, for now we ignore data_addr and bss_addr. */
|
||||
(void) symbol_file_add (arg_string, from_tty, text_addr, 0, 0, 0);
|
||||
symbol_file_add (arg_string, from_tty, text_addr, 0, 0, 0);
|
||||
}
|
||||
|
||||
#ifdef FIXME /* Not ready for prime time */
|
||||
@ -1036,7 +1036,7 @@ add_symbol_stub (arg)
|
||||
struct ldfile *pLoadFile = (struct ldfile *)arg;
|
||||
|
||||
printf("\t%s: ", pLoadFile->name);
|
||||
(void) symbol_file_add (pLoadFile->name, 0, pLoadFile->txt_addr, 0, 0, 0);
|
||||
symbol_file_add (pLoadFile->name, 0, pLoadFile->txt_addr, 0, 0, 0);
|
||||
printf ("ok\n");
|
||||
return 1;
|
||||
}
|
||||
|
@ -76,7 +76,8 @@ fetch_inferior_registers (regno)
|
||||
perror("ptrace_getregs");
|
||||
|
||||
registers[REGISTER_BYTE (0)] = 0;
|
||||
(void) memcpy (®isters[REGISTER_BYTE (1)], &inferior_registers.r_g1, 15 * REGISTER_RAW_SIZE (G0_REGNUM));
|
||||
memcpy (®isters[REGISTER_BYTE (1)], &inferior_registers.r_g1,
|
||||
15 * REGISTER_RAW_SIZE (G0_REGNUM));
|
||||
*(int *)®isters[REGISTER_BYTE (PS_REGNUM)] = inferior_registers.r_ps;
|
||||
*(int *)®isters[REGISTER_BYTE (PC_REGNUM)] = inferior_registers.r_pc;
|
||||
*(int *)®isters[REGISTER_BYTE (NPC_REGNUM)] = inferior_registers.r_npc;
|
||||
@ -103,9 +104,8 @@ fetch_inferior_registers (regno)
|
||||
(PTRACE_ARG3_TYPE) &inferior_fp_registers,
|
||||
0))
|
||||
perror("ptrace_getfpregs");
|
||||
(void) memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)],
|
||||
&inferior_fp_registers,
|
||||
sizeof inferior_fp_registers.fpu_fr);
|
||||
memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)], &inferior_fp_registers,
|
||||
sizeof inferior_fp_registers.fpu_fr);
|
||||
/* bcopy (&inferior_fp_registers.Fpu_fsr,
|
||||
®isters[REGISTER_BYTE (FPS_REGNUM)],
|
||||
sizeof (FPU_FSR_TYPE)); FIXME??? -- gnu@cyg */
|
||||
@ -210,9 +210,8 @@ store_inferior_registers (regno)
|
||||
{
|
||||
if (!register_valid[G1_REGNUM]) abort();
|
||||
|
||||
(void) memcpy (&inferior_registers.r_g1,
|
||||
®isters[REGISTER_BYTE (G1_REGNUM)],
|
||||
15 * REGISTER_RAW_SIZE (G1_REGNUM));
|
||||
memcpy (&inferior_registers.r_g1, ®isters[REGISTER_BYTE (G1_REGNUM)],
|
||||
15 * REGISTER_RAW_SIZE (G1_REGNUM));
|
||||
|
||||
inferior_registers.r_ps =
|
||||
*(int *)®isters[REGISTER_BYTE (PS_REGNUM)];
|
||||
@ -231,13 +230,11 @@ store_inferior_registers (regno)
|
||||
if (wanna_store & FP_REGS)
|
||||
{
|
||||
if (!register_valid[FP0_REGNUM+9]) abort();
|
||||
(void) memcpy (&inferior_fp_registers,
|
||||
®isters[REGISTER_BYTE (FP0_REGNUM)],
|
||||
sizeof inferior_fp_registers.fpu_fr);
|
||||
memcpy (&inferior_fp_registers, ®isters[REGISTER_BYTE (FP0_REGNUM)],
|
||||
sizeof inferior_fp_registers.fpu_fr);
|
||||
|
||||
/* (void) memcpy (&inferior_fp_registers.Fpu_fsr,
|
||||
®isters[REGISTER_BYTE (FPS_REGNUM)],
|
||||
sizeof (FPU_FSR_TYPE));
|
||||
/* memcpy (&inferior_fp_registers.Fpu_fsr,
|
||||
®isters[REGISTER_BYTE (FPS_REGNUM)], sizeof (FPU_FSR_TYPE));
|
||||
****/
|
||||
if (0 !=
|
||||
ptrace (PTRACE_SETFPREGS, inferior_pid,
|
||||
@ -263,9 +260,8 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, ignore)
|
||||
*(int *)®isters[REGISTER_BYTE (0)] = 0;
|
||||
|
||||
/* The globals and output registers. */
|
||||
(void) memcpy (®isters[REGISTER_BYTE (G1_REGNUM)],
|
||||
&gregs->r_g1,
|
||||
15 * REGISTER_RAW_SIZE (G1_REGNUM));
|
||||
memcpy (®isters[REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
|
||||
15 * REGISTER_RAW_SIZE (G1_REGNUM));
|
||||
*(int *)®isters[REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
|
||||
*(int *)®isters[REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
|
||||
*(int *)®isters[REGISTER_BYTE (NPC_REGNUM)] = gregs->r_npc;
|
||||
@ -295,12 +291,10 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, ignore)
|
||||
#define fpuregs ((struct fpu *) core_reg_sect)
|
||||
if (core_reg_size >= sizeof (struct fpu))
|
||||
{
|
||||
(void) memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)],
|
||||
fpuregs->fpu_regs,
|
||||
sizeof (fpuregs->fpu_regs));
|
||||
(void) memcpy (®isters[REGISTER_BYTE (FPS_REGNUM)],
|
||||
&fpuregs->fpu_fsr,
|
||||
sizeof (FPU_FSR_TYPE));
|
||||
memcpy (®isters[REGISTER_BYTE (FP0_REGNUM)], fpuregs->fpu_regs,
|
||||
sizeof (fpuregs->fpu_regs));
|
||||
memcpy (®isters[REGISTER_BYTE (FPS_REGNUM)], &fpuregs->fpu_fsr,
|
||||
sizeof (FPU_FSR_TYPE));
|
||||
}
|
||||
else
|
||||
fprintf (stderr, "Couldn't read float regs from core file\n");
|
||||
|
@ -70,7 +70,7 @@ symfile_bfd_open PARAMS ((char *));
|
||||
static void
|
||||
find_sym_fns PARAMS ((struct objfile *));
|
||||
|
||||
static void
|
||||
void
|
||||
clear_symtab_users_once PARAMS ((void));
|
||||
|
||||
/* List of all available sym_fns. On gdb startup, each object file reader
|
||||
@ -545,7 +545,7 @@ symbol_file_add (name, from_tty, addr, mainline, mapped, readnow)
|
||||
psymtab != NULL;
|
||||
psymtab = psymtab -> next)
|
||||
{
|
||||
(void) psymtab_to_symtab (psymtab);
|
||||
psymtab_to_symtab (psymtab);
|
||||
}
|
||||
}
|
||||
|
||||
@ -625,8 +625,7 @@ symbol_file_command (args, from_tty)
|
||||
/* Getting new symbols may change our opinion about what is
|
||||
frameless. */
|
||||
reinit_frame_cache ();
|
||||
(void) symbol_file_add (name, from_tty, (CORE_ADDR)0, 1,
|
||||
mapped, readnow);
|
||||
symbol_file_add (name, from_tty, (CORE_ADDR)0, 1, mapped, readnow);
|
||||
}
|
||||
do_cleanups (cleanups);
|
||||
}
|
||||
@ -804,7 +803,7 @@ add_symbol_file_command (args, from_tty)
|
||||
|
||||
reinit_frame_cache ();
|
||||
|
||||
(void) symbol_file_add (name, 0, text_addr, 0, mapped, readnow);
|
||||
symbol_file_add (name, 0, text_addr, 0, mapped, readnow);
|
||||
}
|
||||
|
||||
/* Re-read symbols if a symbol-file has changed. */
|
||||
@ -992,7 +991,7 @@ allocate_symtab (filename, objfile)
|
||||
|
||||
symtab = (struct symtab *)
|
||||
obstack_alloc (&objfile -> symbol_obstack, sizeof (struct symtab));
|
||||
(void) memset (symtab, 0, sizeof (*symtab));
|
||||
memset (symtab, 0, sizeof (*symtab));
|
||||
symtab -> filename = obsavestring (filename, strlen (filename),
|
||||
&objfile -> symbol_obstack);
|
||||
symtab -> fullname = NULL;
|
||||
@ -1028,7 +1027,7 @@ allocate_psymtab (filename, objfile)
|
||||
obstack_alloc (&objfile -> psymbol_obstack,
|
||||
sizeof (struct partial_symtab));
|
||||
|
||||
(void) memset (psymtab, 0, sizeof (struct partial_symtab));
|
||||
memset (psymtab, 0, sizeof (struct partial_symtab));
|
||||
psymtab -> filename = obsavestring (filename, strlen (filename),
|
||||
&objfile -> psymbol_obstack);
|
||||
psymtab -> symtab = NULL;
|
||||
@ -1071,7 +1070,7 @@ allocate_psymtab (filename, objfile)
|
||||
static int clear_symtab_users_queued;
|
||||
static int clear_symtab_users_done;
|
||||
|
||||
static void
|
||||
void
|
||||
clear_symtab_users_once ()
|
||||
{
|
||||
/* Enforce once-per-`do_cleanups'-semantics */
|
||||
|
16
gdb/symtab.c
16
gdb/symtab.c
@ -1494,7 +1494,7 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line)
|
||||
p1 = p;
|
||||
while (p != *argptr && p[-1] == ' ') --p;
|
||||
copy = (char *) alloca (p - *argptr + 1);
|
||||
(void) memcpy (copy, *argptr, p - *argptr);
|
||||
memcpy (copy, *argptr, p - *argptr);
|
||||
copy[p - *argptr] = 0;
|
||||
|
||||
/* Discard the class name from the arg. */
|
||||
@ -1535,7 +1535,7 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line)
|
||||
else
|
||||
{
|
||||
copy = (char *) alloca (p - *argptr + 1 + (q1 - q));
|
||||
(void) memcpy (copy, *argptr, p - *argptr);
|
||||
memcpy (copy, *argptr, p - *argptr);
|
||||
copy[p - *argptr] = '\0';
|
||||
}
|
||||
|
||||
@ -1630,7 +1630,7 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line)
|
||||
p1 = p;
|
||||
while (p != *argptr && p[-1] == ' ') --p;
|
||||
copy = (char *) alloca (p - *argptr + 1);
|
||||
(void) memcpy (copy, *argptr, p - *argptr);
|
||||
memcpy (copy, *argptr, p - *argptr);
|
||||
copy[p - *argptr] = 0;
|
||||
|
||||
/* Find that file's data. */
|
||||
@ -1717,7 +1717,7 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line)
|
||||
|
||||
p = skip_quoted (*argptr);
|
||||
copy = (char *) alloca (p - *argptr + 1);
|
||||
(void) memcpy (copy, *argptr, p - *argptr);
|
||||
memcpy (copy, *argptr, p - *argptr);
|
||||
copy[p - *argptr] = '\0';
|
||||
if ((copy[0] == copy [p - *argptr - 1])
|
||||
&& strchr (gdb_completer_quote_characters, copy[0]) != NULL)
|
||||
@ -1784,7 +1784,7 @@ decode_line_1 (argptr, funfirstline, default_symtab, default_line)
|
||||
values.sals = (struct symtab_and_line *)
|
||||
xmalloc (sizeof (struct symtab_and_line));
|
||||
values.nelts = 1;
|
||||
(void) memset (&values.sals[0], 0, sizeof (values.sals[0]));
|
||||
memset (&values.sals[0], 0, sizeof (values.sals[0]));
|
||||
values.sals[0].symtab = sym_symtab;
|
||||
values.sals[0].line = SYMBOL_LINE (sym);
|
||||
return values;
|
||||
@ -1899,8 +1899,8 @@ decode_line_2 (sym_arr, nelts, funfirstline)
|
||||
error ("cancelled");
|
||||
else if (num == 1)
|
||||
{
|
||||
(void) memcpy (return_values.sals, values.sals,
|
||||
(nelts * sizeof(struct symtab_and_line)));
|
||||
memcpy (return_values.sals, values.sals,
|
||||
(nelts * sizeof(struct symtab_and_line)));
|
||||
return_values.nelts = nelts;
|
||||
return return_values;
|
||||
}
|
||||
@ -2159,7 +2159,7 @@ list_symbols (regexp, class, bpt)
|
||||
|| (class == 2 && SYMBOL_CLASS (psym) == LOC_TYPEDEF)
|
||||
|| (class == 3 && SYMBOL_CLASS (psym) == LOC_BLOCK)))
|
||||
{
|
||||
(void) PSYMTAB_TO_SYMTAB(ps);
|
||||
PSYMTAB_TO_SYMTAB(ps);
|
||||
keep_going = 0;
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ extern struct objfile *current_objfile;
|
||||
#define B_TST(a,x) ((a)[(x)>>3] & (1 << ((x)&7)))
|
||||
#define B_TYPE unsigned char
|
||||
#define B_BYTES(x) ( 1 + ((x)>>3) )
|
||||
#define B_CLRALL(a,x) (void) memset ((a), 0, B_BYTES(x))
|
||||
#define B_CLRALL(a,x) memset ((a), 0, B_BYTES(x))
|
||||
|
||||
|
||||
/* Define a simple structure used to hold some very basic information about
|
||||
|
@ -180,13 +180,13 @@ i386_skip_prologue PARAMS ((int));
|
||||
to virtual format for register REGNUM. */
|
||||
|
||||
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) \
|
||||
{(void) memcpy ((TO), (FROM), 4);}
|
||||
{memcpy ((TO), (FROM), 4);}
|
||||
|
||||
/* Convert data from virtual format for register REGNUM
|
||||
to raw format for register REGNUM. */
|
||||
|
||||
#define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) \
|
||||
{(void) memcpy ((TO), (FROM), 4);}
|
||||
{memcpy ((TO), (FROM), 4);}
|
||||
|
||||
/* Return the GDB type object for the "standard" data type
|
||||
of data in register N. */
|
||||
@ -208,7 +208,7 @@ i386_skip_prologue PARAMS ((int));
|
||||
into VALBUF. */
|
||||
|
||||
#define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
|
||||
(void) memcpy ((VALBUF), (REGBUF), TYPE_LENGTH (TYPE))
|
||||
memcpy ((VALBUF), (REGBUF), TYPE_LENGTH (TYPE))
|
||||
|
||||
/* Write into appropriate registers a function return value
|
||||
of type TYPE, given in virtual format. */
|
||||
|
@ -222,13 +222,13 @@ extern CORE_ADDR sparc_pc_adjust();
|
||||
to virtual format for register REGNUM. */
|
||||
|
||||
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) \
|
||||
{ (void) memcpy ((TO), (FROM), 4); }
|
||||
{ memcpy ((TO), (FROM), 4); }
|
||||
|
||||
/* Convert data from virtual format for register REGNUM
|
||||
to raw format for register REGNUM. */
|
||||
|
||||
#define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) \
|
||||
{ (void) memcpy ((TO), (FROM), 4); }
|
||||
{ memcpy ((TO), (FROM), 4); }
|
||||
|
||||
/* Return the GDB type object for the "standard" data type
|
||||
of data in register N. */
|
||||
@ -256,15 +256,13 @@ extern CORE_ADDR sparc_pc_adjust();
|
||||
{ \
|
||||
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
|
||||
{ \
|
||||
(void) memcpy ((VALBUF), \
|
||||
((int *)(REGBUF))+FP0_REGNUM, \
|
||||
TYPE_LENGTH(TYPE)); \
|
||||
memcpy ((VALBUF), ((int *)(REGBUF))+FP0_REGNUM, TYPE_LENGTH(TYPE));\
|
||||
} \
|
||||
else \
|
||||
(void) memcpy ((VALBUF), \
|
||||
(char *)(REGBUF) + 4 * 8 + \
|
||||
(TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)), \
|
||||
TYPE_LENGTH(TYPE)); \
|
||||
memcpy ((VALBUF), \
|
||||
(char *)(REGBUF) + 4 * 8 + \
|
||||
(TYPE_LENGTH(TYPE) >= 4 ? 0 : 4 - TYPE_LENGTH(TYPE)), \
|
||||
TYPE_LENGTH(TYPE)); \
|
||||
}
|
||||
|
||||
/* Write into appropriate registers a function return value
|
||||
|
@ -508,7 +508,7 @@ init_malloc (md)
|
||||
warning ("internal error: failed to install memory consistency checks");
|
||||
}
|
||||
|
||||
(void) mmtrace ();
|
||||
mmtrace ();
|
||||
}
|
||||
|
||||
#endif /* Have mmalloc and want corruption checking */
|
||||
@ -634,7 +634,7 @@ savestring (ptr, size)
|
||||
int size;
|
||||
{
|
||||
register char *p = (char *) xmalloc (size + 1);
|
||||
(void) memcpy (p, ptr, size);
|
||||
memcpy (p, ptr, size);
|
||||
p[size] = 0;
|
||||
return p;
|
||||
}
|
||||
@ -646,7 +646,7 @@ msavestring (md, ptr, size)
|
||||
int size;
|
||||
{
|
||||
register char *p = (char *) xmmalloc (md, size + 1);
|
||||
(void) memcpy (p, ptr, size);
|
||||
memcpy (p, ptr, size);
|
||||
p[size] = 0;
|
||||
return p;
|
||||
}
|
||||
@ -1205,7 +1205,7 @@ vfprintf_filtered (stream, format, args)
|
||||
|
||||
/* This won't blow up if the restrictions described above are
|
||||
followed. */
|
||||
(void) vsprintf (linebuffer, format, args);
|
||||
vsprintf (linebuffer, format, args);
|
||||
|
||||
fputs_filtered (linebuffer, stream);
|
||||
}
|
||||
|
16
gdb/valops.c
16
gdb/valops.c
@ -130,7 +130,7 @@ value_zero (type, lv)
|
||||
{
|
||||
register value val = allocate_value (type);
|
||||
|
||||
(void) memset (VALUE_CONTENTS (val), 0, TYPE_LENGTH (type));
|
||||
memset (VALUE_CONTENTS (val), 0, TYPE_LENGTH (type));
|
||||
VALUE_LVAL (val) = lv;
|
||||
|
||||
return val;
|
||||
@ -333,10 +333,10 @@ value_assign (toval, fromval)
|
||||
(int) value_as_long (fromval),
|
||||
VALUE_BITPOS (toval), VALUE_BITSIZE (toval));
|
||||
else if (use_buffer)
|
||||
(void) memcpy (buffer + byte_offset, raw_buffer, use_buffer);
|
||||
memcpy (buffer + byte_offset, raw_buffer, use_buffer);
|
||||
else
|
||||
(void) memcpy (buffer + byte_offset, VALUE_CONTENTS (fromval),
|
||||
TYPE_LENGTH (type));
|
||||
memcpy (buffer + byte_offset, VALUE_CONTENTS (fromval),
|
||||
TYPE_LENGTH (type));
|
||||
|
||||
/* Copy it back. */
|
||||
for ((regno = VALUE_FRAME_REGNUM (toval) + reg_offset,
|
||||
@ -379,9 +379,9 @@ value_assign (toval, fromval)
|
||||
}
|
||||
|
||||
val = allocate_value (type);
|
||||
(void) memcpy (val, toval, VALUE_CONTENTS_RAW (val) - (char *) val);
|
||||
(void) memcpy (VALUE_CONTENTS_RAW (val), VALUE_CONTENTS (fromval),
|
||||
TYPE_LENGTH (type));
|
||||
memcpy (val, toval, VALUE_CONTENTS_RAW (val) - (char *) val);
|
||||
memcpy (VALUE_CONTENTS_RAW (val), VALUE_CONTENTS (fromval),
|
||||
TYPE_LENGTH (type));
|
||||
VALUE_TYPE (val) = type;
|
||||
|
||||
return val;
|
||||
@ -742,7 +742,7 @@ call_function_by_hand (function, nargs, args)
|
||||
|
||||
/* Create a call sequence customized for this function
|
||||
and the number of arguments for it. */
|
||||
(void) memcpy (dummy1, dummy, sizeof dummy);
|
||||
memcpy (dummy1, dummy, sizeof dummy);
|
||||
for (i = 0; i < sizeof dummy / sizeof (REGISTER_TYPE); i++)
|
||||
SWAP_TARGET_AND_HOST (&dummy1[i], sizeof (REGISTER_TYPE));
|
||||
FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args,
|
||||
|
@ -236,7 +236,7 @@ print_floating (valaddr, type, stream)
|
||||
if (len == sizeof (float))
|
||||
{
|
||||
/* It's single precision. */
|
||||
(void) memcpy ((char *) &low, valaddr, sizeof (low));
|
||||
memcpy ((char *) &low, valaddr, sizeof (low));
|
||||
/* target -> host. */
|
||||
SWAP_TARGET_AND_HOST (&low, sizeof (float));
|
||||
nonnegative = low >= 0;
|
||||
@ -250,19 +250,19 @@ print_floating (valaddr, type, stream)
|
||||
/* It's double precision. Get the high and low words. */
|
||||
|
||||
#if TARGET_BYTE_ORDER == BIG_ENDIAN
|
||||
(void) memcpy (&low, valaddr+4, sizeof (low));
|
||||
(void) memcpy (&high, valaddr+0, sizeof (high));
|
||||
memcpy (&low, valaddr+4, sizeof (low));
|
||||
memcpy (&high, valaddr+0, sizeof (high));
|
||||
#else
|
||||
(void) memcpy (&low, valaddr+0, sizeof (low));
|
||||
(void) memcpy (&high, valaddr+4, sizeof (high));
|
||||
memcpy (&low, valaddr+0, sizeof (low));
|
||||
memcpy (&high, valaddr+4, sizeof (high));
|
||||
#endif
|
||||
SWAP_TARGET_AND_HOST (&low, sizeof (low));
|
||||
SWAP_TARGET_AND_HOST (&high, sizeof (high));
|
||||
nonnegative = high >= 0;
|
||||
is_nan = (((high >> 20) & 0x7ff) == 0x7ff
|
||||
&& ! ((((high & 0xfffff) == 0)) && (low == 0)));
|
||||
high &= 0xfffff;
|
||||
}
|
||||
SWAP_TARGET_AND_HOST (&low, sizeof (low));
|
||||
SWAP_TARGET_AND_HOST (&high, sizeof (high));
|
||||
nonnegative = high >= 0;
|
||||
is_nan = (((high >> 20) & 0x7ff) == 0x7ff
|
||||
&& ! ((((high & 0xfffff) == 0)) && (low == 0)));
|
||||
high &= 0xfffff;
|
||||
}
|
||||
|
||||
if (is_nan)
|
||||
{
|
||||
|
58
gdb/values.c
58
gdb/values.c
@ -233,10 +233,11 @@ record_latest_value (val)
|
||||
|
||||
/* Check error now if about to store an invalid float. We return -1
|
||||
to the caller, but allow them to continue, e.g. to print it as "Nan". */
|
||||
if (TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_FLT) {
|
||||
(void) unpack_double (VALUE_TYPE (val), VALUE_CONTENTS (val), &i);
|
||||
if (i) return -1; /* Indicate value not saved in history */
|
||||
}
|
||||
if (TYPE_CODE (VALUE_TYPE (val)) == TYPE_CODE_FLT)
|
||||
{
|
||||
unpack_double (VALUE_TYPE (val), VALUE_CONTENTS (val), &i);
|
||||
if (i) return -1; /* Indicate value not saved in history */
|
||||
}
|
||||
|
||||
/* Here we treat value_history_count as origin-zero
|
||||
and applying to the value being stored now. */
|
||||
@ -247,7 +248,7 @@ record_latest_value (val)
|
||||
register struct value_history_chunk *new
|
||||
= (struct value_history_chunk *)
|
||||
xmalloc (sizeof (struct value_history_chunk));
|
||||
(void) memset (new->values, 0, sizeof new->values);
|
||||
memset (new->values, 0, sizeof new->values);
|
||||
new->next = value_history_chain;
|
||||
value_history_chain = new;
|
||||
}
|
||||
@ -437,8 +438,7 @@ set_internalvar_component (var, offset, bitpos, bitsize, newval)
|
||||
modify_field (addr, (int) value_as_long (newval),
|
||||
bitpos, bitsize);
|
||||
else
|
||||
(void) memcpy (addr, VALUE_CONTENTS (newval),
|
||||
TYPE_LENGTH (VALUE_TYPE (newval)));
|
||||
memcpy (addr, VALUE_CONTENTS (newval), TYPE_LENGTH (VALUE_TYPE (newval)));
|
||||
}
|
||||
|
||||
void
|
||||
@ -587,7 +587,7 @@ unpack_long (type, valaddr)
|
||||
if (len == sizeof (float))
|
||||
{
|
||||
float retval;
|
||||
(void) memcpy (&retval, valaddr, sizeof (retval));
|
||||
memcpy (&retval, valaddr, sizeof (retval));
|
||||
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
|
||||
return retval;
|
||||
}
|
||||
@ -595,7 +595,7 @@ unpack_long (type, valaddr)
|
||||
if (len == sizeof (double))
|
||||
{
|
||||
double retval;
|
||||
(void) memcpy (&retval, valaddr, sizeof (retval));
|
||||
memcpy (&retval, valaddr, sizeof (retval));
|
||||
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
|
||||
return retval;
|
||||
}
|
||||
@ -616,7 +616,7 @@ unpack_long (type, valaddr)
|
||||
if (len == sizeof (short))
|
||||
{
|
||||
unsigned short retval;
|
||||
(void) memcpy (&retval, valaddr, sizeof (retval));
|
||||
memcpy (&retval, valaddr, sizeof (retval));
|
||||
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
|
||||
return retval;
|
||||
}
|
||||
@ -624,7 +624,7 @@ unpack_long (type, valaddr)
|
||||
if (len == sizeof (int))
|
||||
{
|
||||
unsigned int retval;
|
||||
(void) memcpy (&retval, valaddr, sizeof (retval));
|
||||
memcpy (&retval, valaddr, sizeof (retval));
|
||||
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
|
||||
return retval;
|
||||
}
|
||||
@ -632,7 +632,7 @@ unpack_long (type, valaddr)
|
||||
if (len == sizeof (long))
|
||||
{
|
||||
unsigned long retval;
|
||||
(void) memcpy (&retval, valaddr, sizeof (retval));
|
||||
memcpy (&retval, valaddr, sizeof (retval));
|
||||
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
|
||||
return retval;
|
||||
}
|
||||
@ -640,7 +640,7 @@ unpack_long (type, valaddr)
|
||||
if (len == sizeof (long long))
|
||||
{
|
||||
unsigned long long retval;
|
||||
(void) memcpy (&retval, valaddr, sizeof (retval));
|
||||
memcpy (&retval, valaddr, sizeof (retval));
|
||||
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
|
||||
return retval;
|
||||
}
|
||||
@ -655,7 +655,7 @@ unpack_long (type, valaddr)
|
||||
if (len == sizeof (char))
|
||||
{
|
||||
SIGNED char retval; /* plain chars might be unsigned on host */
|
||||
(void) memcpy (&retval, valaddr, sizeof (retval));
|
||||
memcpy (&retval, valaddr, sizeof (retval));
|
||||
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
|
||||
return retval;
|
||||
}
|
||||
@ -663,7 +663,7 @@ unpack_long (type, valaddr)
|
||||
if (len == sizeof (short))
|
||||
{
|
||||
short retval;
|
||||
(void) memcpy (&retval, valaddr, sizeof (retval));
|
||||
memcpy (&retval, valaddr, sizeof (retval));
|
||||
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
|
||||
return retval;
|
||||
}
|
||||
@ -671,7 +671,7 @@ unpack_long (type, valaddr)
|
||||
if (len == sizeof (int))
|
||||
{
|
||||
int retval;
|
||||
(void) memcpy (&retval, valaddr, sizeof (retval));
|
||||
memcpy (&retval, valaddr, sizeof (retval));
|
||||
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
|
||||
return retval;
|
||||
}
|
||||
@ -679,7 +679,7 @@ unpack_long (type, valaddr)
|
||||
if (len == sizeof (long))
|
||||
{
|
||||
long retval;
|
||||
(void) memcpy (&retval, valaddr, sizeof (retval));
|
||||
memcpy (&retval, valaddr, sizeof (retval));
|
||||
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
|
||||
return retval;
|
||||
}
|
||||
@ -688,7 +688,7 @@ unpack_long (type, valaddr)
|
||||
if (len == sizeof (long long))
|
||||
{
|
||||
long long retval;
|
||||
(void) memcpy (&retval, valaddr, sizeof (retval));
|
||||
memcpy (&retval, valaddr, sizeof (retval));
|
||||
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
|
||||
return retval;
|
||||
}
|
||||
@ -706,14 +706,14 @@ unpack_long (type, valaddr)
|
||||
if (len == sizeof(long))
|
||||
{
|
||||
unsigned long retval;
|
||||
(void) memcpy (&retval, valaddr, sizeof(retval));
|
||||
memcpy (&retval, valaddr, sizeof(retval));
|
||||
SWAP_TARGET_AND_HOST (&retval, sizeof(retval));
|
||||
return retval;
|
||||
}
|
||||
else if (len == sizeof(short))
|
||||
{
|
||||
unsigned short retval;
|
||||
(void) memcpy (&retval, valaddr, len);
|
||||
memcpy (&retval, valaddr, len);
|
||||
SWAP_TARGET_AND_HOST (&retval, len);
|
||||
return retval;
|
||||
}
|
||||
@ -755,7 +755,7 @@ unpack_double (type, valaddr, invp)
|
||||
if (len == sizeof (float))
|
||||
{
|
||||
float retval;
|
||||
(void) memcpy (&retval, valaddr, sizeof (retval));
|
||||
memcpy (&retval, valaddr, sizeof (retval));
|
||||
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
|
||||
return retval;
|
||||
}
|
||||
@ -763,7 +763,7 @@ unpack_double (type, valaddr, invp)
|
||||
if (len == sizeof (double))
|
||||
{
|
||||
double retval;
|
||||
(void) memcpy (&retval, valaddr, sizeof (retval));
|
||||
memcpy (&retval, valaddr, sizeof (retval));
|
||||
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
|
||||
return retval;
|
||||
}
|
||||
@ -816,7 +816,7 @@ unpack_pointer (type, valaddr)
|
||||
if (len == sizeof (CORE_ADDR))
|
||||
{
|
||||
CORE_ADDR retval;
|
||||
(void) memcpy (&retval, valaddr, sizeof (retval));
|
||||
memcpy (&retval, valaddr, sizeof (retval));
|
||||
SWAP_TARGET_AND_HOST (&retval, sizeof (retval));
|
||||
return retval;
|
||||
}
|
||||
@ -872,8 +872,8 @@ value_primitive_field (arg1, offset, fieldno, arg_type)
|
||||
if (VALUE_LAZY (arg1))
|
||||
VALUE_LAZY (v) = 1;
|
||||
else
|
||||
(void) memcpy (VALUE_CONTENTS_RAW (v),
|
||||
VALUE_CONTENTS_RAW (arg1) + offset, TYPE_LENGTH (type));
|
||||
memcpy (VALUE_CONTENTS_RAW (v), VALUE_CONTENTS_RAW (arg1) + offset,
|
||||
TYPE_LENGTH (type));
|
||||
}
|
||||
VALUE_LVAL (v) = VALUE_LVAL (arg1);
|
||||
if (VALUE_LVAL (arg1) == lval_internalvar)
|
||||
@ -1031,7 +1031,7 @@ value_headof (arg, btype, dtype)
|
||||
know that we aren't happy, but don't throw an error.
|
||||
FIXME: there has to be a better way to do this. */
|
||||
struct type *error_type = (struct type *)xmalloc (sizeof (struct type));
|
||||
(void) memcpy (error_type, VALUE_TYPE (arg), sizeof (struct type));
|
||||
memcpy (error_type, VALUE_TYPE (arg), sizeof (struct type));
|
||||
TYPE_NAME (error_type) = savestring ("suspicious *", sizeof ("suspicious *"));
|
||||
VALUE_TYPE (arg) = error_type;
|
||||
return arg;
|
||||
@ -1218,7 +1218,7 @@ unpack_field_as_long (type, valaddr, fieldno)
|
||||
int bitsize = TYPE_FIELD_BITSIZE (type, fieldno);
|
||||
int lsbcount;
|
||||
|
||||
(void) memcpy (&val, valaddr + bitpos / 8, sizeof (val));
|
||||
memcpy (&val, valaddr + bitpos / 8, sizeof (val));
|
||||
SWAP_TARGET_AND_HOST (&val, sizeof (val));
|
||||
|
||||
/* Extract bits. See comment above. */
|
||||
@ -1267,7 +1267,7 @@ modify_field (addr, fieldval, bitpos, bitsize)
|
||||
&& 0 != (fieldval & ~((1<<bitsize)-1)))
|
||||
error ("Value %d does not fit in %d bits.", fieldval, bitsize);
|
||||
|
||||
(void) memcpy (&oword, addr, sizeof oword);
|
||||
memcpy (&oword, addr, sizeof oword);
|
||||
SWAP_TARGET_AND_HOST (&oword, sizeof oword); /* To host format */
|
||||
|
||||
/* Shifting for bit field depends on endianness of the target machine. */
|
||||
@ -1283,7 +1283,7 @@ modify_field (addr, fieldval, bitpos, bitsize)
|
||||
oword |= fieldval << bitpos;
|
||||
|
||||
SWAP_TARGET_AND_HOST (&oword, sizeof oword); /* To target format */
|
||||
(void) memcpy (addr, &oword, sizeof oword);
|
||||
memcpy (addr, &oword, sizeof oword);
|
||||
}
|
||||
|
||||
/* Convert C numbers into newly allocated values */
|
||||
|
@ -1569,7 +1569,7 @@ function_entry_point:
|
||||
break;
|
||||
|
||||
default :
|
||||
(void) process_xcoff_symbol (cs, objfile);
|
||||
process_xcoff_symbol (cs, objfile);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user