* core-aout.c (fetch_core_registers): Cast core_reg_size to int

before testing against reg_ptr.
	* eval.c (evaluate_subexp_standard): Cast type of
	TYPE_FN_FIELD_VOFFSET to int.
	* findvar.c (extract_signed_integer, extract_unsigned_integer,
	extract_long_unsigned_integer): Cast type of sizeof to int.
	* values.c (unpack_field_as_long, modify_field): Ditto.
	* valops.c (value_assign, call_function_by_hand): Ditto.
	* infcmd.c (do_registers_info): Ditto.
	* ser-tcp.c (tcp_open): Ditto
	* remote.c (putpkt): Ditto.
	* dcache.c (dcache_peek): Ditto.
	* dcache.c (dcache_poke): Ditto.
	* m2-exp.y (yylex): Ditto.
	* gnu-regex.c (re_match_2): Ditto.
	* f-lang.c (ADD_BF_SYMNUM, saved_bf_list_end, tmp_bf_ptr): Ifdef
	out unused macro definition and variables.
	* inftarg.c (proc_wait): Move from main.c to here, and make static.
	* valprint.c (val_print_string): Change bufsize from int to unsigned.
	* main.c (wait.h): Include
	* top.c (command_line_input): Remove unused variable "c".
	* f-typeprint.c (f_type_print_varspec_prefix): Add missing enum
	value TYPE_CODE_TYPEDEF to switch statement.
	(f_type_print_varspec_suffix): Add missing enum value
	TYPE_CODE_TYPEDEF to switch statement.
	* ch-exp.c (parse_primval): Add remaining enumeration values to
	switch statement, with no specific action.
	(ch_lex): Add LOC_UNRESOLVED in switch statement.
	(pushback_token): Ifdef out, since code using it is ifdef'd out.
	* stabsread.c (cleanup_undefined_types): Remove unused label
	"badtype".
	* objfiles.h (print_symbol_bcache_statistics): Add prototype.
	* maint.c (objfiles.h): Include.
	(maintenance_print_statistics): Remove unused variable "temp".
	* minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove
	unused variable "found_file_symbol".
	* m2-exp.y (yylex): Add LOC_UNRESOLVED case to switch.
	* language.c (lang_bool_type): Use existing function local type
	variable rather than create block local variables.
	* solib.c (disable_break): Enclose in ifndef SVR4_SHARED_LIBS.
	* infptrace.c (wait.h, command.h): Include.
	* ser-tcp.c (gdb_string.h): Include
	* i386-tdep.c (codestream_seek): Change "place" to CORE_ADDR.
	(i386_get_frame_setup): Change "pc" from int to CORE_ADDR.
	* command.c (complete_on_enum): Make assignment used as truth value
	explictly check against NULL.
	(wait.h): Include.
	* infrun.c (wait_for_inferior): Ifdef out prologue_pc since code
	that uses it is ifdef'd out.
	* parser-defs.h: Add prototype for write_dollar_variable.
	* infrun.c: Add prototype for write_pc_pid.
	* breakpoint.h: Add prototype for re_enable_breakpoints_in_shlibs.
	* symmisc.c (bcache.h): Include.
	* bcache.h: Add prototype for print_bcache_statistics.
	* symfile.c: Include <time.h>.
	* printcmd.c (print_scalar_formatted): Change len to unsigned int.
	* valarith.c (value_equal): Cast result of TYPE_LENGTH to int.
	* valarith.c (value_binop): Change result_len, promoted_len1,
 	and promoted_len2 to unsigned int.
	* valarith.c (value_subscripted_rvalue): Change elt_offs and
 	elt_size to unsigned int.
	* valops.c (value_array): Change typelength to unsigned int.
	(destructor_name_p): Change len to unsigned int.
	* scm-lang.h (scm_parse): Add prototype for scm_unpack.
	* symfile.c (decrement_reading_symtab): Change return type to void.
	* valarith.c (value_subscript): Remove unused variable "word".
	(value_subscript): Remove unused variable "tint".
	* valops.c (auto_abandon): Ifdef out, since code using it is also
	ifdef'd out.
	* eval.c (init_array_element): Remove unused variable "val".
	* Makefile.in (values.o): Depends on scm-lang.h.
	(command.o): Depends upon wait_h.
	(ser-tcp.o): Depends upon gdb_string.h.
	(infptrace.o): Depends upon wait_h and command_h.
	(maint.o): Depends on objfiles.h and symfile.h.
	* values.c (allocate_repeat_value): Remove unused variable
	"element_type".
	(scm-lang.h): Include.
	* breakpoint.c (create_longjmp_breakpoint): Enclose in
	GET_LONGJMP_TARGET define, unused otherwise.
	* config/i386/nm-linux.h: Add prototypes for i386_insert_watchpoint,
	i386_remove_watchpoint and i386_stopped_by_watchpoint.
