mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 01:50:48 +00:00
* ada-lang.c: Change k&r style function definitions to prototyped
form.
* ada-typeprint.c: Change k&r style function definitions to prototyped
form.
* ada-valprint.c: Change k&r style function definitions to prototyped
form.
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
2002-07-24 Aidan Skinner <aidan@velvet.net>
|
||||
|
||||
* ada-lang.c: Change k&r style function definitions to prototyped
|
||||
form.
|
||||
* ada-typeprint.c: Change k&r style function definitions to prototyped
|
||||
form.
|
||||
* ada-valprint.c: Change k&r style function definitions to prototyped
|
||||
form.
|
||||
|
||||
2002-07-24 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* README: Remove reference to remote-bug.
|
||||
@@ -55,6 +64,7 @@
|
||||
(regcache_raw_read): Update declaration.
|
||||
(supply_register): Update declaration.
|
||||
|
||||
>>>>>>> 1.2946
|
||||
2002-07-24 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* defs.h (gdb_readline_wrapper): Declare.
|
||||
|
||||
773
gdb/ada-lang.c
773
gdb/ada-lang.c
File diff suppressed because it is too large
Load Diff
@@ -64,8 +64,7 @@ static int name_buffer_len;
|
||||
next call. */
|
||||
|
||||
static char*
|
||||
demangled_type_name (type)
|
||||
struct type *type;
|
||||
demangled_type_name (struct type *type)
|
||||
{
|
||||
if (ada_type_name (type) == NULL)
|
||||
return NULL;
|
||||
@@ -117,10 +116,7 @@ demangled_type_name (type)
|
||||
NEW is the new name for a type TYPE. */
|
||||
|
||||
void
|
||||
ada_typedef_print (type, new, stream)
|
||||
struct type *type;
|
||||
struct symbol *new;
|
||||
struct ui_file *stream;
|
||||
ada_typedef_print (struct type *type, struct symbol *new, struct ui_file *stream)
|
||||
{
|
||||
fprintf_filtered (stream, "type %.*s is ",
|
||||
ada_name_prefix_len (SYMBOL_SOURCE_NAME(new)),
|
||||
@@ -131,9 +127,7 @@ ada_typedef_print (type, new, stream)
|
||||
/* Print range type TYPE on STREAM. */
|
||||
|
||||
static void
|
||||
print_range (type, stream)
|
||||
struct type* type;
|
||||
struct ui_file* stream;
|
||||
print_range (struct type* type, struct ui_file* stream)
|
||||
{
|
||||
struct type* target_type;
|
||||
target_type = TYPE_TARGET_TYPE (type);
|
||||
@@ -183,11 +177,7 @@ print_range (type, stream)
|
||||
set *N past the bound and its delimiter, if any. */
|
||||
|
||||
static void
|
||||
print_range_bound (type, bounds, n, stream)
|
||||
struct type* type;
|
||||
char* bounds;
|
||||
int* n;
|
||||
struct ui_file* stream;
|
||||
print_range_bound (struct type* type, char* bounds, int* n, struct ui_file* stream)
|
||||
{
|
||||
LONGEST B;
|
||||
if (ada_scan_number (bounds, *n, &B, n))
|
||||
@@ -219,12 +209,7 @@ print_range_bound (type, bounds, n, stream)
|
||||
"___U") according to the ___XD conventions. */
|
||||
|
||||
static void
|
||||
print_dynamic_range_bound (type, name, name_len, suffix, stream)
|
||||
struct type* type;
|
||||
const char* name;
|
||||
int name_len;
|
||||
const char* suffix;
|
||||
struct ui_file* stream;
|
||||
print_dynamic_range_bound (struct type* type, const char* name, int name_len, const char* suffix, struct ui_file* stream)
|
||||
{
|
||||
static char *name_buf = NULL;
|
||||
static size_t name_buf_len = 0;
|
||||
@@ -245,9 +230,7 @@ print_dynamic_range_bound (type, name, name_len, suffix, stream)
|
||||
/* Print the range type named NAME. */
|
||||
|
||||
static void
|
||||
print_range_type_named (name, stream)
|
||||
char* name;
|
||||
struct ui_file* stream;
|
||||
print_range_type_named (char* name, struct ui_file* stream)
|
||||
{
|
||||
struct type *raw_type = ada_find_any_type (name);
|
||||
struct type *base_type;
|
||||
@@ -296,9 +279,7 @@ print_range_type_named (name, stream)
|
||||
/* Print enumerated type TYPE on STREAM. */
|
||||
|
||||
static void
|
||||
print_enum_type (type, stream)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
print_enum_type (struct type *type, struct ui_file *stream)
|
||||
{
|
||||
int len = TYPE_NFIELDS (type);
|
||||
int i, lastval;
|
||||
@@ -326,9 +307,7 @@ print_enum_type (type, stream)
|
||||
/* Print representation of Ada fixed-point type TYPE on STREAM. */
|
||||
|
||||
static void
|
||||
print_fixed_point_type (type, stream)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
print_fixed_point_type (struct type *type, struct ui_file *stream)
|
||||
{
|
||||
DOUBLEST delta = ada_delta (type);
|
||||
DOUBLEST small = ada_fixed_to_float (type, 1.0);
|
||||
@@ -346,9 +325,7 @@ print_fixed_point_type (type, stream)
|
||||
/* Print representation of special VAX floating-point type TYPE on STREAM. */
|
||||
|
||||
static void
|
||||
print_vax_floating_point_type (type, stream)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
print_vax_floating_point_type (struct type *type, struct ui_file *stream)
|
||||
{
|
||||
fprintf_filtered (stream, "<float format %c>",
|
||||
ada_vax_float_type_suffix (type));
|
||||
@@ -360,11 +337,7 @@ print_vax_floating_point_type (type, stream)
|
||||
structure to show (see ada_print_type). */
|
||||
|
||||
static void
|
||||
print_array_type (type, stream, show, level)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
int show;
|
||||
int level;
|
||||
print_array_type (struct type *type, struct ui_file *stream, int show, int level)
|
||||
{
|
||||
int bitsize;
|
||||
int n_indices;
|
||||
@@ -435,11 +408,7 @@ print_array_type (type, stream, show, level)
|
||||
STREAM, assuming the VAL_TYPE is the type of the values. */
|
||||
|
||||
static void
|
||||
print_choices (type, field_num, stream, val_type)
|
||||
struct type *type;
|
||||
int field_num;
|
||||
struct ui_file *stream;
|
||||
struct type *val_type;
|
||||
print_choices (struct type *type, int field_num, struct ui_file *stream, struct type *val_type)
|
||||
{
|
||||
int have_output;
|
||||
int p;
|
||||
@@ -515,13 +484,9 @@ Huh:
|
||||
immediately outside the variant part. */
|
||||
|
||||
static void
|
||||
print_variant_clauses (type, field_num, outer_type, stream, show, level)
|
||||
struct type *type;
|
||||
int field_num;
|
||||
struct type *outer_type;
|
||||
struct ui_file *stream;
|
||||
int show;
|
||||
int level;
|
||||
print_variant_clauses (struct type *type, int field_num,
|
||||
struct type *outer_type, struct ui_file *stream,
|
||||
int show, int level)
|
||||
{
|
||||
int i;
|
||||
struct type *var_type;
|
||||
@@ -561,13 +526,8 @@ print_variant_clauses (type, field_num, outer_type, stream, show, level)
|
||||
level as the fields immediately outside the variant part. */
|
||||
|
||||
static void
|
||||
print_variant_part (type, field_num, outer_type, stream, show, level)
|
||||
struct type *type;
|
||||
int field_num;
|
||||
struct type *outer_type;
|
||||
struct ui_file *stream;
|
||||
int show;
|
||||
int level;
|
||||
print_variant_part (struct type *type, int field_num, struct type *outer_type,
|
||||
struct ui_file *stream, int show, int level)
|
||||
{
|
||||
fprintf_filtered (stream, "\n%*scase %s is", level + 4, "",
|
||||
ada_variant_discrim_name
|
||||
@@ -586,12 +546,8 @@ print_variant_part (type, field_num, outer_type, stream, show, level)
|
||||
end. */
|
||||
|
||||
static int
|
||||
print_record_field_types (type, outer_type, stream, show, level)
|
||||
struct type *type;
|
||||
struct type *outer_type;
|
||||
struct ui_file *stream;
|
||||
int show;
|
||||
int level;
|
||||
print_record_field_types (struct type *type, struct type *outer_type,
|
||||
struct ui_file *stream, int show, int level)
|
||||
{
|
||||
int len, i, flds;
|
||||
|
||||
@@ -635,11 +591,7 @@ print_record_field_types (type, outer_type, stream, show, level)
|
||||
the number of levels of internal structure to show (see ada_print_type). */
|
||||
|
||||
static void
|
||||
print_record_type (type0, stream, show, level)
|
||||
struct type* type0;
|
||||
struct ui_file* stream;
|
||||
int show;
|
||||
int level;
|
||||
print_record_type (struct type* type0, struct ui_file* stream, int show, int level)
|
||||
{
|
||||
struct type* parent_type;
|
||||
struct type* type;
|
||||
@@ -724,10 +676,7 @@ print_unchecked_union_type (struct type* type, struct ui_file* stream,
|
||||
for function or procedure NAME if NAME is not null. */
|
||||
|
||||
static void
|
||||
print_func_type (type, stream, name)
|
||||
struct type *type;
|
||||
struct ui_file *stream;
|
||||
char* name;
|
||||
print_func_type (struct type *type, struct ui_file *stream, char* name)
|
||||
{
|
||||
int i, len = TYPE_NFIELDS (type);
|
||||
|
||||
@@ -777,12 +726,8 @@ print_func_type (type, stream, name)
|
||||
LEVEL indicates level of recursion (for nested definitions). */
|
||||
|
||||
void
|
||||
ada_print_type (type0, varstring, stream, show, level)
|
||||
struct type* type0;
|
||||
char* varstring;
|
||||
struct ui_file* stream;
|
||||
int show;
|
||||
int level;
|
||||
ada_print_type (struct type* type0, char* varstring, struct ui_file* stream,
|
||||
int show, int level)
|
||||
{
|
||||
enum type_code code;
|
||||
int demangled_args;
|
||||
|
||||
@@ -88,9 +88,7 @@ adjust_type_signedness (type)
|
||||
otherwise 0. */
|
||||
|
||||
static int
|
||||
print_optional_low_bound (stream, type)
|
||||
struct ui_file *stream;
|
||||
struct type *type;
|
||||
print_optional_low_bound (struct ui_file *stream, struct type *type)
|
||||
{
|
||||
struct type *index_type;
|
||||
long low_bound;
|
||||
@@ -135,15 +133,10 @@ print_optional_low_bound (stream, type)
|
||||
by ada_coerce_to_simple_array). */
|
||||
|
||||
static void
|
||||
val_print_packed_array_elements (type, valaddr, bitoffset, stream, format,
|
||||
recurse, pretty)
|
||||
struct type *type;
|
||||
char *valaddr;
|
||||
int bitoffset;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
int recurse;
|
||||
enum val_prettyprint pretty;
|
||||
val_print_packed_array_elements (struct type *type, char *valaddr,
|
||||
int bitoffset, struct ui_file *stream,
|
||||
int format, int recurse,
|
||||
enum val_prettyprint pretty)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned int things_printed = 0;
|
||||
@@ -254,9 +247,7 @@ val_print_packed_array_elements (type, valaddr, bitoffset, stream, format,
|
||||
}
|
||||
|
||||
static struct type*
|
||||
printable_val_type (type, valaddr)
|
||||
struct type* type;
|
||||
char* valaddr;
|
||||
printable_val_type (struct type* type, char* valaddr)
|
||||
{
|
||||
return ada_to_fixed_type (ada_aligned_type (type), valaddr, 0, NULL);
|
||||
}
|
||||
@@ -266,11 +257,7 @@ printable_val_type (type, valaddr)
|
||||
(1 or 2) of the character. */
|
||||
|
||||
void
|
||||
ada_emit_char (c, stream, quoter, type_len)
|
||||
int c;
|
||||
struct ui_file *stream;
|
||||
int quoter;
|
||||
int type_len;
|
||||
ada_emit_char (int c, struct ui_file *stream, int quoter, int type_len)
|
||||
{
|
||||
if (type_len != 2)
|
||||
type_len = 1;
|
||||
@@ -292,10 +279,7 @@ ada_emit_char (c, stream, quoter, type_len)
|
||||
or 2) of a character. */
|
||||
|
||||
static int
|
||||
char_at (string, i, type_len)
|
||||
char* string;
|
||||
int i;
|
||||
int type_len;
|
||||
char_at (char* string, int i, int type_len)
|
||||
{
|
||||
if (type_len == 1)
|
||||
return string[i];
|
||||
@@ -304,9 +288,7 @@ char_at (string, i, type_len)
|
||||
}
|
||||
|
||||
void
|
||||
ada_printchar (c, stream)
|
||||
int c;
|
||||
struct ui_file *stream;
|
||||
ada_printchar (int c, struct ui_file *stream)
|
||||
{
|
||||
fputs_filtered ("'", stream);
|
||||
ada_emit_char (c, stream, '\'', 1);
|
||||
@@ -317,10 +299,7 @@ ada_printchar (c, stream)
|
||||
form appropriate for TYPE. */
|
||||
|
||||
void
|
||||
ada_print_scalar (type, val, stream)
|
||||
struct type *type;
|
||||
LONGEST val;
|
||||
struct ui_file *stream;
|
||||
ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned len;
|
||||
@@ -396,12 +375,8 @@ ada_print_scalar (type, val, stream)
|
||||
*/
|
||||
|
||||
static void
|
||||
printstr (stream, string, length, force_ellipses, type_len)
|
||||
struct ui_file *stream;
|
||||
char *string;
|
||||
unsigned int length;
|
||||
int force_ellipses;
|
||||
int type_len;
|
||||
printstr (struct ui_file *stream, char *string, unsigned int length,
|
||||
int force_ellipses, int type_len)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned int things_printed = 0;
|
||||
@@ -487,12 +462,8 @@ printstr (stream, string, length, force_ellipses, type_len)
|
||||
}
|
||||
|
||||
void
|
||||
ada_printstr (stream, string, length, force_ellipses, width)
|
||||
struct ui_file *stream;
|
||||
char *string;
|
||||
unsigned int length;
|
||||
int force_ellipses;
|
||||
int width;
|
||||
ada_printstr (struct ui_file *stream, char *string, unsigned int length,
|
||||
int force_ellipses, int width)
|
||||
{
|
||||
printstr (stream, string, length, force_ellipses, width);
|
||||
}
|
||||
@@ -518,17 +489,9 @@ ada_printstr (stream, string, length, force_ellipses, width)
|
||||
arrays.) */
|
||||
|
||||
int
|
||||
ada_val_print (type, valaddr0, embedded_offset, address, stream,
|
||||
format, deref_ref, recurse, pretty)
|
||||
struct type* type;
|
||||
char* valaddr0;
|
||||
int embedded_offset;
|
||||
CORE_ADDR address;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
int deref_ref;
|
||||
int recurse;
|
||||
enum val_prettyprint pretty;
|
||||
ada_val_print (struct type* type, char* valaddr0, int embedded_offset,
|
||||
CORE_ADDR address, struct ui_file *stream, int format,
|
||||
int deref_ref, int recurse, enum val_prettyprint pretty)
|
||||
{
|
||||
struct ada_val_print_args args;
|
||||
args.type = type; args.valaddr0 = valaddr0;
|
||||
@@ -559,17 +522,9 @@ ada_val_print_stub (PTR args0)
|
||||
* does not catch evaluation errors (leaving that to ada_val_print). */
|
||||
|
||||
static int
|
||||
ada_val_print_1 (type, valaddr0, embedded_offset, address, stream,
|
||||
format, deref_ref, recurse, pretty)
|
||||
struct type* type;
|
||||
char* valaddr0;
|
||||
int embedded_offset;
|
||||
CORE_ADDR address;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
int deref_ref;
|
||||
int recurse;
|
||||
enum val_prettyprint pretty;
|
||||
ada_val_print_1 (struct type* type, char* valaddr0, int embedded_offset,
|
||||
CORE_ADDR address, struct ui_file *stream, int format,
|
||||
int deref_ref, int recurse, enum val_prettyprint pretty)
|
||||
{
|
||||
unsigned int len;
|
||||
int i;
|
||||
@@ -826,19 +781,10 @@ ada_val_print_1 (type, valaddr0, embedded_offset, address, stream,
|
||||
}
|
||||
|
||||
static int
|
||||
print_variant_part (type, field_num, valaddr,
|
||||
stream, format, recurse, pretty, comma_needed,
|
||||
outer_type, outer_valaddr)
|
||||
struct type *type;
|
||||
int field_num;
|
||||
char *valaddr;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
int recurse;
|
||||
enum val_prettyprint pretty;
|
||||
int comma_needed;
|
||||
struct type *outer_type;
|
||||
char *outer_valaddr;
|
||||
print_variant_part (struct type *type, int field_num, char *valaddr,
|
||||
struct ui_file *stream, int format, int recurse,
|
||||
enum val_prettyprint pretty, int comma_needed,
|
||||
struct type *outer_type, char *outer_valaddr)
|
||||
{
|
||||
struct type *var_type = TYPE_FIELD_TYPE (type, field_num);
|
||||
int which =
|
||||
@@ -856,11 +802,8 @@ print_variant_part (type, field_num, valaddr,
|
||||
}
|
||||
|
||||
int
|
||||
ada_value_print (val0, stream, format, pretty)
|
||||
struct value* val0;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
enum val_prettyprint pretty;
|
||||
ada_value_print (struct value* val0, struct ui_file *stream, int format,
|
||||
enum val_prettyprint pretty)
|
||||
{
|
||||
char* valaddr = VALUE_CONTENTS (val0);
|
||||
CORE_ADDR address = VALUE_ADDRESS (val0) + VALUE_OFFSET (val0);
|
||||
@@ -906,13 +849,8 @@ ada_value_print (val0, stream, format, pretty)
|
||||
}
|
||||
|
||||
static void
|
||||
print_record (type, valaddr, stream, format, recurse, pretty)
|
||||
struct type *type;
|
||||
char *valaddr;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
int recurse;
|
||||
enum val_prettyprint pretty;
|
||||
print_record (struct type *type, char *valaddr, struct ui_file *stream,
|
||||
int format, int recurse, enum val_prettyprint pretty)
|
||||
{
|
||||
CHECK_TYPEDEF (type);
|
||||
|
||||
@@ -944,17 +882,10 @@ print_record (type, valaddr, stream, format, recurse, pretty)
|
||||
Returns 1 if COMMA_NEEDED or any fields were printed. */
|
||||
|
||||
static int
|
||||
print_field_values (type, valaddr, stream, format, recurse, pretty,
|
||||
comma_needed, outer_type, outer_valaddr)
|
||||
struct type *type;
|
||||
char *valaddr;
|
||||
struct ui_file *stream;
|
||||
int format;
|
||||
int recurse;
|
||||
enum val_prettyprint pretty;
|
||||
int comma_needed;
|
||||
struct type *outer_type;
|
||||
char *outer_valaddr;
|
||||
print_field_values (struct type *type, char *valaddr, struct ui_file *stream,
|
||||
int format, int recurse, enum val_prettyprint pretty,
|
||||
int comma_needed, struct type *outer_type,
|
||||
char *outer_valaddr)
|
||||
{
|
||||
int i, len;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user