diff -uprN src0/gdb/ada-exp.y src1/gdb/ada-exp.y --- src0/gdb/ada-exp.y 2009-05-26 09:56:22.000000000 -0400 +++ src1/gdb/ada-exp.y 2009-08-06 13:49:22.000000000 -0400 @@ -762,6 +762,7 @@ static struct obstack temp_parse_space; /* The following kludge was found necessary to prevent conflicts between */ /* defs.h and non-standard stdlib.h files. */ #define qsort __qsort__dummy +#define YY_NO_INPUT #include "ada-lex.c" int @@ -1091,7 +1092,6 @@ find_primitive_type (char *name) { /* Check to see if we have a regular definition of this type that just didn't happen to have been read yet. */ - int ntypes; struct symbol *sym; char *expanded_name = (char *) alloca (strlen (name) + sizeof ("standard__")); @@ -1366,7 +1366,6 @@ write_var_or_type (struct block *block, } else if (nsyms == 0) { - int i; struct minimal_symbol *msym = ada_lookup_simple_minsym (encoded_name); if (msym != NULL) diff -uprN src0/gdb/ada-lang.c src1/gdb/ada-lang.c --- src0/gdb/ada-lang.c 2009-07-06 09:28:17.000000000 -0400 +++ src1/gdb/ada-lang.c 2009-08-06 10:08:44.000000000 -0400 @@ -65,9 +65,7 @@ #define TRUNCATION_TOWARDS_ZERO ((-5 / 2) == -2) #endif -static void extract_string (CORE_ADDR addr, char *buf); - -static void modify_general_field (struct type *, char *, LONGEST, int, int); +static void modify_general_field (struct type *, gdb_byte *, LONGEST, int, int); static struct type *desc_base_type (struct type *); @@ -350,24 +348,6 @@ ada_print_array_index (struct value *ind fprintf_filtered (stream, " => "); } -/* Read the string located at ADDR from the inferior and store the - result into BUF. */ - -static void -extract_string (CORE_ADDR addr, char *buf) -{ - int char_index = 0; - - /* Loop, reading one byte at a time, until we reach the '\000' - end-of-string marker. */ - do - { - target_read_memory (addr + char_index * sizeof (char), - buf + char_index * sizeof (char), sizeof (char)); - char_index++; - } - while (buf[char_index - 1] != '\000'); -} /* Assuming VECT points to an array of *SIZE objects of size ELEMENT_SIZE, grow it to contain at least MIN_SIZE objects, @@ -1214,7 +1194,7 @@ static char *bound_name[] = { /* Like modify_field, but allows bitpos > wordlength. */ static void -modify_general_field (struct type *type, char *addr, +modify_general_field (struct type *type, gdb_byte *addr, LONGEST fieldval, int bitpos, int bitsize) { modify_field (type, addr + bitpos / 8, fieldval, bitpos % 8, bitsize); @@ -1758,13 +1738,11 @@ static struct type * decode_packed_array_type (struct type *type) { struct symbol *sym; - struct block **blocks; char *raw_name = ada_type_name (ada_check_typedef (type)); char *name; char *tail; struct type *shadow_type; long bits; - int i, n; if (!raw_name) raw_name = ada_type_name (desc_base_type (type)); @@ -2182,7 +2160,7 @@ ada_value_assign (struct value *toval, s int len = (value_bitpos (toval) + bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT; int from_size; - char *buffer = (char *) alloca (len); + gdb_byte *buffer = (gdb_byte *) alloca (len); struct value *val; CORE_ADDR to_addr = value_address (toval); @@ -3987,7 +3965,6 @@ add_defn_to_vec (struct obstack *obstack struct block *block) { int i; - size_t tmp; struct ada_symbol_info *prevDefns = defns_collected (obstackp, 0); /* Do not try to complete stub types, as the debugger is probably @@ -5074,7 +5051,6 @@ symbol_completion_match (const char *sym const char *text, int text_len, int wild_match, int encoded) { - char *result; const int verbatim_match = (text[0] == '<'); int match = 0; @@ -5461,8 +5437,9 @@ value_tag_from_contents_and_address (str const gdb_byte *valaddr, CORE_ADDR address) { - int tag_byte_offset, dummy1, dummy2; + int tag_byte_offset; struct type *tag_type; + if (find_struct_field ("_tag", type, 0, &tag_type, &tag_byte_offset, NULL, NULL, NULL)) { @@ -7456,21 +7433,6 @@ ada_to_fixed_value (struct value *val) val); } -/* A value representing VAL, but with a standard (static-sized) type - chosen to approximate the real type of VAL as well as possible, but - without consulting any runtime values. For Ada dynamic-sized - types, therefore, the type of the result is likely to be inaccurate. */ - -static struct value * -ada_to_static_fixed_value (struct value *val) -{ - struct type *type = - to_static_fixed_type (static_unwrap_type (value_type (val))); - if (type == value_type (val)) - return val; - else - return coerce_unspec_val_to_type (val, type); -} /* Attributes */ @@ -8036,7 +7998,6 @@ assign_aggregate (struct value *containe int max_indices, num_indices; int is_array_aggregate; int i; - struct value *mark = value_mark (); *pos += 3; if (noside != EVAL_NORMAL) @@ -8519,7 +8480,7 @@ ada_evaluate_subexp (struct type *expect int *pos, enum noside noside) { enum exp_opcode op; - int tem, tem2, tem3; + int tem; int pc; struct value *arg1 = NULL, *arg2 = NULL, *arg3; struct type *type; @@ -10256,7 +10217,8 @@ print_it_exception (enum exception_catch if (addr != 0) { - read_memory (addr, exception_name, sizeof (exception_name) - 1); + read_memory (addr, (gdb_byte *)exception_name, + sizeof (exception_name) - 1); exception_name [sizeof (exception_name) - 1] = '\0'; } diff -uprN src0/gdb/ada-tasks.c src1/gdb/ada-tasks.c --- src0/gdb/ada-tasks.c 2009-07-06 09:28:17.000000000 -0400 +++ src1/gdb/ada-tasks.c 2009-08-06 10:17:33.000000000 -0400 @@ -271,7 +271,7 @@ read_fat_string_value (char *dest, struc /* Extract LEN characters from the fat string. */ array_val = value_ind (value_field (val, array_fieldno)); - read_memory (value_address (array_val), dest, len); + read_memory (value_address (array_val), (gdb_byte *)dest, len); /* Add the NUL character to close the string. */ dest[len] = '\0'; @@ -292,7 +292,6 @@ get_known_tasks_addr (void) if (ada_tasks_check_symbol_table) { - struct symbol *sym; struct minimal_symbol *msym; msym = lookup_minimal_symbol (KNOWN_TASKS_NAME, NULL, NULL); diff -uprN src0/gdb/ada-valprint.c src1/gdb/ada-valprint.c --- src0/gdb/ada-valprint.c 2009-07-06 09:28:17.000000000 -0400 +++ src1/gdb/ada-valprint.c 2009-08-06 10:24:31.000000000 -0400 @@ -680,7 +680,6 @@ ada_val_print_1 (struct type *type, cons unsigned int len; int i; struct type *elttype; - unsigned int eltlen; LONGEST val; const gdb_byte *valaddr = valaddr0 + embedded_offset;