* symmisc.c (print_symbol): Use %02x not %2x for LOC_CONST_BYTES.
Clean up problems with targets and hosts that have 64 bit longs
and pointers and 32 bit ints.
* breakpoint.c, buildsym.c, c-lang.c, c-valprint.c, ch-lang.c,
ch-valprint.c, core.c, cp-valprint.c, dbxread.c, exec.c,
expprint.c, gdbtypes.c, infcmd.c, language.c, language.h,
m2-lang.c, maint.c, mips-tdep.c, mipsread.c, partial-stab.h,
printcmd.c, remote-vx.c, solib.c, source.c, stack.c, symfile.c,
symmisc.c, symtab.c, valops.c, valprint.c, xcoffexec.c:
Change all printf formats from %x to %lx if outputting an address.
Change la_*_format to use long format.
local_hex_string, local_hex_string_custom now take an unsigned long
argument, change all callers.
* coffread.c (read_coff_symtab): Remove superfluous cast for
complaint output.
* dbxread.c (end_psymtab): Cast MSYMBOL_INFO to long, not int.
* findvar.c, value.h (write_register): Change register value to long.
* gdbtypes.h (struct type): Change `bitsize' to long as
TYPE_FIELD_STATIC_PHYSNAME uses this field as a pointer.
* inferior.h (struct inferior_status): Change type of stop_pc to
CORE_ADDR.
* language.h (local_octal_string, local_octal_string_custom):
Remove prototype, the functions are neither defined nor used.
* mipsread.c (parse_symbol): Use temporary variable for bitsize as
f->bitsize is a long now.
* objfiles.c (add_to_objfile_sections, build_objfile_section_table):
Use unsigned long casts instead of int for abusing sections_end
pointer as integer.
* stack.c (parse_frame_specification): Change type of `args' to
CORE_ADDR for SETUP_ARBITRARY_FRAME.
* printcmd.c (make_vasize): Allow redefinition via MAKEVA_SIZE.
* mipsread.c (parse_type): Alpha cc now supports the t->continued
bit, update algorithm to match the way the compiler uses it.
+Tue Sep 28 09:45:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * symmisc.c (print_symbol): Use %02x not %2x for LOC_CONST_BYTES.
+
+ Clean up problems with targets and hosts that have 64 bit longs
+ and pointers and 32 bit ints.
+ * breakpoint.c, buildsym.c, c-lang.c, c-valprint.c, ch-lang.c,
+ ch-valprint.c, core.c, cp-valprint.c, dbxread.c, exec.c,
+ expprint.c, gdbtypes.c, infcmd.c, language.c, language.h,
+ m2-lang.c, maint.c, mips-tdep.c, mipsread.c, partial-stab.h,
+ printcmd.c, remote-vx.c, solib.c, source.c, stack.c, symfile.c,
+ symmisc.c, symtab.c, valops.c, valprint.c, xcoffexec.c:
+ Change all printf formats from %x to %lx if outputting an address.
+ Change la_*_format to use long format.
+ local_hex_string, local_hex_string_custom now take an unsigned long
+ argument, change all callers.
+ * coffread.c (read_coff_symtab): Remove superfluous cast for
+ complaint output.
+ * dbxread.c (end_psymtab): Cast MSYMBOL_INFO to long, not int.
+ * findvar.c, value.h (write_register): Change register value to long.
+ * gdbtypes.h (struct type): Change `bitsize' to long as
+ TYPE_FIELD_STATIC_PHYSNAME uses this field as a pointer.
+ * inferior.h (struct inferior_status): Change type of stop_pc to
+ CORE_ADDR.
+ * language.h (local_octal_string, local_octal_string_custom):
+ Remove prototype, the functions are neither defined nor used.
+ * mipsread.c (parse_symbol): Use temporary variable for bitsize as
+ f->bitsize is a long now.
+ * objfiles.c (add_to_objfile_sections, build_objfile_section_table):
+ Use unsigned long casts instead of int for abusing sections_end
+ pointer as integer.
+ * stack.c (parse_frame_specification): Change type of `args' to
+ CORE_ADDR for SETUP_ARBITRARY_FRAME.
+
+ * printcmd.c (make_vasize): Allow redefinition via MAKEVA_SIZE.
+ * mipsread.c (parse_type): Alpha cc now supports the t->continued
+ bit, update algorithm to match the way the compiler uses it.
+
Tue Sep 28 12:05:11 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* utils.c (fprintfi_filtered): Fix comments.
{"inner block not inside outer block", 0, 0};
struct complaint blockvector_complaint =
- {"block at 0x%x out of order", 0, 0};
+ {"block at 0x%lx out of order", 0, 0};
\f
/* maintain the lists of symbols and blocks */
> BLOCK_START(BLOCKVECTOR_BLOCK (blockvector, i)))
{
complain (&blockvector_complaint,
- BLOCK_START(BLOCKVECTOR_BLOCK (blockvector, i)));
+ (unsigned long) BLOCK_START(BLOCKVECTOR_BLOCK (blockvector, i)));
}
}
}
&BUILTIN_TYPE_UNSIGNED_LONGEST,/* longest unsigned integral type */
&builtin_type_double, /* longest floating point type */ /*FIXME*/
{"", "", "", ""}, /* Binary format info */
- {"0%o", "0", "o", ""}, /* Octal format info */
- {"%d", "", "d", ""}, /* Decimal format info */
- {"0x%x", "0x", "x", ""}, /* Hex format info */
+ {"0%lo", "0", "o", ""}, /* Octal format info */
+ {"%ld", "", "d", ""}, /* Decimal format info */
+ {"0x%lx", "0x", "x", ""}, /* Hex format info */
c_op_print_tab, /* expression operators for printing */
LANG_MAGIC
};
&BUILTIN_TYPE_UNSIGNED_LONGEST,/* longest unsigned integral type */
&builtin_type_double, /* longest floating point type */ /*FIXME*/
{"", "", "", ""}, /* Binary format info */
- {"0%o", "0", "o", ""}, /* Octal format info */
- {"%d", "", "d", ""}, /* Decimal format info */
- {"0x%x", "0x", "x", ""}, /* Hex format info */
+ {"0%lo", "0", "o", ""}, /* Octal format info */
+ {"%ld", "", "d", ""}, /* Decimal format info */
+ {"0x%lx", "0x", "x", ""}, /* Hex format info */
c_op_print_tab, /* expression operators for printing */
LANG_MAGIC
};
if (addressprint && format != 's')
{
- fprintf_filtered (stream, "0x%x", addr);
+ fprintf_filtered (stream, "0x%lx", (unsigned long)addr);
}
/* For a pointer to char or unsigned char, also print the string
&BUILTIN_TYPE_UNSIGNED_LONGEST,/* longest unsigned integral type */
&builtin_type_chill_real, /* longest floating point type */
{"", "B'", "", ""}, /* Binary format info */
- {"O'%o", "O'", "o", ""}, /* Octal format info */
- {"D'%d", "D'", "d", ""}, /* Decimal format info */
- {"H'%x", "H'", "x", ""}, /* Hex format info */
+ {"O'%lo", "O'", "o", ""}, /* Octal format info */
+ {"D'%ld", "D'", "d", ""}, /* Decimal format info */
+ {"H'%lx", "H'", "x", ""}, /* Hex format info */
chill_op_print_tab, /* expression operators for printing */
LANG_MAGIC
};
}
if (addressprint && format != 's')
{
- fprintf_filtered (stream, "H'%x", addr);
+ fprintf_filtered (stream, "H'%lx", (unsigned long) addr);
}
/* For a pointer to char or unsigned char, also print the string
{
/* This used to say `addr', which is unset at this point.
Is `address' what is meant? */
- fprintf_filtered (stream, "H'%x ", address);
+ fprintf_filtered (stream, "H'%lx ", (unsigned long) address);
}
i = TYPE_LENGTH (type);
LA_PRINT_STRING (stream, valaddr, i, 0);
new = pop_context ();
if (depth-- != new->depth)
{
- complain (&eb_complaint, (char *)symnum);
+ complain (&eb_complaint, symnum);
break;
}
if (local_symbols && context_stack_depth > 0)
{
/* Actually, address between memaddr and memaddr + len
was out of bounds. */
- error ("Cannot access memory at address %s.", local_hex_string(memaddr));
+ error ("Cannot access memory at address %s.",
+ local_hex_string((unsigned long) memaddr));
}
else
{
error ("Error accessing memory address %s: %s.",
- local_hex_string (memaddr), safe_strerror (status));
+ local_hex_string ((unsigned long) memaddr),
+ safe_strerror (status));
}
}
fputs_filtered (basename ? basename : "", stream);
fputs_filtered ("> = ", stream);
if (err != 0)
- fprintf_filtered (stream, "<invalid address 0x%x>", baddr);
+ fprintf_filtered (stream,
+ "<invalid address 0x%lx>", (unsigned long) baddr);
else
cp_print_value_fields (TYPE_BASECLASS (type, i), baddr, stream, format,
recurse, pretty,
if (minsym) {
pst->texthigh = SYMBOL_VALUE_ADDRESS (minsym) +
- (int) MSYMBOL_INFO (minsym);
+ (long) MSYMBOL_INFO (minsym);
} else {
/* This file ends with a static function, and it's
difficult to imagine how hard it would be to track down
case N_BCOMM:
if (common_block)
{
+ /* Note: this does not detect nesting if the previous N_BCOMM
+ was at the beginning of a scope (and thus common_block was
+ NULL). Not necessarily worth worrying about unless we run
+ into a compiler which actually has this bug. */
static struct complaint msg = {
"Invalid symbol data: common within common at symtab pos %d",
0, 0};
break;
case N_ECOMM:
+
/* Symbols declared since the BCOMM are to have the common block
- start address added in when we know it. common_block points to
- the first symbol after the BCOMM in the local_symbols list;
- copy the list and hang it off the symbol for the common block name
- for later fixup. */
+ start address added in when we know it. common_block and
+ common_block_i point to the first symbol after the BCOMM in
+ the local_symbols list; copy the list and hang it off the
+ symbol for the common block name for later fixup. */
+
+ /* If there is a N_ECOMM unmatched by a N_BCOMM, we treat all
+ the local_symbols as part of the common block. It might be
+ better to just ignore the N_ECOMM, but then we'd need to
+ distinguish between a N_BCOMM at the start of a scope, or no
+ N_BCOMM at all (currently they both have common_block NULL).
+ Not necessarily worth worrying about unless we run into a
+ compiler which actually has this bug. */
+
{
int i;
struct symbol *sym =
case N_NBBSS:
case N_NBSTS:
case N_NBLCS:
- complain (&unknown_symtype_complaint, local_hex_string(type));
+ complain (&unknown_symtype_complaint,
+ local_hex_string((unsigned long) type));
/* FALLTHROUGH */
/* The following symbol types don't need the address field relocated,
/* On solaris up to 2.2, the N_FUN stab gets relocated.
On Solaris 2.3, ld no longer relocates stabs (which
is good), and the N_FUN's value is now always zero.
- We only provide this correction for functions, not for
- all N_FUN symbols, because that is easiest and all
- readonly variables seem to go in the .rodata on Solaris. */
+ The following code can't deal with this, because
+ last_pc_address depends on getting the address from a
+ N_SLINE or some such and in Solaris those are function
+ relative. Best fix is probably to create a Ttext.text symbol
+ and handle this like Ddata.data and so on. */
- if (type == N_GSYM || type == N_STSYM
- || (type == N_FUN && valu == 0))
+ if (type == N_GSYM || type == N_STSYM)
{
struct minimal_symbol *m;
int l = colon_pos - name;
add_symbol_to_list (next->symbol[j], &new);
}
- /* Copy however much of END we need. */
- for (j = endi; j < end->nsyms; j++)
- add_symbol_to_list (end->symbol[j], &new);
+ /* Copy however much of END we need. If END is NULL, it means copy
+ all the local symbols (which we already did above). */
+ if (end != NULL)
+ for (j = endi; j < end->nsyms; j++)
+ add_symbol_to_list (end->symbol[j], &new);
return new;
}
p = endaddr - 1;
#endif
/* Do the sign extension once at the start. */
- retval = (*p ^ 0x80) - 0x80;
+ retval = ((LONGEST)*p ^ 0x80) - 0x80;
#if TARGET_BYTE_ORDER == BIG_ENDIAN
for (++p; p < endaddr; ++p)
#else
void
write_register (regno, val)
- int regno, val;
+ int regno;
+ long val;
{
PTR buf;
int size;
int mem_stor = 0, reg_stor = 0;
int mem_tracking = 1;
CORE_ADDR last_addr = 0;
- CORE_ADDR first_addr;
+ CORE_ADDR first_addr = 0;
value_bytes = (char *) alloca (len + MAX_REGISTER_RAW_SIZE);
int overload_idx;
struct fn_field *f;
- printfi_filtered (spaces, "fn_fieldlists 0x%x\n",
- TYPE_FN_FIELDLISTS (type));
+ printfi_filtered (spaces, "fn_fieldlists 0x%lx\n",
+ (unsigned long) TYPE_FN_FIELDLISTS (type));
for (method_idx = 0; method_idx < TYPE_NFN_FIELDS (type); method_idx++)
{
f = TYPE_FN_FIELDLIST1 (type, method_idx);
- printfi_filtered (spaces + 2, "[%d] name '%s' (0x%x) length %d\n",
+ printfi_filtered (spaces + 2, "[%d] name '%s' (0x%lx) length %d\n",
method_idx,
TYPE_FN_FIELDLIST_NAME (type, method_idx),
- TYPE_FN_FIELDLIST_NAME (type, method_idx),
+ (unsigned long) TYPE_FN_FIELDLIST_NAME (type, method_idx),
TYPE_FN_FIELDLIST_LENGTH (type, method_idx));
for (overload_idx = 0;
overload_idx < TYPE_FN_FIELDLIST_LENGTH (type, method_idx);
overload_idx++)
{
- printfi_filtered (spaces + 4, "[%d] physname '%s' (0x%x)\n",
+ printfi_filtered (spaces + 4, "[%d] physname '%s' (0x%lx)\n",
overload_idx,
TYPE_FN_FIELD_PHYSNAME (f, overload_idx),
- TYPE_FN_FIELD_PHYSNAME (f, overload_idx));
- printfi_filtered (spaces + 8, "type 0x%x\n",
- TYPE_FN_FIELD_TYPE (f, overload_idx));
+ (unsigned long) TYPE_FN_FIELD_PHYSNAME (f, overload_idx));
+ printfi_filtered (spaces + 8, "type 0x%lx\n",
+ (unsigned long) TYPE_FN_FIELD_TYPE (f, overload_idx));
recursive_dump_type (TYPE_FN_FIELD_TYPE (f, overload_idx),
spaces + 8 + 2);
- printfi_filtered (spaces + 8, "args 0x%x\n",
- TYPE_FN_FIELD_ARGS (f, overload_idx));
+ printfi_filtered (spaces + 8, "args 0x%lx\n",
+ (unsigned long) TYPE_FN_FIELD_ARGS (f, overload_idx));
print_arg_types (TYPE_FN_FIELD_ARGS (f, overload_idx), spaces);
- printfi_filtered (spaces + 8, "fcontext 0x%x\n",
- TYPE_FN_FIELD_FCONTEXT (f, overload_idx));
+ printfi_filtered (spaces + 8, "fcontext 0x%lx\n",
+ (unsigned long) TYPE_FN_FIELD_FCONTEXT (f, overload_idx));
printfi_filtered (spaces + 8, "is_const %d\n",
TYPE_FN_FIELD_CONST (f, overload_idx));
printfi_filtered (spaces + 8, "is_volatile %d\n",
TYPE_NFN_FIELDS_TOTAL (type));
if (TYPE_N_BASECLASSES (type) > 0)
{
- printfi_filtered (spaces, "virtual_field_bits (%d bits at *0x%x)",
+ printfi_filtered (spaces, "virtual_field_bits (%d bits at *0x%lx)",
TYPE_N_BASECLASSES (type),
- TYPE_FIELD_VIRTUAL_BITS (type));
+ (unsigned long) TYPE_FIELD_VIRTUAL_BITS (type));
print_bit_vector (TYPE_FIELD_VIRTUAL_BITS (type),
TYPE_N_BASECLASSES (type));
puts_filtered ("\n");
{
if (TYPE_FIELD_PRIVATE_BITS (type) != NULL)
{
- printfi_filtered (spaces, "private_field_bits (%d bits at *0x%x)",
+ printfi_filtered (spaces, "private_field_bits (%d bits at *0x%lx)",
TYPE_NFIELDS (type),
- TYPE_FIELD_PRIVATE_BITS (type));
+ (unsigned long) TYPE_FIELD_PRIVATE_BITS (type));
print_bit_vector (TYPE_FIELD_PRIVATE_BITS (type),
TYPE_NFIELDS (type));
puts_filtered ("\n");
}
if (TYPE_FIELD_PROTECTED_BITS (type) != NULL)
{
- printfi_filtered (spaces, "protected_field_bits (%d bits at *0x%x)",
+ printfi_filtered (spaces, "protected_field_bits (%d bits at *0x%lx)",
TYPE_NFIELDS (type),
- TYPE_FIELD_PROTECTED_BITS (type));
+ (unsigned long) TYPE_FIELD_PROTECTED_BITS (type));
print_bit_vector (TYPE_FIELD_PROTECTED_BITS (type),
TYPE_NFIELDS (type));
puts_filtered ("\n");
}
puts_filtered ("\n");
printfi_filtered (spaces, "length %d\n", TYPE_LENGTH (type));
- printfi_filtered (spaces, "objfile 0x%x\n", TYPE_OBJFILE (type));
- printfi_filtered (spaces, "target_type 0x%x\n", TYPE_TARGET_TYPE (type));
+ printfi_filtered (spaces, "objfile 0x%lx\n",
+ (unsigned long) TYPE_OBJFILE (type));
+ printfi_filtered (spaces, "target_type 0x%lx\n",
+ (unsigned long) TYPE_TARGET_TYPE (type));
if (TYPE_TARGET_TYPE (type) != NULL)
{
recursive_dump_type (TYPE_TARGET_TYPE (type), spaces + 2);
}
- printfi_filtered (spaces, "pointer_type 0x%x\n",
- TYPE_POINTER_TYPE (type));
- printfi_filtered (spaces, "reference_type 0x%x\n",
- TYPE_REFERENCE_TYPE (type));
- printfi_filtered (spaces, "function_type 0x%x\n",
- TYPE_FUNCTION_TYPE (type));
+ printfi_filtered (spaces, "pointer_type 0x%lx\n",
+ (unsigned long) TYPE_POINTER_TYPE (type));
+ printfi_filtered (spaces, "reference_type 0x%lx\n",
+ (unsigned long) TYPE_REFERENCE_TYPE (type));
+ printfi_filtered (spaces, "function_type 0x%lx\n",
+ (unsigned long) TYPE_FUNCTION_TYPE (type));
printfi_filtered (spaces, "flags 0x%x", TYPE_FLAGS (type));
if (TYPE_FLAGS (type) & TYPE_FLAG_UNSIGNED)
{
puts_filtered (" TYPE_FLAG_STUB");
}
puts_filtered ("\n");
- printfi_filtered (spaces, "nfields %d 0x%x\n", TYPE_NFIELDS (type),
- TYPE_FIELDS (type));
+ printfi_filtered (spaces, "nfields %d 0x%lx\n", TYPE_NFIELDS (type),
+ (unsigned long) TYPE_FIELDS (type));
for (idx = 0; idx < TYPE_NFIELDS (type); idx++)
{
printfi_filtered (spaces + 2,
- "[%d] bitpos %d bitsize %d type 0x%x name '%s' (0x%x)\n",
+ "[%d] bitpos %d bitsize %d type 0x%lx name '%s' (0x%lx)\n",
idx, TYPE_FIELD_BITPOS (type, idx),
TYPE_FIELD_BITSIZE (type, idx),
- TYPE_FIELD_TYPE (type, idx),
- TYPE_FIELD_NAME (type, idx),
+ (unsigned long) TYPE_FIELD_TYPE (type, idx),
TYPE_FIELD_NAME (type, idx) != NULL
? TYPE_FIELD_NAME (type, idx)
- : "<NULL>");
+ : "<NULL>",
+ (unsigned long) TYPE_FIELD_NAME (type, idx));
if (TYPE_FIELD_TYPE (type, idx) != NULL)
{
recursive_dump_type (TYPE_FIELD_TYPE (type, idx), spaces + 4);
}
}
- printfi_filtered (spaces, "vptr_basetype 0x%x\n",
- TYPE_VPTR_BASETYPE (type));
+ printfi_filtered (spaces, "vptr_basetype 0x%lx\n",
+ (unsigned long) TYPE_VPTR_BASETYPE (type));
if (TYPE_VPTR_BASETYPE (type) != NULL)
{
recursive_dump_type (TYPE_VPTR_BASETYPE (type), spaces + 2);
{
case TYPE_CODE_METHOD:
case TYPE_CODE_FUNC:
- printfi_filtered (spaces, "arg_types 0x%x\n", TYPE_ARG_TYPES (type));
+ printfi_filtered (spaces, "arg_types 0x%lx\n",
+ (unsigned long) TYPE_ARG_TYPES (type));
print_arg_types (TYPE_ARG_TYPES (type), spaces);
break;
case TYPE_CODE_STRUCT:
- printfi_filtered (spaces, "cplus_stuff 0x%x\n",
- TYPE_CPLUS_SPECIFIC (type));
+ printfi_filtered (spaces, "cplus_stuff 0x%lx\n",
+ (unsigned long) TYPE_CPLUS_SPECIFIC (type));
print_cplus_stuff (type, spaces);
break;
/* We have to pick one of the union types to be able print and test
the value. Pick cplus_struct_type, even though we know it isn't
any particular one. */
- printfi_filtered (spaces, "type_specific 0x%x",
- TYPE_CPLUS_SPECIFIC (type));
+ printfi_filtered (spaces, "type_specific 0x%lx",
+ (unsigned long) TYPE_CPLUS_SPECIFIC (type));
if (TYPE_CPLUS_SPECIFIC (type) != NULL)
{
printf_filtered (" (unknown data form)");
/* Size of this field, in bits, or zero if not packed.
For an unpacked field, the field's type's length
says how many bytes the field occupies. */
+ /* FIXME: This is abused by TYPE_FIELD_STATIC_PHYSNAME to contain
+ a pointer, so it has to be long. */
- int bitsize;
+ long bitsize;
/* In a struct or enum type, type of this field.
In a function type, type of this argument.
proceed ((CORE_ADDR) -1, -1, 1);
if (! stop_step)
break;
+
+ /* FIXME: On nexti, this may have already been done (when we hit the
+ step resume break, I think). Probably this should be moved to
+ wait_for_inferior (near the top). */
#if defined (SHIFT_INST_REGS)
SHIFT_INST_REGS();
#endif
}
}
- addr = ADDR_BITS_SET (sal.pc);
+ addr = sal.pc;
if (from_tty)
- printf_filtered ("Continuing at %s.\n", local_hex_string(addr));
+ printf_filtered ("Continuing at %s.\n",
+ local_hex_string((unsigned long) addr));
clear_proceed_status ();
proceed (addr, 0, 0);
}
target_files_info ();
- printf_filtered ("Program stopped at %s.\n", local_hex_string(stop_pc));
+ printf_filtered ("Program stopped at %s.\n",
+ local_hex_string((unsigned long) stop_pc));
if (stop_step)
printf_filtered ("It stopped after being stepped.\n");
else if (num != 0)
string. Returns a pointer to this string. */
char *
local_hex_string (num)
- int num;
+ unsigned long num;
{
static char res[50];
string. Returns a pointer to this string. */
char *
local_hex_string_custom(num,pre)
- int num;
+ unsigned long num;
char *pre;
{
static char res[50];
&builtin_type_error, /* longest unsigned integral type */
&builtin_type_error, /* longest floating point type */
{"", "", "", ""}, /* Binary format info */
- {"0%o", "0", "o", ""}, /* Octal format info */
- {"%d", "", "d", ""}, /* Decimal format info */
- {"0x%x", "0x", "x", ""}, /* Hex format info */
+ {"0%lo", "0", "o", ""}, /* Octal format info */
+ {"%ld", "", "d", ""}, /* Decimal format info */
+ {"0x%lx", "0x", "x", ""}, /* Hex format info */
unk_op_print_tab, /* expression operators for printing */
LANG_MAGIC
};
&builtin_type_error, /* longest unsigned integral type */
&builtin_type_error, /* longest floating point type */
{"", "", "", ""}, /* Binary format info */
- {"0%o", "0", "o", ""}, /* Octal format info */
- {"%d", "", "d", ""}, /* Decimal format info */
- {"0x%x", "0x", "x", ""}, /* Hex format info */
+ {"0%lo", "0", "o", ""}, /* Octal format info */
+ {"%ld", "", "d", ""}, /* Decimal format info */
+ {"0x%lx", "0x", "x", ""}, /* Hex format info */
unk_op_print_tab, /* expression operators for printing */
LANG_MAGIC
};
&builtin_type_error, /* longest unsigned integral type */
&builtin_type_error, /* longest floating point type */
{"", "", "", ""}, /* Binary format info */
- {"0%o", "0", "o", ""}, /* Octal format info */
- {"%d", "", "d", ""}, /* Decimal format info */
- {"0x%x", "0x", "x", ""}, /* Hex format info */
+ {"0%lo", "0", "o", ""}, /* Octal format info */
+ {"%ld", "", "d", ""}, /* Decimal format info */
+ {"0x%lx", "0x", "x", ""}, /* Hex format info */
unk_op_print_tab, /* expression operators for printing */
LANG_MAGIC
};
the next call. Takes printf options like "08" or "l". */
extern char *
-local_octal_string PARAMS ((int)); /* language.c */
+local_hex_string PARAMS ((unsigned long)); /* language.c */
extern char *
-local_octal_string_custom PARAMS ((int, char *));/* language.c */
-
-extern char *
-local_hex_string PARAMS ((int)); /* language.c */
-
-extern char *
-local_hex_string_custom PARAMS ((int, char *)); /* language.c */
+local_hex_string_custom PARAMS ((unsigned long, char *)); /* language.c */
/* Type predicates */
&builtin_type_m2_card, /* longest unsigned integral type */
&builtin_type_m2_real, /* longest floating point type */
{"", "", "", ""}, /* Binary format info */
- {"%oB", "", "o", "B"}, /* Octal format info */
- {"%d", "", "d", ""}, /* Decimal format info */
- {"0%XH", "0", "X", "H"}, /* Hex format info */
+ {"%loB", "", "o", "B"}, /* Octal format info */
+ {"%ld", "", "d", ""}, /* Decimal format info */
+ {"0%lXH", "0", "X", "H"}, /* Hex format info */
m2_op_print_tab, /* expression operators for printing */
LANG_MAGIC
};
flags = bfd_get_section_flags (abfd, asect);
printf_filtered (" %s",
- local_hex_string_custom (bfd_section_vma (abfd, asect),
- "08"));
+ local_hex_string_custom
+ ((unsigned long) bfd_section_vma (abfd, asect), "08l"));
printf_filtered ("->%s",
- local_hex_string_custom ((bfd_section_vma (abfd, asect)
- + bfd_section_size (abfd, asect)),
- "08"));
- printf_filtered (" at %s", local_hex_string_custom (asect->filepos, "08"));
+ local_hex_string_custom
+ ((unsigned long) (bfd_section_vma (abfd, asect)
+ + bfd_section_size (abfd, asect)),
+ "08l"));
+ printf_filtered (" at %s",
+ local_hex_string_custom
+ ((unsigned long) asect->filepos, "08l"));
printf_filtered (": %s", bfd_section_name (abfd, asect));
if (flags & SEC_ALLOC)
section.addr = bfd_section_vma (abfd, asect);
section.endaddr = section.addr + bfd_section_size (abfd, asect);
obstack_grow (&objfile->psymbol_obstack, §ion, sizeof(section));
- objfile->sections_end = (struct obj_section *) (((int) objfile->sections_end) + 1);
+ objfile->sections_end = (struct obj_section *) (((unsigned long) objfile->sections_end) + 1);
}
/* Builds a section table for OBJFILE.
bfd_map_over_sections (objfile->obfd, add_to_objfile_sections, (char *)objfile);
objfile->sections = (struct obj_section *)
obstack_finish (&objfile->psymbol_obstack);
- objfile->sections_end = objfile->sections + (int) objfile->sections_end;
+ objfile->sections_end = objfile->sections + (unsigned long) objfile->sections_end;
return(0);
}
/* If we haven't found it yet, ignore it. It's probably some
new type we don't know about yet. */
complain (&unknown_symtype_complaint,
- local_hex_string (CUR_SYMBOL_TYPE));
+ local_hex_string ((unsigned long) CUR_SYMBOL_TYPE));
continue;
}
{
printf ("\tRunning %s VxWorks process %s",
vx_running? "child": "attached",
- local_hex_string(inferior_pid));
+ local_hex_string((unsigned long) inferior_pid));
if (vx_running)
printf (", function `%s'", vx_running);
printf(".\n");
sleep_ms (200); /* FIXME Don't kill the network too badly */
}
else if (pid != inferior_pid)
- fatal ("Bad pid for debugged task: %s\n", local_hex_string(pid));
+ fatal ("Bad pid for debugged task: %s\n",
+ local_hex_string((unsigned long) pid));
} while (pid == 0);
/* FIXME, eventually do more then SIGTRAP on everything... */
error ("Invalid process-id -- give a single number in decimal or 0xhex");
if (from_tty)
- printf ("Attaching pid %s.\n", local_hex_string(pid));
+ printf ("Attaching pid %s.\n",
+ local_hex_string((unsigned long) pid));
memset ((char *)&ptrace_in, '\0', sizeof (ptrace_in));
memset ((char *)&ptrace_out, '\0', sizeof (ptrace_out));
error ("Argument given to VxWorks \"detach\".");
if (from_tty)
- printf ("Detaching pid %s.\n", local_hex_string(inferior_pid));
+ printf ("Detaching pid %s.\n",
+ local_hex_string((unsigned long) inferior_pid));
if (args) /* FIXME, should be possible to leave suspended */
signal = atoi (args);
Ptrace_return ptrace_out;
int status;
- printf ("Killing pid %s.\n", local_hex_string(inferior_pid));
+ printf ("Killing pid %s.\n", local_hex_string((unsigned long) inferior_pid));
memset ((char *)&ptrace_in, '\0', sizeof (ptrace_in));
memset ((char *)&ptrace_out, '\0', sizeof (ptrace_out));
will cause a core dump), but maybe we can successfully
continue, so let's not. */
warning ("\
-(Internal error: pc 0x%x in read in psymtab, but not in symtab.)\n", pc);
+(Internal error: pc 0x%lx in read in psymtab, but not in symtab.)\n",
+ (unsigned long) pc);
s = PSYMTAB_TO_SYMTAB (ps);
}
return (s);
printf_filtered ("\nNon-debugging symbols:\n");
found_in_file = 1;
}
- printf_filtered (" %08x %s\n",
- SYMBOL_VALUE_ADDRESS (msymbol),
+ printf_filtered (" %08lx %s\n",
+ (unsigned long) SYMBOL_VALUE_ADDRESS (msymbol),
SYMBOL_SOURCE_NAME (msymbol));
}
}
/* If ARG is an enum, convert it to an integer. */
#define COERCE_ENUM(arg) \
-{ if (TYPE_CODE (VALUE_TYPE (arg)) == TYPE_CODE_REF) \
- arg = value_ind (arg); \
+{ COERCE_REF (arg); \
if (TYPE_CODE (VALUE_TYPE (arg)) == TYPE_CODE_ENUM) \
arg = value_cast (builtin_type_unsigned_int, arg); \
}
extern double
unpack_double PARAMS ((struct type *type, char *valaddr, int *invp));
-extern CORE_ADDR
-unpack_pointer PARAMS ((struct type *type, char *valaddr));
+extern CORE_ADDR unpack_pointer PARAMS ((struct type *type, char *valaddr));
-extern LONGEST
-unpack_field_as_long PARAMS ((struct type *type, char *valaddr,
- int fieldno));
+extern LONGEST unpack_field_as_long PARAMS ((struct type *type, char *valaddr,
+ int fieldno));
-extern value
-value_from_longest PARAMS ((struct type *type, LONGEST num));
+extern value value_from_longest PARAMS ((struct type *type, LONGEST num));
-extern value
-value_from_double PARAMS ((struct type *type, double num));
+extern value value_from_double PARAMS ((struct type *type, double num));
-extern value
-value_at PARAMS ((struct type *type, CORE_ADDR addr));
+extern value value_at PARAMS ((struct type *type, CORE_ADDR addr));
-extern value
-value_at_lazy PARAMS ((struct type *type, CORE_ADDR addr));
+extern value value_at_lazy PARAMS ((struct type *type, CORE_ADDR addr));
/* FIXME: Assumes equivalence of "struct frame_info *" and "FRAME" */
-extern value
-value_from_register PARAMS ((struct type *type, int regnum,
- struct frame_info * frame));
+extern value value_from_register PARAMS ((struct type *type, int regnum,
+ struct frame_info * frame));
-extern value
-value_of_variable PARAMS ((struct symbol *var));
+extern value value_of_variable PARAMS ((struct symbol *var, struct block *b));
-extern value
-value_of_register PARAMS ((int regnum));
+extern value value_of_register PARAMS ((int regnum));
/* FIXME: Assumes equivalence of "struct frame_info *" and "FRAME" */
-extern value
-read_var_value PARAMS ((struct symbol *var, struct frame_info *frame));
+extern value read_var_value PARAMS ((struct symbol *var,
+ struct frame_info *frame));
/* FIXME: Assumes equivalence of "struct frame_info *" and "FRAME" */
-extern value
-locate_var_value PARAMS ((struct symbol *var, struct frame_info *frame));
+extern value locate_var_value PARAMS ((struct symbol *var,
+ struct frame_info *frame));
-extern value
-allocate_value PARAMS ((struct type *type));
+extern value allocate_value PARAMS ((struct type *type));
-extern value
-allocate_repeat_value PARAMS ((struct type *type, int count));
+extern value allocate_repeat_value PARAMS ((struct type *type, int count));
-extern value
-value_mark PARAMS ((void));
+extern value value_mark PARAMS ((void));
-extern void
-value_free_to_mark PARAMS ((value mark));
+extern void value_free_to_mark PARAMS ((value mark));
-extern value
-value_string PARAMS ((char *ptr, int len));
+extern value value_string PARAMS ((char *ptr, int len));
-extern value
-value_array PARAMS ((int lowbound, int highbound, value *elemvec));
+extern value value_array PARAMS ((int lowbound, int highbound,
+ value *elemvec));
-extern value
-value_concat PARAMS ((value arg1, value arg2));
+extern value value_concat PARAMS ((value arg1, value arg2));
-extern value
-value_binop PARAMS ((value arg1, value arg2, enum exp_opcode op));
+extern value value_binop PARAMS ((value arg1, value arg2, enum exp_opcode op));
-extern value
-value_add PARAMS ((value arg1, value arg2));
+extern value value_add PARAMS ((value arg1, value arg2));
-extern value
-value_sub PARAMS ((value arg1, value arg2));
+extern value value_sub PARAMS ((value arg1, value arg2));
-extern value
-value_coerce_array PARAMS ((value arg1));
+extern value value_coerce_array PARAMS ((value arg1));
-extern value
-value_coerce_function PARAMS ((value arg1));
+extern value value_coerce_function PARAMS ((value arg1));
-extern value
-value_ind PARAMS ((value arg1));
+extern value value_ind PARAMS ((value arg1));
-extern value
-value_addr PARAMS ((value arg1));
+extern value value_addr PARAMS ((value arg1));
-extern value
-value_assign PARAMS ((value toval, value fromval));
+extern value value_assign PARAMS ((value toval, value fromval));
-extern value
-value_neg PARAMS ((value arg1));
+extern value value_neg PARAMS ((value arg1));
-extern value
-value_complement PARAMS ((value arg1));
+extern value value_complement PARAMS ((value arg1));
-extern value
-value_struct_elt PARAMS ((value *argp, value *args, char *name,
- int *static_memfuncp, char *err));
+extern value value_struct_elt PARAMS ((value *argp, value *args, char *name,
+ int *static_memfuncp, char *err));
-extern value
-value_struct_elt_for_reference PARAMS ((struct type *domain,
- int offset,
- struct type *curtype,
- char *name,
- struct type *intype));
+extern value value_struct_elt_for_reference PARAMS ((struct type *domain,
+ int offset,
+ struct type *curtype,
+ char *name,
+ struct type *intype));
-extern value
-value_field PARAMS ((value arg1, int fieldno));
+extern value value_field PARAMS ((value arg1, int fieldno));
-extern value
-value_primitive_field PARAMS ((value arg1, int offset, int fieldno,
- struct type *arg_type));
+extern value value_primitive_field PARAMS ((value arg1, int offset,
+ int fieldno,
+ struct type *arg_type));
-extern value
-value_cast PARAMS ((struct type *type, value arg2));
+extern value value_cast PARAMS ((struct type *type, value arg2));
-extern value
-value_zero PARAMS ((struct type *type, enum lval_type lv));
+extern value value_zero PARAMS ((struct type *type, enum lval_type lv));
-extern value
-value_repeat PARAMS ((value arg1, int count));
+extern value value_repeat PARAMS ((value arg1, int count));
-extern value
-value_subscript PARAMS ((value array, value idx));
+extern value value_subscript PARAMS ((value array, value idx));
-extern value
-value_from_vtable_info PARAMS ((value arg, struct type *type));
+extern value value_from_vtable_info PARAMS ((value arg, struct type *type));
-extern value
-value_being_returned PARAMS ((struct type *valtype,
- char retbuf[REGISTER_BYTES],
- int struct_return));
+extern value value_being_returned PARAMS ((struct type *valtype,
+ char retbuf[REGISTER_BYTES],
+ int struct_return));
extern int
using_struct_return PARAMS ((value function, CORE_ADDR funcaddr,
read_register PARAMS ((int regno));
extern void
-write_register PARAMS ((int regno, int val));
+write_register PARAMS ((int regno, long val));
extern void
supply_register PARAMS ((int regno, char *val));
int regnum, enum lval_type *lval));
extern void
-modify_field PARAMS ((char *addr, int fieldval, int bitpos, int bitsize));
+modify_field PARAMS ((char *addr, LONGEST fieldval, int bitpos, int bitsize));
extern void
type_print PARAMS ((struct type *type, char *varstring, FILE *stream,
value *valuep, int *errp));
extern void
-print_longest PARAMS ((FILE *stream, char format, int use_local,
+print_longest PARAMS ((FILE *stream, int format, int use_local,
LONGEST value));
extern void
printf_filtered ("file type %s.\n", bfd_get_target(abfd));
for (p = t->to_sections; p < t->to_sections_end; p++) {
- printf_filtered ("\t%s", local_hex_string_custom (p->addr, "08"));
- printf_filtered (" - %s", local_hex_string_custom (p->endaddr, "08"));
+ printf_filtered ("\t%s",
+ local_hex_string_custom ((unsigned long) p->addr, "08l"));
+ printf_filtered (" - %s",
+ local_hex_string_custom ((unsigned long) p->endaddr, "08l"));
if (info_verbose)
printf_filtered (" @ %s",
- local_hex_string_custom (p->sec_ptr->filepos, "08"));
+ local_hex_string_custom ((unsigned long) p->sec_ptr->filepos, "08l"));
printf_filtered (" is %s", bfd_section_name (p->bfd, p->sec_ptr));
if (p->bfd != abfd) {
printf_filtered (" in %s", bfd_get_filename (p->bfd));