This commit is contained in:
Fred Fish 1996-03-30 05:45:10 +00:00
parent 84f737e989
commit b52cac6b76
32 changed files with 371 additions and 170 deletions

View file

@ -147,8 +147,7 @@ val_print (type, valaddr, address, stream, format, deref_ref, recurse, pretty)
only a stub and we can't find and substitute its complete type, then
print appropriate string and return. */
if (TYPE_FLAGS (real_type) & TYPE_FLAG_STUB
|| TYPE_LENGTH (real_type) == 0)
if (TYPE_FLAGS (real_type) & TYPE_FLAG_STUB)
{
fprintf_filtered (stream, "<incomplete type>");
gdb_flush (stream);
@ -184,7 +183,9 @@ value_print (val, stream, format, pretty)
return LA_VALUE_PRINT (val, stream, format, pretty);
}
/* Called by various <lang>_val_print routines to print TYPE_CODE_INT's */
/* Called by various <lang>_val_print routines to print
TYPE_CODE_INT's. TYPE is the type. VALADDR is the address of the
value. STREAM is where to print the value. */
void
val_print_type_code_int (type, valaddr, stream)
@ -192,74 +193,22 @@ val_print_type_code_int (type, valaddr, stream)
char *valaddr;
GDB_FILE *stream;
{
char *p;
/* Pointer to first (i.e. lowest address) nonzero character. */
char *first_addr;
unsigned int len;
if (TYPE_LENGTH (type) > sizeof (LONGEST))
{
if (TYPE_UNSIGNED (type))
{
/* First figure out whether the number in fact has zeros
in all its bytes more significant than least significant
sizeof (LONGEST) ones. */
len = TYPE_LENGTH (type);
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
{
for (p = valaddr;
len > sizeof (LONGEST) && p < valaddr + TYPE_LENGTH (type);
p++)
{
if (*p == 0)
{
len--;
}
else
{
break;
}
}
first_addr = p;
}
else
{
first_addr = valaddr;
for (p = valaddr + TYPE_LENGTH (type) - 1;
len > sizeof (LONGEST) && p >= valaddr;
p--)
{
if (*p == 0)
{
len--;
}
else
{
break;
}
}
}
LONGEST val;
if (len <= sizeof (LONGEST))
{
/* The most significant bytes are zero, so we can just get
the least significant sizeof (LONGEST) bytes and print it
in decimal. */
print_longest (stream, 'u', 0,
extract_unsigned_integer (first_addr,
sizeof (LONGEST)));
}
else
{
/* It is big, so print it in hex. */
print_hex_chars (stream, (unsigned char *) first_addr, len);
}
if (TYPE_UNSIGNED (type)
&& extract_long_unsigned_integer (valaddr, TYPE_LENGTH (type),
&val))
{
print_longest (stream, 'u', 0, val);
}
else
{
/* Signed. One could assume two's complement (a reasonable
assumption, I think) and do better than this. */
/* Signed, or we couldn't turn an unsigned value into a
LONGEST. For signed values, one could assume two's
complement (a reasonable assumption, I think) and do
better than this. */
print_hex_chars (stream, (unsigned char *) valaddr,
TYPE_LENGTH (type));
}
@ -427,7 +376,7 @@ print_floating (valaddr, type, stream)
struct type *type;
GDB_FILE *stream;
{
double doub;
DOUBLEST doub;
int inv;
unsigned len = TYPE_LENGTH (type);
@ -505,9 +454,17 @@ print_floating (valaddr, type, stream)
doub = unpack_double (type, valaddr, &inv);
if (inv)
fprintf_filtered (stream, "<invalid float value>");
{
fprintf_filtered (stream, "<invalid float value>");
return;
}
if (len < sizeof (double))
fprintf_filtered (stream, "%.9g", (double) doub);
else if (len == sizeof (double))
fprintf_filtered (stream, "%.17g", (double) doub);
else
fprintf_filtered (stream, len <= sizeof(float) ? "%.9g" : "%.17g", doub);
fprintf_filtered (stream, "%.35Lg", doub);
}
/* VALADDR points to an integer of LEN bytes. Print it in hex on stream. */
@ -656,7 +613,7 @@ val_print_string (addr, len, stream)
unsigned int fetchlimit; /* Maximum number of bytes to fetch. */
unsigned int nfetch; /* Bytes to fetch / bytes fetched. */
unsigned int chunksize; /* Size of each fetch, in bytes. */
int bufsize; /* Size of current fetch buffer. */
unsigned int bufsize; /* Size of current fetch buffer. */
char *buffer = NULL; /* Dynamically growable fetch buffer. */
char *bufptr; /* Pointer to next available byte in buffer. */
char *limit; /* First location past end of fetch buffer. */