2011-01-07 Michael Snyder <msnyder@vmware.com>
* ada-lang.c: Comment cleanup, mostly periods and spaces. * ada-lang.h: Ditto. * ada-tasks.c: Ditto. * ada-valprint.c: Ditto. * aix-threads.c: Ditto. * alpha-linux-nat.c: Ditto. * alpha-linux-tdep.c: Ditto. * alpha-mdebug-tdep.c: Ditto. * alpha-nat.c: Ditto. * alpha-osf1-tdep.c: Ditto. * alpha-tdep.c: Ditto. * alphabsd-nat.c: Ditto. * alphabsd-tdep.c: Ditto. * amd64-darwin-tdep.c: Ditto. * amd64-linux-nat.c: Ditto. * amd64-linux-tdep.c: Ditto. * amd64-sol2-tdep.c: Ditto. * amd64-tdep.c: Ditto. * amd64-fbsd-tdep.c: Ditto. * amd64-nbsd-tdep.c: Ditto. * amd64-obsd-tdep.c: Ditto. * amd64-linux-nat.c: Ditto. * amd64-linux-tdep.c: Ditto. * arm-tdep.c: Ditto. * arm-tdep.h: Ditto. * armnbsd-nat.c: Ditto. * avr-tdep.c: Ditto. * bfin-tdep.c: Ditto. * bsd-kvm.c: Ditto. * c-typeprintc: Ditto. * c-valprint.c: Ditto. * coff-pe-read.h: Ditto. * coffreead.c: Ditto. * cris-tdep.c: Ditto. * d-lang.c: Ditto. * darwin-nat-info.c: Ditto. * darwin-nat.c: Ditto. * dbug-rom.c: Ditto. * dbxread.c: Ditto. * dcache.c: Ditto. * dcache.h: Ditto. * dec-thread.c: Ditto. * defs.h: Ditto. * demangle.c: Ditto. * dicos-tdep.c: Ditto. * dictionary.c: Ditto. * dictionary.h: Ditto. * dink32-rom.c: Ditto. * disasm.c: Ditto. * doublest.c: Ditto. * dsrec.c: Ditto. * dummy-frame.c: Ditto. * dwarf2-frame.c: Ditto. * dwarf2expr.c: Ditto. * dwarf2loc.c: Ditto. * dwarf2read.c: Ditto. * elfread.c: Ditto. * environ.c: Ditto. * eval.c: Ditto. * event-top.h: Ditto. * exceptions.c: Ditto. * exceptions.h: Ditto. * exec.c: Ditto. * expprint.c: Ditto. * expression.h: Ditto. * f-exp.y: Ditto. * f-lang.c: Ditto. * f-lang.h: Ditto. * f-typeprint.c: Ditto. * f-valprint.c: Ditto. * fbsd-nat.c: Ditto. * findvar.c: Ditto. * fork-child.c: Ditto. * frame.c: Ditto. * frame.h: Ditto. * frv-linux-tdep.c: Ditto. * frv-tdep.c: Ditto. * gcore.c: Ditto. * gdb-stabs.h: Ditto. * gdb_assert.h: Ditto. * gdb_string.h: Ditto. * gdb_thread_db.h: Ditto. * gdb_wait.h: Ditto. * gdbarch.sh: Ditto. * gdbcore.h: Ditto. * gdbthread.h: Ditto. * gdbtypes.c: Ditto. * gdbtypes.h: Ditto. * gnu-nat.c: Ditto. * gnu-nat.h: Ditto. * gnu-v2-abi.c: Ditto. * gnu-v3-abi.c: Ditto. * go32-nat.c: Ditto. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate.
This commit is contained in:
parent
87973e9f82
commit
0963b4bd45
97 changed files with 1538 additions and 1304 deletions
|
@ -1,3 +1,101 @@
|
||||||
|
2011-01-07 Michael Snyder <msnyder@vmware.com>
|
||||||
|
|
||||||
|
* ada-lang.c: Comment cleanup, mostly periods and spaces.
|
||||||
|
* ada-lang.h: Ditto.
|
||||||
|
* ada-tasks.c: Ditto.
|
||||||
|
* ada-valprint.c: Ditto.
|
||||||
|
* aix-threads.c: Ditto.
|
||||||
|
* alpha-linux-nat.c: Ditto.
|
||||||
|
* alpha-linux-tdep.c: Ditto.
|
||||||
|
* alpha-mdebug-tdep.c: Ditto.
|
||||||
|
* alpha-nat.c: Ditto.
|
||||||
|
* alpha-osf1-tdep.c: Ditto.
|
||||||
|
* alpha-tdep.c: Ditto.
|
||||||
|
* alphabsd-nat.c: Ditto.
|
||||||
|
* alphabsd-tdep.c: Ditto.
|
||||||
|
* amd64-darwin-tdep.c: Ditto.
|
||||||
|
* amd64-linux-nat.c: Ditto.
|
||||||
|
* amd64-linux-tdep.c: Ditto.
|
||||||
|
* amd64-sol2-tdep.c: Ditto.
|
||||||
|
* amd64-tdep.c: Ditto.
|
||||||
|
* amd64-fbsd-tdep.c: Ditto.
|
||||||
|
* amd64-nbsd-tdep.c: Ditto.
|
||||||
|
* amd64-obsd-tdep.c: Ditto.
|
||||||
|
* amd64-linux-nat.c: Ditto.
|
||||||
|
* amd64-linux-tdep.c: Ditto.
|
||||||
|
* arm-tdep.c: Ditto.
|
||||||
|
* arm-tdep.h: Ditto.
|
||||||
|
* armnbsd-nat.c: Ditto.
|
||||||
|
* avr-tdep.c: Ditto.
|
||||||
|
* bfin-tdep.c: Ditto.
|
||||||
|
* bsd-kvm.c: Ditto.
|
||||||
|
* c-typeprintc: Ditto.
|
||||||
|
* c-valprint.c: Ditto.
|
||||||
|
* coff-pe-read.h: Ditto.
|
||||||
|
* coffreead.c: Ditto.
|
||||||
|
* cris-tdep.c: Ditto.
|
||||||
|
* d-lang.c: Ditto.
|
||||||
|
* darwin-nat-info.c: Ditto.
|
||||||
|
* darwin-nat.c: Ditto.
|
||||||
|
* dbug-rom.c: Ditto.
|
||||||
|
* dbxread.c: Ditto.
|
||||||
|
* dcache.c: Ditto.
|
||||||
|
* dcache.h: Ditto.
|
||||||
|
* dec-thread.c: Ditto.
|
||||||
|
* defs.h: Ditto.
|
||||||
|
* demangle.c: Ditto.
|
||||||
|
* dicos-tdep.c: Ditto.
|
||||||
|
* dictionary.c: Ditto.
|
||||||
|
* dictionary.h: Ditto.
|
||||||
|
* dink32-rom.c: Ditto.
|
||||||
|
* disasm.c: Ditto.
|
||||||
|
* doublest.c: Ditto.
|
||||||
|
* dsrec.c: Ditto.
|
||||||
|
* dummy-frame.c: Ditto.
|
||||||
|
* dwarf2-frame.c: Ditto.
|
||||||
|
* dwarf2expr.c: Ditto.
|
||||||
|
* dwarf2loc.c: Ditto.
|
||||||
|
* dwarf2read.c: Ditto.
|
||||||
|
* elfread.c: Ditto.
|
||||||
|
* environ.c: Ditto.
|
||||||
|
* eval.c: Ditto.
|
||||||
|
* event-top.h: Ditto.
|
||||||
|
* exceptions.c: Ditto.
|
||||||
|
* exceptions.h: Ditto.
|
||||||
|
* exec.c: Ditto.
|
||||||
|
* expprint.c: Ditto.
|
||||||
|
* expression.h: Ditto.
|
||||||
|
* f-exp.y: Ditto.
|
||||||
|
* f-lang.c: Ditto.
|
||||||
|
* f-lang.h: Ditto.
|
||||||
|
* f-typeprint.c: Ditto.
|
||||||
|
* f-valprint.c: Ditto.
|
||||||
|
* fbsd-nat.c: Ditto.
|
||||||
|
* findvar.c: Ditto.
|
||||||
|
* fork-child.c: Ditto.
|
||||||
|
* frame.c: Ditto.
|
||||||
|
* frame.h: Ditto.
|
||||||
|
* frv-linux-tdep.c: Ditto.
|
||||||
|
* frv-tdep.c: Ditto.
|
||||||
|
* gcore.c: Ditto.
|
||||||
|
* gdb-stabs.h: Ditto.
|
||||||
|
* gdb_assert.h: Ditto.
|
||||||
|
* gdb_string.h: Ditto.
|
||||||
|
* gdb_thread_db.h: Ditto.
|
||||||
|
* gdb_wait.h: Ditto.
|
||||||
|
* gdbarch.sh: Ditto.
|
||||||
|
* gdbcore.h: Ditto.
|
||||||
|
* gdbthread.h: Ditto.
|
||||||
|
* gdbtypes.c: Ditto.
|
||||||
|
* gdbtypes.h: Ditto.
|
||||||
|
* gnu-nat.c: Ditto.
|
||||||
|
* gnu-nat.h: Ditto.
|
||||||
|
* gnu-v2-abi.c: Ditto.
|
||||||
|
* gnu-v3-abi.c: Ditto.
|
||||||
|
* go32-nat.c: Ditto.
|
||||||
|
* gdbarch.c: Regenerate.
|
||||||
|
* gdbarch.h: Regenerate.
|
||||||
|
|
||||||
2011-01-07 Michael Snyder <msnyder@vmware.com>
|
2011-01-07 Michael Snyder <msnyder@vmware.com>
|
||||||
|
|
||||||
* ax-gdb.c: Adjust some long output strings.
|
* ax-gdb.c: Adjust some long output strings.
|
||||||
|
|
|
@ -239,7 +239,8 @@ static struct value *ada_index_struct_field (int, struct value *, int,
|
||||||
struct type *);
|
struct type *);
|
||||||
|
|
||||||
static struct value *assign_aggregate (struct value *, struct value *,
|
static struct value *assign_aggregate (struct value *, struct value *,
|
||||||
struct expression *, int *, enum noside);
|
struct expression *,
|
||||||
|
int *, enum noside);
|
||||||
|
|
||||||
static void aggregate_assign_from_choices (struct value *, struct value *,
|
static void aggregate_assign_from_choices (struct value *, struct value *,
|
||||||
struct expression *,
|
struct expression *,
|
||||||
|
@ -1235,8 +1236,7 @@ static struct htab *decoded_names_store;
|
||||||
GSYMBOL).
|
GSYMBOL).
|
||||||
The GSYMBOL parameter is "mutable" in the C++ sense: logically
|
The GSYMBOL parameter is "mutable" in the C++ sense: logically
|
||||||
const, but nevertheless modified to a semantically equivalent form
|
const, but nevertheless modified to a semantically equivalent form
|
||||||
when a decoded name is cached in it.
|
when a decoded name is cached in it. */
|
||||||
*/
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
ada_decode_symbol (const struct general_symbol_info *gsymbol)
|
ada_decode_symbol (const struct general_symbol_info *gsymbol)
|
||||||
|
@ -2039,7 +2039,8 @@ decode_constrained_packed_array_type (struct type *type)
|
||||||
|
|
||||||
if (TYPE_CODE (shadow_type) != TYPE_CODE_ARRAY)
|
if (TYPE_CODE (shadow_type) != TYPE_CODE_ARRAY)
|
||||||
{
|
{
|
||||||
lim_warning (_("could not understand bounds information on packed array"));
|
lim_warning (_("could not understand bounds "
|
||||||
|
"information on packed array"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2125,7 +2126,8 @@ value_subscript_packed (struct value *arr, int arity, struct value **ind)
|
||||||
if (TYPE_CODE (elt_type) != TYPE_CODE_ARRAY
|
if (TYPE_CODE (elt_type) != TYPE_CODE_ARRAY
|
||||||
|| TYPE_FIELD_BITSIZE (elt_type, 0) == 0)
|
|| TYPE_FIELD_BITSIZE (elt_type, 0) == 0)
|
||||||
error
|
error
|
||||||
(_("attempt to do packed indexing of something other than a packed array"));
|
(_("attempt to do packed indexing of "
|
||||||
|
"something other than a packed array"));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
struct type *range_type = TYPE_INDEX_TYPE (elt_type);
|
struct type *range_type = TYPE_INDEX_TYPE (elt_type);
|
||||||
|
@ -2140,7 +2142,8 @@ value_subscript_packed (struct value *arr, int arity, struct value **ind)
|
||||||
|
|
||||||
idx = pos_atr (ind[i]);
|
idx = pos_atr (ind[i]);
|
||||||
if (idx < lowerbound || idx > upperbound)
|
if (idx < lowerbound || idx > upperbound)
|
||||||
lim_warning (_("packed array index %ld out of bounds"), (long) idx);
|
lim_warning (_("packed array index %ld out of bounds"),
|
||||||
|
(long) idx);
|
||||||
bits = TYPE_FIELD_BITSIZE (elt_type, 0);
|
bits = TYPE_FIELD_BITSIZE (elt_type, 0);
|
||||||
elt_total_bit_offset += (idx - lowerbound) * bits;
|
elt_total_bit_offset += (idx - lowerbound) * bits;
|
||||||
elt_type = ada_check_typedef (TYPE_TARGET_TYPE (elt_type));
|
elt_type = ada_check_typedef (TYPE_TARGET_TYPE (elt_type));
|
||||||
|
@ -4069,7 +4072,8 @@ make_array_descriptor (struct type *type, struct value *arr)
|
||||||
struct value *bounds = allocate_value (bounds_type);
|
struct value *bounds = allocate_value (bounds_type);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = ada_array_arity (ada_check_typedef (value_type (arr))); i > 0; i -= 1)
|
for (i = ada_array_arity (ada_check_typedef (value_type (arr)));
|
||||||
|
i > 0; i -= 1)
|
||||||
{
|
{
|
||||||
modify_field (value_type (bounds), value_contents_writeable (bounds),
|
modify_field (value_type (bounds), value_contents_writeable (bounds),
|
||||||
ada_array_bound (arr, i, 0),
|
ada_array_bound (arr, i, 0),
|
||||||
|
@ -4784,8 +4788,10 @@ add_nonlocal_symbols (struct obstack *obstackp, const char *name,
|
||||||
strcpy (name1, "_ada_");
|
strcpy (name1, "_ada_");
|
||||||
strcpy (name1 + sizeof ("_ada_") - 1, name);
|
strcpy (name1 + sizeof ("_ada_") - 1, name);
|
||||||
data.objfile = objfile;
|
data.objfile = objfile;
|
||||||
objfile->sf->qf->map_matching_symbols (name1, domain, objfile, global,
|
objfile->sf->qf->map_matching_symbols (name1, domain,
|
||||||
aux_add_nonlocal_symbols, &data,
|
objfile, global,
|
||||||
|
aux_add_nonlocal_symbols,
|
||||||
|
&data,
|
||||||
full_match, compare_names);
|
full_match, compare_names);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6267,7 +6273,8 @@ ada_search_struct_field (char *name, struct value *arg, int offset,
|
||||||
|
|
||||||
for (j = 0; j < TYPE_NFIELDS (field_type); j += 1)
|
for (j = 0; j < TYPE_NFIELDS (field_type); j += 1)
|
||||||
{
|
{
|
||||||
struct value *v = ada_search_struct_field /* Force line break. */
|
struct value *v = ada_search_struct_field /* Force line
|
||||||
|
break. */
|
||||||
(name, arg,
|
(name, arg,
|
||||||
var_offset + TYPE_FIELD_BITPOS (field_type, j) / 8,
|
var_offset + TYPE_FIELD_BITPOS (field_type, j) / 8,
|
||||||
TYPE_FIELD_TYPE (field_type, j));
|
TYPE_FIELD_TYPE (field_type, j));
|
||||||
|
@ -6430,7 +6437,8 @@ ada_value_struct_elt (struct value *arg, char *name, int no_err)
|
||||||
if (no_err)
|
if (no_err)
|
||||||
return NULL;
|
return NULL;
|
||||||
else
|
else
|
||||||
error (_("Attempt to extract a component of a value that is not a record."));
|
error (_("Attempt to extract a component of "
|
||||||
|
"a value that is not a record."));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Given a type TYPE, look up the type of the component of type named NAME.
|
/* Given a type TYPE, look up the type of the component of type named NAME.
|
||||||
|
@ -6540,7 +6548,8 @@ ada_lookup_struct_elt_type (struct type *type, char *name, int refok,
|
||||||
&& field_name_match (v_field_name, name))
|
&& field_name_match (v_field_name, name))
|
||||||
t = ada_check_typedef (TYPE_FIELD_TYPE (field_type, j));
|
t = ada_check_typedef (TYPE_FIELD_TYPE (field_type, j));
|
||||||
else
|
else
|
||||||
t = ada_lookup_struct_elt_type (TYPE_FIELD_TYPE (field_type, j),
|
t = ada_lookup_struct_elt_type (TYPE_FIELD_TYPE (field_type,
|
||||||
|
j),
|
||||||
name, 0, 1, &disp);
|
name, 0, 1, &disp);
|
||||||
|
|
||||||
if (t != NULL)
|
if (t != NULL)
|
||||||
|
@ -8681,7 +8690,7 @@ aggregate_assign_from_choices (struct value *container,
|
||||||
EXP at *POS into the components of LHS indexed from LOW .. HIGH that
|
EXP at *POS into the components of LHS indexed from LOW .. HIGH that
|
||||||
have not been previously assigned. The index intervals already assigned
|
have not been previously assigned. The index intervals already assigned
|
||||||
are in INDICES[0 .. NUM_INDICES-1]. Updates *POS to after the
|
are in INDICES[0 .. NUM_INDICES-1]. Updates *POS to after the
|
||||||
OP_OTHERS clause. CONTAINER is as for assign_aggregate*/
|
OP_OTHERS clause. CONTAINER is as for assign_aggregate. */
|
||||||
static void
|
static void
|
||||||
aggregate_assign_others (struct value *container,
|
aggregate_assign_others (struct value *container,
|
||||||
struct value *lhs, struct expression *exp,
|
struct value *lhs, struct expression *exp,
|
||||||
|
@ -9146,7 +9155,8 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp,
|
||||||
if ((ada_is_fixed_point_type (value_type (arg1))
|
if ((ada_is_fixed_point_type (value_type (arg1))
|
||||||
|| ada_is_fixed_point_type (value_type (arg2)))
|
|| ada_is_fixed_point_type (value_type (arg2)))
|
||||||
&& value_type (arg1) != value_type (arg2))
|
&& value_type (arg1) != value_type (arg2))
|
||||||
error (_("Operands of fixed-point subtraction must have the same type"));
|
error (_("Operands of fixed-point subtraction "
|
||||||
|
"must have the same type"));
|
||||||
/* Do the substraction, and cast the result to the type of the first
|
/* Do the substraction, and cast the result to the type of the first
|
||||||
argument. We cannot cast the result to a reference type, so if
|
argument. We cannot cast the result to a reference type, so if
|
||||||
ARG1 is a reference type, find its underlying type. */
|
ARG1 is a reference type, find its underlying type. */
|
||||||
|
@ -9946,7 +9956,8 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp,
|
||||||
case OP_AGGREGATE:
|
case OP_AGGREGATE:
|
||||||
error (_("Aggregates only allowed on the right of an assignment"));
|
error (_("Aggregates only allowed on the right of an assignment"));
|
||||||
default:
|
default:
|
||||||
internal_error (__FILE__, __LINE__, _("aggregate apparently mangled"));
|
internal_error (__FILE__, __LINE__,
|
||||||
|
_("aggregate apparently mangled"));
|
||||||
}
|
}
|
||||||
|
|
||||||
ada_forward_operator_length (exp, pc, &oplen, &nargs);
|
ada_forward_operator_length (exp, pc, &oplen, &nargs);
|
||||||
|
@ -11805,7 +11816,8 @@ const struct language_defn ada_language_defn = {
|
||||||
ada_lookup_symbol_nonlocal, /* Looking up non-local symbols. */
|
ada_lookup_symbol_nonlocal, /* Looking up non-local symbols. */
|
||||||
basic_lookup_transparent_type, /* lookup_transparent_type */
|
basic_lookup_transparent_type, /* lookup_transparent_type */
|
||||||
ada_la_decode, /* Language specific symbol demangler */
|
ada_la_decode, /* Language specific symbol demangler */
|
||||||
NULL, /* Language specific class_name_from_physname */
|
NULL, /* Language specific
|
||||||
|
class_name_from_physname */
|
||||||
ada_op_print_tab, /* expression operators for printing */
|
ada_op_print_tab, /* expression operators for printing */
|
||||||
0, /* c-style arrays */
|
0, /* c-style arrays */
|
||||||
1, /* String lower bound */
|
1, /* String lower bound */
|
||||||
|
|
|
@ -296,7 +296,7 @@ char_at (const gdb_byte *string, int i, int type_len,
|
||||||
return (int) extract_unsigned_integer (string + 2 * i, 2, byte_order);
|
return (int) extract_unsigned_integer (string + 2 * i, 2, byte_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wrapper around memcpy to make it legal argument to ui_file_put */
|
/* Wrapper around memcpy to make it legal argument to ui_file_put. */
|
||||||
static void
|
static void
|
||||||
ui_memcpy (void *dest, const char *buffer, long len)
|
ui_memcpy (void *dest, const char *buffer, long len)
|
||||||
{
|
{
|
||||||
|
@ -454,8 +454,7 @@ ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream)
|
||||||
Printing stops early if the number hits print_max; repeat counts
|
Printing stops early if the number hits print_max; repeat counts
|
||||||
are printed as appropriate. Print ellipses at the end if we
|
are printed as appropriate. Print ellipses at the end if we
|
||||||
had to stop before printing LENGTH characters, or if
|
had to stop before printing LENGTH characters, or if
|
||||||
FORCE_ELLIPSES. TYPE_LEN is the length (1 or 2) of the character type.
|
FORCE_ELLIPSES. TYPE_LEN is the length (1 or 2) of the character type. */
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string,
|
printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string,
|
||||||
|
@ -549,8 +548,9 @@ printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ada_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string,
|
ada_printstr (struct ui_file *stream, struct type *type,
|
||||||
unsigned int length, const char *encoding, int force_ellipses,
|
const gdb_byte *string, unsigned int length,
|
||||||
|
const char *encoding, int force_ellipses,
|
||||||
const struct value_print_options *options)
|
const struct value_print_options *options)
|
||||||
{
|
{
|
||||||
printstr (stream, type, string, length, force_ellipses, TYPE_LENGTH (type),
|
printstr (stream, type, string, length, force_ellipses, TYPE_LENGTH (type),
|
||||||
|
@ -761,7 +761,8 @@ ada_val_print_1 (struct type *type, const gdb_byte *valaddr0,
|
||||||
else
|
else
|
||||||
return ada_val_print_1 (TYPE_TARGET_TYPE (type),
|
return ada_val_print_1 (TYPE_TARGET_TYPE (type),
|
||||||
valaddr0, embedded_offset,
|
valaddr0, embedded_offset,
|
||||||
address, stream, recurse, original_value, options);
|
address, stream, recurse,
|
||||||
|
original_value, options);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -909,7 +910,8 @@ static int
|
||||||
print_variant_part (struct type *type, int field_num, const gdb_byte *valaddr,
|
print_variant_part (struct type *type, int field_num, const gdb_byte *valaddr,
|
||||||
struct ui_file *stream, int recurse,
|
struct ui_file *stream, int recurse,
|
||||||
const struct value *val,
|
const struct value *val,
|
||||||
const struct value_print_options *options, int comma_needed,
|
const struct value_print_options *options,
|
||||||
|
int comma_needed,
|
||||||
struct type *outer_type, const gdb_byte *outer_valaddr)
|
struct type *outer_type, const gdb_byte *outer_valaddr)
|
||||||
{
|
{
|
||||||
struct type *var_type = TYPE_FIELD_TYPE (type, field_num);
|
struct type *var_type = TYPE_FIELD_TYPE (type, field_num);
|
||||||
|
|
|
@ -1512,7 +1512,8 @@ store_regs_user_thread (const struct regcache *regcache, pthdb_pthread_t pdtid)
|
||||||
|
|
||||||
status = pthdb_pthread_setcontext (pd_session, pdtid, &ctx);
|
status = pthdb_pthread_setcontext (pd_session, pdtid, &ctx);
|
||||||
if (status != PTHDB_SUCCESS)
|
if (status != PTHDB_SUCCESS)
|
||||||
error (_("aix-thread: store_registers: pthdb_pthread_setcontext returned %s"),
|
error (_("aix-thread: store_registers: "
|
||||||
|
"pthdb_pthread_setcontext returned %s"),
|
||||||
pd_status2str (status));
|
pd_status2str (status));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1660,7 +1661,8 @@ aix_thread_store_registers (struct target_ops *ops,
|
||||||
static LONGEST
|
static LONGEST
|
||||||
aix_thread_xfer_partial (struct target_ops *ops, enum target_object object,
|
aix_thread_xfer_partial (struct target_ops *ops, enum target_object object,
|
||||||
const char *annex, gdb_byte *readbuf,
|
const char *annex, gdb_byte *readbuf,
|
||||||
const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
|
const gdb_byte *writebuf,
|
||||||
|
ULONGEST offset, LONGEST len)
|
||||||
{
|
{
|
||||||
struct cleanup *old_chain = save_inferior_ptid ();
|
struct cleanup *old_chain = save_inferior_ptid ();
|
||||||
LONGEST xfer;
|
LONGEST xfer;
|
||||||
|
@ -1829,6 +1831,8 @@ _initialize_aix_thread (void)
|
||||||
_("Set debugging of AIX thread module."),
|
_("Set debugging of AIX thread module."),
|
||||||
_("Show debugging of AIX thread module."),
|
_("Show debugging of AIX thread module."),
|
||||||
_("Enables debugging output (used to debug GDB)."),
|
_("Enables debugging output (used to debug GDB)."),
|
||||||
NULL, NULL, /* FIXME: i18n: Debugging of AIX thread module is \"%d\". */
|
NULL, NULL,
|
||||||
|
/* FIXME: i18n: Debugging of AIX thread
|
||||||
|
module is \"%d\". */
|
||||||
&setdebuglist, &showdebuglist);
|
&setdebuglist, &showdebuglist);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,9 +34,8 @@
|
||||||
#define ALPHA_UNIQUE_PTRACE_ADDR 65
|
#define ALPHA_UNIQUE_PTRACE_ADDR 65
|
||||||
|
|
||||||
|
|
||||||
/*
|
/* See the comment in m68k-tdep.c regarding the utility of these
|
||||||
* See the comment in m68k-tdep.c regarding the utility of these functions.
|
functions. */
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
void
|
||||||
supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregsetp)
|
supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregsetp)
|
||||||
|
@ -57,10 +56,8 @@ fill_gregset (const struct regcache *regcache,
|
||||||
alpha_fill_int_regs (regcache, regno, regp, regp + 31, regp + 32);
|
alpha_fill_int_regs (regcache, regno, regp, regp + 31, regp + 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Now we do the same thing for floating-point registers.
|
||||||
* Now we do the same thing for floating-point registers.
|
Again, see the comments in m68k-tdep.c. */
|
||||||
* Again, see the comments in m68k-tdep.c.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
void
|
||||||
supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
|
supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
|
||||||
|
|
|
@ -41,8 +41,7 @@
|
||||||
(2) the kernel has changed from using "addq" to "lda" to load the
|
(2) the kernel has changed from using "addq" to "lda" to load the
|
||||||
syscall number,
|
syscall number,
|
||||||
(3) there is a "normal" sigreturn and an "rt" sigreturn which
|
(3) there is a "normal" sigreturn and an "rt" sigreturn which
|
||||||
has a different stack layout.
|
has a different stack layout. */
|
||||||
*/
|
|
||||||
|
|
||||||
static long
|
static long
|
||||||
alpha_linux_sigtramp_offset_1 (struct gdbarch *gdbarch, CORE_ADDR pc)
|
alpha_linux_sigtramp_offset_1 (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||||
|
@ -120,8 +119,8 @@ alpha_linux_sigcontext_addr (struct frame_info *this_frame)
|
||||||
struct ucontext uc;
|
struct ucontext uc;
|
||||||
};
|
};
|
||||||
|
|
||||||
offsetof (struct rt_sigframe, uc.uc_mcontext);
|
offsetof (struct rt_sigframe, uc.uc_mcontext); */
|
||||||
*/
|
|
||||||
if (alpha_read_insn (gdbarch, pc - off + 4) == 0x201f015f)
|
if (alpha_read_insn (gdbarch, pc - off + 4) == 0x201f015f)
|
||||||
return sp + 176;
|
return sp + 176;
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,8 @@ alpha_mdebug_frameless (struct mdebug_extra_func_info *proc_desc)
|
||||||
find the prologue, then return 0. */
|
find the prologue, then return 0. */
|
||||||
|
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
alpha_mdebug_after_prologue (CORE_ADDR pc, struct mdebug_extra_func_info *proc_desc)
|
alpha_mdebug_after_prologue (CORE_ADDR pc,
|
||||||
|
struct mdebug_extra_func_info *proc_desc)
|
||||||
{
|
{
|
||||||
if (proc_desc)
|
if (proc_desc)
|
||||||
{
|
{
|
||||||
|
@ -166,7 +167,8 @@ alpha_mdebug_after_prologue (CORE_ADDR pc, struct mdebug_extra_func_info *proc_d
|
||||||
if we are definitively *not* in a function prologue. */
|
if we are definitively *not* in a function prologue. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
alpha_mdebug_in_prologue (CORE_ADDR pc, struct mdebug_extra_func_info *proc_desc)
|
alpha_mdebug_in_prologue (CORE_ADDR pc,
|
||||||
|
struct mdebug_extra_func_info *proc_desc)
|
||||||
{
|
{
|
||||||
CORE_ADDR after_prologue_pc = alpha_mdebug_after_prologue (pc, proc_desc);
|
CORE_ADDR after_prologue_pc = alpha_mdebug_after_prologue (pc, proc_desc);
|
||||||
return (after_prologue_pc == 0 || pc < after_prologue_pc);
|
return (after_prologue_pc == 0 || pc < after_prologue_pc);
|
||||||
|
|
|
@ -42,8 +42,7 @@
|
||||||
REG_ADDR is the offset from u.u_ar0 to the register values relative to
|
REG_ADDR is the offset from u.u_ar0 to the register values relative to
|
||||||
core_reg_sect. This is used with old-fashioned core files to
|
core_reg_sect. This is used with old-fashioned core files to
|
||||||
locate the registers in a large upage-plus-stack ".reg" section.
|
locate the registers in a large upage-plus-stack ".reg" section.
|
||||||
Original upage address X is at location core_reg_sect+x+reg_addr.
|
Original upage address X is at location core_reg_sect+x+reg_addr. */
|
||||||
*/
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fetch_osf_core_registers (struct regcache *regcache,
|
fetch_osf_core_registers (struct regcache *regcache,
|
||||||
|
@ -68,10 +67,14 @@ fetch_osf_core_registers (struct regcache *regcache,
|
||||||
CF_T7, CF_S0, CF_S1, CF_S2, CF_S3, CF_S4, CF_S5, CF_S6,
|
CF_T7, CF_S0, CF_S1, CF_S2, CF_S3, CF_S4, CF_S5, CF_S6,
|
||||||
CF_A0, CF_A1, CF_A2, CF_A3, CF_A4, CF_A5, CF_T8, CF_T9,
|
CF_A0, CF_A1, CF_A2, CF_A3, CF_A4, CF_A5, CF_T8, CF_T9,
|
||||||
CF_T10, CF_T11, CF_RA, CF_T12, CF_AT, CF_GP, CF_SP, -1,
|
CF_T10, CF_T11, CF_RA, CF_T12, CF_AT, CF_GP, CF_SP, -1,
|
||||||
EFL + 0, EFL + 1, EFL + 2, EFL + 3, EFL + 4, EFL + 5, EFL + 6, EFL + 7,
|
EFL + 0, EFL + 1, EFL + 2, EFL + 3,
|
||||||
EFL + 8, EFL + 9, EFL + 10, EFL + 11, EFL + 12, EFL + 13, EFL + 14, EFL + 15,
|
EFL + 4, EFL + 5, EFL + 6, EFL + 7,
|
||||||
EFL + 16, EFL + 17, EFL + 18, EFL + 19, EFL + 20, EFL + 21, EFL + 22, EFL + 23,
|
EFL + 8, EFL + 9, EFL + 10, EFL + 11,
|
||||||
EFL + 24, EFL + 25, EFL + 26, EFL + 27, EFL + 28, EFL + 29, EFL + 30, EFL + 31,
|
EFL + 12, EFL + 13, EFL + 14, EFL + 15,
|
||||||
|
EFL + 16, EFL + 17, EFL + 18, EFL + 19,
|
||||||
|
EFL + 20, EFL + 21, EFL + 22, EFL + 23,
|
||||||
|
EFL + 24, EFL + 25, EFL + 26, EFL + 27,
|
||||||
|
EFL + 28, EFL + 29, EFL + 30, EFL + 31,
|
||||||
CF_PC, -1, -1
|
CF_PC, -1, -1
|
||||||
#else
|
#else
|
||||||
#define EFL (EF_SIZE / 8)
|
#define EFL (EF_SIZE / 8)
|
||||||
|
@ -79,10 +82,14 @@ fetch_osf_core_registers (struct regcache *regcache,
|
||||||
EF_T7, EF_S0, EF_S1, EF_S2, EF_S3, EF_S4, EF_S5, EF_S6,
|
EF_T7, EF_S0, EF_S1, EF_S2, EF_S3, EF_S4, EF_S5, EF_S6,
|
||||||
EF_A0, EF_A1, EF_A2, EF_A3, EF_A4, EF_A5, EF_T8, EF_T9,
|
EF_A0, EF_A1, EF_A2, EF_A3, EF_A4, EF_A5, EF_T8, EF_T9,
|
||||||
EF_T10, EF_T11, EF_RA, EF_T12, EF_AT, EF_GP, EF_SP, -1,
|
EF_T10, EF_T11, EF_RA, EF_T12, EF_AT, EF_GP, EF_SP, -1,
|
||||||
EFL + 0, EFL + 1, EFL + 2, EFL + 3, EFL + 4, EFL + 5, EFL + 6, EFL + 7,
|
EFL + 0, EFL + 1, EFL + 2, EFL + 3,
|
||||||
EFL + 8, EFL + 9, EFL + 10, EFL + 11, EFL + 12, EFL + 13, EFL + 14, EFL + 15,
|
EFL + 4, EFL + 5, EFL + 6, EFL + 7,
|
||||||
EFL + 16, EFL + 17, EFL + 18, EFL + 19, EFL + 20, EFL + 21, EFL + 22, EFL + 23,
|
EFL + 8, EFL + 9, EFL + 10, EFL + 11,
|
||||||
EFL + 24, EFL + 25, EFL + 26, EFL + 27, EFL + 28, EFL + 29, EFL + 30, EFL + 31,
|
EFL + 12, EFL + 13, EFL + 14, EFL + 15,
|
||||||
|
EFL + 16, EFL + 17, EFL + 18, EFL + 19,
|
||||||
|
EFL + 20, EFL + 21, EFL + 22, EFL + 23,
|
||||||
|
EFL + 24, EFL + 25, EFL + 26, EFL + 27,
|
||||||
|
EFL + 28, EFL + 29, EFL + 30, EFL + 31,
|
||||||
EF_PC, -1, -1
|
EF_PC, -1, -1
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -123,9 +130,8 @@ fetch_osf_core_registers (struct regcache *regcache,
|
||||||
/* Prototypes for supply_gregset etc. */
|
/* Prototypes for supply_gregset etc. */
|
||||||
#include "gregset.h"
|
#include "gregset.h"
|
||||||
|
|
||||||
/*
|
/* See the comment in m68k-tdep.c regarding the utility of these
|
||||||
* See the comment in m68k-tdep.c regarding the utility of these functions.
|
functions. */
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
void
|
||||||
supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregsetp)
|
supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregsetp)
|
||||||
|
@ -146,10 +152,8 @@ fill_gregset (const struct regcache *regcache,
|
||||||
alpha_fill_int_regs (regcache, regno, regp, regp + 31, NULL);
|
alpha_fill_int_regs (regcache, regno, regp, regp + 31, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Now we do the same thing for floating-point registers.
|
||||||
* Now we do the same thing for floating-point registers.
|
Again, see the comments in m68k-tdep.c. */
|
||||||
* Again, see the comments in m68k-tdep.c.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
void
|
||||||
supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
|
supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
|
||||||
|
|
|
@ -58,8 +58,8 @@ alpha_osf1_init_abi (struct gdbarch_info info,
|
||||||
alpha_mdebug_init_abi (info, gdbarch);
|
alpha_mdebug_init_abi (info, gdbarch);
|
||||||
|
|
||||||
/* The next/step support via procfs on OSF1 is broken when running
|
/* The next/step support via procfs on OSF1 is broken when running
|
||||||
on multi-processor machines. We need to use software single stepping
|
on multi-processor machines. We need to use software single
|
||||||
instead. */
|
stepping instead. */
|
||||||
set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
|
set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
|
||||||
|
|
||||||
tdep->sigcontext_addr = alpha_osf1_sigcontext_addr;
|
tdep->sigcontext_addr = alpha_osf1_sigcontext_addr;
|
||||||
|
|
|
@ -232,7 +232,8 @@ alpha_sts (struct gdbarch *gdbarch, void *out, const void *in)
|
||||||
registers is different. */
|
registers is different. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
alpha_convert_register_p (struct gdbarch *gdbarch, int regno, struct type *type)
|
alpha_convert_register_p (struct gdbarch *gdbarch, int regno,
|
||||||
|
struct type *type)
|
||||||
{
|
{
|
||||||
return (regno >= ALPHA_FP0_REGNUM && regno < ALPHA_FP0_REGNUM + 31
|
return (regno >= ALPHA_FP0_REGNUM && regno < ALPHA_FP0_REGNUM + 31
|
||||||
&& TYPE_LENGTH (type) != 8);
|
&& TYPE_LENGTH (type) != 8);
|
||||||
|
@ -493,7 +494,8 @@ alpha_extract_return_value (struct type *valtype, struct regcache *regcache,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
internal_error (__FILE__, __LINE__, _("unknown floating point width"));
|
internal_error (__FILE__, __LINE__,
|
||||||
|
_("unknown floating point width"));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -516,7 +518,8 @@ alpha_extract_return_value (struct type *valtype, struct regcache *regcache,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
internal_error (__FILE__, __LINE__, _("unknown floating point width"));
|
internal_error (__FILE__, __LINE__,
|
||||||
|
_("unknown floating point width"));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -561,7 +564,8 @@ alpha_store_return_value (struct type *valtype, struct regcache *regcache,
|
||||||
error (_("Cannot set a 128-bit long double return value."));
|
error (_("Cannot set a 128-bit long double return value."));
|
||||||
|
|
||||||
default:
|
default:
|
||||||
internal_error (__FILE__, __LINE__, _("unknown floating point width"));
|
internal_error (__FILE__, __LINE__,
|
||||||
|
_("unknown floating point width"));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -585,7 +589,8 @@ alpha_store_return_value (struct type *valtype, struct regcache *regcache,
|
||||||
error (_("Cannot set a 128-bit long double return value."));
|
error (_("Cannot set a 128-bit long double return value."));
|
||||||
|
|
||||||
default:
|
default:
|
||||||
internal_error (__FILE__, __LINE__, _("unknown floating point width"));
|
internal_error (__FILE__, __LINE__,
|
||||||
|
_("unknown floating point width"));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1059,8 +1064,7 @@ alpha_heuristic_analyze_probing_loop (struct gdbarch *gdbarch, CORE_ADDR *pc,
|
||||||
|
|
||||||
If anything different is found, the function returns without
|
If anything different is found, the function returns without
|
||||||
changing PC and FRAME_SIZE. Otherwise, PC will point immediately
|
changing PC and FRAME_SIZE. Otherwise, PC will point immediately
|
||||||
after this sequence, and FRAME_SIZE will be updated.
|
after this sequence, and FRAME_SIZE will be updated. */
|
||||||
*/
|
|
||||||
|
|
||||||
/* lda REG_INDEX,NB_OF_ITERATIONS */
|
/* lda REG_INDEX,NB_OF_ITERATIONS */
|
||||||
|
|
||||||
|
@ -1235,7 +1239,8 @@ alpha_heuristic_frame_unwind_cache (struct frame_info *this_frame,
|
||||||
the return address register from it.
|
the return address register from it.
|
||||||
|
|
||||||
FIXME: Rewriting GDB to access the procedure descriptors,
|
FIXME: Rewriting GDB to access the procedure descriptors,
|
||||||
e.g. via the minimal symbol table, might obviate this hack. */
|
e.g. via the minimal symbol table, might obviate this
|
||||||
|
hack. */
|
||||||
if (return_reg == -1
|
if (return_reg == -1
|
||||||
&& cur_pc < (start_pc + 80)
|
&& cur_pc < (start_pc + 80)
|
||||||
&& (reg == ALPHA_T7_REGNUM
|
&& (reg == ALPHA_T7_REGNUM
|
||||||
|
@ -1674,7 +1679,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
tdep->sc_regs_offset = 4 * 8;
|
tdep->sc_regs_offset = 4 * 8;
|
||||||
tdep->sc_fpregs_offset = tdep->sc_regs_offset + 32 * 8 + 8;
|
tdep->sc_fpregs_offset = tdep->sc_regs_offset + 32 * 8 + 8;
|
||||||
|
|
||||||
tdep->jb_pc = -1; /* longjmp support not enabled by default */
|
tdep->jb_pc = -1; /* longjmp support not enabled by default. */
|
||||||
|
|
||||||
tdep->return_in_memory = alpha_return_in_memory_always;
|
tdep->return_in_memory = alpha_return_in_memory_always;
|
||||||
|
|
||||||
|
@ -1780,6 +1785,7 @@ If you are debugging a stripped executable, GDB needs to search through the\n\
|
||||||
program for the start of a function. This command sets the distance of the\n\
|
program for the start of a function. This command sets the distance of the\n\
|
||||||
search. The only need to set it is when debugging a stripped executable."),
|
search. The only need to set it is when debugging a stripped executable."),
|
||||||
reinit_frame_cache_sfunc,
|
reinit_frame_cache_sfunc,
|
||||||
NULL, /* FIXME: i18n: The distance searched for the start of a function is \"%d\". */
|
NULL, /* FIXME: i18n: The distance searched for
|
||||||
|
the start of a function is \"%d\". */
|
||||||
&setlist, &showlist);
|
&setlist, &showlist);
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,8 @@ supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
fill_fpregset (const struct regcache *regcache, fpregset_t *fpregsetp, int regno)
|
fill_fpregset (const struct regcache *regcache,
|
||||||
|
fpregset_t *fpregsetp, int regno)
|
||||||
{
|
{
|
||||||
alphabsd_fill_fpreg (regcache, (char *) fpregsetp, regno);
|
alphabsd_fill_fpreg (regcache, (char *) fpregsetp, regno);
|
||||||
}
|
}
|
||||||
|
@ -100,7 +101,8 @@ alphabsd_fetch_inferior_registers (struct target_ops *ops,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (regno == -1 || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
|
if (regno == -1
|
||||||
|
|| regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
|
||||||
{
|
{
|
||||||
struct fpreg fpregs;
|
struct fpreg fpregs;
|
||||||
|
|
||||||
|
@ -136,7 +138,8 @@ alphabsd_store_inferior_registers (struct target_ops *ops,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (regno == -1 || regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
|
if (regno == -1
|
||||||
|
|| regno >= gdbarch_fp0_regnum (get_regcache_arch (regcache)))
|
||||||
{
|
{
|
||||||
struct fpreg fpregs;
|
struct fpreg fpregs;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,8 @@ alphabsd_fill_reg (const struct regcache *regcache, char *regs, int regno)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
alphabsd_supply_fpreg (struct regcache *regcache, const char *fpregs, int regno)
|
alphabsd_supply_fpreg (struct regcache *regcache,
|
||||||
|
const char *fpregs, int regno)
|
||||||
{
|
{
|
||||||
/* FPCR is at slot 33; slot 32 unused. */
|
/* FPCR is at slot 33; slot 32 unused. */
|
||||||
alpha_supply_fp_regs (regcache, regno, fpregs, fpregs + 32 * 8);
|
alpha_supply_fp_regs (regcache, regno, fpregs, fpregs + 32 * 8);
|
||||||
|
|
|
@ -1544,7 +1544,7 @@ _initialize_amd64_linux_tdep (void)
|
||||||
gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
|
gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
|
||||||
GDB_OSABI_LINUX, amd64_linux_init_abi);
|
GDB_OSABI_LINUX, amd64_linux_init_abi);
|
||||||
|
|
||||||
/* Initialize the Linux target description */
|
/* Initialize the Linux target description. */
|
||||||
initialize_tdesc_amd64_linux ();
|
initialize_tdesc_amd64_linux ();
|
||||||
initialize_tdesc_amd64_avx_linux ();
|
initialize_tdesc_amd64_avx_linux ();
|
||||||
}
|
}
|
||||||
|
|
142
gdb/arm-tdep.c
142
gdb/arm-tdep.c
|
@ -19,7 +19,7 @@
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include <ctype.h> /* XXX for isupper () */
|
#include <ctype.h> /* XXX for isupper (). */
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
|
@ -845,7 +845,8 @@ thumb_analyze_prologue (struct gdbarch *gdbarch,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ((insn & 0xffd0) == 0xe900 /* stmdb Rn{!}, { registers } */
|
else if ((insn & 0xffd0) == 0xe900 /* stmdb Rn{!},
|
||||||
|
{ registers } */
|
||||||
&& pv_is_register (regs[bits (insn, 0, 3)], ARM_SP_REGNUM))
|
&& pv_is_register (regs[bits (insn, 0, 3)], ARM_SP_REGNUM))
|
||||||
{
|
{
|
||||||
pv_t addr = regs[bits (insn, 0, 3)];
|
pv_t addr = regs[bits (insn, 0, 3)];
|
||||||
|
@ -866,7 +867,8 @@ thumb_analyze_prologue (struct gdbarch *gdbarch,
|
||||||
regs[bits (insn, 0, 3)] = addr;
|
regs[bits (insn, 0, 3)] = addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ((insn & 0xff50) == 0xe940 /* strd Rt, Rt2, [Rn, #+/-imm]{!} */
|
else if ((insn & 0xff50) == 0xe940 /* strd Rt, Rt2,
|
||||||
|
[Rn, #+/-imm]{!} */
|
||||||
&& pv_is_register (regs[bits (insn, 0, 3)], ARM_SP_REGNUM))
|
&& pv_is_register (regs[bits (insn, 0, 3)], ARM_SP_REGNUM))
|
||||||
{
|
{
|
||||||
int regno1 = bits (inst2, 12, 15);
|
int regno1 = bits (inst2, 12, 15);
|
||||||
|
@ -938,14 +940,16 @@ thumb_analyze_prologue (struct gdbarch *gdbarch,
|
||||||
/* Ignore stores of argument registers to the stack. */
|
/* Ignore stores of argument registers to the stack. */
|
||||||
;
|
;
|
||||||
|
|
||||||
else if ((insn & 0xffd0) == 0xe890 /* ldmia Rn[!], { registers } */
|
else if ((insn & 0xffd0) == 0xe890 /* ldmia Rn[!],
|
||||||
|
{ registers } */
|
||||||
&& (inst2 & 0x8000) == 0x0000
|
&& (inst2 & 0x8000) == 0x0000
|
||||||
&& pv_is_register (regs[bits (insn, 0, 3)], ARM_SP_REGNUM))
|
&& pv_is_register (regs[bits (insn, 0, 3)], ARM_SP_REGNUM))
|
||||||
/* Ignore block loads from the stack, potentially copying
|
/* Ignore block loads from the stack, potentially copying
|
||||||
parameters from memory. */
|
parameters from memory. */
|
||||||
;
|
;
|
||||||
|
|
||||||
else if ((insn & 0xffb0) == 0xe950 /* ldrd Rt, Rt2, [Rn, #+/-imm] */
|
else if ((insn & 0xffb0) == 0xe950 /* ldrd Rt, Rt2,
|
||||||
|
[Rn, #+/-imm] */
|
||||||
&& pv_is_register (regs[bits (insn, 0, 3)], ARM_SP_REGNUM))
|
&& pv_is_register (regs[bits (insn, 0, 3)], ARM_SP_REGNUM))
|
||||||
/* Similarly ignore dual loads from the stack. */
|
/* Similarly ignore dual loads from the stack. */
|
||||||
;
|
;
|
||||||
|
@ -1223,8 +1227,8 @@ arm_analyze_load_stack_chk_guard(CORE_ADDR pc, struct gdbarch *gdbarch,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try to skip a sequence of instructions used for stack protector. If PC
|
/* Try to skip a sequence of instructions used for stack protector. If PC
|
||||||
points to the first instruction of this sequence, return the address of first
|
points to the first instruction of this sequence, return the address of
|
||||||
instruction after this sequence, otherwise, return original PC.
|
first instruction after this sequence, otherwise, return original PC.
|
||||||
|
|
||||||
On arm, this sequence of instructions is composed of mainly three steps,
|
On arm, this sequence of instructions is composed of mainly three steps,
|
||||||
Step 1: load symbol __stack_chk_guard,
|
Step 1: load symbol __stack_chk_guard,
|
||||||
|
@ -1338,7 +1342,7 @@ arm_skip_stack_protector(CORE_ADDR pc, struct gdbarch *gdbarch)
|
||||||
[stfe f6, [sp, #-12]!]
|
[stfe f6, [sp, #-12]!]
|
||||||
[stfe f5, [sp, #-12]!]
|
[stfe f5, [sp, #-12]!]
|
||||||
[stfe f4, [sp, #-12]!]
|
[stfe f4, [sp, #-12]!]
|
||||||
sub fp, ip, #nn @@ nn == 20 or 4 depending on second insn */
|
sub fp, ip, #nn @@ nn == 20 or 4 depending on second insn. */
|
||||||
|
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
arm_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
arm_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||||
|
@ -1475,7 +1479,7 @@ arm_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return skip_pc; /* End of prologue */
|
return skip_pc; /* End of prologue. */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
|
@ -1692,7 +1696,8 @@ arm_analyze_prologue (struct gdbarch *gdbarch,
|
||||||
regs[rd] = pv_add_constant (regs[bits (insn, 16, 19)], -imm);
|
regs[rd] = pv_add_constant (regs[bits (insn, 16, 19)], -imm);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if ((insn & 0xffff0fff) == 0xe52d0004) /* str Rd, [sp, #-4]! */
|
else if ((insn & 0xffff0fff) == 0xe52d0004) /* str Rd,
|
||||||
|
[sp, #-4]! */
|
||||||
{
|
{
|
||||||
if (pv_area_store_would_trash (stack, regs[ARM_SP_REGNUM]))
|
if (pv_area_store_would_trash (stack, regs[ARM_SP_REGNUM]))
|
||||||
break;
|
break;
|
||||||
|
@ -1715,7 +1720,8 @@ arm_analyze_prologue (struct gdbarch *gdbarch,
|
||||||
for (regno = ARM_PC_REGNUM; regno >= 0; regno--)
|
for (regno = ARM_PC_REGNUM; regno >= 0; regno--)
|
||||||
if (mask & (1 << regno))
|
if (mask & (1 << regno))
|
||||||
{
|
{
|
||||||
regs[ARM_SP_REGNUM] = pv_add_constant (regs[ARM_SP_REGNUM], -4);
|
regs[ARM_SP_REGNUM]
|
||||||
|
= pv_add_constant (regs[ARM_SP_REGNUM], -4);
|
||||||
pv_area_store (stack, regs[ARM_SP_REGNUM], 4, regs[regno]);
|
pv_area_store (stack, regs[ARM_SP_REGNUM], 4, regs[regno]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1733,7 +1739,8 @@ arm_analyze_prologue (struct gdbarch *gdbarch,
|
||||||
/* No need to add this to saved_regs -- it's just an arg reg. */
|
/* No need to add this to saved_regs -- it's just an arg reg. */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if ((insn & 0xfff00000) == 0xe8800000 /* stm Rn, { registers } */
|
else if ((insn & 0xfff00000) == 0xe8800000 /* stm Rn,
|
||||||
|
{ registers } */
|
||||||
&& pv_is_register (regs[bits (insn, 16, 19)], ARM_SP_REGNUM))
|
&& pv_is_register (regs[bits (insn, 16, 19)], ARM_SP_REGNUM))
|
||||||
{
|
{
|
||||||
/* No need to add this to saved_regs -- it's just arg regs. */
|
/* No need to add this to saved_regs -- it's just arg regs. */
|
||||||
|
@ -1753,7 +1760,8 @@ arm_analyze_prologue (struct gdbarch *gdbarch,
|
||||||
imm = (imm >> rot) | (imm << (32 - rot));
|
imm = (imm >> rot) | (imm << (32 - rot));
|
||||||
regs[ARM_SP_REGNUM] = pv_add_constant (regs[ARM_SP_REGNUM], -imm);
|
regs[ARM_SP_REGNUM] = pv_add_constant (regs[ARM_SP_REGNUM], -imm);
|
||||||
}
|
}
|
||||||
else if ((insn & 0xffff7fff) == 0xed6d0103 /* stfe f?, [sp, -#c]! */
|
else if ((insn & 0xffff7fff) == 0xed6d0103 /* stfe f?,
|
||||||
|
[sp, -#c]! */
|
||||||
&& gdbarch_tdep (gdbarch)->have_fpa_registers)
|
&& gdbarch_tdep (gdbarch)->have_fpa_registers)
|
||||||
{
|
{
|
||||||
if (pv_area_store_would_trash (stack, regs[ARM_SP_REGNUM]))
|
if (pv_area_store_would_trash (stack, regs[ARM_SP_REGNUM]))
|
||||||
|
@ -1763,7 +1771,8 @@ arm_analyze_prologue (struct gdbarch *gdbarch,
|
||||||
regno = ARM_F0_REGNUM + ((insn >> 12) & 0x07);
|
regno = ARM_F0_REGNUM + ((insn >> 12) & 0x07);
|
||||||
pv_area_store (stack, regs[ARM_SP_REGNUM], 12, regs[regno]);
|
pv_area_store (stack, regs[ARM_SP_REGNUM], 12, regs[regno]);
|
||||||
}
|
}
|
||||||
else if ((insn & 0xffbf0fff) == 0xec2d0200 /* sfmfd f0, 4, [sp!] */
|
else if ((insn & 0xffbf0fff) == 0xec2d0200 /* sfmfd f0, 4,
|
||||||
|
[sp!] */
|
||||||
&& gdbarch_tdep (gdbarch)->have_fpa_registers)
|
&& gdbarch_tdep (gdbarch)->have_fpa_registers)
|
||||||
{
|
{
|
||||||
int n_saved_fp_regs;
|
int n_saved_fp_regs;
|
||||||
|
@ -1809,7 +1818,7 @@ arm_analyze_prologue (struct gdbarch *gdbarch,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if ((insn & 0xf0000000) != 0xe0000000)
|
else if ((insn & 0xf0000000) != 0xe0000000)
|
||||||
break; /* Condition not true, exit early */
|
break; /* Condition not true, exit early. */
|
||||||
else if (arm_instruction_changes_pc (insn))
|
else if (arm_instruction_changes_pc (insn))
|
||||||
/* Don't scan past anything that might change control flow. */
|
/* Don't scan past anything that might change control flow. */
|
||||||
break;
|
break;
|
||||||
|
@ -2186,7 +2195,8 @@ struct frame_base arm_normal_base = {
|
||||||
static struct frame_id
|
static struct frame_id
|
||||||
arm_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
|
arm_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
|
||||||
{
|
{
|
||||||
return frame_id_build (get_frame_register_unsigned (this_frame, ARM_SP_REGNUM),
|
return frame_id_build (get_frame_register_unsigned (this_frame,
|
||||||
|
ARM_SP_REGNUM),
|
||||||
get_frame_pc (this_frame));
|
get_frame_pc (this_frame));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3396,7 +3406,7 @@ bitcount (unsigned long val)
|
||||||
{
|
{
|
||||||
int nbits;
|
int nbits;
|
||||||
for (nbits = 0; val != 0; nbits++)
|
for (nbits = 0; val != 0; nbits++)
|
||||||
val &= val - 1; /* delete rightmost 1-bit in val */
|
val &= val - 1; /* Delete rightmost 1-bit in val. */
|
||||||
return nbits;
|
return nbits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3441,7 +3451,7 @@ thumb_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc, int insert_bkpt)
|
||||||
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
|
enum bfd_endian byte_order_for_code = gdbarch_byte_order_for_code (gdbarch);
|
||||||
unsigned long pc_val = ((unsigned long) pc) + 4; /* PC after prefetch */
|
unsigned long pc_val = ((unsigned long) pc) + 4; /* PC after prefetch */
|
||||||
unsigned short inst1;
|
unsigned short inst1;
|
||||||
CORE_ADDR nextpc = pc + 2; /* default is next instruction */
|
CORE_ADDR nextpc = pc + 2; /* Default is next instruction. */
|
||||||
unsigned long offset;
|
unsigned long offset;
|
||||||
ULONGEST status, itstate;
|
ULONGEST status, itstate;
|
||||||
|
|
||||||
|
@ -3481,7 +3491,8 @@ thumb_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc, int insert_bkpt)
|
||||||
|
|
||||||
while (itstate != 0 && ! condition_true (itstate >> 4, status))
|
while (itstate != 0 && ! condition_true (itstate >> 4, status))
|
||||||
{
|
{
|
||||||
inst1 = read_memory_unsigned_integer (pc, 2, byte_order_for_code);
|
inst1 = read_memory_unsigned_integer (pc, 2,
|
||||||
|
byte_order_for_code);
|
||||||
pc += thumb_insn_size (inst1);
|
pc += thumb_insn_size (inst1);
|
||||||
itstate = thumb_advance_itstate (itstate);
|
itstate = thumb_advance_itstate (itstate);
|
||||||
}
|
}
|
||||||
|
@ -3499,7 +3510,8 @@ thumb_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc, int insert_bkpt)
|
||||||
|
|
||||||
while (itstate != 0 && ! condition_true (itstate >> 4, status))
|
while (itstate != 0 && ! condition_true (itstate >> 4, status))
|
||||||
{
|
{
|
||||||
inst1 = read_memory_unsigned_integer (pc, 2, byte_order_for_code);
|
inst1 = read_memory_unsigned_integer (pc, 2,
|
||||||
|
byte_order_for_code);
|
||||||
pc += thumb_insn_size (inst1);
|
pc += thumb_insn_size (inst1);
|
||||||
itstate = thumb_advance_itstate (itstate);
|
itstate = thumb_advance_itstate (itstate);
|
||||||
}
|
}
|
||||||
|
@ -3540,7 +3552,8 @@ thumb_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc, int insert_bkpt)
|
||||||
the instruction after the IT block. */
|
the instruction after the IT block. */
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
inst1 = read_memory_unsigned_integer (pc, 2, byte_order_for_code);
|
inst1 = read_memory_unsigned_integer (pc, 2,
|
||||||
|
byte_order_for_code);
|
||||||
pc += thumb_insn_size (inst1);
|
pc += thumb_insn_size (inst1);
|
||||||
itstate = thumb_advance_itstate (itstate);
|
itstate = thumb_advance_itstate (itstate);
|
||||||
}
|
}
|
||||||
|
@ -3807,8 +3820,8 @@ thumb_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc, int insert_bkpt)
|
||||||
The value returned has the execution state of the next instruction
|
The value returned has the execution state of the next instruction
|
||||||
encoded in it. Use IS_THUMB_ADDR () to see whether the instruction is
|
encoded in it. Use IS_THUMB_ADDR () to see whether the instruction is
|
||||||
in Thumb-State, and gdbarch_addr_bits_remove () to get the plain memory
|
in Thumb-State, and gdbarch_addr_bits_remove () to get the plain memory
|
||||||
address.
|
address. */
|
||||||
*/
|
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
arm_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc, int insert_bkpt)
|
arm_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc, int insert_bkpt)
|
||||||
{
|
{
|
||||||
|
@ -3879,7 +3892,7 @@ arm_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc, int insert_bkpt)
|
||||||
return nextpc;
|
return nextpc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Multiply into PC */
|
/* Multiply into PC. */
|
||||||
c = (status & FLAG_C) ? 1 : 0;
|
c = (status & FLAG_C) ? 1 : 0;
|
||||||
rn = bits (this_instr, 16, 19);
|
rn = bits (this_instr, 16, 19);
|
||||||
operand1 = (rn == 15) ? pc_val + 8
|
operand1 = (rn == 15) ? pc_val + 8
|
||||||
|
@ -3892,8 +3905,9 @@ arm_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc, int insert_bkpt)
|
||||||
operand2 = ((immval >> rotate) | (immval << (32 - rotate)))
|
operand2 = ((immval >> rotate) | (immval << (32 - rotate)))
|
||||||
& 0xffffffff;
|
& 0xffffffff;
|
||||||
}
|
}
|
||||||
else /* operand 2 is a shifted register */
|
else /* operand 2 is a shifted register. */
|
||||||
operand2 = shifted_reg_val (frame, this_instr, c, pc_val, status);
|
operand2 = shifted_reg_val (frame, this_instr, c,
|
||||||
|
pc_val, status);
|
||||||
|
|
||||||
switch (bits (this_instr, 21, 24))
|
switch (bits (this_instr, 21, 24))
|
||||||
{
|
{
|
||||||
|
@ -4235,7 +4249,8 @@ arm_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
|
||||||
known boundary. */
|
known boundary. */
|
||||||
if (! definite)
|
if (! definite)
|
||||||
{
|
{
|
||||||
buf = extend_buffer_earlier (buf, bpaddr, buf_len, bpaddr - boundary);
|
buf = extend_buffer_earlier (buf, bpaddr, buf_len,
|
||||||
|
bpaddr - boundary);
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
return bpaddr;
|
return bpaddr;
|
||||||
buf_len = bpaddr - boundary;
|
buf_len = bpaddr - boundary;
|
||||||
|
@ -4358,9 +4373,11 @@ branch_write_pc (struct regcache *regs, ULONGEST val)
|
||||||
if (displaced_in_arm_mode (regs))
|
if (displaced_in_arm_mode (regs))
|
||||||
/* Note: If bits 0/1 are set, this branch would be unpredictable for
|
/* Note: If bits 0/1 are set, this branch would be unpredictable for
|
||||||
architecture versions < 6. */
|
architecture versions < 6. */
|
||||||
regcache_cooked_write_unsigned (regs, ARM_PC_REGNUM, val & ~(ULONGEST) 0x3);
|
regcache_cooked_write_unsigned (regs, ARM_PC_REGNUM,
|
||||||
|
val & ~(ULONGEST) 0x3);
|
||||||
else
|
else
|
||||||
regcache_cooked_write_unsigned (regs, ARM_PC_REGNUM, val & ~(ULONGEST) 0x1);
|
regcache_cooked_write_unsigned (regs, ARM_PC_REGNUM,
|
||||||
|
val & ~(ULONGEST) 0x1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write to the PC as from a branch-exchange instruction. */
|
/* Write to the PC as from a branch-exchange instruction. */
|
||||||
|
@ -4469,9 +4486,9 @@ displaced_write_reg (struct regcache *regs, struct displaced_step_closure *dsc,
|
||||||
|
|
||||||
/* This function is used to concisely determine if an instruction INSN
|
/* This function is used to concisely determine if an instruction INSN
|
||||||
references PC. Register fields of interest in INSN should have the
|
references PC. Register fields of interest in INSN should have the
|
||||||
corresponding fields of BITMASK set to 0b1111. The function returns return 1
|
corresponding fields of BITMASK set to 0b1111. The function
|
||||||
if any of these fields in INSN reference the PC (also 0b1111, r15), else it
|
returns return 1 if any of these fields in INSN reference the PC
|
||||||
returns 0. */
|
(also 0b1111, r15), else it returns 0. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
insn_references_pc (uint32_t insn, uint32_t bitmask)
|
insn_references_pc (uint32_t insn, uint32_t bitmask)
|
||||||
|
@ -4564,7 +4581,8 @@ copy_preload (struct gdbarch *gdbarch, uint32_t insn, struct regcache *regs,
|
||||||
/* Preload instructions with register offset. */
|
/* Preload instructions with register offset. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
copy_preload_reg (struct gdbarch *gdbarch, uint32_t insn, struct regcache *regs,
|
copy_preload_reg (struct gdbarch *gdbarch, uint32_t insn,
|
||||||
|
struct regcache *regs,
|
||||||
struct displaced_step_closure *dsc)
|
struct displaced_step_closure *dsc)
|
||||||
{
|
{
|
||||||
unsigned int rn = bits (insn, 16, 19);
|
unsigned int rn = bits (insn, 16, 19);
|
||||||
|
@ -4741,7 +4759,8 @@ copy_bx_blx_reg (struct gdbarch *gdbarch, uint32_t insn,
|
||||||
|
|
||||||
if (debug_displaced)
|
if (debug_displaced)
|
||||||
fprintf_unfiltered (gdb_stdlog, "displaced: copying %s register insn "
|
fprintf_unfiltered (gdb_stdlog, "displaced: copying %s register insn "
|
||||||
"%.8lx\n", (link) ? "blx" : "bx", (unsigned long) insn);
|
"%.8lx\n", (link) ? "blx" : "bx",
|
||||||
|
(unsigned long) insn);
|
||||||
|
|
||||||
/* Implement {BX,BLX}<cond> <reg>" as:
|
/* Implement {BX,BLX}<cond> <reg>" as:
|
||||||
|
|
||||||
|
@ -4912,7 +4931,8 @@ cleanup_alu_shifted_reg (struct gdbarch *gdbarch,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
copy_alu_shifted_reg (struct gdbarch *gdbarch, uint32_t insn,
|
copy_alu_shifted_reg (struct gdbarch *gdbarch, uint32_t insn,
|
||||||
struct regcache *regs, struct displaced_step_closure *dsc)
|
struct regcache *regs,
|
||||||
|
struct displaced_step_closure *dsc)
|
||||||
{
|
{
|
||||||
unsigned int rn = bits (insn, 16, 19);
|
unsigned int rn = bits (insn, 16, 19);
|
||||||
unsigned int rm = bits (insn, 0, 3);
|
unsigned int rm = bits (insn, 0, 3);
|
||||||
|
@ -5426,13 +5446,15 @@ copy_block_xfer (struct gdbarch *gdbarch, uint32_t insn, struct regcache *regs,
|
||||||
int rn = bits (insn, 16, 19);
|
int rn = bits (insn, 16, 19);
|
||||||
CORE_ADDR from = dsc->insn_addr;
|
CORE_ADDR from = dsc->insn_addr;
|
||||||
|
|
||||||
/* Block transfers which don't mention PC can be run directly out-of-line. */
|
/* Block transfers which don't mention PC can be run directly
|
||||||
|
out-of-line. */
|
||||||
if (rn != 15 && (insn & 0x8000) == 0)
|
if (rn != 15 && (insn & 0x8000) == 0)
|
||||||
return copy_unmodified (gdbarch, insn, "ldm/stm", dsc);
|
return copy_unmodified (gdbarch, insn, "ldm/stm", dsc);
|
||||||
|
|
||||||
if (rn == 15)
|
if (rn == 15)
|
||||||
{
|
{
|
||||||
warning (_("displaced: Unpredictable LDM or STM with base register r15"));
|
warning (_("displaced: Unpredictable LDM or STM with "
|
||||||
|
"base register r15"));
|
||||||
return copy_unmodified (gdbarch, insn, "unpredictable ldm/stm", dsc);
|
return copy_unmodified (gdbarch, insn, "unpredictable ldm/stm", dsc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5578,7 +5600,8 @@ copy_undef (struct gdbarch *gdbarch, uint32_t insn,
|
||||||
struct displaced_step_closure *dsc)
|
struct displaced_step_closure *dsc)
|
||||||
{
|
{
|
||||||
if (debug_displaced)
|
if (debug_displaced)
|
||||||
fprintf_unfiltered (gdb_stdlog, "displaced: copying undefined insn %.8lx\n",
|
fprintf_unfiltered (gdb_stdlog,
|
||||||
|
"displaced: copying undefined insn %.8lx\n",
|
||||||
(unsigned long) insn);
|
(unsigned long) insn);
|
||||||
|
|
||||||
dsc->modinsn[0] = insn;
|
dsc->modinsn[0] = insn;
|
||||||
|
@ -5665,7 +5688,8 @@ decode_misc_memhint_neon (struct gdbarch *gdbarch, uint32_t insn,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
decode_unconditional (struct gdbarch *gdbarch, uint32_t insn,
|
decode_unconditional (struct gdbarch *gdbarch, uint32_t insn,
|
||||||
struct regcache *regs, struct displaced_step_closure *dsc)
|
struct regcache *regs,
|
||||||
|
struct displaced_step_closure *dsc)
|
||||||
{
|
{
|
||||||
if (bit (insn, 27) == 0)
|
if (bit (insn, 27) == 0)
|
||||||
return decode_misc_memhint_neon (gdbarch, insn, regs, dsc);
|
return decode_misc_memhint_neon (gdbarch, insn, regs, dsc);
|
||||||
|
@ -5749,7 +5773,8 @@ decode_unconditional (struct gdbarch *gdbarch, uint32_t insn,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
decode_miscellaneous (struct gdbarch *gdbarch, uint32_t insn,
|
decode_miscellaneous (struct gdbarch *gdbarch, uint32_t insn,
|
||||||
struct regcache *regs, struct displaced_step_closure *dsc)
|
struct regcache *regs,
|
||||||
|
struct displaced_step_closure *dsc)
|
||||||
{
|
{
|
||||||
unsigned int op2 = bits (insn, 4, 6);
|
unsigned int op2 = bits (insn, 4, 6);
|
||||||
unsigned int op = bits (insn, 21, 22);
|
unsigned int op = bits (insn, 21, 22);
|
||||||
|
@ -5777,7 +5802,8 @@ decode_miscellaneous (struct gdbarch *gdbarch, uint32_t insn,
|
||||||
|
|
||||||
case 0x3:
|
case 0x3:
|
||||||
if (op == 0x1)
|
if (op == 0x1)
|
||||||
return copy_bx_blx_reg (gdbarch, insn, regs, dsc); /* blx register. */
|
return copy_bx_blx_reg (gdbarch, insn,
|
||||||
|
regs, dsc); /* blx register. */
|
||||||
else
|
else
|
||||||
return copy_undef (gdbarch, insn, dsc);
|
return copy_undef (gdbarch, insn, dsc);
|
||||||
|
|
||||||
|
@ -5947,7 +5973,8 @@ decode_b_bl_ldmstm (struct gdbarch *gdbarch, int32_t insn,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
decode_ext_reg_ld_st (struct gdbarch *gdbarch, uint32_t insn,
|
decode_ext_reg_ld_st (struct gdbarch *gdbarch, uint32_t insn,
|
||||||
struct regcache *regs, struct displaced_step_closure *dsc)
|
struct regcache *regs,
|
||||||
|
struct displaced_step_closure *dsc)
|
||||||
{
|
{
|
||||||
unsigned int opcode = bits (insn, 20, 24);
|
unsigned int opcode = bits (insn, 20, 24);
|
||||||
|
|
||||||
|
@ -6023,7 +6050,8 @@ decode_svc_copro (struct gdbarch *gdbarch, uint32_t insn, CORE_ADDR to,
|
||||||
|
|
||||||
void
|
void
|
||||||
arm_process_displaced_insn (struct gdbarch *gdbarch, uint32_t insn,
|
arm_process_displaced_insn (struct gdbarch *gdbarch, uint32_t insn,
|
||||||
CORE_ADDR from, CORE_ADDR to, struct regcache *regs,
|
CORE_ADDR from, CORE_ADDR to,
|
||||||
|
struct regcache *regs,
|
||||||
struct displaced_step_closure *dsc)
|
struct displaced_step_closure *dsc)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
@ -6322,9 +6350,9 @@ arm_extract_return_value (struct type *type, struct regcache *regs,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
internal_error
|
internal_error (__FILE__, __LINE__,
|
||||||
(__FILE__, __LINE__,
|
_("arm_extract_return_value: "
|
||||||
_("arm_extract_return_value: Floating point model not supported"));
|
"Floating point model not supported"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6449,7 +6477,8 @@ arm_return_in_memory (struct gdbarch *gdbarch, struct type *type)
|
||||||
for (i = 0; i < TYPE_NFIELDS (type); i++)
|
for (i = 0; i < TYPE_NFIELDS (type); i++)
|
||||||
{
|
{
|
||||||
enum type_code field_type_code;
|
enum type_code field_type_code;
|
||||||
field_type_code = TYPE_CODE (check_typedef (TYPE_FIELD_TYPE (type, i)));
|
field_type_code = TYPE_CODE (check_typedef (TYPE_FIELD_TYPE (type,
|
||||||
|
i)));
|
||||||
|
|
||||||
/* Is it a floating point type field? */
|
/* Is it a floating point type field? */
|
||||||
if (field_type_code == TYPE_CODE_FLT)
|
if (field_type_code == TYPE_CODE_FLT)
|
||||||
|
@ -6841,8 +6870,9 @@ arm_show_fallback_mode (struct ui_file *file, int from_tty,
|
||||||
{
|
{
|
||||||
struct gdbarch_tdep *tdep = gdbarch_tdep (target_gdbarch);
|
struct gdbarch_tdep *tdep = gdbarch_tdep (target_gdbarch);
|
||||||
|
|
||||||
fprintf_filtered (file, _("\
|
fprintf_filtered (file,
|
||||||
The current execution mode assumed (when symbols are unavailable) is \"%s\".\n"),
|
_("The current execution mode assumed "
|
||||||
|
"(when symbols are unavailable) is \"%s\".\n"),
|
||||||
arm_fallback_mode_string);
|
arm_fallback_mode_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6852,8 +6882,9 @@ arm_show_force_mode (struct ui_file *file, int from_tty,
|
||||||
{
|
{
|
||||||
struct gdbarch_tdep *tdep = gdbarch_tdep (target_gdbarch);
|
struct gdbarch_tdep *tdep = gdbarch_tdep (target_gdbarch);
|
||||||
|
|
||||||
fprintf_filtered (file, _("\
|
fprintf_filtered (file,
|
||||||
The current execution mode assumed (even when symbols are available) is \"%s\".\n"),
|
_("The current execution mode assumed "
|
||||||
|
"(even when symbols are available) is \"%s\".\n"),
|
||||||
arm_force_mode_string);
|
arm_force_mode_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7333,7 +7364,8 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
not. */
|
not. */
|
||||||
attr_arch = bfd_elf_get_obj_attr_int (info.abfd, OBJ_ATTR_PROC,
|
attr_arch = bfd_elf_get_obj_attr_int (info.abfd, OBJ_ATTR_PROC,
|
||||||
Tag_CPU_arch);
|
Tag_CPU_arch);
|
||||||
attr_profile = bfd_elf_get_obj_attr_int (info.abfd, OBJ_ATTR_PROC,
|
attr_profile = bfd_elf_get_obj_attr_int (info.abfd,
|
||||||
|
OBJ_ATTR_PROC,
|
||||||
Tag_CPU_arch_profile);
|
Tag_CPU_arch_profile);
|
||||||
/* GCC specifies the profile for v6-M; RealView only
|
/* GCC specifies the profile for v6-M; RealView only
|
||||||
specifies the profile for architectures starting with
|
specifies the profile for architectures starting with
|
||||||
|
@ -7875,7 +7907,8 @@ _initialize_arm_tdep (void)
|
||||||
_("Show the disassembly style."),
|
_("Show the disassembly style."),
|
||||||
helptext,
|
helptext,
|
||||||
set_disassembly_style_sfunc,
|
set_disassembly_style_sfunc,
|
||||||
NULL, /* FIXME: i18n: The disassembly style is \"%s\". */
|
NULL, /* FIXME: i18n: The disassembly style is
|
||||||
|
\"%s\". */
|
||||||
&setarmcmdlist, &showarmcmdlist);
|
&setarmcmdlist, &showarmcmdlist);
|
||||||
|
|
||||||
add_setshow_boolean_cmd ("apcs32", no_class, &arm_apcs_32,
|
add_setshow_boolean_cmd ("apcs32", no_class, &arm_apcs_32,
|
||||||
|
@ -7883,7 +7916,8 @@ _initialize_arm_tdep (void)
|
||||||
_("Show usage of ARM 32-bit mode."),
|
_("Show usage of ARM 32-bit mode."),
|
||||||
_("When off, a 26-bit PC will be used."),
|
_("When off, a 26-bit PC will be used."),
|
||||||
NULL,
|
NULL,
|
||||||
NULL, /* FIXME: i18n: Usage of ARM 32-bit mode is %s. */
|
NULL, /* FIXME: i18n: Usage of ARM 32-bit
|
||||||
|
mode is %s. */
|
||||||
&setarmcmdlist, &showarmcmdlist);
|
&setarmcmdlist, &showarmcmdlist);
|
||||||
|
|
||||||
/* Add a command to allow the user to force the FPU model. */
|
/* Add a command to allow the user to force the FPU model. */
|
||||||
|
|
|
@ -110,7 +110,7 @@ enum
|
||||||
AVR_RETN_REGNUM = 25, /* Multi byte return value */
|
AVR_RETN_REGNUM = 25, /* Multi byte return value */
|
||||||
|
|
||||||
/* FIXME: TRoth/2002-01-??: Can we shift all these memory masks left 8
|
/* FIXME: TRoth/2002-01-??: Can we shift all these memory masks left 8
|
||||||
bits? Do these have to match the bfd vma values?. It sure would make
|
bits? Do these have to match the bfd vma values? It sure would make
|
||||||
things easier in the future if they didn't need to match.
|
things easier in the future if they didn't need to match.
|
||||||
|
|
||||||
Note: I chose these values so as to be consistent with bfd vma
|
Note: I chose these values so as to be consistent with bfd vma
|
||||||
|
@ -750,7 +750,7 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Third stage of the prologue scanning. (Really two stages)
|
/* Third stage of the prologue scanning. (Really two stages).
|
||||||
Scan for:
|
Scan for:
|
||||||
sbiw r28,XX or subi r28,lo8(XX)
|
sbiw r28,XX or subi r28,lo8(XX)
|
||||||
sbci r29,hi8(XX)
|
sbci r29,hi8(XX)
|
||||||
|
@ -885,7 +885,8 @@ avr_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||||
only target, this shouldn't be a problem (I hope). TRoth/2003-05-14 */
|
only target, this shouldn't be a problem (I hope). TRoth/2003-05-14 */
|
||||||
|
|
||||||
static const unsigned char *
|
static const unsigned char *
|
||||||
avr_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR * pcptr, int *lenptr)
|
avr_breakpoint_from_pc (struct gdbarch *gdbarch,
|
||||||
|
CORE_ADDR *pcptr, int *lenptr)
|
||||||
{
|
{
|
||||||
static const unsigned char avr_break_insn [] = { 0x98, 0x95 };
|
static const unsigned char avr_break_insn [] = { 0x98, 0x95 };
|
||||||
*lenptr = sizeof (avr_break_insn);
|
*lenptr = sizeof (avr_break_insn);
|
||||||
|
|
|
@ -581,7 +581,8 @@ bfin_reg_to_regnum (struct gdbarch *gdbarch, int reg)
|
||||||
the breakpoint should be inserted. */
|
the breakpoint should be inserted. */
|
||||||
|
|
||||||
static const unsigned char *
|
static const unsigned char *
|
||||||
bfin_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
|
bfin_breakpoint_from_pc (struct gdbarch *gdbarch,
|
||||||
|
CORE_ADDR *pcptr, int *lenptr)
|
||||||
{
|
{
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
unsigned short iw;
|
unsigned short iw;
|
||||||
|
|
|
@ -248,7 +248,7 @@ bsd_kvm_fetch_registers (struct target_ops *ops,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* i18n: PCB == "Process Control Block" */
|
/* i18n: PCB == "Process Control Block". */
|
||||||
error (_("Cannot find a valid PCB"));
|
error (_("Cannot find a valid PCB"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,7 +297,7 @@ static void
|
||||||
bsd_kvm_pcb_cmd (char *arg, int fromtty)
|
bsd_kvm_pcb_cmd (char *arg, int fromtty)
|
||||||
{
|
{
|
||||||
if (arg == NULL)
|
if (arg == NULL)
|
||||||
/* i18n: PCB == "Process Control Block" */
|
/* i18n: PCB == "Process Control Block". */
|
||||||
error_no_arg (_("pcb address"));
|
error_no_arg (_("pcb address"));
|
||||||
|
|
||||||
if (core_kd == NULL)
|
if (core_kd == NULL)
|
||||||
|
@ -370,7 +370,7 @@ Generic command for manipulating the kernel memory interface."),
|
||||||
_("Set current context from proc address"), &bsd_kvm_cmdlist);
|
_("Set current context from proc address"), &bsd_kvm_cmdlist);
|
||||||
#endif
|
#endif
|
||||||
add_cmd ("pcb", class_obscure, bsd_kvm_pcb_cmd,
|
add_cmd ("pcb", class_obscure, bsd_kvm_pcb_cmd,
|
||||||
/* i18n: PCB == "Process Control Block" */
|
/* i18n: PCB == "Process Control Block". */
|
||||||
_("Set current context from pcb address"), &bsd_kvm_cmdlist);
|
_("Set current context from pcb address"), &bsd_kvm_cmdlist);
|
||||||
|
|
||||||
/* Some notes on the ptid usage on this target.
|
/* Some notes on the ptid usage on this target.
|
||||||
|
@ -385,7 +385,7 @@ Generic command for manipulating the kernel memory interface."),
|
||||||
ptid (1, 1, 0) -> kvm inferior 1, in kernel
|
ptid (1, 1, 0) -> kvm inferior 1, in kernel
|
||||||
ptid (1, 1, 1) -> kvm inferior 1, process 1
|
ptid (1, 1, 1) -> kvm inferior 1, process 1
|
||||||
ptid (1, 1, 2) -> kvm inferior 1, process 2
|
ptid (1, 1, 2) -> kvm inferior 1, process 2
|
||||||
ptid (1, 1, n) -> kvm inferior 1, process n
|
ptid (1, 1, n) -> kvm inferior 1, process n */
|
||||||
*/
|
|
||||||
bsd_kvm_ptid = ptid_build (1, 1, 0);
|
bsd_kvm_ptid = ptid_build (1, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ c_print_type (struct type *type,
|
||||||
fputs_filtered (varstring, stream);
|
fputs_filtered (varstring, stream);
|
||||||
|
|
||||||
/* For demangled function names, we have the arglist as part of
|
/* For demangled function names, we have the arglist as part of
|
||||||
the name, so don't print an additional pair of ()'s */
|
the name, so don't print an additional pair of ()'s. */
|
||||||
|
|
||||||
demangled_args = strchr (varstring, '(') != NULL;
|
demangled_args = strchr (varstring, '(') != NULL;
|
||||||
c_type_print_varspec_suffix (type, stream, show,
|
c_type_print_varspec_suffix (type, stream, show,
|
||||||
|
@ -509,10 +509,10 @@ is_type_conversion_operator (struct type *type, int i, int j)
|
||||||
static char *
|
static char *
|
||||||
remove_qualifiers (char *qid)
|
remove_qualifiers (char *qid)
|
||||||
{
|
{
|
||||||
int quoted = 0; /* zero if we're not in quotes;
|
int quoted = 0; /* Zero if we're not in quotes;
|
||||||
'"' if we're in a double-quoted string;
|
'"' if we're in a double-quoted string;
|
||||||
'\'' if we're in a single-quoted string. */
|
'\'' if we're in a single-quoted string. */
|
||||||
int depth = 0; /* number of unclosed parens we've seen */
|
int depth = 0; /* Number of unclosed parens we've seen. */
|
||||||
char *parenstack = (char *) alloca (strlen (qid));
|
char *parenstack = (char *) alloca (strlen (qid));
|
||||||
char *scan;
|
char *scan;
|
||||||
char *last = 0; /* The character after the rightmost
|
char *last = 0; /* The character after the rightmost
|
||||||
|
@ -974,7 +974,7 @@ c_type_print_base (struct type *type, struct ui_file *stream,
|
||||||
if (real_len > 0 && section_type != s_none)
|
if (real_len > 0 && section_type != s_none)
|
||||||
fprintf_filtered (stream, "\n");
|
fprintf_filtered (stream, "\n");
|
||||||
|
|
||||||
/* C++: print out the methods */
|
/* C++: print out the methods. */
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
{
|
{
|
||||||
struct fn_field *f = TYPE_FN_FIELDLIST1 (type, i);
|
struct fn_field *f = TYPE_FN_FIELDLIST1 (type, i);
|
||||||
|
@ -1207,7 +1207,7 @@ c_type_print_base (struct type *type, struct ui_file *stream,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_CODE_RANGE:
|
case TYPE_CODE_RANGE:
|
||||||
/* This should not occur */
|
/* This should not occur. */
|
||||||
fprintf_filtered (stream, _("<range type>"));
|
fprintf_filtered (stream, _("<range type>"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -404,7 +404,7 @@ c_val_print (struct type *type, const gdb_byte *valaddr,
|
||||||
}
|
}
|
||||||
/* Fall through. */
|
/* Fall through. */
|
||||||
case TYPE_CODE_STRUCT:
|
case TYPE_CODE_STRUCT:
|
||||||
/*FIXME: Abstract this away */
|
/*FIXME: Abstract this away. */
|
||||||
if (options->vtblprint && cp_is_vtbl_ptr_type (type))
|
if (options->vtblprint && cp_is_vtbl_ptr_type (type))
|
||||||
{
|
{
|
||||||
/* Print the unmangled name if desired. */
|
/* Print the unmangled name if desired. */
|
||||||
|
|
|
@ -1652,7 +1652,7 @@ process_coff_symbol (struct coff_symbol *cs,
|
||||||
SYMBOL_CLASS (sym) = LOC_TYPEDEF;
|
SYMBOL_CLASS (sym) = LOC_TYPEDEF;
|
||||||
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
|
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
|
||||||
|
|
||||||
/* If type has no name, give it one */
|
/* If type has no name, give it one. */
|
||||||
if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
|
if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
|
||||||
{
|
{
|
||||||
if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_PTR
|
if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_PTR
|
||||||
|
|
|
@ -94,7 +94,7 @@ enum cris_regnums
|
||||||
MOF_REGNUM = 23,
|
MOF_REGNUM = 23,
|
||||||
SRP_REGNUM = 27,
|
SRP_REGNUM = 27,
|
||||||
|
|
||||||
/* CRISv10 et. al. specific registers. */
|
/* CRISv10 et al. specific registers. */
|
||||||
P0_REGNUM = 16,
|
P0_REGNUM = 16,
|
||||||
P4_REGNUM = 20,
|
P4_REGNUM = 20,
|
||||||
CCR_REGNUM = 21,
|
CCR_REGNUM = 21,
|
||||||
|
@ -1135,7 +1135,7 @@ cris_scan_prologue (CORE_ADDR pc, struct frame_info *this_frame,
|
||||||
pc += 2;
|
pc += 2;
|
||||||
if (insn == 0xE1FC)
|
if (insn == 0xE1FC)
|
||||||
{
|
{
|
||||||
/* push <reg> 32 bit instruction */
|
/* push <reg> 32 bit instruction. */
|
||||||
insn_next = read_memory_unsigned_integer (pc, 2, byte_order);
|
insn_next = read_memory_unsigned_integer (pc, 2, byte_order);
|
||||||
pc += 2;
|
pc += 2;
|
||||||
regno = cris_get_operand2 (insn_next);
|
regno = cris_get_operand2 (insn_next);
|
||||||
|
@ -1465,7 +1465,8 @@ cris_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
|
||||||
the breakpoint should be inserted. */
|
the breakpoint should be inserted. */
|
||||||
|
|
||||||
static const unsigned char *
|
static const unsigned char *
|
||||||
cris_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
|
cris_breakpoint_from_pc (struct gdbarch *gdbarch,
|
||||||
|
CORE_ADDR *pcptr, int *lenptr)
|
||||||
{
|
{
|
||||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||||
static unsigned char break8_insn[] = {0x38, 0xe9};
|
static unsigned char break8_insn[] = {0x38, 0xe9};
|
||||||
|
@ -1583,8 +1584,7 @@ cris_cannot_store_register (struct gdbarch *gdbarch, int regno)
|
||||||
/* There are three kinds of registers we refuse to write to.
|
/* There are three kinds of registers we refuse to write to.
|
||||||
1. Those that not implemented.
|
1. Those that not implemented.
|
||||||
2. Those that are read-only (depends on the processor mode).
|
2. Those that are read-only (depends on the processor mode).
|
||||||
3. Those registers to which a write has no effect.
|
3. Those registers to which a write has no effect. */
|
||||||
*/
|
|
||||||
|
|
||||||
if (regno < 0
|
if (regno < 0
|
||||||
|| regno >= gdbarch_num_regs (gdbarch)
|
|| regno >= gdbarch_num_regs (gdbarch)
|
||||||
|
@ -1625,8 +1625,7 @@ crisv32_cannot_store_register (struct gdbarch *gdbarch, int regno)
|
||||||
/* There are three kinds of registers we refuse to write to.
|
/* There are three kinds of registers we refuse to write to.
|
||||||
1. Those that not implemented.
|
1. Those that not implemented.
|
||||||
2. Those that are read-only (depends on the processor mode).
|
2. Those that are read-only (depends on the processor mode).
|
||||||
3. Those registers to which a write has no effect.
|
3. Those registers to which a write has no effect. */
|
||||||
*/
|
|
||||||
|
|
||||||
if (regno < 0
|
if (regno < 0
|
||||||
|| regno >= gdbarch_num_regs (gdbarch)
|
|| regno >= gdbarch_num_regs (gdbarch)
|
||||||
|
@ -1731,8 +1730,8 @@ cris_store_return_value (struct type *type, struct regcache *regcache,
|
||||||
error (_("cris_store_return_value: type length too large."));
|
error (_("cris_store_return_value: type length too large."));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the name of register regno as a string. Return NULL for an invalid or
|
/* Return the name of register regno as a string. Return NULL for an
|
||||||
unimplemented register. */
|
invalid or unimplemented register. */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
cris_special_register_name (struct gdbarch *gdbarch, int regno)
|
cris_special_register_name (struct gdbarch *gdbarch, int regno)
|
||||||
|
@ -2384,7 +2383,8 @@ sixteen_bit_offset_branch_op (unsigned short inst, inst_env_type *inst_env)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We have a branch, find out the offset for the branch. */
|
/* We have a branch, find out the offset for the branch. */
|
||||||
offset = read_memory_integer (inst_env->reg[REG_PC], 2, inst_env->byte_order);
|
offset = read_memory_integer (inst_env->reg[REG_PC], 2,
|
||||||
|
inst_env->byte_order);
|
||||||
|
|
||||||
/* The instruction is one word longer than normal, so add one word
|
/* The instruction is one word longer than normal, so add one word
|
||||||
to the PC. */
|
to the PC. */
|
||||||
|
@ -2487,7 +2487,8 @@ asr_op (unsigned short inst, inst_env_type *inst_env)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* Get the number of bits to shift. */
|
/* Get the number of bits to shift. */
|
||||||
shift_steps = cris_get_asr_shift_steps (inst_env->reg[cris_get_operand1 (inst)]);
|
shift_steps
|
||||||
|
= cris_get_asr_shift_steps (inst_env->reg[cris_get_operand1 (inst)]);
|
||||||
value = inst_env->reg[REG_PC];
|
value = inst_env->reg[REG_PC];
|
||||||
|
|
||||||
/* Find out how many bits the operation should apply to. */
|
/* Find out how many bits the operation should apply to. */
|
||||||
|
@ -3104,7 +3105,8 @@ move_mem_to_reg_movem_op (unsigned short inst, inst_env_type *inst_env)
|
||||||
}
|
}
|
||||||
/* The increment is not depending on the size, instead it's depending
|
/* The increment is not depending on the size, instead it's depending
|
||||||
on the number of registers loaded from memory. */
|
on the number of registers loaded from memory. */
|
||||||
if ((cris_get_operand1 (inst) == REG_PC) && (cris_get_mode (inst) == AUTOINC_MODE))
|
if ((cris_get_operand1 (inst) == REG_PC)
|
||||||
|
&& (cris_get_mode (inst) == AUTOINC_MODE))
|
||||||
{
|
{
|
||||||
/* It's invalid to change the PC in a delay slot. */
|
/* It's invalid to change the PC in a delay slot. */
|
||||||
if (inst_env->slot_needed)
|
if (inst_env->slot_needed)
|
||||||
|
@ -3142,7 +3144,8 @@ move_reg_to_mem_movem_op (unsigned short inst, inst_env_type *inst_env)
|
||||||
{
|
{
|
||||||
/* The increment is not depending on the size, instead it's depending
|
/* The increment is not depending on the size, instead it's depending
|
||||||
on the number of registers loaded to memory. */
|
on the number of registers loaded to memory. */
|
||||||
if ((cris_get_operand1 (inst) == REG_PC) && (cris_get_mode (inst) == AUTOINC_MODE))
|
if ((cris_get_operand1 (inst) == REG_PC)
|
||||||
|
&& (cris_get_mode (inst) == AUTOINC_MODE))
|
||||||
{
|
{
|
||||||
/* It's invalid to change the PC in a delay slot. */
|
/* It's invalid to change the PC in a delay slot. */
|
||||||
if (inst_env->slot_needed)
|
if (inst_env->slot_needed)
|
||||||
|
@ -3414,7 +3417,8 @@ reg_mode_add_sub_cmp_and_or_move_op (unsigned short inst,
|
||||||
extend instruction, the size field is changed in instruction. */
|
extend instruction, the size field is changed in instruction. */
|
||||||
|
|
||||||
static unsigned long
|
static unsigned long
|
||||||
get_data_from_address (unsigned short *inst, CORE_ADDR address, enum bfd_endian byte_order)
|
get_data_from_address (unsigned short *inst, CORE_ADDR address,
|
||||||
|
enum bfd_endian byte_order)
|
||||||
{
|
{
|
||||||
int size = cris_get_size (*inst);
|
int size = cris_get_size (*inst);
|
||||||
unsigned long value;
|
unsigned long value;
|
||||||
|
@ -3556,7 +3560,8 @@ handle_inc_and_index_mode_for_aritm_op (unsigned short inst,
|
||||||
}
|
}
|
||||||
/* If this is an autoincrement addressing mode, check if the increment
|
/* If this is an autoincrement addressing mode, check if the increment
|
||||||
changes the PC. */
|
changes the PC. */
|
||||||
if ((cris_get_operand1 (inst) == REG_PC) && (cris_get_mode (inst) == AUTOINC_MODE))
|
if ((cris_get_operand1 (inst) == REG_PC)
|
||||||
|
&& (cris_get_mode (inst) == AUTOINC_MODE))
|
||||||
{
|
{
|
||||||
/* Get the size field. */
|
/* Get the size field. */
|
||||||
size = cris_get_size (inst);
|
size = cris_get_size (inst);
|
||||||
|
@ -3968,7 +3973,8 @@ _initialize_cris_tdep (void)
|
||||||
Set to 10 for CRISv10 or 32 for CRISv32 if autodetection fails.\n\
|
Set to 10 for CRISv10 or 32 for CRISv32 if autodetection fails.\n\
|
||||||
Defaults to 10. "),
|
Defaults to 10. "),
|
||||||
set_cris_version,
|
set_cris_version,
|
||||||
NULL, /* FIXME: i18n: Current CRIS version is %s. */
|
NULL, /* FIXME: i18n: Current CRIS version
|
||||||
|
is %s. */
|
||||||
&setlist, &showlist);
|
&setlist, &showlist);
|
||||||
|
|
||||||
add_setshow_enum_cmd ("cris-mode", class_support,
|
add_setshow_enum_cmd ("cris-mode", class_support,
|
||||||
|
@ -3988,7 +3994,8 @@ Makes GDB use the NRP register instead of the ERP register in certain cases."),
|
||||||
_("Show the usage of Dwarf-2 CFI for CRIS."),
|
_("Show the usage of Dwarf-2 CFI for CRIS."),
|
||||||
_("Set this to \"off\" if using gcc-cris < R59."),
|
_("Set this to \"off\" if using gcc-cris < R59."),
|
||||||
set_cris_dwarf2_cfi,
|
set_cris_dwarf2_cfi,
|
||||||
NULL, /* FIXME: i18n: Usage of Dwarf-2 CFI for CRIS is %d. */
|
NULL, /* FIXME: i18n: Usage of Dwarf-2 CFI
|
||||||
|
for CRIS is %d. */
|
||||||
&setlist, &showlist);
|
&setlist, &showlist);
|
||||||
|
|
||||||
deprecated_add_core_fns (&cris_elf_core_fns);
|
deprecated_add_core_fns (&cris_elf_core_fns);
|
||||||
|
@ -4107,11 +4114,13 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BFD_ENDIAN_BIG:
|
case BFD_ENDIAN_BIG:
|
||||||
internal_error (__FILE__, __LINE__, _("cris_gdbarch_init: big endian byte order in info"));
|
internal_error (__FILE__, __LINE__,
|
||||||
|
_("cris_gdbarch_init: big endian byte order in info"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
internal_error (__FILE__, __LINE__, _("cris_gdbarch_init: unknown byte order in info"));
|
internal_error (__FILE__, __LINE__,
|
||||||
|
_("cris_gdbarch_init: unknown byte order in info"));
|
||||||
}
|
}
|
||||||
|
|
||||||
set_gdbarch_return_value (gdbarch, cris_return_value);
|
set_gdbarch_return_value (gdbarch, cris_return_value);
|
||||||
|
|
|
@ -253,7 +253,8 @@ static const struct language_defn d_language_defn =
|
||||||
c_printstr, /* Function to print string constant. */
|
c_printstr, /* Function to print string constant. */
|
||||||
c_emit_char, /* Print a single char. */
|
c_emit_char, /* Print a single char. */
|
||||||
c_print_type, /* Print a type using appropriate syntax. */
|
c_print_type, /* Print a type using appropriate syntax. */
|
||||||
c_print_typedef, /* Print a typedef using appropriate syntax. */
|
c_print_typedef, /* Print a typedef using appropriate
|
||||||
|
syntax. */
|
||||||
d_val_print, /* Print a value using appropriate syntax. */
|
d_val_print, /* Print a value using appropriate syntax. */
|
||||||
c_value_print, /* Print a top-level value. */
|
c_value_print, /* Print a top-level value. */
|
||||||
NULL, /* Language specific skip_trampoline. */
|
NULL, /* Language specific skip_trampoline. */
|
||||||
|
@ -261,7 +262,8 @@ static const struct language_defn d_language_defn =
|
||||||
basic_lookup_symbol_nonlocal,
|
basic_lookup_symbol_nonlocal,
|
||||||
basic_lookup_transparent_type,
|
basic_lookup_transparent_type,
|
||||||
d_demangle, /* Language specific symbol demangler. */
|
d_demangle, /* Language specific symbol demangler. */
|
||||||
NULL, /* Language specific class_name_from_physname. */
|
NULL, /* Language specific
|
||||||
|
class_name_from_physname. */
|
||||||
d_op_print_tab, /* Expression operators for printing. */
|
d_op_print_tab, /* Expression operators for printing. */
|
||||||
1, /* C-style arrays. */
|
1, /* C-style arrays. */
|
||||||
0, /* String lower bound. */
|
0, /* String lower bound. */
|
||||||
|
|
|
@ -1655,7 +1655,7 @@ darwin_read_write_inferior (task_t task, CORE_ADDR addr,
|
||||||
inferior_debug (8, _("darwin_read_write_inferior(task=%x, %s, len=%d)\n"),
|
inferior_debug (8, _("darwin_read_write_inferior(task=%x, %s, len=%d)\n"),
|
||||||
task, core_addr_to_string (addr), length);
|
task, core_addr_to_string (addr), length);
|
||||||
|
|
||||||
/* Get memory from inferior with page aligned addresses */
|
/* Get memory from inferior with page aligned addresses. */
|
||||||
kret = mach_vm_read (task, low_address, aligned_length,
|
kret = mach_vm_read (task, low_address, aligned_length,
|
||||||
&copied, ©_count);
|
&copied, ©_count);
|
||||||
if (kret != KERN_SUCCESS)
|
if (kret != KERN_SUCCESS)
|
||||||
|
@ -1707,7 +1707,7 @@ darwin_read_write_inferior (task_t task, CORE_ADDR addr,
|
||||||
core_addr_to_string (region_start),
|
core_addr_to_string (region_start),
|
||||||
core_addr_to_string (region_length));
|
core_addr_to_string (region_length));
|
||||||
|
|
||||||
/* Check for holes in memory */
|
/* Check for holes in memory. */
|
||||||
if (region_start > region_address)
|
if (region_start > region_address)
|
||||||
{
|
{
|
||||||
warning (_("No memory at %s (vs %s+0x%x). Nothing written"),
|
warning (_("No memory at %s (vs %s+0x%x). Nothing written"),
|
||||||
|
|
|
@ -74,10 +74,10 @@ dbug_supply_register (struct regcache *regcache, char *regname,
|
||||||
monitor_supply_register (regcache, regno, val);
|
monitor_supply_register (regcache, regno, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This array of registers needs to match the indexes used by GDB. The
|
/* This array of registers needs to match the indexes used by GDB.
|
||||||
whole reason this exists is because the various ROM monitors use
|
The whole reason this exists is because the various ROM monitors
|
||||||
different names than GDB does, and don't support all the registers
|
use different names than GDB does, and don't support all the
|
||||||
either. So, typing "info reg sp" becomes an "A7". */
|
registers either. So, typing "info reg sp" becomes an "A7". */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
dbug_regname (int index)
|
dbug_regname (int index)
|
||||||
|
|
122
gdb/dbxread.c
122
gdb/dbxread.c
|
@ -61,7 +61,8 @@
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
|
|
||||||
#include "aout/aout64.h"
|
#include "aout/aout64.h"
|
||||||
#include "aout/stab_gnu.h" /* We always use GNU stabs, not native, now */
|
#include "aout/stab_gnu.h" /* We always use GNU stabs, not
|
||||||
|
native, now. */
|
||||||
|
|
||||||
|
|
||||||
/* We put a pointer to this structure in the read_symtab_private field
|
/* We put a pointer to this structure in the read_symtab_private field
|
||||||
|
@ -240,14 +241,14 @@ struct header_file_location
|
||||||
char *name; /* Name of header file */
|
char *name; /* Name of header file */
|
||||||
int instance; /* See above */
|
int instance; /* See above */
|
||||||
struct partial_symtab *pst; /* Partial symtab that has the
|
struct partial_symtab *pst; /* Partial symtab that has the
|
||||||
BINCL/EINCL defs for this file */
|
BINCL/EINCL defs for this file. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The actual list and controling variables */
|
/* The actual list and controling variables. */
|
||||||
static struct header_file_location *bincl_list, *next_bincl;
|
static struct header_file_location *bincl_list, *next_bincl;
|
||||||
static int bincls_allocated;
|
static int bincls_allocated;
|
||||||
|
|
||||||
/* Local function prototypes */
|
/* Local function prototypes. */
|
||||||
|
|
||||||
extern void _initialize_dbxread (void);
|
extern void _initialize_dbxread (void);
|
||||||
|
|
||||||
|
@ -294,7 +295,7 @@ static struct partial_symtab *start_psymtab (struct objfile *, char *,
|
||||||
struct partial_symbol **,
|
struct partial_symbol **,
|
||||||
struct partial_symbol **);
|
struct partial_symbol **);
|
||||||
|
|
||||||
/* Free up old header file tables */
|
/* Free up old header file tables. */
|
||||||
|
|
||||||
void
|
void
|
||||||
free_header_files (void)
|
free_header_files (void)
|
||||||
|
@ -307,7 +308,7 @@ free_header_files (void)
|
||||||
n_allocated_this_object_header_files = 0;
|
n_allocated_this_object_header_files = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate new header file tables */
|
/* Allocate new header file tables. */
|
||||||
|
|
||||||
void
|
void
|
||||||
init_header_files (void)
|
init_header_files (void)
|
||||||
|
@ -621,7 +622,7 @@ dbx_symfile_init (struct objfile *objfile)
|
||||||
asection *text_sect;
|
asection *text_sect;
|
||||||
unsigned char size_temp[DBX_STRINGTAB_SIZE_SIZE];
|
unsigned char size_temp[DBX_STRINGTAB_SIZE_SIZE];
|
||||||
|
|
||||||
/* Allocate struct to keep track of the symfile */
|
/* Allocate struct to keep track of the symfile. */
|
||||||
objfile->deprecated_sym_stab_info = (struct dbx_symfile_info *)
|
objfile->deprecated_sym_stab_info = (struct dbx_symfile_info *)
|
||||||
xmalloc (sizeof (struct dbx_symfile_info));
|
xmalloc (sizeof (struct dbx_symfile_info));
|
||||||
memset (objfile->deprecated_sym_stab_info, 0,
|
memset (objfile->deprecated_sym_stab_info, 0,
|
||||||
|
@ -631,11 +632,11 @@ dbx_symfile_init (struct objfile *objfile)
|
||||||
DBX_DATA_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".data");
|
DBX_DATA_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".data");
|
||||||
DBX_BSS_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".bss");
|
DBX_BSS_SECTION (objfile) = bfd_get_section_by_name (sym_bfd, ".bss");
|
||||||
|
|
||||||
/* FIXME POKING INSIDE BFD DATA STRUCTURES */
|
/* FIXME POKING INSIDE BFD DATA STRUCTURES. */
|
||||||
#define STRING_TABLE_OFFSET (sym_bfd->origin + obj_str_filepos (sym_bfd))
|
#define STRING_TABLE_OFFSET (sym_bfd->origin + obj_str_filepos (sym_bfd))
|
||||||
#define SYMBOL_TABLE_OFFSET (sym_bfd->origin + obj_sym_filepos (sym_bfd))
|
#define SYMBOL_TABLE_OFFSET (sym_bfd->origin + obj_sym_filepos (sym_bfd))
|
||||||
|
|
||||||
/* FIXME POKING INSIDE BFD DATA STRUCTURES */
|
/* FIXME POKING INSIDE BFD DATA STRUCTURES. */
|
||||||
|
|
||||||
DBX_SYMFILE_INFO (objfile)->stab_section_info = NULL;
|
DBX_SYMFILE_INFO (objfile)->stab_section_info = NULL;
|
||||||
|
|
||||||
|
@ -1185,7 +1186,7 @@ static void
|
||||||
read_dbx_symtab (struct objfile *objfile)
|
read_dbx_symtab (struct objfile *objfile)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||||
struct external_nlist *bufp = 0; /* =0 avoids gcc -Wall glitch */
|
struct external_nlist *bufp = 0; /* =0 avoids gcc -Wall glitch. */
|
||||||
struct internal_nlist nlist;
|
struct internal_nlist nlist;
|
||||||
CORE_ADDR text_addr;
|
CORE_ADDR text_addr;
|
||||||
int text_size;
|
int text_size;
|
||||||
|
@ -1202,15 +1203,15 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
int textlow_not_set;
|
int textlow_not_set;
|
||||||
int data_sect_index;
|
int data_sect_index;
|
||||||
|
|
||||||
/* Current partial symtab */
|
/* Current partial symtab. */
|
||||||
struct partial_symtab *pst;
|
struct partial_symtab *pst;
|
||||||
|
|
||||||
/* List of current psymtab's include files */
|
/* List of current psymtab's include files. */
|
||||||
char **psymtab_include_list;
|
char **psymtab_include_list;
|
||||||
int includes_allocated;
|
int includes_allocated;
|
||||||
int includes_used;
|
int includes_used;
|
||||||
|
|
||||||
/* Index within current psymtab dependency list */
|
/* Index within current psymtab dependency list. */
|
||||||
struct partial_symtab **dependency_list;
|
struct partial_symtab **dependency_list;
|
||||||
int dependencies_used, dependencies_allocated;
|
int dependencies_used, dependencies_allocated;
|
||||||
|
|
||||||
|
@ -1245,7 +1246,7 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
|
|
||||||
lowest_text_address = (CORE_ADDR) -1;
|
lowest_text_address = (CORE_ADDR) -1;
|
||||||
|
|
||||||
symfile_bfd = objfile->obfd; /* For next_text_symbol */
|
symfile_bfd = objfile->obfd; /* For next_text_symbol. */
|
||||||
abfd = objfile->obfd;
|
abfd = objfile->obfd;
|
||||||
symbuf_end = symbuf_idx = 0;
|
symbuf_end = symbuf_idx = 0;
|
||||||
next_symbol_text_func = dbx_next_symbol_text;
|
next_symbol_text_func = dbx_next_symbol_text;
|
||||||
|
@ -1286,8 +1287,8 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
|
|
||||||
for (symnum = 0; symnum < DBX_SYMCOUNT (objfile); symnum++)
|
for (symnum = 0; symnum < DBX_SYMCOUNT (objfile); symnum++)
|
||||||
{
|
{
|
||||||
/* Get the symbol for this run and pull out some info */
|
/* Get the symbol for this run and pull out some info. */
|
||||||
QUIT; /* allow this to be interruptable */
|
QUIT; /* Allow this to be interruptable. */
|
||||||
if (symbuf_idx == symbuf_end)
|
if (symbuf_idx == symbuf_end)
|
||||||
fill_symbuf (abfd);
|
fill_symbuf (abfd);
|
||||||
bufp = &symbuf[symbuf_idx++];
|
bufp = &symbuf[symbuf_idx++];
|
||||||
|
@ -1313,8 +1314,7 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
*) The call to strchr.
|
*) The call to strchr.
|
||||||
*) The addition of a partial symbol the the two partial
|
*) The addition of a partial symbol the the two partial
|
||||||
symbol lists. This last is a large section of code, so
|
symbol lists. This last is a large section of code, so
|
||||||
I've imbedded it in the following macro.
|
I've imbedded it in the following macro. */
|
||||||
*/
|
|
||||||
|
|
||||||
switch (nlist.n_type)
|
switch (nlist.n_type)
|
||||||
{
|
{
|
||||||
|
@ -1351,7 +1351,7 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
nlist.n_type, objfile); /* Always */
|
nlist.n_type, objfile); /* Always */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Standard, local, non-debugger, symbols */
|
/* Standard, local, non-debugger, symbols. */
|
||||||
|
|
||||||
case N_NBTEXT:
|
case N_NBTEXT:
|
||||||
|
|
||||||
|
@ -1413,11 +1413,12 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
{
|
{
|
||||||
continue; /* Error in lookup; ignore symbol for now. */
|
continue; /* Error in lookup; ignore symbol for now. */
|
||||||
}
|
}
|
||||||
nlist.n_type ^= (N_BSS ^ N_UNDF); /* Define it as a bss-symbol */
|
nlist.n_type ^= (N_BSS ^ N_UNDF); /* Define it as a
|
||||||
|
bss-symbol. */
|
||||||
nlist.n_value = reladdr;
|
nlist.n_value = reladdr;
|
||||||
goto bss_ext_symbol;
|
goto bss_ext_symbol;
|
||||||
}
|
}
|
||||||
continue; /* Just undefined, not COMMON */
|
continue; /* Just undefined, not COMMON. */
|
||||||
|
|
||||||
case N_UNDF:
|
case N_UNDF:
|
||||||
if (processing_acc_compilation && nlist.n_strx == 1)
|
if (processing_acc_compilation && nlist.n_strx == 1)
|
||||||
|
@ -1497,7 +1498,7 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
past_first_source_file = 1;
|
past_first_source_file = 1;
|
||||||
|
|
||||||
if (prev_so_symnum != symnum - 1)
|
if (prev_so_symnum != symnum - 1)
|
||||||
{ /* Here if prev stab wasn't N_SO */
|
{ /* Here if prev stab wasn't N_SO. */
|
||||||
first_so_symnum = symnum;
|
first_so_symnum = symnum;
|
||||||
|
|
||||||
if (pst)
|
if (pst)
|
||||||
|
@ -1516,7 +1517,7 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
|
|
||||||
prev_so_symnum = symnum;
|
prev_so_symnum = symnum;
|
||||||
|
|
||||||
/* End the current partial symtab and start a new one */
|
/* End the current partial symtab and start a new one. */
|
||||||
|
|
||||||
namestring = set_namestring (objfile, &nlist);
|
namestring = set_namestring (objfile, &nlist);
|
||||||
|
|
||||||
|
@ -1561,7 +1562,7 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
|
|
||||||
/* Add this bincl to the bincl_list for future EXCLs. No
|
/* Add this bincl to the bincl_list for future EXCLs. No
|
||||||
need to save the string; it'll be around until
|
need to save the string; it'll be around until
|
||||||
read_dbx_symtab function returns */
|
read_dbx_symtab function returns. */
|
||||||
|
|
||||||
namestring = set_namestring (objfile, &nlist);
|
namestring = set_namestring (objfile, &nlist);
|
||||||
tmp_language = deduce_language_from_filename (namestring);
|
tmp_language = deduce_language_from_filename (namestring);
|
||||||
|
@ -1587,7 +1588,7 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
}
|
}
|
||||||
add_bincl_to_list (pst, namestring, nlist.n_value);
|
add_bincl_to_list (pst, namestring, nlist.n_value);
|
||||||
|
|
||||||
/* Mark down an include file in the current psymtab */
|
/* Mark down an include file in the current psymtab. */
|
||||||
|
|
||||||
goto record_include_file;
|
goto record_include_file;
|
||||||
}
|
}
|
||||||
|
@ -1596,7 +1597,7 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
{
|
{
|
||||||
enum language tmp_language;
|
enum language tmp_language;
|
||||||
|
|
||||||
/* Mark down an include file in the current psymtab */
|
/* Mark down an include file in the current psymtab. */
|
||||||
namestring = set_namestring (objfile, &nlist);
|
namestring = set_namestring (objfile, &nlist);
|
||||||
tmp_language = deduce_language_from_filename (namestring);
|
tmp_language = deduce_language_from_filename (namestring);
|
||||||
|
|
||||||
|
@ -1649,7 +1650,7 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
case N_LSYM: /* Typedef or automatic variable. */
|
case N_LSYM: /* Typedef or automatic variable. */
|
||||||
case N_STSYM: /* Data seg var -- static */
|
case N_STSYM: /* Data seg var -- static. */
|
||||||
case N_LCSYM: /* BSS " */
|
case N_LCSYM: /* BSS " */
|
||||||
case N_ROSYM: /* Read-only data seg var -- static. */
|
case N_ROSYM: /* Read-only data seg var -- static. */
|
||||||
case N_NBSTS: /* Gould nobase. */
|
case N_NBSTS: /* Gould nobase. */
|
||||||
|
@ -1880,7 +1881,7 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
}
|
}
|
||||||
nlist.n_value += ANOFFSET (objfile->section_offsets,
|
nlist.n_value += ANOFFSET (objfile->section_offsets,
|
||||||
SECT_OFF_TEXT (objfile));
|
SECT_OFF_TEXT (objfile));
|
||||||
/* Kludges for ELF/STABS with Sun ACC */
|
/* Kludges for ELF/STABS with Sun ACC. */
|
||||||
last_function_name = namestring;
|
last_function_name = namestring;
|
||||||
/* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
|
/* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
|
||||||
value for the bottom of the text seg in those cases. */
|
value for the bottom of the text seg in those cases. */
|
||||||
|
@ -1950,7 +1951,7 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
}
|
}
|
||||||
nlist.n_value += ANOFFSET (objfile->section_offsets,
|
nlist.n_value += ANOFFSET (objfile->section_offsets,
|
||||||
SECT_OFF_TEXT (objfile));
|
SECT_OFF_TEXT (objfile));
|
||||||
/* Kludges for ELF/STABS with Sun ACC */
|
/* Kludges for ELF/STABS with Sun ACC. */
|
||||||
last_function_name = namestring;
|
last_function_name = namestring;
|
||||||
/* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
|
/* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
|
||||||
value for the bottom of the text seg in those cases. */
|
value for the bottom of the text seg in those cases. */
|
||||||
|
@ -2020,7 +2021,7 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
case '8':
|
case '8':
|
||||||
case '9':
|
case '9':
|
||||||
case '-':
|
case '-':
|
||||||
case '#': /* for symbol identification (used in live ranges) */
|
case '#': /* For symbol identification (used in live ranges). */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case ':':
|
case ':':
|
||||||
|
@ -2056,7 +2057,7 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
namestring = set_namestring (objfile, &nlist);
|
namestring = set_namestring (objfile, &nlist);
|
||||||
|
|
||||||
/* Find the corresponding bincl and mark that psymtab on the
|
/* Find the corresponding bincl and mark that psymtab on the
|
||||||
psymtab dependency list */
|
psymtab dependency list. */
|
||||||
{
|
{
|
||||||
struct partial_symtab *needed_pst =
|
struct partial_symtab *needed_pst =
|
||||||
find_corresponding_bincl_psymtab (namestring, nlist.n_value);
|
find_corresponding_bincl_psymtab (namestring, nlist.n_value);
|
||||||
|
@ -2152,11 +2153,10 @@ read_dbx_symtab (struct objfile *objfile)
|
||||||
case N_DEFD: /* GNU Modula-2 */
|
case N_DEFD: /* GNU Modula-2 */
|
||||||
case N_ALIAS: /* SunPro F77: alias name, ignore for now. */
|
case N_ALIAS: /* SunPro F77: alias name, ignore for now. */
|
||||||
|
|
||||||
case N_OBJ: /* useless types from Solaris */
|
case N_OBJ: /* Useless types from Solaris. */
|
||||||
case N_OPT:
|
case N_OPT:
|
||||||
case N_PATCH:
|
case N_PATCH:
|
||||||
/* These symbols aren't interesting; don't worry about them */
|
/* These symbols aren't interesting; don't worry about them. */
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -2294,7 +2294,7 @@ end_psymtab (struct partial_symtab *pst, char **include_list, int num_includes,
|
||||||
|
|
||||||
if (!gdbarch_sofun_address_maybe_missing (gdbarch))
|
if (!gdbarch_sofun_address_maybe_missing (gdbarch))
|
||||||
;
|
;
|
||||||
/* this test will be true if the last .o file is only data */
|
/* This test will be true if the last .o file is only data. */
|
||||||
else if (textlow_not_set)
|
else if (textlow_not_set)
|
||||||
pst->textlow = pst->texthigh;
|
pst->textlow = pst->texthigh;
|
||||||
else
|
else
|
||||||
|
@ -2312,7 +2312,8 @@ end_psymtab (struct partial_symtab *pst, char **include_list, int num_includes,
|
||||||
if (p1->texthigh == 0 && p1->textlow != 0 && p1 != pst)
|
if (p1->texthigh == 0 && p1->textlow != 0 && p1 != pst)
|
||||||
{
|
{
|
||||||
p1->texthigh = pst->textlow;
|
p1->texthigh = pst->textlow;
|
||||||
/* if this file has only data, then make textlow match texthigh */
|
/* If this file has only data, then make textlow match
|
||||||
|
texthigh. */
|
||||||
if (p1->textlow == 0)
|
if (p1->textlow == 0)
|
||||||
p1->textlow = p1->texthigh;
|
p1->textlow = p1->texthigh;
|
||||||
}
|
}
|
||||||
|
@ -2407,13 +2408,13 @@ dbx_psymtab_to_symtab_1 (struct partial_symtab *pst)
|
||||||
|
|
||||||
if (pst->readin)
|
if (pst->readin)
|
||||||
{
|
{
|
||||||
fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in. \
|
fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in. "
|
||||||
Shouldn't happen.\n",
|
"Shouldn't happen.\n",
|
||||||
pst->filename);
|
pst->filename);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read in all partial symtabs on which this one is dependent */
|
/* Read in all partial symtabs on which this one is dependent. */
|
||||||
for (i = 0; i < pst->number_of_dependencies; i++)
|
for (i = 0; i < pst->number_of_dependencies; i++)
|
||||||
if (!pst->dependencies[i]->readin)
|
if (!pst->dependencies[i]->readin)
|
||||||
{
|
{
|
||||||
|
@ -2425,13 +2426,13 @@ Shouldn't happen.\n",
|
||||||
fputs_filtered ("and ", gdb_stdout);
|
fputs_filtered ("and ", gdb_stdout);
|
||||||
wrap_here ("");
|
wrap_here ("");
|
||||||
printf_filtered ("%s...", pst->dependencies[i]->filename);
|
printf_filtered ("%s...", pst->dependencies[i]->filename);
|
||||||
wrap_here (""); /* Flush output */
|
wrap_here (""); /* Flush output. */
|
||||||
gdb_flush (gdb_stdout);
|
gdb_flush (gdb_stdout);
|
||||||
}
|
}
|
||||||
dbx_psymtab_to_symtab_1 (pst->dependencies[i]);
|
dbx_psymtab_to_symtab_1 (pst->dependencies[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LDSYMLEN (pst)) /* Otherwise it's a dummy */
|
if (LDSYMLEN (pst)) /* Otherwise it's a dummy. */
|
||||||
{
|
{
|
||||||
/* Init stuff necessary for reading in symbols */
|
/* Init stuff necessary for reading in symbols */
|
||||||
stabsread_init ();
|
stabsread_init ();
|
||||||
|
@ -2440,7 +2441,7 @@ Shouldn't happen.\n",
|
||||||
file_string_table_offset = FILE_STRING_OFFSET (pst);
|
file_string_table_offset = FILE_STRING_OFFSET (pst);
|
||||||
symbol_size = SYMBOL_SIZE (pst);
|
symbol_size = SYMBOL_SIZE (pst);
|
||||||
|
|
||||||
/* Read in this file's symbols */
|
/* Read in this file's symbols. */
|
||||||
bfd_seek (pst->objfile->obfd, SYMBOL_OFFSET (pst), SEEK_SET);
|
bfd_seek (pst->objfile->obfd, SYMBOL_OFFSET (pst), SEEK_SET);
|
||||||
read_ofile_symtab (pst);
|
read_ofile_symtab (pst);
|
||||||
|
|
||||||
|
@ -2464,8 +2465,8 @@ dbx_psymtab_to_symtab (struct partial_symtab *pst)
|
||||||
|
|
||||||
if (pst->readin)
|
if (pst->readin)
|
||||||
{
|
{
|
||||||
fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in. \
|
fprintf_unfiltered (gdb_stderr, "Psymtab for %s already read in. "
|
||||||
Shouldn't happen.\n",
|
"Shouldn't happen.\n",
|
||||||
pst->filename);
|
pst->filename);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2547,7 +2548,7 @@ read_ofile_symtab (struct partial_symtab *pst)
|
||||||
last_source_file = NULL;
|
last_source_file = NULL;
|
||||||
|
|
||||||
abfd = objfile->obfd;
|
abfd = objfile->obfd;
|
||||||
symfile_bfd = objfile->obfd; /* Implicit param to next_text_symbol */
|
symfile_bfd = objfile->obfd; /* Implicit param to next_text_symbol. */
|
||||||
symbuf_end = symbuf_idx = 0;
|
symbuf_end = symbuf_idx = 0;
|
||||||
symbuf_read = 0;
|
symbuf_read = 0;
|
||||||
symbuf_left = sym_offset + sym_size;
|
symbuf_left = sym_offset + sym_size;
|
||||||
|
@ -2619,7 +2620,7 @@ read_ofile_symtab (struct partial_symtab *pst)
|
||||||
symnum < max_symnum;
|
symnum < max_symnum;
|
||||||
symnum++)
|
symnum++)
|
||||||
{
|
{
|
||||||
QUIT; /* Allow this to be interruptable */
|
QUIT; /* Allow this to be interruptable. */
|
||||||
if (symbuf_idx == symbuf_end)
|
if (symbuf_idx == symbuf_end)
|
||||||
fill_symbuf (abfd);
|
fill_symbuf (abfd);
|
||||||
bufp = &symbuf[symbuf_idx++];
|
bufp = &symbuf[symbuf_idx++];
|
||||||
|
@ -2953,7 +2954,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
|
||||||
if (previous_stab_code == (unsigned char) N_SO)
|
if (previous_stab_code == (unsigned char) N_SO)
|
||||||
{
|
{
|
||||||
patch_subfile_names (current_subfile, name);
|
patch_subfile_names (current_subfile, name);
|
||||||
break; /* Ignore repeated SOs */
|
break; /* Ignore repeated SOs. */
|
||||||
}
|
}
|
||||||
end_symtab (valu, objfile, SECT_OFF_TEXT (objfile));
|
end_symtab (valu, objfile, SECT_OFF_TEXT (objfile));
|
||||||
end_stabs ();
|
end_stabs ();
|
||||||
|
@ -3506,7 +3507,8 @@ elfstab_build_psymtabs (struct objfile *objfile, asection *stabsect,
|
||||||
STAB_NAME is the name of the section that contains the stabs.
|
STAB_NAME is the name of the section that contains the stabs.
|
||||||
STABSTR_NAME is the name of the section that contains the stab strings.
|
STABSTR_NAME is the name of the section that contains the stab strings.
|
||||||
|
|
||||||
This routine is mostly copied from dbx_symfile_init and dbx_symfile_read. */
|
This routine is mostly copied from dbx_symfile_init and
|
||||||
|
dbx_symfile_read. */
|
||||||
|
|
||||||
void
|
void
|
||||||
stabsect_build_psymtabs (struct objfile *objfile, char *stab_name,
|
stabsect_build_psymtabs (struct objfile *objfile, char *stab_name,
|
||||||
|
@ -3526,8 +3528,8 @@ stabsect_build_psymtabs (struct objfile *objfile, char *stab_name,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!stabstrsect)
|
if (!stabstrsect)
|
||||||
error (_("stabsect_build_psymtabs: Found stabs (%s), but not string \
|
error (_("stabsect_build_psymtabs: Found stabs (%s), "
|
||||||
section (%s)"),
|
"but not string section (%s)"),
|
||||||
stab_name, stabstr_name);
|
stab_name, stabstr_name);
|
||||||
|
|
||||||
objfile->deprecated_sym_stab_info = (struct dbx_symfile_info *)
|
objfile->deprecated_sym_stab_info = (struct dbx_symfile_info *)
|
||||||
|
@ -3574,7 +3576,7 @@ section (%s)"),
|
||||||
free_header_files ();
|
free_header_files ();
|
||||||
init_header_files ();
|
init_header_files ();
|
||||||
|
|
||||||
/* Now, do an incremental load */
|
/* Now, do an incremental load. */
|
||||||
|
|
||||||
processing_acc_compilation = 1;
|
processing_acc_compilation = 1;
|
||||||
dbx_symfile_read (objfile, 0);
|
dbx_symfile_read (objfile, 0);
|
||||||
|
@ -3583,16 +3585,14 @@ section (%s)"),
|
||||||
static const struct sym_fns aout_sym_fns =
|
static const struct sym_fns aout_sym_fns =
|
||||||
{
|
{
|
||||||
bfd_target_aout_flavour,
|
bfd_target_aout_flavour,
|
||||||
dbx_new_init, /* sym_new_init: init anything gbl to entire symtab */
|
dbx_new_init, /* init anything gbl to entire symtab */
|
||||||
dbx_symfile_init, /* sym_init: read initial info, setup for sym_read() */
|
dbx_symfile_init, /* read initial info, setup for sym_read() */
|
||||||
dbx_symfile_read, /* sym_read: read a symbol file into symtab */
|
dbx_symfile_read, /* read a symbol file into symtab */
|
||||||
dbx_symfile_finish, /* sym_finish: finished with file, cleanup */
|
dbx_symfile_finish, /* finished with file, cleanup */
|
||||||
default_symfile_offsets, /* sym_offsets: parse user's offsets to
|
default_symfile_offsets, /* parse user's offsets to internal form */
|
||||||
internal form */
|
default_symfile_segments, /* Get segment information from a file. */
|
||||||
default_symfile_segments, /* sym_segments: Get segment information from
|
NULL,
|
||||||
a file. */
|
default_symfile_relocate, /* Relocate a debug section. */
|
||||||
NULL, /* sym_read_linetable */
|
|
||||||
default_symfile_relocate, /* sym_relocate: Relocate a debug section. */
|
|
||||||
&psym_functions
|
&psym_functions
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
|
|
||||||
struct dcache_block
|
struct dcache_block
|
||||||
{
|
{
|
||||||
/* for least-recently-allocated and free lists */
|
/* For least-recently-allocated and free lists. */
|
||||||
struct dcache_block *prev;
|
struct dcache_block *prev;
|
||||||
struct dcache_block *next;
|
struct dcache_block *next;
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ struct dcache_block
|
||||||
struct dcache_struct
|
struct dcache_struct
|
||||||
{
|
{
|
||||||
splay_tree tree;
|
splay_tree tree;
|
||||||
struct dcache_block *oldest; /* least-recently-allocated list */
|
struct dcache_block *oldest; /* least-recently-allocated list. */
|
||||||
|
|
||||||
/* The free list is maintained identically to OLDEST to simplify
|
/* The free list is maintained identically to OLDEST to simplify
|
||||||
the code: we only need one set of accessors. */
|
the code: we only need one set of accessors. */
|
||||||
|
@ -134,7 +134,7 @@ show_dcache_enabled_p (struct ui_file *file, int from_tty,
|
||||||
fprintf_filtered (file, _("Deprecated remotecache flag is %s.\n"), value);
|
fprintf_filtered (file, _("Deprecated remotecache flag is %s.\n"), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static DCACHE *last_cache; /* Used by info dcache */
|
static DCACHE *last_cache; /* Used by info dcache. */
|
||||||
|
|
||||||
/* Add BLOCK to circular block list BLIST, behind the block at *BLIST.
|
/* Add BLOCK to circular block list BLIST, behind the block at *BLIST.
|
||||||
*BLIST is not updated (unless it was previously NULL of course).
|
*BLIST is not updated (unless it was previously NULL of course).
|
||||||
|
@ -575,7 +575,7 @@ dcache_print_line (int index)
|
||||||
{
|
{
|
||||||
printf_filtered ("%02x ", db->data[j]);
|
printf_filtered ("%02x ", db->data[j]);
|
||||||
|
|
||||||
/* Print a newline every 16 bytes (48 characters) */
|
/* Print a newline every 16 bytes (48 characters). */
|
||||||
if ((j % 16 == 15) && (j != LINE_SIZE - 1))
|
if ((j % 16 == 15) && (j != LINE_SIZE - 1))
|
||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,10 +30,10 @@ void dcache_invalidate (DCACHE *dcache);
|
||||||
/* Initialize DCACHE. */
|
/* Initialize DCACHE. */
|
||||||
DCACHE *dcache_init (void);
|
DCACHE *dcache_init (void);
|
||||||
|
|
||||||
/* Free a DCACHE */
|
/* Free a DCACHE. */
|
||||||
void dcache_free (DCACHE *);
|
void dcache_free (DCACHE *);
|
||||||
|
|
||||||
/* Simple to call from <remote>_xfer_memory */
|
/* Simple to call from <remote>_xfer_memory. */
|
||||||
|
|
||||||
int dcache_xfer_memory (struct target_ops *ops, DCACHE *cache, CORE_ADDR mem,
|
int dcache_xfer_memory (struct target_ops *ops, DCACHE *cache, CORE_ADDR mem,
|
||||||
gdb_byte *my, int len, int should_write);
|
gdb_byte *my, int len, int should_write);
|
||||||
|
|
|
@ -108,7 +108,7 @@ write_clbk (void *caller_context, void *address, void *buffer,
|
||||||
return ESUCCESS;
|
return ESUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get integer regs */
|
/* Get integer regs. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
get_reg_clbk(void *caller_context, pthreadDebugGetRegRtn_t regs,
|
get_reg_clbk(void *caller_context, pthreadDebugGetRegRtn_t regs,
|
||||||
|
@ -120,7 +120,7 @@ get_reg_clbk(void *caller_context, pthreadDebugGetRegRtn_t regs,
|
||||||
return ESUCCESS;
|
return ESUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set integer regs */
|
/* Set integer regs. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
set_reg_clbk(void *caller_context, const pthreadDebugRegs_t *regs,
|
set_reg_clbk(void *caller_context, const pthreadDebugRegs_t *regs,
|
||||||
|
@ -256,7 +256,7 @@ enable_dec_thread (void)
|
||||||
debug ("enable_dec_thread: Thread support enabled.");
|
debug ("enable_dec_thread: Thread support enabled.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Deactivate thread support. Do nothing is thread support is
|
/* Deactivate thread support. Do nothing if thread support is
|
||||||
already inactive. */
|
already inactive. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
13
gdb/defs.h
13
gdb/defs.h
|
@ -145,10 +145,10 @@ typedef bfd_vma CORE_ADDR;
|
||||||
/* Check if a character is one of the commonly used C++ marker characters. */
|
/* Check if a character is one of the commonly used C++ marker characters. */
|
||||||
extern int is_cplus_marker (int);
|
extern int is_cplus_marker (int);
|
||||||
|
|
||||||
/* enable xdb commands if set */
|
/* Enable xdb commands if set. */
|
||||||
extern int xdb_commands;
|
extern int xdb_commands;
|
||||||
|
|
||||||
/* enable dbx commands if set */
|
/* Enable dbx commands if set. */
|
||||||
extern int dbx_commands;
|
extern int dbx_commands;
|
||||||
|
|
||||||
/* System root path, used to find libraries etc. */
|
/* System root path, used to find libraries etc. */
|
||||||
|
@ -708,10 +708,9 @@ struct command_line
|
||||||
enum command_control_type control_type;
|
enum command_control_type control_type;
|
||||||
/* The number of elements in body_list. */
|
/* The number of elements in body_list. */
|
||||||
int body_count;
|
int body_count;
|
||||||
/* For composite commands, the nested lists of
|
/* For composite commands, the nested lists of commands. For
|
||||||
commands. For example, for "if" command this
|
example, for "if" command this will contain the then branch and
|
||||||
will contain the then branch and the else
|
the else branch, if that is available. */
|
||||||
branch, if that is available. */
|
|
||||||
struct command_line **body_list;
|
struct command_line **body_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -841,7 +840,7 @@ typedef struct ptid ptid_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Defaults for system-wide constants (if not defined by xm.h, we fake it).
|
/* Defaults for system-wide constants (if not defined by xm.h, we fake it).
|
||||||
FIXME: Assumes 2's complement arithmetic */
|
FIXME: Assumes 2's complement arithmetic. */
|
||||||
|
|
||||||
#if !defined (UINT_MAX)
|
#if !defined (UINT_MAX)
|
||||||
#define UINT_MAX ((unsigned int)(~0)) /* 0xFFFFFFFF for 32-bits */
|
#define UINT_MAX ((unsigned int)(~0)) /* 0xFFFFFFFF for 32-bits */
|
||||||
|
|
|
@ -81,7 +81,8 @@ dicos_load_module_p (bfd *abfd, int header_size)
|
||||||
storage_needed = bfd_get_symtab_upper_bound (abfd);
|
storage_needed = bfd_get_symtab_upper_bound (abfd);
|
||||||
if (storage_needed < 0)
|
if (storage_needed < 0)
|
||||||
{
|
{
|
||||||
warning (_("Can't read elf symbols from %s: %s"), bfd_get_filename (abfd),
|
warning (_("Can't read elf symbols from %s: %s"),
|
||||||
|
bfd_get_filename (abfd),
|
||||||
bfd_errmsg (bfd_get_error ()));
|
bfd_errmsg (bfd_get_error ()));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,9 +83,7 @@
|
||||||
|
|
||||||
* Define a function dict_<op> that looks up <op> in the dict_vector
|
* Define a function dict_<op> that looks up <op> in the dict_vector
|
||||||
and calls the appropriate function. Add a declaration for
|
and calls the appropriate function. Add a declaration for
|
||||||
dict_<op> to dictionary.h.
|
dict_<op> to dictionary.h. */
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* An enum representing the various implementations of dictionaries.
|
/* An enum representing the various implementations of dictionaries.
|
||||||
Used only for debugging. */
|
Used only for debugging. */
|
||||||
|
|
|
@ -96,10 +96,10 @@ dink32_supply_register (struct regcache *regcache, char *regname,
|
||||||
monitor_supply_register (regcache, regno, val);
|
monitor_supply_register (regcache, regno, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This array of registers needs to match the indexes used by GDB. The
|
/* This array of registers needs to match the indexes used by GDB.
|
||||||
whole reason this exists is because the various ROM monitors use
|
The whole reason this exists is because the various ROM monitors
|
||||||
different names than GDB does, and don't support all the registers
|
use different names than GDB does, and don't support all the
|
||||||
either. */
|
registers either. */
|
||||||
|
|
||||||
static char *dink32_regnames[] =
|
static char *dink32_regnames[] =
|
||||||
{
|
{
|
||||||
|
@ -134,7 +134,11 @@ extern initialize_file_ftype _initialize_dink32_rom; /* -Wmissing-prototypes */
|
||||||
void
|
void
|
||||||
_initialize_dink32_rom (void)
|
_initialize_dink32_rom (void)
|
||||||
{
|
{
|
||||||
dink32_cmds.flags = MO_HEX_PREFIX | MO_GETMEM_NEEDS_RANGE | MO_FILL_USES_ADDR | MO_HANDLE_NL | MO_32_REGS_PAIRED | MO_SETREG_INTERACTIVE | MO_SETMEM_INTERACTIVE | MO_GETMEM_16_BOUNDARY | MO_CLR_BREAK_1_BASED | MO_SREC_ACK | MO_SREC_ACK_ROTATE;
|
dink32_cmds.flags = MO_HEX_PREFIX | MO_GETMEM_NEEDS_RANGE
|
||||||
|
| MO_FILL_USES_ADDR | MO_HANDLE_NL | MO_32_REGS_PAIRED
|
||||||
|
| MO_SETREG_INTERACTIVE | MO_SETMEM_INTERACTIVE
|
||||||
|
| MO_GETMEM_16_BOUNDARY | MO_CLR_BREAK_1_BASED | MO_SREC_ACK
|
||||||
|
| MO_SREC_ACK_ROTATE;
|
||||||
dink32_cmds.init = dink32_inits;
|
dink32_cmds.init = dink32_inits;
|
||||||
dink32_cmds.cont = "go +\r";
|
dink32_cmds.cont = "go +\r";
|
||||||
dink32_cmds.step = "tr +\r";
|
dink32_cmds.step = "tr +\r";
|
||||||
|
|
|
@ -168,6 +168,7 @@ dump_insns (struct gdbarch *gdbarch, struct ui_out *uiout,
|
||||||
function to the user. This means that things are presented
|
function to the user. This means that things are presented
|
||||||
in source order, with (possibly) out of order assembly
|
in source order, with (possibly) out of order assembly
|
||||||
immediately following. */
|
immediately following. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
do_mixed_source_and_assembly (struct gdbarch *gdbarch, struct ui_out *uiout,
|
do_mixed_source_and_assembly (struct gdbarch *gdbarch, struct ui_out *uiout,
|
||||||
struct disassemble_info *di, int nlines,
|
struct disassemble_info *di, int nlines,
|
||||||
|
@ -203,7 +204,7 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch, struct ui_out *uiout,
|
||||||
for (; i < nlines - 1 && le[i].pc < high; i++)
|
for (; i < nlines - 1 && le[i].pc < high; i++)
|
||||||
{
|
{
|
||||||
if (le[i].line == le[i + 1].line && le[i].pc == le[i + 1].pc)
|
if (le[i].line == le[i + 1].line && le[i].pc == le[i + 1].pc)
|
||||||
continue; /* Ignore duplicates */
|
continue; /* Ignore duplicates. */
|
||||||
|
|
||||||
/* Skip any end-of-function markers. */
|
/* Skip any end-of-function markers. */
|
||||||
if (le[i].line == 0)
|
if (le[i].line == 0)
|
||||||
|
@ -389,7 +390,7 @@ gdb_disassembly (struct gdbarch *gdbarch, struct ui_out *uiout,
|
||||||
struct linetable_entry *le = NULL;
|
struct linetable_entry *le = NULL;
|
||||||
int nlines = -1;
|
int nlines = -1;
|
||||||
|
|
||||||
/* Assume symtab is valid for whole PC range */
|
/* Assume symtab is valid for whole PC range. */
|
||||||
symtab = find_pc_symtab (low);
|
symtab = find_pc_symtab (low);
|
||||||
|
|
||||||
if (symtab != NULL && symtab->linetable != NULL)
|
if (symtab != NULL && symtab->linetable != NULL)
|
||||||
|
|
|
@ -104,7 +104,7 @@ get_field (const bfd_byte *data, enum floatformat_byteorders order,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (len < sizeof(result) * FLOATFORMAT_CHAR_BIT)
|
if (len < sizeof(result) * FLOATFORMAT_CHAR_BIT)
|
||||||
/* Mask out bits which are not part of the field */
|
/* Mask out bits which are not part of the field. */
|
||||||
result &= ((1UL << len) - 1);
|
result &= ((1UL << len) - 1);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ convert_floatformat_to_doublest (const struct floatformat *fmt,
|
||||||
unsigned long mant;
|
unsigned long mant;
|
||||||
unsigned int mant_bits, mant_off;
|
unsigned int mant_bits, mant_off;
|
||||||
int mant_bits_left;
|
int mant_bits_left;
|
||||||
int special_exponent; /* It's a NaN, denorm or zero */
|
int special_exponent; /* It's a NaN, denorm or zero. */
|
||||||
enum floatformat_byteorders order;
|
enum floatformat_byteorders order;
|
||||||
unsigned char newfrom[FLOATFORMAT_LARGEST_BYTES];
|
unsigned char newfrom[FLOATFORMAT_LARGEST_BYTES];
|
||||||
enum float_kind kind;
|
enum float_kind kind;
|
||||||
|
@ -233,10 +233,10 @@ convert_floatformat_to_doublest (const struct floatformat *fmt,
|
||||||
|
|
||||||
special_exponent = exponent == 0 || exponent == fmt->exp_nan;
|
special_exponent = exponent == 0 || exponent == fmt->exp_nan;
|
||||||
|
|
||||||
/* Don't bias NaNs. Use minimum exponent for denorms. For simplicity,
|
/* Don't bias NaNs. Use minimum exponent for denorms. For
|
||||||
we don't check for zero as the exponent doesn't matter. Note the cast
|
simplicity, we don't check for zero as the exponent doesn't matter.
|
||||||
to int; exp_bias is unsigned, so it's important to make sure the
|
Note the cast to int; exp_bias is unsigned, so it's important to
|
||||||
operation is done in signed arithmetic. */
|
make sure the operation is done in signed arithmetic. */
|
||||||
if (!special_exponent)
|
if (!special_exponent)
|
||||||
exponent -= fmt->exp_bias;
|
exponent -= fmt->exp_bias;
|
||||||
else if (exponent == 0)
|
else if (exponent == 0)
|
||||||
|
@ -447,7 +447,7 @@ convert_doublest_to_floatformat (CONST struct floatformat *fmt,
|
||||||
/* From is NaN */
|
/* From is NaN */
|
||||||
put_field (uto, order, fmt->totalsize, fmt->exp_start,
|
put_field (uto, order, fmt->totalsize, fmt->exp_start,
|
||||||
fmt->exp_len, fmt->exp_nan);
|
fmt->exp_len, fmt->exp_nan);
|
||||||
/* Be sure it's not infinity, but NaN value is irrel */
|
/* Be sure it's not infinity, but NaN value is irrel. */
|
||||||
put_field (uto, order, fmt->totalsize, fmt->man_start,
|
put_field (uto, order, fmt->totalsize, fmt->man_start,
|
||||||
32, 1);
|
32, 1);
|
||||||
goto finalize_byteorder;
|
goto finalize_byteorder;
|
||||||
|
@ -460,7 +460,7 @@ convert_doublest_to_floatformat (CONST struct floatformat *fmt,
|
||||||
dfrom = -dfrom;
|
dfrom = -dfrom;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dfrom + dfrom == dfrom && dfrom != 0.0) /* Result is Infinity */
|
if (dfrom + dfrom == dfrom && dfrom != 0.0) /* Result is Infinity. */
|
||||||
{
|
{
|
||||||
/* Infinity exponent is same as NaN's. */
|
/* Infinity exponent is same as NaN's. */
|
||||||
put_field (uto, order, fmt->totalsize, fmt->exp_start,
|
put_field (uto, order, fmt->totalsize, fmt->exp_start,
|
||||||
|
|
10
gdb/dsrec.c
10
gdb/dsrec.c
|
@ -135,7 +135,7 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
|
||||||
putchar_unfiltered ('#');
|
putchar_unfiltered ('#');
|
||||||
gdb_flush (gdb_stdout);
|
gdb_flush (gdb_stdout);
|
||||||
}
|
}
|
||||||
} /* Per-packet (or S-record) loop */
|
} /* Per-packet (or S-record) loop. */
|
||||||
|
|
||||||
if (deprecated_ui_load_progress_hook)
|
if (deprecated_ui_load_progress_hook)
|
||||||
if (deprecated_ui_load_progress_hook (section_name,
|
if (deprecated_ui_load_progress_hook (section_name,
|
||||||
|
@ -190,9 +190,9 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
|
||||||
*
|
*
|
||||||
* Where
|
* Where
|
||||||
* - length
|
* - length
|
||||||
* is the number of bytes following upto the checksum. Note that
|
* is the number of bytes following upto the checksum. Note
|
||||||
* this is not the number of chars following, since it takes two
|
* that this is not the number of chars following, since it
|
||||||
* chars to represent a byte.
|
* takes two chars to represent a byte.
|
||||||
* - type
|
* - type
|
||||||
* is one of:
|
* is one of:
|
||||||
* 0) header record
|
* 0) header record
|
||||||
|
@ -267,7 +267,7 @@ make_srec (char *srec, CORE_ADDR targ_addr, bfd *abfd, asection *sect,
|
||||||
bfd_get_section_contents (abfd, sect, binbuf, sectoff, payload_size);
|
bfd_get_section_contents (abfd, sect, binbuf, sectoff, payload_size);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
payload_size = 0; /* Term or header packets have no payload */
|
payload_size = 0; /* Term or header packets have no payload. */
|
||||||
|
|
||||||
/* Output the header. */
|
/* Output the header. */
|
||||||
snprintf (srec, (*maxrecsize) + 1, "S%c%02X%0*X",
|
snprintf (srec, (*maxrecsize) + 1, "S%c%02X%0*X",
|
||||||
|
|
|
@ -121,7 +121,7 @@ pop_dummy_frame (struct dummy_frame **dummy_ptr)
|
||||||
restore_infcall_suspend_state ((*dummy_ptr)->caller_state);
|
restore_infcall_suspend_state ((*dummy_ptr)->caller_state);
|
||||||
|
|
||||||
/* restore_infcall_control_state frees inf_state,
|
/* restore_infcall_control_state frees inf_state,
|
||||||
all that remains is to pop *dummy_ptr */
|
all that remains is to pop *dummy_ptr. */
|
||||||
dummy = *dummy_ptr;
|
dummy = *dummy_ptr;
|
||||||
*dummy_ptr = dummy->next;
|
*dummy_ptr = dummy->next;
|
||||||
xfree (dummy);
|
xfree (dummy);
|
||||||
|
|
|
@ -671,7 +671,8 @@ execute_stack_op (struct dwarf_expr_context *ctx,
|
||||||
struct dwarf_stack_value t1, t2, t3;
|
struct dwarf_stack_value t1, t2, t3;
|
||||||
|
|
||||||
if (ctx->stack_len < 3)
|
if (ctx->stack_len < 3)
|
||||||
error (_("Not enough elements for DW_OP_rot. Need 3, have %d."),
|
error (_("Not enough elements for "
|
||||||
|
"DW_OP_rot. Need 3, have %d."),
|
||||||
ctx->stack_len);
|
ctx->stack_len);
|
||||||
t1 = ctx->stack[ctx->stack_len - 1];
|
t1 = ctx->stack[ctx->stack_len - 1];
|
||||||
t2 = ctx->stack[ctx->stack_len - 2];
|
t2 = ctx->stack[ctx->stack_len - 2];
|
||||||
|
|
|
@ -2237,9 +2237,9 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream,
|
||||||
as the size of an address on the target machine (here is 8
|
as the size of an address on the target machine (here is 8
|
||||||
bytes). Note that more recent version of GCC emit DW_OP_const4u
|
bytes). Note that more recent version of GCC emit DW_OP_const4u
|
||||||
or DW_OP_const8u, depending on address size, rather than
|
or DW_OP_const8u, depending on address size, rather than
|
||||||
DW_OP_addr. 0xe0 is the encoding for
|
DW_OP_addr. 0xe0 is the encoding for DW_OP_GNU_push_tls_address.
|
||||||
DW_OP_GNU_push_tls_address. The operand represents the offset at
|
The operand represents the offset at which the variable is within
|
||||||
which the variable is within the thread local storage. */
|
the thread local storage. */
|
||||||
|
|
||||||
else if (data + 1 + addr_size < end
|
else if (data + 1 + addr_size < end
|
||||||
&& (data[0] == DW_OP_addr
|
&& (data[0] == DW_OP_addr
|
||||||
|
|
|
@ -464,11 +464,11 @@ struct signatured_type
|
||||||
struct dwarf2_per_cu_data per_cu;
|
struct dwarf2_per_cu_data per_cu;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Struct used to pass misc. parameters to read_die_and_children, et. al.
|
/* Struct used to pass misc. parameters to read_die_and_children, et
|
||||||
which are used for both .debug_info and .debug_types dies.
|
al. which are used for both .debug_info and .debug_types dies.
|
||||||
All parameters here are unchanging for the life of the call.
|
All parameters here are unchanging for the life of the call. This
|
||||||
This struct exists to abstract away the constant parameters of
|
struct exists to abstract away the constant parameters of die
|
||||||
die reading. */
|
reading. */
|
||||||
|
|
||||||
struct die_reader_specs
|
struct die_reader_specs
|
||||||
{
|
{
|
||||||
|
@ -613,7 +613,7 @@ struct attr_abbrev
|
||||||
ENUM_BITFIELD(dwarf_form) form : 16;
|
ENUM_BITFIELD(dwarf_form) form : 16;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Attributes have a name and a value */
|
/* Attributes have a name and a value. */
|
||||||
struct attribute
|
struct attribute
|
||||||
{
|
{
|
||||||
ENUM_BITFIELD(dwarf_attribute) name : 16;
|
ENUM_BITFIELD(dwarf_attribute) name : 16;
|
||||||
|
@ -677,7 +677,7 @@ struct function_range
|
||||||
struct function_range *next;
|
struct function_range *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Get at parts of an attribute structure */
|
/* Get at parts of an attribute structure. */
|
||||||
|
|
||||||
#define DW_STRING(attr) ((attr)->u.str)
|
#define DW_STRING(attr) ((attr)->u.str)
|
||||||
#define DW_STRING_IS_CANONICAL(attr) ((attr)->string_is_canonical)
|
#define DW_STRING_IS_CANONICAL(attr) ((attr)->string_is_canonical)
|
||||||
|
@ -793,7 +793,7 @@ show_dwarf2_max_cache_age (struct ui_file *file, int from_tty,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Various complaints about symbol reading that don't abort the process */
|
/* Various complaints about symbol reading that don't abort the process. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dwarf2_statement_list_fits_in_line_number_section_complaint (void)
|
dwarf2_statement_list_fits_in_line_number_section_complaint (void)
|
||||||
|
@ -3241,7 +3241,7 @@ process_psymtab_comp_unit (struct objfile *objfile,
|
||||||
|
|
||||||
baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
baseaddr = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
||||||
|
|
||||||
/* Store the function that reads in the rest of the symbol table */
|
/* Store the function that reads in the rest of the symbol table. */
|
||||||
pst->read_symtab = dwarf2_psymtab_to_symtab;
|
pst->read_symtab = dwarf2_psymtab_to_symtab;
|
||||||
|
|
||||||
this_cu->v.psymtab = pst;
|
this_cu->v.psymtab = pst;
|
||||||
|
@ -4409,7 +4409,7 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
|
||||||
fputs_filtered ("and ", gdb_stdout);
|
fputs_filtered ("and ", gdb_stdout);
|
||||||
wrap_here ("");
|
wrap_here ("");
|
||||||
printf_filtered ("%s...", pst->dependencies[i]->filename);
|
printf_filtered ("%s...", pst->dependencies[i]->filename);
|
||||||
wrap_here (""); /* Flush output */
|
wrap_here (""); /* Flush output. */
|
||||||
gdb_flush (gdb_stdout);
|
gdb_flush (gdb_stdout);
|
||||||
}
|
}
|
||||||
psymtab_to_symtab_1 (pst->dependencies[i]);
|
psymtab_to_symtab_1 (pst->dependencies[i]);
|
||||||
|
@ -6597,9 +6597,9 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
|
||||||
/* Handle static member functions.
|
/* Handle static member functions.
|
||||||
Dwarf2 has no clean way to discern C++ static and non-static
|
Dwarf2 has no clean way to discern C++ static and non-static
|
||||||
member functions. G++ helps GDB by marking the first
|
member functions. G++ helps GDB by marking the first
|
||||||
parameter for non-static member functions (which is the
|
parameter for non-static member functions (which is the this
|
||||||
this pointer) as artificial. We obtain this information
|
pointer) as artificial. We obtain this information from
|
||||||
from read_subroutine_type via TYPE_FIELD_ARTIFICIAL. */
|
read_subroutine_type via TYPE_FIELD_ARTIFICIAL. */
|
||||||
if (nparams == 0 || TYPE_FIELD_ARTIFICIAL (this_type, 0) == 0)
|
if (nparams == 0 || TYPE_FIELD_ARTIFICIAL (this_type, 0) == 0)
|
||||||
fnp->voffset = VOFFSET_STATIC;
|
fnp->voffset = VOFFSET_STATIC;
|
||||||
}
|
}
|
||||||
|
@ -7307,8 +7307,8 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
|
|
||||||
if (child_type != NULL)
|
if (child_type != NULL)
|
||||||
{
|
{
|
||||||
/* The range type was succesfully read. Save it for
|
/* The range type was succesfully read. Save it for the
|
||||||
the array type creation. */
|
array type creation. */
|
||||||
if ((ndim % DW_FIELD_ALLOC_CHUNK) == 0)
|
if ((ndim % DW_FIELD_ALLOC_CHUNK) == 0)
|
||||||
{
|
{
|
||||||
range_types = (struct type **)
|
range_types = (struct type **)
|
||||||
|
@ -7389,14 +7389,12 @@ read_array_order (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
|
|
||||||
if (attr) return DW_SND (attr);
|
if (attr) return DW_SND (attr);
|
||||||
|
|
||||||
/*
|
/* GNU F77 is a special case, as at 08/2004 array type info is the
|
||||||
GNU F77 is a special case, as at 08/2004 array type info is the
|
|
||||||
opposite order to the dwarf2 specification, but data is still
|
opposite order to the dwarf2 specification, but data is still
|
||||||
laid out as per normal fortran.
|
laid out as per normal fortran.
|
||||||
|
|
||||||
FIXME: dsl/2004-8-20: If G77 is ever fixed, this will also need
|
FIXME: dsl/2004-8-20: If G77 is ever fixed, this will also need
|
||||||
version checking.
|
version checking. */
|
||||||
*/
|
|
||||||
|
|
||||||
if (cu->language == language_fortran
|
if (cu->language == language_fortran
|
||||||
&& cu->producer && strstr (cu->producer, "GNU F77"))
|
&& cu->producer && strstr (cu->producer, "GNU F77"))
|
||||||
|
@ -7452,7 +7450,7 @@ read_common_block (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
attr = dwarf2_attr (die, DW_AT_location, cu);
|
attr = dwarf2_attr (die, DW_AT_location, cu);
|
||||||
if (attr)
|
if (attr)
|
||||||
{
|
{
|
||||||
/* Support the .debug_loc offsets */
|
/* Support the .debug_loc offsets. */
|
||||||
if (attr_form_is_block (attr))
|
if (attr_form_is_block (attr))
|
||||||
{
|
{
|
||||||
base = decode_locdesc (DW_BLOCK (attr), cu);
|
base = decode_locdesc (DW_BLOCK (attr), cu);
|
||||||
|
@ -7844,7 +7842,7 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* check for the DW_AT_byte_size attribute */
|
/* Check for the DW_AT_byte_size attribute. */
|
||||||
attr = dwarf2_attr (die, DW_AT_byte_size, cu);
|
attr = dwarf2_attr (die, DW_AT_byte_size, cu);
|
||||||
if (attr)
|
if (attr)
|
||||||
{
|
{
|
||||||
|
@ -7872,14 +7870,13 @@ read_tag_string_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
int b;
|
int b;
|
||||||
};
|
};
|
||||||
|
|
||||||
('funcp' generates a DW_TAG_subroutine_type DIE)
|
('funcp' generates a DW_TAG_subroutine_type DIE). */
|
||||||
*/
|
|
||||||
|
|
||||||
static struct type *
|
static struct type *
|
||||||
read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu)
|
read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
{
|
{
|
||||||
struct type *type; /* Type that this function returns */
|
struct type *type; /* Type that this function returns. */
|
||||||
struct type *ftype; /* Function that returns above type */
|
struct type *ftype; /* Function that returns above type. */
|
||||||
struct attribute *attr;
|
struct attribute *attr;
|
||||||
|
|
||||||
type = die_type (die, cu);
|
type = die_type (die, cu);
|
||||||
|
@ -8208,8 +8205,7 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu)
|
||||||
For the following C code: `extern char gdb_int [];'
|
For the following C code: `extern char gdb_int [];'
|
||||||
GCC produces an empty range DIE.
|
GCC produces an empty range DIE.
|
||||||
FIXME: muller/2010-05-28: Possible references to object for low bound,
|
FIXME: muller/2010-05-28: Possible references to object for low bound,
|
||||||
high bound or count are not yet handled by this code.
|
high bound or count are not yet handled by this code. */
|
||||||
*/
|
|
||||||
if (TYPE_CODE (base_type) == TYPE_CODE_VOID)
|
if (TYPE_CODE (base_type) == TYPE_CODE_VOID)
|
||||||
{
|
{
|
||||||
struct objfile *objfile = cu->objfile;
|
struct objfile *objfile = cu->objfile;
|
||||||
|
@ -8506,7 +8502,7 @@ dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu)
|
||||||
struct attr_abbrev *cur_attrs;
|
struct attr_abbrev *cur_attrs;
|
||||||
unsigned int allocated_attrs;
|
unsigned int allocated_attrs;
|
||||||
|
|
||||||
/* Initialize dwarf2 abbrevs */
|
/* Initialize dwarf2 abbrevs. */
|
||||||
obstack_init (&cu->abbrev_obstack);
|
obstack_init (&cu->abbrev_obstack);
|
||||||
cu->dwarf2_abbrevs = obstack_alloc (&cu->abbrev_obstack,
|
cu->dwarf2_abbrevs = obstack_alloc (&cu->abbrev_obstack,
|
||||||
(ABBREV_HASH_SIZE
|
(ABBREV_HASH_SIZE
|
||||||
|
@ -8523,7 +8519,7 @@ dwarf2_read_abbrevs (bfd *abfd, struct dwarf2_cu *cu)
|
||||||
allocated_attrs = ATTR_ALLOC_CHUNK;
|
allocated_attrs = ATTR_ALLOC_CHUNK;
|
||||||
cur_attrs = xmalloc (allocated_attrs * sizeof (struct attr_abbrev));
|
cur_attrs = xmalloc (allocated_attrs * sizeof (struct attr_abbrev));
|
||||||
|
|
||||||
/* loop until we reach an abbrev number of 0 */
|
/* Loop until we reach an abbrev number of 0. */
|
||||||
while (abbrev_number)
|
while (abbrev_number)
|
||||||
{
|
{
|
||||||
cur_abbrev = dwarf_alloc_abbrev (cu);
|
cur_abbrev = dwarf_alloc_abbrev (cu);
|
||||||
|
@ -8996,7 +8992,7 @@ read_partial_die (struct partial_die_info *part_die,
|
||||||
part_die->highpc = DW_ADDR (&attr);
|
part_die->highpc = DW_ADDR (&attr);
|
||||||
break;
|
break;
|
||||||
case DW_AT_location:
|
case DW_AT_location:
|
||||||
/* Support the .debug_loc offsets */
|
/* Support the .debug_loc offsets. */
|
||||||
if (attr_form_is_block (&attr))
|
if (attr_form_is_block (&attr))
|
||||||
{
|
{
|
||||||
part_die->locdesc = DW_BLOCK (&attr);
|
part_die->locdesc = DW_BLOCK (&attr);
|
||||||
|
@ -9459,7 +9455,7 @@ read_attribute (struct attribute *attr, struct attr_abbrev *abbrev,
|
||||||
return read_attribute_value (attr, abbrev->form, abfd, info_ptr, cu);
|
return read_attribute_value (attr, abbrev->form, abfd, info_ptr, cu);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read dwarf information from a buffer */
|
/* Read dwarf information from a buffer. */
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
read_1_byte (bfd *abfd, gdb_byte *buf)
|
read_1_byte (bfd *abfd, gdb_byte *buf)
|
||||||
|
@ -10864,9 +10860,9 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
|
||||||
case DW_TAG_constant:
|
case DW_TAG_constant:
|
||||||
case DW_TAG_variable:
|
case DW_TAG_variable:
|
||||||
case DW_TAG_member:
|
case DW_TAG_member:
|
||||||
/* Compilation with minimal debug info may result in variables
|
/* Compilation with minimal debug info may result in
|
||||||
with missing type entries. Change the misleading `void' type
|
variables with missing type entries. Change the
|
||||||
to something sensible. */
|
misleading `void' type to something sensible. */
|
||||||
if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_VOID)
|
if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_VOID)
|
||||||
SYMBOL_TYPE (sym)
|
SYMBOL_TYPE (sym)
|
||||||
= objfile_type (objfile)->nodebug_data_symbol;
|
= objfile_type (objfile)->nodebug_data_symbol;
|
||||||
|
@ -13003,8 +12999,8 @@ dump_die_shallow (struct ui_file *f, int indent, struct die_info *die)
|
||||||
fprintf_unfiltered (f, "flag: TRUE");
|
fprintf_unfiltered (f, "flag: TRUE");
|
||||||
break;
|
break;
|
||||||
case DW_FORM_indirect:
|
case DW_FORM_indirect:
|
||||||
/* the reader will have reduced the indirect form to
|
/* The reader will have reduced the indirect form to
|
||||||
the "base form" so this form should not occur */
|
the "base form" so this form should not occur. */
|
||||||
fprintf_unfiltered (f,
|
fprintf_unfiltered (f,
|
||||||
"unexpected attribute form: DW_FORM_indirect");
|
"unexpected attribute form: DW_FORM_indirect");
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -152,7 +152,7 @@ elf_symfile_segments (bfd *abfd)
|
||||||
|
|
||||||
FIXME: The section names should not be hardwired strings (what
|
FIXME: The section names should not be hardwired strings (what
|
||||||
should they be? I don't think most object file formats have enough
|
should they be? I don't think most object file formats have enough
|
||||||
section flags to specify what kind of debug section it is
|
section flags to specify what kind of debug section it is.
|
||||||
-kingdon). */
|
-kingdon). */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -759,7 +759,7 @@ elf_symfile_read (struct objfile *objfile, int symfile_flags)
|
||||||
|
|
||||||
memset ((char *) &ei, 0, sizeof (ei));
|
memset ((char *) &ei, 0, sizeof (ei));
|
||||||
|
|
||||||
/* Allocate struct to keep track of the symfile */
|
/* Allocate struct to keep track of the symfile. */
|
||||||
objfile->deprecated_sym_stab_info = (struct dbx_symfile_info *)
|
objfile->deprecated_sym_stab_info = (struct dbx_symfile_info *)
|
||||||
xmalloc (sizeof (struct dbx_symfile_info));
|
xmalloc (sizeof (struct dbx_symfile_info));
|
||||||
memset ((char *) objfile->deprecated_sym_stab_info,
|
memset ((char *) objfile->deprecated_sym_stab_info,
|
||||||
|
|
98
gdb/eval.c
98
gdb/eval.c
|
@ -27,8 +27,8 @@
|
||||||
#include "expression.h"
|
#include "expression.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "language.h" /* For CAST_IS_CONVERSION */
|
#include "language.h" /* For CAST_IS_CONVERSION. */
|
||||||
#include "f-lang.h" /* for array bound stuff */
|
#include "f-lang.h" /* For array bound stuff. */
|
||||||
#include "cp-abi.h"
|
#include "cp-abi.h"
|
||||||
#include "infcall.h"
|
#include "infcall.h"
|
||||||
#include "objc-lang.h"
|
#include "objc-lang.h"
|
||||||
|
@ -110,7 +110,7 @@ parse_and_eval_address_1 (char **expptr)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Like parse_and_eval_address, but treats the value of the expression
|
/* Like parse_and_eval_address, but treats the value of the expression
|
||||||
as an integer, not an address, returns a LONGEST, not a CORE_ADDR */
|
as an integer, not an address, returns a LONGEST, not a CORE_ADDR. */
|
||||||
LONGEST
|
LONGEST
|
||||||
parse_and_eval_long (char *exp)
|
parse_and_eval_long (char *exp)
|
||||||
{
|
{
|
||||||
|
@ -1004,7 +1004,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (index > high_bound)
|
if (index > high_bound)
|
||||||
/* to avoid memory corruption */
|
/* To avoid memory corruption. */
|
||||||
error (_("Too many array elements"));
|
error (_("Too many array elements"));
|
||||||
memcpy (value_contents_raw (array)
|
memcpy (value_contents_raw (array)
|
||||||
+ (index - low_bound) * element_size,
|
+ (index - low_bound) * element_size,
|
||||||
|
@ -1025,7 +1025,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
struct type *check_type = element_type;
|
struct type *check_type = element_type;
|
||||||
LONGEST low_bound, high_bound;
|
LONGEST low_bound, high_bound;
|
||||||
|
|
||||||
/* get targettype of elementtype */
|
/* Get targettype of elementtype. */
|
||||||
while (TYPE_CODE (check_type) == TYPE_CODE_RANGE
|
while (TYPE_CODE (check_type) == TYPE_CODE_RANGE
|
||||||
|| TYPE_CODE (check_type) == TYPE_CODE_TYPEDEF)
|
|| TYPE_CODE (check_type) == TYPE_CODE_TYPEDEF)
|
||||||
check_type = TYPE_TARGET_TYPE (check_type);
|
check_type = TYPE_TARGET_TYPE (check_type);
|
||||||
|
@ -1055,9 +1055,9 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
range_low_type = range_high_type = value_type (elem_val);
|
range_low_type = range_high_type = value_type (elem_val);
|
||||||
range_low = range_high = value_as_long (elem_val);
|
range_low = range_high = value_as_long (elem_val);
|
||||||
}
|
}
|
||||||
/* check types of elements to avoid mixture of elements from
|
/* Check types of elements to avoid mixture of elements from
|
||||||
different types. Also check if type of element is "compatible"
|
different types. Also check if type of element is "compatible"
|
||||||
with element type of powerset */
|
with element type of powerset. */
|
||||||
if (TYPE_CODE (range_low_type) == TYPE_CODE_RANGE)
|
if (TYPE_CODE (range_low_type) == TYPE_CODE_RANGE)
|
||||||
range_low_type = TYPE_TARGET_TYPE (range_low_type);
|
range_low_type = TYPE_TARGET_TYPE (range_low_type);
|
||||||
if (TYPE_CODE (range_high_type) == TYPE_CODE_RANGE)
|
if (TYPE_CODE (range_high_type) == TYPE_CODE_RANGE)
|
||||||
|
@ -1065,7 +1065,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
if ((TYPE_CODE (range_low_type) != TYPE_CODE (range_high_type))
|
if ((TYPE_CODE (range_low_type) != TYPE_CODE (range_high_type))
|
||||||
|| (TYPE_CODE (range_low_type) == TYPE_CODE_ENUM
|
|| (TYPE_CODE (range_low_type) == TYPE_CODE_ENUM
|
||||||
&& (range_low_type != range_high_type)))
|
&& (range_low_type != range_high_type)))
|
||||||
/* different element modes */
|
/* different element modes. */
|
||||||
error (_("POWERSET tuple elements of different mode"));
|
error (_("POWERSET tuple elements of different mode"));
|
||||||
if ((TYPE_CODE (check_type) != TYPE_CODE (range_low_type))
|
if ((TYPE_CODE (check_type) != TYPE_CODE (range_low_type))
|
||||||
|| (TYPE_CODE (check_type) == TYPE_CODE_ENUM
|
|| (TYPE_CODE (check_type) == TYPE_CODE_ENUM
|
||||||
|
@ -1096,7 +1096,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
argvec = (struct value **) alloca (sizeof (struct value *) * nargs);
|
argvec = (struct value **) alloca (sizeof (struct value *) * nargs);
|
||||||
for (tem = 0; tem < nargs; tem++)
|
for (tem = 0; tem < nargs; tem++)
|
||||||
{
|
{
|
||||||
/* Ensure that array expressions are coerced into pointer objects. */
|
/* Ensure that array expressions are coerced into pointer
|
||||||
|
objects. */
|
||||||
argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside);
|
argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside);
|
||||||
}
|
}
|
||||||
if (noside == EVAL_SKIP)
|
if (noside == EVAL_SKIP)
|
||||||
|
@ -1236,7 +1237,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg_send = find_function_in_inferior ("objc_msgSend", NULL);
|
msg_send = find_function_in_inferior ("objc_msgSend", NULL);
|
||||||
/* Special dispatcher for methods returning structs */
|
/* Special dispatcher for methods returning structs. */
|
||||||
msg_send_stret
|
msg_send_stret
|
||||||
= find_function_in_inferior ("objc_msgSend_stret", NULL);
|
= find_function_in_inferior ("objc_msgSend_stret", NULL);
|
||||||
}
|
}
|
||||||
|
@ -1456,13 +1457,13 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
op = exp->elts[*pos].opcode;
|
op = exp->elts[*pos].opcode;
|
||||||
nargs = longest_to_int (exp->elts[pc + 1].longconst);
|
nargs = longest_to_int (exp->elts[pc + 1].longconst);
|
||||||
/* Allocate arg vector, including space for the function to be
|
/* Allocate arg vector, including space for the function to be
|
||||||
called in argvec[0] and a terminating NULL */
|
called in argvec[0] and a terminating NULL. */
|
||||||
argvec = (struct value **)
|
argvec = (struct value **)
|
||||||
alloca (sizeof (struct value *) * (nargs + 3));
|
alloca (sizeof (struct value *) * (nargs + 3));
|
||||||
if (op == STRUCTOP_MEMBER || op == STRUCTOP_MPTR)
|
if (op == STRUCTOP_MEMBER || op == STRUCTOP_MPTR)
|
||||||
{
|
{
|
||||||
nargs++;
|
nargs++;
|
||||||
/* First, evaluate the structure into arg2 */
|
/* First, evaluate the structure into arg2. */
|
||||||
pc2 = (*pos)++;
|
pc2 = (*pos)++;
|
||||||
|
|
||||||
if (noside == EVAL_SKIP)
|
if (noside == EVAL_SKIP)
|
||||||
|
@ -1499,16 +1500,16 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
else
|
else
|
||||||
arg1 = cplus_method_ptr_to_value (&arg2, arg1);
|
arg1 = cplus_method_ptr_to_value (&arg2, arg1);
|
||||||
|
|
||||||
/* Now, say which argument to start evaluating from */
|
/* Now, say which argument to start evaluating from. */
|
||||||
tem = 2;
|
tem = 2;
|
||||||
}
|
}
|
||||||
else if (op == STRUCTOP_STRUCT || op == STRUCTOP_PTR)
|
else if (op == STRUCTOP_STRUCT || op == STRUCTOP_PTR)
|
||||||
{
|
{
|
||||||
/* Hair for method invocations */
|
/* Hair for method invocations. */
|
||||||
int tem2;
|
int tem2;
|
||||||
|
|
||||||
nargs++;
|
nargs++;
|
||||||
/* First, evaluate the structure into arg2 */
|
/* First, evaluate the structure into arg2. */
|
||||||
pc2 = (*pos)++;
|
pc2 = (*pos)++;
|
||||||
tem2 = longest_to_int (exp->elts[pc2 + 1].longconst);
|
tem2 = longest_to_int (exp->elts[pc2 + 1].longconst);
|
||||||
*pos += 3 + BYTES_TO_EXP_ELEM (tem2 + 1);
|
*pos += 3 + BYTES_TO_EXP_ELEM (tem2 + 1);
|
||||||
|
@ -1560,7 +1561,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
arg2 = value;
|
arg2 = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Now, say which argument to start evaluating from */
|
/* Now, say which argument to start evaluating from. */
|
||||||
tem = 2;
|
tem = 2;
|
||||||
}
|
}
|
||||||
else if (op == OP_SCOPE
|
else if (op == OP_SCOPE
|
||||||
|
@ -1617,7 +1618,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Non-method function call */
|
/* Non-method function call. */
|
||||||
save_pos1 = *pos;
|
save_pos1 = *pos;
|
||||||
tem = 1;
|
tem = 1;
|
||||||
|
|
||||||
|
@ -1647,14 +1648,15 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Evaluate arguments */
|
/* Evaluate arguments. */
|
||||||
for (; tem <= nargs; tem++)
|
for (; tem <= nargs; tem++)
|
||||||
{
|
{
|
||||||
/* Ensure that array expressions are coerced into pointer objects. */
|
/* Ensure that array expressions are coerced into pointer
|
||||||
|
objects. */
|
||||||
argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside);
|
argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* signal end of arglist */
|
/* Signal end of arglist. */
|
||||||
argvec[tem] = 0;
|
argvec[tem] = 0;
|
||||||
if (op == OP_ADL_FUNC)
|
if (op == OP_ADL_FUNC)
|
||||||
{
|
{
|
||||||
|
@ -1668,7 +1670,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
func_name = (char *) alloca (name_len + 1);
|
func_name = (char *) alloca (name_len + 1);
|
||||||
strcpy (func_name, &exp->elts[string_pc + 1].string);
|
strcpy (func_name, &exp->elts[string_pc + 1].string);
|
||||||
|
|
||||||
/* Prepare list of argument types for overload resolution */
|
/* Prepare list of argument types for overload resolution. */
|
||||||
arg_types = (struct type **)
|
arg_types = (struct type **)
|
||||||
alloca (nargs * (sizeof (struct type *)));
|
alloca (nargs * (sizeof (struct type *)));
|
||||||
for (ix = 1; ix <= nargs; ix++)
|
for (ix = 1; ix <= nargs; ix++)
|
||||||
|
@ -1692,12 +1694,12 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
int static_memfuncp;
|
int static_memfuncp;
|
||||||
char *tstr;
|
char *tstr;
|
||||||
|
|
||||||
/* Method invocation : stuff "this" as first parameter */
|
/* Method invocation : stuff "this" as first parameter. */
|
||||||
argvec[1] = arg2;
|
argvec[1] = arg2;
|
||||||
|
|
||||||
if (op != OP_SCOPE)
|
if (op != OP_SCOPE)
|
||||||
{
|
{
|
||||||
/* Name of method from expression */
|
/* Name of method from expression. */
|
||||||
tstr = &exp->elts[pc2 + 2].string;
|
tstr = &exp->elts[pc2 + 2].string;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1707,10 +1709,10 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
== language_cplus))
|
== language_cplus))
|
||||||
{
|
{
|
||||||
/* Language is C++, do some overload resolution before
|
/* Language is C++, do some overload resolution before
|
||||||
evaluation */
|
evaluation. */
|
||||||
struct value *valp = NULL;
|
struct value *valp = NULL;
|
||||||
|
|
||||||
/* Prepare list of argument types for overload resolution */
|
/* Prepare list of argument types for overload resolution. */
|
||||||
arg_types = (struct type **)
|
arg_types = (struct type **)
|
||||||
alloca (nargs * (sizeof (struct type *)));
|
alloca (nargs * (sizeof (struct type *)));
|
||||||
for (ix = 1; ix <= nargs; ix++)
|
for (ix = 1; ix <= nargs; ix++)
|
||||||
|
@ -1731,11 +1733,11 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
function_name);
|
function_name);
|
||||||
}
|
}
|
||||||
argvec[1] = arg2; /* the ``this'' pointer */
|
argvec[1] = arg2; /* the ``this'' pointer */
|
||||||
argvec[0] = valp; /* use the method found after overload
|
argvec[0] = valp; /* Use the method found after overload
|
||||||
resolution */
|
resolution. */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* Non-C++ case -- or no overload resolution */
|
/* Non-C++ case -- or no overload resolution. */
|
||||||
{
|
{
|
||||||
struct value *temp = arg2;
|
struct value *temp = arg2;
|
||||||
|
|
||||||
|
@ -1767,16 +1769,16 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
}
|
}
|
||||||
else if (op == OP_VAR_VALUE || (op == OP_SCOPE && function != NULL))
|
else if (op == OP_VAR_VALUE || (op == OP_SCOPE && function != NULL))
|
||||||
{
|
{
|
||||||
/* Non-member function being called */
|
/* Non-member function being called. */
|
||||||
/* fn: This can only be done for C++ functions. A C-style function
|
/* fn: This can only be done for C++ functions. A C-style function
|
||||||
in a C++ program, for instance, does not have the fields that
|
in a C++ program, for instance, does not have the fields that
|
||||||
are expected here */
|
are expected here. */
|
||||||
|
|
||||||
if (overload_resolution && (exp->language_defn->la_language
|
if (overload_resolution && (exp->language_defn->la_language
|
||||||
== language_cplus))
|
== language_cplus))
|
||||||
{
|
{
|
||||||
/* Language is C++, do some overload resolution before
|
/* Language is C++, do some overload resolution before
|
||||||
evaluation */
|
evaluation. */
|
||||||
struct symbol *symp;
|
struct symbol *symp;
|
||||||
int no_adl = 0;
|
int no_adl = 0;
|
||||||
|
|
||||||
|
@ -1787,7 +1789,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
if (op == OP_VAR_VALUE)
|
if (op == OP_VAR_VALUE)
|
||||||
function = exp->elts[save_pos1+2].symbol;
|
function = exp->elts[save_pos1+2].symbol;
|
||||||
|
|
||||||
/* Prepare list of argument types for overload resolution */
|
/* Prepare list of argument types for overload resolution. */
|
||||||
arg_types = (struct type **)
|
arg_types = (struct type **)
|
||||||
alloca (nargs * (sizeof (struct type *)));
|
alloca (nargs * (sizeof (struct type *)));
|
||||||
for (ix = 1; ix <= nargs; ix++)
|
for (ix = 1; ix <= nargs; ix++)
|
||||||
|
@ -1802,7 +1804,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
|
|
||||||
if (op == OP_VAR_VALUE)
|
if (op == OP_VAR_VALUE)
|
||||||
{
|
{
|
||||||
/* Now fix the expression being evaluated */
|
/* Now fix the expression being evaluated. */
|
||||||
exp->elts[save_pos1+2].symbol = symp;
|
exp->elts[save_pos1+2].symbol = symp;
|
||||||
argvec[0] = evaluate_subexp_with_coercion (exp, &save_pos1,
|
argvec[0] = evaluate_subexp_with_coercion (exp, &save_pos1,
|
||||||
noside);
|
noside);
|
||||||
|
@ -1812,14 +1814,14 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Not C++, or no overload resolution allowed */
|
/* Not C++, or no overload resolution allowed. */
|
||||||
/* nothing to be done; argvec already correctly set up */
|
/* Nothing to be done; argvec already correctly set up. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* It is probably a C-style function */
|
/* It is probably a C-style function. */
|
||||||
/* nothing to be done; argvec already correctly set up */
|
/* Nothing to be done; argvec already correctly set up. */
|
||||||
}
|
}
|
||||||
|
|
||||||
do_call_it:
|
do_call_it:
|
||||||
|
@ -1917,7 +1919,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
case TYPE_CODE_FUNC:
|
case TYPE_CODE_FUNC:
|
||||||
/* It's a function call. */
|
/* It's a function call. */
|
||||||
/* Allocate arg vector, including space for the function to be
|
/* Allocate arg vector, including space for the function to be
|
||||||
called in argvec[0] and a terminating NULL */
|
called in argvec[0] and a terminating NULL. */
|
||||||
argvec = (struct value **)
|
argvec = (struct value **)
|
||||||
alloca (sizeof (struct value *) * (nargs + 2));
|
alloca (sizeof (struct value *) * (nargs + 2));
|
||||||
argvec[0] = arg1;
|
argvec[0] = arg1;
|
||||||
|
@ -1933,7 +1935,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
|
|
||||||
case OP_COMPLEX:
|
case OP_COMPLEX:
|
||||||
/* We have a complex number, There should be 2 floating
|
/* We have a complex number, There should be 2 floating
|
||||||
point numbers that compose it */
|
point numbers that compose it. */
|
||||||
(*pos) += 2;
|
(*pos) += 2;
|
||||||
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
|
arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
|
||||||
arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
|
arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
|
||||||
|
@ -2356,7 +2358,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
int array_size_array[MAX_FORTRAN_DIMS];
|
int array_size_array[MAX_FORTRAN_DIMS];
|
||||||
int ndimensions = 1, i;
|
int ndimensions = 1, i;
|
||||||
struct type *tmp_type;
|
struct type *tmp_type;
|
||||||
int offset_item; /* The array offset where the item lives */
|
int offset_item; /* The array offset where the item lives. */
|
||||||
|
|
||||||
if (nargs > MAX_FORTRAN_DIMS)
|
if (nargs > MAX_FORTRAN_DIMS)
|
||||||
error (_("Too many subscripts for F77 (%d Max)"), MAX_FORTRAN_DIMS);
|
error (_("Too many subscripts for F77 (%d Max)"), MAX_FORTRAN_DIMS);
|
||||||
|
@ -2373,18 +2375,18 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
let us actually find out where this element exists in the array. */
|
let us actually find out where this element exists in the array. */
|
||||||
|
|
||||||
offset_item = 0;
|
offset_item = 0;
|
||||||
/* Take array indices left to right */
|
/* Take array indices left to right. */
|
||||||
for (i = 0; i < nargs; i++)
|
for (i = 0; i < nargs; i++)
|
||||||
{
|
{
|
||||||
/* Evaluate each subscript, It must be a legal integer in F77 */
|
/* Evaluate each subscript; it must be a legal integer in F77. */
|
||||||
arg2 = evaluate_subexp_with_coercion (exp, pos, noside);
|
arg2 = evaluate_subexp_with_coercion (exp, pos, noside);
|
||||||
|
|
||||||
/* Fill in the subscript and array size arrays */
|
/* Fill in the subscript and array size arrays. */
|
||||||
|
|
||||||
subscript_array[i] = value_as_long (arg2);
|
subscript_array[i] = value_as_long (arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Internal type of array is arranged right to left */
|
/* Internal type of array is arranged right to left. */
|
||||||
for (i = 0; i < nargs; i++)
|
for (i = 0; i < nargs; i++)
|
||||||
{
|
{
|
||||||
upper = f77_get_upperbound (tmp_type);
|
upper = f77_get_upperbound (tmp_type);
|
||||||
|
@ -2408,7 +2410,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
tmp_type = check_typedef (TYPE_TARGET_TYPE (tmp_type));
|
tmp_type = check_typedef (TYPE_TARGET_TYPE (tmp_type));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now let us calculate the offset for this item */
|
/* Now let us calculate the offset for this item. */
|
||||||
|
|
||||||
offset_item = subscript_array[ndimensions - 1];
|
offset_item = subscript_array[ndimensions - 1];
|
||||||
|
|
||||||
|
@ -2421,7 +2423,7 @@ evaluate_subexp_standard (struct type *expect_type,
|
||||||
of the multidimensional array-set and pretend
|
of the multidimensional array-set and pretend
|
||||||
that it is actually a array of the final element
|
that it is actually a array of the final element
|
||||||
type, this will ensure that value_subscript()
|
type, this will ensure that value_subscript()
|
||||||
returns the correct type value */
|
returns the correct type value. */
|
||||||
|
|
||||||
deprecated_set_value_type (arg1, tmp_type);
|
deprecated_set_value_type (arg1, tmp_type);
|
||||||
return value_subscripted_rvalue (arg1, offset_item, 0);
|
return value_subscripted_rvalue (arg1, offset_item, 0);
|
||||||
|
@ -3030,9 +3032,7 @@ evaluate_subexp_for_address (struct expression *exp, int *pos,
|
||||||
Note that we currently only do the coercion for C expressions, where
|
Note that we currently only do the coercion for C expressions, where
|
||||||
arrays are zero based and the coercion is correct. For other languages,
|
arrays are zero based and the coercion is correct. For other languages,
|
||||||
with nonzero based arrays, coercion loses. Use CAST_IS_CONVERSION
|
with nonzero based arrays, coercion loses. Use CAST_IS_CONVERSION
|
||||||
to decide if coercion is appropriate.
|
to decide if coercion is appropriate. */
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
struct value *
|
struct value *
|
||||||
evaluate_subexp_with_coercion (struct expression *exp,
|
evaluate_subexp_with_coercion (struct expression *exp,
|
||||||
|
|
|
@ -227,7 +227,7 @@ throw_exception (struct gdb_exception exception)
|
||||||
I can think of a reason why that is vital, though). */
|
I can think of a reason why that is vital, though). */
|
||||||
if (tp != NULL)
|
if (tp != NULL)
|
||||||
{
|
{
|
||||||
/* Clear queued breakpoint commands */
|
/* Clear queued breakpoint commands. */
|
||||||
bpstat_clear_actions (tp->control.stop_bpstat);
|
bpstat_clear_actions (tp->control.stop_bpstat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,7 +370,7 @@ print_any_exception (struct ui_file *file, const char *prefix,
|
||||||
if (e.reason < 0 && e.message != NULL)
|
if (e.reason < 0 && e.message != NULL)
|
||||||
{
|
{
|
||||||
target_terminal_ours ();
|
target_terminal_ours ();
|
||||||
wrap_here (""); /* Force out any buffered output */
|
wrap_here (""); /* Force out any buffered output. */
|
||||||
gdb_flush (gdb_stdout);
|
gdb_flush (gdb_stdout);
|
||||||
annotate_error_begin ();
|
annotate_error_begin ();
|
||||||
|
|
||||||
|
@ -442,12 +442,12 @@ throw_error (enum errors error, const char *fmt, ...)
|
||||||
be replaced by judicious use of QUIT. */
|
be replaced by judicious use of QUIT. */
|
||||||
|
|
||||||
/* MAYBE: cagney/1999-11-05: catch_errors() in conjunction with
|
/* MAYBE: cagney/1999-11-05: catch_errors() in conjunction with
|
||||||
error() et.al. could maintain a set of flags that indicate the the
|
error() et al. could maintain a set of flags that indicate the the
|
||||||
current state of each of the longjmp buffers. This would give the
|
current state of each of the longjmp buffers. This would give the
|
||||||
longjmp code the chance to detect a longjmp botch (before it gets
|
longjmp code the chance to detect a longjmp botch (before it gets
|
||||||
to longjmperror()). Prior to 1999-11-05 this wasn't possible as
|
to longjmperror()). Prior to 1999-11-05 this wasn't possible as
|
||||||
code also randomly used a SET_TOP_LEVEL macro that directly
|
code also randomly used a SET_TOP_LEVEL macro that directly
|
||||||
initialize the longjmp buffers. */
|
initialized the longjmp buffers. */
|
||||||
|
|
||||||
int
|
int
|
||||||
catch_exceptions (struct ui_out *uiout,
|
catch_exceptions (struct ui_out *uiout,
|
||||||
|
|
|
@ -149,7 +149,7 @@ int exceptions_state_mc_action_iter_1 (void);
|
||||||
|
|
||||||
|
|
||||||
/* If E is an exception, print it's error message on the specified
|
/* If E is an exception, print it's error message on the specified
|
||||||
stream. for _fprintf, prefix the message with PREFIX... */
|
stream. For _fprintf, prefix the message with PREFIX... */
|
||||||
extern void exception_print (struct ui_file *file, struct gdb_exception e);
|
extern void exception_print (struct ui_file *file, struct gdb_exception e);
|
||||||
extern void exception_fprintf (struct ui_file *file, struct gdb_exception e,
|
extern void exception_fprintf (struct ui_file *file, struct gdb_exception e,
|
||||||
const char *prefix,
|
const char *prefix,
|
||||||
|
|
|
@ -591,7 +591,7 @@ section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf,
|
||||||
for (p = sections; p < sections_end; p++)
|
for (p = sections; p < sections_end; p++)
|
||||||
{
|
{
|
||||||
if (section_name && strcmp (section_name, p->the_bfd_section->name) != 0)
|
if (section_name && strcmp (section_name, p->the_bfd_section->name) != 0)
|
||||||
continue; /* not the section we need */
|
continue; /* not the section we need. */
|
||||||
if (memaddr >= p->addr)
|
if (memaddr >= p->addr)
|
||||||
{
|
{
|
||||||
if (memend <= p->endaddr)
|
if (memend <= p->endaddr)
|
||||||
|
@ -629,7 +629,7 @@ section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0; /* We can't help */
|
return 0; /* We can't help. */
|
||||||
}
|
}
|
||||||
|
|
||||||
struct target_section_table *
|
struct target_section_table *
|
||||||
|
@ -768,11 +768,11 @@ set_section_command (char *args, int from_tty)
|
||||||
if (args == 0)
|
if (args == 0)
|
||||||
error (_("Must specify section name and its virtual address"));
|
error (_("Must specify section name and its virtual address"));
|
||||||
|
|
||||||
/* Parse out section name */
|
/* Parse out section name. */
|
||||||
for (secname = args; !isspace (*args); args++);
|
for (secname = args; !isspace (*args); args++);
|
||||||
seclen = args - secname;
|
seclen = args - secname;
|
||||||
|
|
||||||
/* Parse out new virtual address */
|
/* Parse out new virtual address. */
|
||||||
secaddr = parse_and_eval_address (args);
|
secaddr = parse_and_eval_address (args);
|
||||||
|
|
||||||
table = current_target_sections;
|
table = current_target_sections;
|
||||||
|
|
|
@ -286,7 +286,8 @@ print_subexp_standard (struct expression *exp, int *pos,
|
||||||
|| exp->elts[pc + 1].type
|
|| exp->elts[pc + 1].type
|
||||||
!= builtin_type (exp->gdbarch)->builtin_char)
|
!= builtin_type (exp->gdbarch)->builtin_char)
|
||||||
{
|
{
|
||||||
/* Not a simple array of char, use regular array printing. */
|
/* Not a simple array of char, use regular array
|
||||||
|
printing. */
|
||||||
tem = 0;
|
tem = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -371,7 +372,7 @@ print_subexp_standard (struct expression *exp, int *pos,
|
||||||
fputs_filtered (&exp->elts[pc + 2].string, stream);
|
fputs_filtered (&exp->elts[pc + 2].string, stream);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Will not occur for Modula-2 */
|
/* Will not occur for Modula-2. */
|
||||||
case STRUCTOP_PTR:
|
case STRUCTOP_PTR:
|
||||||
tem = longest_to_int (exp->elts[pc + 1].longconst);
|
tem = longest_to_int (exp->elts[pc + 1].longconst);
|
||||||
(*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
|
(*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
|
||||||
|
|
|
@ -92,12 +92,12 @@ enum exp_opcode
|
||||||
type instantiation for overloaded methods/functions.
|
type instantiation for overloaded methods/functions.
|
||||||
|
|
||||||
The format is:
|
The format is:
|
||||||
TYPE_INSTANCE num_types type0 ... typeN num_types TYPE_INSTANCE */
|
TYPE_INSTANCE num_types type0 ... typeN num_types TYPE_INSTANCE. */
|
||||||
TYPE_INSTANCE,
|
TYPE_INSTANCE,
|
||||||
|
|
||||||
/* end of C++. */
|
/* end of C++. */
|
||||||
|
|
||||||
/* For Modula-2 integer division DIV */
|
/* For Modula-2 integer division DIV. */
|
||||||
BINOP_INTDIV,
|
BINOP_INTDIV,
|
||||||
|
|
||||||
BINOP_ASSIGN_MODIFY, /* +=, -=, *=, and so on.
|
BINOP_ASSIGN_MODIFY, /* +=, -=, *=, and so on.
|
||||||
|
@ -106,7 +106,7 @@ enum exp_opcode
|
||||||
Then comes another BINOP_ASSIGN_MODIFY,
|
Then comes another BINOP_ASSIGN_MODIFY,
|
||||||
making three exp_elements in total. */
|
making three exp_elements in total. */
|
||||||
|
|
||||||
/* Modula-2 standard (binary) procedures */
|
/* Modula-2 standard (binary) procedures. */
|
||||||
BINOP_VAL,
|
BINOP_VAL,
|
||||||
|
|
||||||
/* Concatenate two operands, such as character strings or bitstrings.
|
/* Concatenate two operands, such as character strings or bitstrings.
|
||||||
|
@ -192,14 +192,15 @@ enum exp_opcode
|
||||||
and then an integer. The string is the selector string. The
|
and then an integer. The string is the selector string. The
|
||||||
integer is the number of arguments to the message call. That
|
integer is the number of arguments to the message call. That
|
||||||
many plus one values are used, the first one being the object
|
many plus one values are used, the first one being the object
|
||||||
pointer. This is an Objective C message */
|
pointer. This is an Objective C message. */
|
||||||
OP_OBJC_MSGCALL,
|
OP_OBJC_MSGCALL,
|
||||||
|
|
||||||
/* This is EXACTLY like OP_FUNCALL but is semantically different.
|
/* This is EXACTLY like OP_FUNCALL but is semantically different.
|
||||||
In F77, array subscript expressions, substring expressions
|
In F77, array subscript expressions, substring expressions and
|
||||||
and function calls are all exactly the same syntactically. They may
|
function calls are all exactly the same syntactically. They
|
||||||
only be disambiguated at runtime. Thus this operator, which
|
may only be disambiguated at runtime. Thus this operator,
|
||||||
indicates that we have found something of the form <name> ( <stuff> ) */
|
which indicates that we have found something of the form
|
||||||
|
<name> ( <stuff> ). */
|
||||||
OP_F77_UNDETERMINED_ARGLIST,
|
OP_F77_UNDETERMINED_ARGLIST,
|
||||||
|
|
||||||
/* OP_COMPLEX takes a type in the following element, followed by another
|
/* OP_COMPLEX takes a type in the following element, followed by another
|
||||||
|
@ -307,7 +308,7 @@ enum exp_opcode
|
||||||
OP_OBJC_SELF) pair. */
|
OP_OBJC_SELF) pair. */
|
||||||
OP_OBJC_SELF,
|
OP_OBJC_SELF,
|
||||||
|
|
||||||
/* Objective C: "@selector" pseudo-operator */
|
/* Objective C: "@selector" pseudo-operator. */
|
||||||
OP_OBJC_SELECTOR,
|
OP_OBJC_SELECTOR,
|
||||||
|
|
||||||
/* OP_SCOPE surrounds a type name and a field name. The type
|
/* OP_SCOPE surrounds a type name and a field name. The type
|
||||||
|
@ -336,7 +337,7 @@ enum exp_opcode
|
||||||
/* An un-looked-up identifier. */
|
/* An un-looked-up identifier. */
|
||||||
OP_NAME,
|
OP_NAME,
|
||||||
|
|
||||||
/* An Objective C Foundation Class NSString constant */
|
/* An Objective C Foundation Class NSString constant. */
|
||||||
OP_OBJC_NSSTRING,
|
OP_OBJC_NSSTRING,
|
||||||
|
|
||||||
/* A F90 array range operator (for "exp:exp", "exp:", ":exp" and ":"). */
|
/* A F90 array range operator (for "exp:exp", "exp:", ":exp" and ":"). */
|
||||||
|
@ -394,8 +395,8 @@ union exp_element
|
||||||
struct expression
|
struct expression
|
||||||
{
|
{
|
||||||
const struct language_defn *language_defn; /* language it was
|
const struct language_defn *language_defn; /* language it was
|
||||||
entered in */
|
entered in. */
|
||||||
struct gdbarch *gdbarch; /* architecture it was parsed in */
|
struct gdbarch *gdbarch; /* architecture it was parsed in. */
|
||||||
int nelts;
|
int nelts;
|
||||||
union exp_element elts[1];
|
union exp_element elts[1];
|
||||||
};
|
};
|
||||||
|
|
10
gdb/f-exp.y
10
gdb/f-exp.y
|
@ -892,8 +892,8 @@ static int tempbufindex; /* Current index into buffer */
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
|
|
||||||
/* Grow the static temp buffer if necessary, including allocating the first one
|
/* Grow the static temp buffer if necessary, including allocating the
|
||||||
on demand. */
|
first one on demand. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
growbuf_by_size (count)
|
growbuf_by_size (count)
|
||||||
|
@ -984,7 +984,8 @@ yylex ()
|
||||||
/* See if it is a special .foo. operator. */
|
/* See if it is a special .foo. operator. */
|
||||||
|
|
||||||
for (i = 0; dot_ops[i].operator != NULL; i++)
|
for (i = 0; dot_ops[i].operator != NULL; i++)
|
||||||
if (strncmp (tokstart, dot_ops[i].operator, strlen (dot_ops[i].operator)) == 0)
|
if (strncmp (tokstart, dot_ops[i].operator,
|
||||||
|
strlen (dot_ops[i].operator)) == 0)
|
||||||
{
|
{
|
||||||
lexptr += strlen (dot_ops[i].operator);
|
lexptr += strlen (dot_ops[i].operator);
|
||||||
yylval.opcode = dot_ops[i].opcode;
|
yylval.opcode = dot_ops[i].opcode;
|
||||||
|
@ -1062,7 +1063,8 @@ yylex ()
|
||||||
p += 2;
|
p += 2;
|
||||||
hex = 1;
|
hex = 1;
|
||||||
}
|
}
|
||||||
else if (c == '0' && (p[1]=='t' || p[1]=='T' || p[1]=='d' || p[1]=='D'))
|
else if (c == '0' && (p[1]=='t' || p[1]=='T'
|
||||||
|
|| p[1]=='d' || p[1]=='D'))
|
||||||
{
|
{
|
||||||
p += 2;
|
p += 2;
|
||||||
hex = 0;
|
hex = 0;
|
||||||
|
|
20
gdb/f-lang.c
20
gdb/f-lang.c
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
struct saved_fcn
|
struct saved_fcn
|
||||||
{
|
{
|
||||||
long line_offset; /* Line offset for function */
|
long line_offset; /* Line offset for function. */
|
||||||
struct saved_fcn *next;
|
struct saved_fcn *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ static void f_emit_char (int c, struct type *type,
|
||||||
static void
|
static void
|
||||||
f_emit_char (int c, struct type *type, struct ui_file *stream, int quoter)
|
f_emit_char (int c, struct type *type, struct ui_file *stream, int quoter)
|
||||||
{
|
{
|
||||||
c &= 0xFF; /* Avoid sign bit follies */
|
c &= 0xFF; /* Avoid sign bit follies. */
|
||||||
|
|
||||||
if (PRINT_LITERAL_FORM (c))
|
if (PRINT_LITERAL_FORM (c))
|
||||||
{
|
{
|
||||||
|
@ -511,10 +511,10 @@ static SAVED_BF_PTR current_head_bf_list = NULL; /* Current head of
|
||||||
above list. */
|
above list. */
|
||||||
|
|
||||||
static SAVED_BF_PTR tmp_bf_ptr; /* Generic temporary for use
|
static SAVED_BF_PTR tmp_bf_ptr; /* Generic temporary for use
|
||||||
in macros */
|
in macros. */
|
||||||
|
|
||||||
/* The following function simply enters a given common block onto
|
/* The following function simply enters a given common block onto
|
||||||
the global common block chain */
|
the global common block chain. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
add_common_block (char *name, CORE_ADDR offset, int secnum, char *func_stab)
|
add_common_block (char *name, CORE_ADDR offset, int secnum, char *func_stab)
|
||||||
|
@ -594,7 +594,7 @@ add_common_entry (struct symbol *entry_sym_ptr)
|
||||||
|
|
||||||
/* The order of this list is important, since
|
/* The order of this list is important, since
|
||||||
we expect the entries to appear in decl.
|
we expect the entries to appear in decl.
|
||||||
order when we later issue "info common" calls */
|
order when we later issue "info common" calls. */
|
||||||
|
|
||||||
tmp = allocate_common_entry_node ();
|
tmp = allocate_common_entry_node ();
|
||||||
|
|
||||||
|
@ -619,7 +619,7 @@ add_common_entry (struct symbol *entry_sym_ptr)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This routine finds the first encountred COMMON block named "name" */
|
/* This routine finds the first encountred COMMON block named "name". */
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static SAVED_F77_COMMON_PTR
|
static SAVED_F77_COMMON_PTR
|
||||||
|
@ -642,7 +642,7 @@ find_first_common_named (char *name)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This routine finds the first encountred COMMON block named "name"
|
/* This routine finds the first encountred COMMON block named "name"
|
||||||
that belongs to function funcname */
|
that belongs to function funcname. */
|
||||||
|
|
||||||
SAVED_F77_COMMON_PTR
|
SAVED_F77_COMMON_PTR
|
||||||
find_common_for_function (char *name, char *funcname)
|
find_common_for_function (char *name, char *funcname)
|
||||||
|
@ -760,7 +760,7 @@ else \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This function frees the entire (.bf,function) list */
|
/* This function frees the entire (.bf,function) list. */
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static void
|
static void
|
||||||
|
@ -791,7 +791,7 @@ get_bf_for_fcn (long the_function)
|
||||||
int nprobes = 0;
|
int nprobes = 0;
|
||||||
|
|
||||||
/* First use a simple queuing algorithm (i.e. look and see if the
|
/* First use a simple queuing algorithm (i.e. look and see if the
|
||||||
item at the head of the queue is the one you want) */
|
item at the head of the queue is the one you want). */
|
||||||
|
|
||||||
if (saved_bf_list == NULL)
|
if (saved_bf_list == NULL)
|
||||||
internal_error (__FILE__, __LINE__,
|
internal_error (__FILE__, __LINE__,
|
||||||
|
@ -810,7 +810,7 @@ get_bf_for_fcn (long the_function)
|
||||||
|
|
||||||
/* If the above did not work (probably because #line directives were
|
/* If the above did not work (probably because #line directives were
|
||||||
used in the sourcefile and they messed up our internal tables) we now do
|
used in the sourcefile and they messed up our internal tables) we now do
|
||||||
the ugly linear scan */
|
the ugly linear scan. */
|
||||||
|
|
||||||
if (global_remote_debug)
|
if (global_remote_debug)
|
||||||
fprintf_unfiltered (gdb_stderr, "\ndefaulting to linear scan\n");
|
fprintf_unfiltered (gdb_stderr, "\ndefaulting to linear scan\n");
|
||||||
|
|
|
@ -92,8 +92,8 @@ extern SAVED_F77_COMMON_PTR find_common_for_function (char *, char *);
|
||||||
#define DEFAULT_UPPER_BOUND 999999
|
#define DEFAULT_UPPER_BOUND 999999
|
||||||
#define DEFAULT_LOWER_BOUND -999999
|
#define DEFAULT_LOWER_BOUND -999999
|
||||||
|
|
||||||
extern char *real_main_name; /* Name of main function */
|
extern char *real_main_name; /* Name of main function. */
|
||||||
extern int real_main_c_value; /* C_value field of main function */
|
extern int real_main_c_value; /* C_value field of main function. */
|
||||||
|
|
||||||
extern int f77_get_upperbound (struct type *);
|
extern int f77_get_upperbound (struct type *);
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if 0 /* Currently unused */
|
#if 0 /* Currently unused. */
|
||||||
static void f_type_print_args (struct type *, struct ui_file *);
|
static void f_type_print_args (struct type *, struct ui_file *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ f_print_type (struct type *type, const char *varstring, struct ui_file *stream,
|
||||||
fputs_filtered (varstring, stream);
|
fputs_filtered (varstring, stream);
|
||||||
|
|
||||||
/* For demangled function names, we have the arglist as part of the name,
|
/* For demangled function names, we have the arglist as part of the name,
|
||||||
so don't print an additional pair of ()'s */
|
so don't print an additional pair of ()'s. */
|
||||||
|
|
||||||
demangled_args = varstring[strlen (varstring) - 1] == ')';
|
demangled_args = varstring[strlen (varstring) - 1] == ')';
|
||||||
f_type_print_varspec_suffix (type, stream, show, 0, demangled_args, 0);
|
f_type_print_varspec_suffix (type, stream, show, 0, demangled_args, 0);
|
||||||
|
@ -182,7 +182,7 @@ f_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
||||||
fprintf_filtered (stream, "%d:", lower_bound);
|
fprintf_filtered (stream, "%d:", lower_bound);
|
||||||
|
|
||||||
/* Make sure that, if we have an assumed size array, we
|
/* Make sure that, if we have an assumed size array, we
|
||||||
print out a warning and print the upperbound as '*' */
|
print out a warning and print the upperbound as '*'. */
|
||||||
|
|
||||||
if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
if (TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED (type))
|
||||||
fprintf_filtered (stream, "*");
|
fprintf_filtered (stream, "*");
|
||||||
|
@ -316,12 +316,12 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_CODE_RANGE:
|
case TYPE_CODE_RANGE:
|
||||||
/* This should not occur */
|
/* This should not occur. */
|
||||||
fprintfi_filtered (level, stream, "<range type>");
|
fprintfi_filtered (level, stream, "<range type>");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TYPE_CODE_CHAR:
|
case TYPE_CODE_CHAR:
|
||||||
/* Override name "char" and make it "character" */
|
/* Override name "char" and make it "character". */
|
||||||
fprintfi_filtered (level, stream, "character");
|
fprintfi_filtered (level, stream, "character");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ f77_get_upperbound (struct type *type)
|
||||||
return TYPE_ARRAY_UPPER_BOUND_VALUE (type);
|
return TYPE_ARRAY_UPPER_BOUND_VALUE (type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Obtain F77 adjustable array dimensions */
|
/* Obtain F77 adjustable array dimensions. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
f77_get_dynamic_length_of_aggregate (struct type *type)
|
f77_get_dynamic_length_of_aggregate (struct type *type)
|
||||||
|
@ -144,7 +144,7 @@ f77_create_arrayprint_offset_tbl (struct type *type, struct ui_file *stream)
|
||||||
/* Now we multiply eltlen by all the offsets, so that later we
|
/* Now we multiply eltlen by all the offsets, so that later we
|
||||||
can print out array elements correctly. Up till now we
|
can print out array elements correctly. Up till now we
|
||||||
know an offset to apply to get the item but we also
|
know an offset to apply to get the item but we also
|
||||||
have to know how much to add to get to the next item */
|
have to know how much to add to get to the next item. */
|
||||||
|
|
||||||
ndimen--;
|
ndimen--;
|
||||||
eltlen = TYPE_LENGTH (tmp_type);
|
eltlen = TYPE_LENGTH (tmp_type);
|
||||||
|
@ -209,7 +209,7 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function gets called to print an F77 array, we set up some
|
/* This function gets called to print an F77 array, we set up some
|
||||||
stuff and then immediately call f77_print_array_1() */
|
stuff and then immediately call f77_print_array_1(). */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
f77_print_array (struct type *type, const gdb_byte *valaddr,
|
f77_print_array (struct type *type, const gdb_byte *valaddr,
|
||||||
|
@ -254,7 +254,7 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_type_arch (type);
|
struct gdbarch *gdbarch = get_type_arch (type);
|
||||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||||
unsigned int i = 0; /* Number of characters printed */
|
unsigned int i = 0; /* Number of characters printed. */
|
||||||
struct type *elttype;
|
struct type *elttype;
|
||||||
LONGEST val;
|
LONGEST val;
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
|
@ -502,7 +502,7 @@ list_all_visible_commons (char *funname)
|
||||||
|
|
||||||
/* This function is used to print out the values in a given COMMON
|
/* This function is used to print out the values in a given COMMON
|
||||||
block. It will always use the most local common block of the
|
block. It will always use the most local common block of the
|
||||||
given name */
|
given name. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
info_common_command (char *comname, int from_tty)
|
info_common_command (char *comname, int from_tty)
|
||||||
|
@ -516,12 +516,12 @@ info_common_command (char *comname, int from_tty)
|
||||||
/* We have been told to display the contents of F77 COMMON
|
/* We have been told to display the contents of F77 COMMON
|
||||||
block supposedly visible in this function. Let us
|
block supposedly visible in this function. Let us
|
||||||
first make sure that it is visible and if so, let
|
first make sure that it is visible and if so, let
|
||||||
us display its contents */
|
us display its contents. */
|
||||||
|
|
||||||
fi = get_selected_frame (_("No frame selected"));
|
fi = get_selected_frame (_("No frame selected"));
|
||||||
|
|
||||||
/* The following is generally ripped off from stack.c's routine
|
/* The following is generally ripped off from stack.c's routine
|
||||||
print_frame_info() */
|
print_frame_info(). */
|
||||||
|
|
||||||
func = find_pc_function (get_frame_pc (fi));
|
func = find_pc_function (get_frame_pc (fi));
|
||||||
if (func)
|
if (func)
|
||||||
|
@ -538,7 +538,7 @@ info_common_command (char *comname, int from_tty)
|
||||||
up with a larger address for the function use that instead.
|
up with a larger address for the function use that instead.
|
||||||
I don't think this can ever cause any problems; there shouldn't
|
I don't think this can ever cause any problems; there shouldn't
|
||||||
be any minimal symbols in the middle of a function.
|
be any minimal symbols in the middle of a function.
|
||||||
FIXME: (Not necessarily true. What about text labels) */
|
FIXME: (Not necessarily true. What about text labels?) */
|
||||||
|
|
||||||
struct minimal_symbol *msymbol =
|
struct minimal_symbol *msymbol =
|
||||||
lookup_minimal_symbol_by_pc (get_frame_pc (fi));
|
lookup_minimal_symbol_by_pc (get_frame_pc (fi));
|
||||||
|
@ -562,7 +562,7 @@ info_common_command (char *comname, int from_tty)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If comname is NULL, we assume the user wishes to see the
|
/* If comname is NULL, we assume the user wishes to see the
|
||||||
which COMMON blocks are visible here and then return */
|
which COMMON blocks are visible here and then return. */
|
||||||
|
|
||||||
if (comname == 0)
|
if (comname == 0)
|
||||||
{
|
{
|
||||||
|
@ -611,7 +611,7 @@ there_is_a_visible_common_named (char *comname)
|
||||||
fi = get_selected_frame (_("No frame selected"));
|
fi = get_selected_frame (_("No frame selected"));
|
||||||
|
|
||||||
/* The following is generally ripped off from stack.c's routine
|
/* The following is generally ripped off from stack.c's routine
|
||||||
print_frame_info() */
|
print_frame_info(). */
|
||||||
|
|
||||||
func = find_pc_function (fi->pc);
|
func = find_pc_function (fi->pc);
|
||||||
if (func)
|
if (func)
|
||||||
|
@ -628,7 +628,7 @@ there_is_a_visible_common_named (char *comname)
|
||||||
up with a larger address for the function use that instead.
|
up with a larger address for the function use that instead.
|
||||||
I don't think this can ever cause any problems; there shouldn't
|
I don't think this can ever cause any problems; there shouldn't
|
||||||
be any minimal symbols in the middle of a function.
|
be any minimal symbols in the middle of a function.
|
||||||
FIXME: (Not necessarily true. What about text labels) */
|
FIXME: (Not necessarily true. What about text labels?) */
|
||||||
|
|
||||||
struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (fi->pc);
|
struct minimal_symbol *msymbol = lookup_minimal_symbol_by_pc (fi->pc);
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,7 @@ fbsd_find_memory_regions (find_memory_region_ftype func, void *obfd)
|
||||||
exec ? 'x' : '-');
|
exec ? 'x' : '-');
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Invoke the callback function to create the corefile segment. */
|
/* Invoke the callback function to create the corefile segment. /
|
||||||
func (start, size, read, write, exec, obfd);
|
func (start, size, read, write, exec, obfd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1123,7 +1123,7 @@ create_sentinel_frame (struct program_space *pspace, struct regcache *regcache)
|
||||||
return frame;
|
return frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Info about the innermost stack frame (contents of FP register) */
|
/* Info about the innermost stack frame (contents of FP register). */
|
||||||
|
|
||||||
static struct frame_info *current_frame;
|
static struct frame_info *current_frame;
|
||||||
|
|
||||||
|
@ -1387,7 +1387,7 @@ reinit_frame_cache (void)
|
||||||
fi->base->unwind->dealloc_cache (fi, fi->base_cache);
|
fi->base->unwind->dealloc_cache (fi, fi->base_cache);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Since we can't really be sure what the first object allocated was */
|
/* Since we can't really be sure what the first object allocated was. */
|
||||||
obstack_free (&frame_cache_obstack, 0);
|
obstack_free (&frame_cache_obstack, 0);
|
||||||
obstack_init (&frame_cache_obstack);
|
obstack_init (&frame_cache_obstack);
|
||||||
|
|
||||||
|
|
|
@ -258,7 +258,8 @@ frv_linux_sigcontext_reg_addr (struct frame_info *this_frame, int regno,
|
||||||
/* Signal trampolines. */
|
/* Signal trampolines. */
|
||||||
|
|
||||||
static struct trad_frame_cache *
|
static struct trad_frame_cache *
|
||||||
frv_linux_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache)
|
frv_linux_sigtramp_frame_cache (struct frame_info *this_frame,
|
||||||
|
void **this_cache)
|
||||||
{
|
{
|
||||||
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
struct gdbarch *gdbarch = get_frame_arch (this_frame);
|
||||||
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
|
||||||
|
@ -297,11 +298,12 @@ frv_linux_sigtramp_frame_cache (struct frame_info *this_frame, void **this_cache
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
frv_linux_sigtramp_frame_this_id (struct frame_info *this_frame, void **this_cache,
|
frv_linux_sigtramp_frame_this_id (struct frame_info *this_frame,
|
||||||
|
void **this_cache,
|
||||||
struct frame_id *this_id)
|
struct frame_id *this_id)
|
||||||
{
|
{
|
||||||
struct trad_frame_cache *cache =
|
struct trad_frame_cache *cache
|
||||||
frv_linux_sigtramp_frame_cache (this_frame, this_cache);
|
= frv_linux_sigtramp_frame_cache (this_frame, this_cache);
|
||||||
trad_frame_get_id (cache, this_id);
|
trad_frame_get_id (cache, this_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,8 +312,8 @@ frv_linux_sigtramp_frame_prev_register (struct frame_info *this_frame,
|
||||||
void **this_cache, int regnum)
|
void **this_cache, int regnum)
|
||||||
{
|
{
|
||||||
/* Make sure we've initialized the cache. */
|
/* Make sure we've initialized the cache. */
|
||||||
struct trad_frame_cache *cache =
|
struct trad_frame_cache *cache
|
||||||
frv_linux_sigtramp_frame_cache (this_frame, this_cache);
|
= frv_linux_sigtramp_frame_cache (this_frame, this_cache);
|
||||||
return trad_frame_get_register (cache, this_frame, regnum);
|
return trad_frame_get_register (cache, this_frame, regnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -412,7 +414,8 @@ frv_linux_supply_gregset (const struct regset *regset,
|
||||||
regcache_raw_supply (regcache, regi, zerobuf);
|
regcache_raw_supply (regcache, regi, zerobuf);
|
||||||
else
|
else
|
||||||
regcache_raw_supply (regcache, regi,
|
regcache_raw_supply (regcache, regi,
|
||||||
gregsetp->reg[FRV_PT_GR (regi - first_gpr_regnum)]);
|
gregsetp->reg[FRV_PT_GR (regi
|
||||||
|
- first_gpr_regnum)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
regcache_raw_supply (regcache, pc_regnum, gregsetp->reg[FRV_PT_PC]);
|
regcache_raw_supply (regcache, pc_regnum, gregsetp->reg[FRV_PT_PC]);
|
||||||
|
@ -441,7 +444,8 @@ frv_linux_supply_fpregset (const struct regset *regset,
|
||||||
const frv_elf_fpregset_t *fpregsetp = gregs;
|
const frv_elf_fpregset_t *fpregsetp = gregs;
|
||||||
|
|
||||||
for (regi = first_fpr_regnum; regi <= last_fpr_regnum; regi++)
|
for (regi = first_fpr_regnum; regi <= last_fpr_regnum; regi++)
|
||||||
regcache_raw_supply (regcache, regi, fpregsetp->fr[regi - first_fpr_regnum]);
|
regcache_raw_supply (regcache, regi,
|
||||||
|
fpregsetp->fr[regi - first_fpr_regnum]);
|
||||||
|
|
||||||
regcache_raw_supply (regcache, fner0_regnum, fpregsetp->fner[0]);
|
regcache_raw_supply (regcache, fner0_regnum, fpregsetp->fner[0]);
|
||||||
regcache_raw_supply (regcache, fner1_regnum, fpregsetp->fner[1]);
|
regcache_raw_supply (regcache, fner1_regnum, fpregsetp->fner[1]);
|
||||||
|
@ -522,7 +526,8 @@ void _initialize_frv_linux_tdep (void);
|
||||||
void
|
void
|
||||||
_initialize_frv_linux_tdep (void)
|
_initialize_frv_linux_tdep (void)
|
||||||
{
|
{
|
||||||
gdbarch_register_osabi (bfd_arch_frv, 0, GDB_OSABI_LINUX, frv_linux_init_abi);
|
gdbarch_register_osabi (bfd_arch_frv, 0, GDB_OSABI_LINUX,
|
||||||
|
frv_linux_init_abi);
|
||||||
gdbarch_register_osabi_sniffer (bfd_arch_frv,
|
gdbarch_register_osabi_sniffer (bfd_arch_frv,
|
||||||
bfd_target_elf_flavour,
|
bfd_target_elf_flavour,
|
||||||
frv_linux_elf_osabi_sniffer);
|
frv_linux_elf_osabi_sniffer);
|
||||||
|
|
|
@ -264,7 +264,8 @@ set_variant_abi_fdpic (struct gdbarch_tdep *var)
|
||||||
{
|
{
|
||||||
var->frv_abi = FRV_ABI_FDPIC;
|
var->frv_abi = FRV_ABI_FDPIC;
|
||||||
var->register_names[fdpic_loadmap_exec_regnum] = xstrdup ("loadmap_exec");
|
var->register_names[fdpic_loadmap_exec_regnum] = xstrdup ("loadmap_exec");
|
||||||
var->register_names[fdpic_loadmap_interp_regnum] = xstrdup ("loadmap_interp");
|
var->register_names[fdpic_loadmap_interp_regnum]
|
||||||
|
= xstrdup ("loadmap_interp");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -954,7 +955,8 @@ frv_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc,
|
||||||
|
|
||||||
/* If LR was saved on the stack, record its location. */
|
/* If LR was saved on the stack, record its location. */
|
||||||
if (lr_saved_on_stack)
|
if (lr_saved_on_stack)
|
||||||
info->saved_regs[lr_regnum].addr = this_base - fp_offset + lr_sp_offset;
|
info->saved_regs[lr_regnum].addr
|
||||||
|
= this_base - fp_offset + lr_sp_offset;
|
||||||
|
|
||||||
/* The call instruction moves the caller's PC in the callee's LR.
|
/* The call instruction moves the caller's PC in the callee's LR.
|
||||||
Since this is an unwind, do the reverse. Copy the location of LR
|
Since this is an unwind, do the reverse. Copy the location of LR
|
||||||
|
@ -1122,13 +1124,15 @@ frv_extract_return_value (struct type *type, struct regcache *regcache,
|
||||||
else if (len == 8)
|
else if (len == 8)
|
||||||
{
|
{
|
||||||
ULONGEST regval;
|
ULONGEST regval;
|
||||||
|
|
||||||
regcache_cooked_read_unsigned (regcache, 8, ®val);
|
regcache_cooked_read_unsigned (regcache, 8, ®val);
|
||||||
store_unsigned_integer (valbuf, 4, byte_order, regval);
|
store_unsigned_integer (valbuf, 4, byte_order, regval);
|
||||||
regcache_cooked_read_unsigned (regcache, 9, ®val);
|
regcache_cooked_read_unsigned (regcache, 9, ®val);
|
||||||
store_unsigned_integer ((bfd_byte *) valbuf + 4, 4, byte_order, regval);
|
store_unsigned_integer ((bfd_byte *) valbuf + 4, 4, byte_order, regval);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
internal_error (__FILE__, __LINE__, _("Illegal return value length: %d"), len);
|
internal_error (__FILE__, __LINE__,
|
||||||
|
_("Illegal return value length: %d"), len);
|
||||||
}
|
}
|
||||||
|
|
||||||
static CORE_ADDR
|
static CORE_ADDR
|
||||||
|
@ -1284,7 +1288,8 @@ frv_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
printf(" Argnum %d data %x -> offset %d (%x)\n",
|
printf(" Argnum %d data %x -> offset %d (%x)\n",
|
||||||
argnum, *((int *)val), stack_offset, (int) (sp + stack_offset));
|
argnum, *((int *)val), stack_offset,
|
||||||
|
(int) (sp + stack_offset));
|
||||||
#endif
|
#endif
|
||||||
write_memory (sp + stack_offset, val, partial_len);
|
write_memory (sp + stack_offset, val, partial_len);
|
||||||
stack_offset += align_up (partial_len, 4);
|
stack_offset += align_up (partial_len, 4);
|
||||||
|
|
|
@ -427,7 +427,7 @@ gcore_create_callback (CORE_ADDR vaddr, unsigned long size,
|
||||||
&& !(bfd_get_file_flags (abfd) & BFD_IN_MEMORY))
|
&& !(bfd_get_file_flags (abfd) & BFD_IN_MEMORY))
|
||||||
{
|
{
|
||||||
flags &= ~(SEC_LOAD | SEC_HAS_CONTENTS);
|
flags &= ~(SEC_LOAD | SEC_HAS_CONTENTS);
|
||||||
goto keep; /* break out of two nested for loops */
|
goto keep; /* Break out of two nested for loops. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ struct stab_section_info
|
||||||
{
|
{
|
||||||
char *filename;
|
char *filename;
|
||||||
struct stab_section_info *next;
|
struct stab_section_info *next;
|
||||||
int found; /* Count of times it's found in searching */
|
int found; /* Count of times it's found in searching. */
|
||||||
size_t num_sections;
|
size_t num_sections;
|
||||||
CORE_ADDR sections[1];
|
CORE_ADDR sections[1];
|
||||||
};
|
};
|
||||||
|
|
|
@ -111,9 +111,10 @@ typedef struct td_thrhandle
|
||||||
|
|
||||||
|
|
||||||
#define TD_EVENTSIZE 2
|
#define TD_EVENTSIZE 2
|
||||||
#define BT_UISHIFT 5 /* log base 2 of BT_NBIPUI, to extract word index */
|
#define BT_UISHIFT 5 /* log base 2 of BT_NBIPUI, to
|
||||||
#define BT_NBIPUI (1 << BT_UISHIFT) /* n bits per uint */
|
extract word index. */
|
||||||
#define BT_UIMASK (BT_NBIPUI - 1) /* to extract bit index */
|
#define BT_NBIPUI (1 << BT_UISHIFT) /* n bits per uint. */
|
||||||
|
#define BT_UIMASK (BT_NBIPUI - 1) /* to extract bit index. */
|
||||||
|
|
||||||
/* Bitmask of enabled events. */
|
/* Bitmask of enabled events. */
|
||||||
typedef struct td_thr_events
|
typedef struct td_thr_events
|
||||||
|
@ -181,7 +182,8 @@ typedef enum
|
||||||
/* Values representing the different ways events are reported. */
|
/* Values representing the different ways events are reported. */
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
NOTIFY_BPT, /* User must insert breakpoint at u.bptaddr. */
|
NOTIFY_BPT, /* User must insert breakpoint at
|
||||||
|
u.bptaddr. */
|
||||||
NOTIFY_AUTOBPT, /* Breakpoint at u.bptaddr is automatically
|
NOTIFY_AUTOBPT, /* Breakpoint at u.bptaddr is automatically
|
||||||
inserted. */
|
inserted. */
|
||||||
NOTIFY_SYSCALL /* System call u.syscallno will be invoked. */
|
NOTIFY_SYSCALL /* System call u.syscallno will be invoked. */
|
||||||
|
@ -284,7 +286,8 @@ typedef struct td_thrinfo
|
||||||
psaddr_t ti_ro_area; /* Unused. */
|
psaddr_t ti_ro_area; /* Unused. */
|
||||||
int ti_ro_size; /* Unused. */
|
int ti_ro_size; /* Unused. */
|
||||||
td_thr_state_e ti_state; /* Thread state. */
|
td_thr_state_e ti_state; /* Thread state. */
|
||||||
unsigned char ti_db_suspended; /* Nonzero if suspended by debugger. */
|
unsigned char ti_db_suspended; /* Nonzero if suspended by
|
||||||
|
debugger. */
|
||||||
td_thr_type_e ti_type; /* Type of the thread (system vs
|
td_thr_type_e ti_type; /* Type of the thread (system vs
|
||||||
user thread). */
|
user thread). */
|
||||||
intptr_t ti_pc; /* Unused. */
|
intptr_t ti_pc; /* Unused. */
|
||||||
|
|
112
gdb/gdbarch.c
112
gdb/gdbarch.c
|
@ -86,7 +86,7 @@ pstring (const char *string)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Maintain the struct gdbarch object */
|
/* Maintain the struct gdbarch object. */
|
||||||
|
|
||||||
struct gdbarch
|
struct gdbarch
|
||||||
{
|
{
|
||||||
|
@ -96,7 +96,7 @@ struct gdbarch
|
||||||
/* An obstack bound to the lifetime of the architecture. */
|
/* An obstack bound to the lifetime of the architecture. */
|
||||||
struct obstack *obstack;
|
struct obstack *obstack;
|
||||||
|
|
||||||
/* basic architectural information */
|
/* basic architectural information. */
|
||||||
const struct bfd_arch_info * bfd_arch_info;
|
const struct bfd_arch_info * bfd_arch_info;
|
||||||
int byte_order;
|
int byte_order;
|
||||||
int byte_order_for_code;
|
int byte_order_for_code;
|
||||||
|
@ -107,11 +107,11 @@ struct gdbarch
|
||||||
struct gdbarch_tdep *tdep;
|
struct gdbarch_tdep *tdep;
|
||||||
gdbarch_dump_tdep_ftype *dump_tdep;
|
gdbarch_dump_tdep_ftype *dump_tdep;
|
||||||
|
|
||||||
/* per-architecture data-pointers */
|
/* per-architecture data-pointers. */
|
||||||
unsigned nr_data;
|
unsigned nr_data;
|
||||||
void **data;
|
void **data;
|
||||||
|
|
||||||
/* per-architecture swap-regions */
|
/* per-architecture swap-regions. */
|
||||||
struct gdbarch_swap *swap;
|
struct gdbarch_swap *swap;
|
||||||
|
|
||||||
/* Multi-arch values.
|
/* Multi-arch values.
|
||||||
|
@ -281,15 +281,15 @@ struct gdbarch startup_gdbarch =
|
||||||
{
|
{
|
||||||
1, /* Always initialized. */
|
1, /* Always initialized. */
|
||||||
NULL, /* The obstack. */
|
NULL, /* The obstack. */
|
||||||
/* basic architecture information */
|
/* basic architecture information. */
|
||||||
&bfd_default_arch_struct, /* bfd_arch_info */
|
&bfd_default_arch_struct, /* bfd_arch_info */
|
||||||
BFD_ENDIAN_BIG, /* byte_order */
|
BFD_ENDIAN_BIG, /* byte_order */
|
||||||
BFD_ENDIAN_BIG, /* byte_order_for_code */
|
BFD_ENDIAN_BIG, /* byte_order_for_code */
|
||||||
GDB_OSABI_UNKNOWN, /* osabi */
|
GDB_OSABI_UNKNOWN, /* osabi */
|
||||||
0, /* target_desc */
|
0, /* target_desc */
|
||||||
/* target specific vector and its dump routine */
|
/* target specific vector and its dump routine. */
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
/*per-architecture data-pointers and swap regions */
|
/*per-architecture data-pointers and swap regions. */
|
||||||
0, NULL, NULL,
|
0, NULL, NULL,
|
||||||
/* Multi-arch values */
|
/* Multi-arch values */
|
||||||
1, /* bits_big_endian */
|
1, /* bits_big_endian */
|
||||||
|
@ -590,16 +590,16 @@ verify_gdbarch (struct gdbarch *gdbarch)
|
||||||
gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
|
gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT;
|
||||||
if (gdbarch->char_signed == -1)
|
if (gdbarch->char_signed == -1)
|
||||||
gdbarch->char_signed = 1;
|
gdbarch->char_signed = 1;
|
||||||
/* Skip verify of read_pc, has predicate */
|
/* Skip verify of read_pc, has predicate. */
|
||||||
/* Skip verify of write_pc, has predicate */
|
/* Skip verify of write_pc, has predicate. */
|
||||||
/* Skip verify of virtual_frame_pointer, invalid_p == 0 */
|
/* Skip verify of virtual_frame_pointer, invalid_p == 0 */
|
||||||
/* Skip verify of pseudo_register_read, has predicate */
|
/* Skip verify of pseudo_register_read, has predicate. */
|
||||||
/* Skip verify of pseudo_register_write, has predicate */
|
/* Skip verify of pseudo_register_write, has predicate. */
|
||||||
if (gdbarch->num_regs == -1)
|
if (gdbarch->num_regs == -1)
|
||||||
fprintf_unfiltered (log, "\n\tnum_regs");
|
fprintf_unfiltered (log, "\n\tnum_regs");
|
||||||
/* Skip verify of num_pseudo_regs, invalid_p == 0 */
|
/* Skip verify of num_pseudo_regs, invalid_p == 0 */
|
||||||
/* Skip verify of ax_pseudo_register_collect, has predicate */
|
/* Skip verify of ax_pseudo_register_collect, has predicate. */
|
||||||
/* Skip verify of ax_pseudo_register_push_stack, has predicate */
|
/* Skip verify of ax_pseudo_register_push_stack, has predicate. */
|
||||||
/* Skip verify of sp_regnum, invalid_p == 0 */
|
/* Skip verify of sp_regnum, invalid_p == 0 */
|
||||||
/* Skip verify of pc_regnum, invalid_p == 0 */
|
/* Skip verify of pc_regnum, invalid_p == 0 */
|
||||||
/* Skip verify of ps_regnum, invalid_p == 0 */
|
/* Skip verify of ps_regnum, invalid_p == 0 */
|
||||||
|
@ -610,51 +610,51 @@ verify_gdbarch (struct gdbarch *gdbarch)
|
||||||
/* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
|
/* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
|
||||||
if (gdbarch->register_name == 0)
|
if (gdbarch->register_name == 0)
|
||||||
fprintf_unfiltered (log, "\n\tregister_name");
|
fprintf_unfiltered (log, "\n\tregister_name");
|
||||||
/* Skip verify of register_type, has predicate */
|
/* Skip verify of register_type, has predicate. */
|
||||||
/* Skip verify of dummy_id, has predicate */
|
/* Skip verify of dummy_id, has predicate. */
|
||||||
/* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
|
/* Skip verify of deprecated_fp_regnum, invalid_p == 0 */
|
||||||
/* Skip verify of push_dummy_call, has predicate */
|
/* Skip verify of push_dummy_call, has predicate. */
|
||||||
/* Skip verify of call_dummy_location, invalid_p == 0 */
|
/* Skip verify of call_dummy_location, invalid_p == 0 */
|
||||||
/* Skip verify of push_dummy_code, has predicate */
|
/* Skip verify of push_dummy_code, has predicate. */
|
||||||
/* Skip verify of print_registers_info, invalid_p == 0 */
|
/* Skip verify of print_registers_info, invalid_p == 0 */
|
||||||
/* Skip verify of print_float_info, has predicate */
|
/* Skip verify of print_float_info, has predicate. */
|
||||||
/* Skip verify of print_vector_info, has predicate */
|
/* Skip verify of print_vector_info, has predicate. */
|
||||||
/* Skip verify of register_sim_regno, invalid_p == 0 */
|
/* Skip verify of register_sim_regno, invalid_p == 0 */
|
||||||
/* Skip verify of cannot_fetch_register, invalid_p == 0 */
|
/* Skip verify of cannot_fetch_register, invalid_p == 0 */
|
||||||
/* Skip verify of cannot_store_register, invalid_p == 0 */
|
/* Skip verify of cannot_store_register, invalid_p == 0 */
|
||||||
/* Skip verify of get_longjmp_target, has predicate */
|
/* Skip verify of get_longjmp_target, has predicate. */
|
||||||
/* Skip verify of convert_register_p, invalid_p == 0 */
|
/* Skip verify of convert_register_p, invalid_p == 0 */
|
||||||
/* Skip verify of value_from_register, invalid_p == 0 */
|
/* Skip verify of value_from_register, invalid_p == 0 */
|
||||||
/* Skip verify of pointer_to_address, invalid_p == 0 */
|
/* Skip verify of pointer_to_address, invalid_p == 0 */
|
||||||
/* Skip verify of address_to_pointer, invalid_p == 0 */
|
/* Skip verify of address_to_pointer, invalid_p == 0 */
|
||||||
/* Skip verify of integer_to_address, has predicate */
|
/* Skip verify of integer_to_address, has predicate. */
|
||||||
/* Skip verify of return_value, has predicate */
|
/* Skip verify of return_value, has predicate. */
|
||||||
if (gdbarch->skip_prologue == 0)
|
if (gdbarch->skip_prologue == 0)
|
||||||
fprintf_unfiltered (log, "\n\tskip_prologue");
|
fprintf_unfiltered (log, "\n\tskip_prologue");
|
||||||
/* Skip verify of skip_main_prologue, has predicate */
|
/* Skip verify of skip_main_prologue, has predicate. */
|
||||||
if (gdbarch->inner_than == 0)
|
if (gdbarch->inner_than == 0)
|
||||||
fprintf_unfiltered (log, "\n\tinner_than");
|
fprintf_unfiltered (log, "\n\tinner_than");
|
||||||
if (gdbarch->breakpoint_from_pc == 0)
|
if (gdbarch->breakpoint_from_pc == 0)
|
||||||
fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
|
fprintf_unfiltered (log, "\n\tbreakpoint_from_pc");
|
||||||
/* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
|
/* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */
|
||||||
/* Skip verify of adjust_breakpoint_address, has predicate */
|
/* Skip verify of adjust_breakpoint_address, has predicate. */
|
||||||
/* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
|
/* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
|
||||||
/* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
|
/* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
|
||||||
/* Skip verify of decr_pc_after_break, invalid_p == 0 */
|
/* Skip verify of decr_pc_after_break, invalid_p == 0 */
|
||||||
/* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
|
/* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
|
||||||
/* Skip verify of remote_register_number, invalid_p == 0 */
|
/* Skip verify of remote_register_number, invalid_p == 0 */
|
||||||
/* Skip verify of fetch_tls_load_module_address, has predicate */
|
/* Skip verify of fetch_tls_load_module_address, has predicate. */
|
||||||
/* Skip verify of frame_args_skip, invalid_p == 0 */
|
/* Skip verify of frame_args_skip, invalid_p == 0 */
|
||||||
/* Skip verify of unwind_pc, has predicate */
|
/* Skip verify of unwind_pc, has predicate. */
|
||||||
/* Skip verify of unwind_sp, has predicate */
|
/* Skip verify of unwind_sp, has predicate. */
|
||||||
/* Skip verify of frame_num_args, has predicate */
|
/* Skip verify of frame_num_args, has predicate. */
|
||||||
/* Skip verify of frame_align, has predicate */
|
/* Skip verify of frame_align, has predicate. */
|
||||||
/* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
|
/* Skip verify of stabs_argument_has_addr, invalid_p == 0 */
|
||||||
/* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
|
/* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
|
||||||
/* Skip verify of addr_bits_remove, invalid_p == 0 */
|
/* Skip verify of addr_bits_remove, invalid_p == 0 */
|
||||||
/* Skip verify of smash_text_address, invalid_p == 0 */
|
/* Skip verify of smash_text_address, invalid_p == 0 */
|
||||||
/* Skip verify of software_single_step, has predicate */
|
/* Skip verify of software_single_step, has predicate. */
|
||||||
/* Skip verify of single_step_through_delay, has predicate */
|
/* Skip verify of single_step_through_delay, has predicate. */
|
||||||
if (gdbarch->print_insn == 0)
|
if (gdbarch->print_insn == 0)
|
||||||
fprintf_unfiltered (log, "\n\tprint_insn");
|
fprintf_unfiltered (log, "\n\tprint_insn");
|
||||||
/* Skip verify of skip_trampoline_code, invalid_p == 0 */
|
/* Skip verify of skip_trampoline_code, invalid_p == 0 */
|
||||||
|
@ -665,38 +665,38 @@ verify_gdbarch (struct gdbarch *gdbarch)
|
||||||
/* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
|
/* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
|
||||||
/* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
|
/* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
|
||||||
/* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
|
/* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
|
||||||
/* Skip verify of address_class_type_flags, has predicate */
|
/* Skip verify of address_class_type_flags, has predicate. */
|
||||||
/* Skip verify of address_class_type_flags_to_name, has predicate */
|
/* Skip verify of address_class_type_flags_to_name, has predicate. */
|
||||||
/* Skip verify of address_class_name_to_type_flags, has predicate */
|
/* Skip verify of address_class_name_to_type_flags, has predicate. */
|
||||||
/* Skip verify of register_reggroup_p, invalid_p == 0 */
|
/* Skip verify of register_reggroup_p, invalid_p == 0 */
|
||||||
/* Skip verify of fetch_pointer_argument, has predicate */
|
/* Skip verify of fetch_pointer_argument, has predicate. */
|
||||||
/* Skip verify of regset_from_core_section, has predicate */
|
/* Skip verify of regset_from_core_section, has predicate. */
|
||||||
/* Skip verify of core_xfer_shared_libraries, has predicate */
|
/* Skip verify of core_xfer_shared_libraries, has predicate. */
|
||||||
/* Skip verify of core_pid_to_str, has predicate */
|
/* Skip verify of core_pid_to_str, has predicate. */
|
||||||
/* Skip verify of gcore_bfd_target, has predicate */
|
/* Skip verify of gcore_bfd_target, has predicate. */
|
||||||
/* Skip verify of vtable_function_descriptors, invalid_p == 0 */
|
/* Skip verify of vtable_function_descriptors, invalid_p == 0 */
|
||||||
/* Skip verify of vbit_in_delta, invalid_p == 0 */
|
/* Skip verify of vbit_in_delta, invalid_p == 0 */
|
||||||
/* Skip verify of skip_permanent_breakpoint, has predicate */
|
/* Skip verify of skip_permanent_breakpoint, has predicate. */
|
||||||
/* Skip verify of max_insn_length, has predicate */
|
/* Skip verify of max_insn_length, has predicate. */
|
||||||
/* Skip verify of displaced_step_copy_insn, has predicate */
|
/* Skip verify of displaced_step_copy_insn, has predicate. */
|
||||||
/* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
|
/* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */
|
||||||
/* Skip verify of displaced_step_fixup, has predicate */
|
/* Skip verify of displaced_step_fixup, has predicate. */
|
||||||
if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
|
if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn))
|
||||||
fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
|
fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure");
|
||||||
if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
|
if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn))
|
||||||
fprintf_unfiltered (log, "\n\tdisplaced_step_location");
|
fprintf_unfiltered (log, "\n\tdisplaced_step_location");
|
||||||
/* Skip verify of relocate_instruction, has predicate */
|
/* Skip verify of relocate_instruction, has predicate. */
|
||||||
/* Skip verify of overlay_update, has predicate */
|
/* Skip verify of overlay_update, has predicate. */
|
||||||
/* Skip verify of core_read_description, has predicate */
|
/* Skip verify of core_read_description, has predicate. */
|
||||||
/* Skip verify of static_transform_name, has predicate */
|
/* Skip verify of static_transform_name, has predicate. */
|
||||||
/* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
|
/* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */
|
||||||
/* Skip verify of process_record, has predicate */
|
/* Skip verify of process_record, has predicate. */
|
||||||
/* Skip verify of process_record_signal, has predicate */
|
/* Skip verify of process_record_signal, has predicate. */
|
||||||
/* Skip verify of target_signal_from_host, invalid_p == 0 */
|
/* Skip verify of target_signal_from_host, invalid_p == 0 */
|
||||||
/* Skip verify of target_signal_to_host, invalid_p == 0 */
|
/* Skip verify of target_signal_to_host, invalid_p == 0 */
|
||||||
/* Skip verify of get_siginfo_type, has predicate */
|
/* Skip verify of get_siginfo_type, has predicate. */
|
||||||
/* Skip verify of record_special_symbol, has predicate */
|
/* Skip verify of record_special_symbol, has predicate. */
|
||||||
/* Skip verify of get_syscall_number, has predicate */
|
/* Skip verify of get_syscall_number, has predicate. */
|
||||||
/* Skip verify of has_global_solist, invalid_p == 0 */
|
/* Skip verify of has_global_solist, invalid_p == 0 */
|
||||||
/* Skip verify of has_global_breakpoints, invalid_p == 0 */
|
/* Skip verify of has_global_breakpoints, invalid_p == 0 */
|
||||||
/* Skip verify of has_shared_address_space, invalid_p == 0 */
|
/* Skip verify of has_shared_address_space, invalid_p == 0 */
|
||||||
|
@ -4019,17 +4019,19 @@ gdbarch_register (enum bfd_architecture bfd_architecture,
|
||||||
if (bfd_arch_info == NULL)
|
if (bfd_arch_info == NULL)
|
||||||
{
|
{
|
||||||
internal_error (__FILE__, __LINE__,
|
internal_error (__FILE__, __LINE__,
|
||||||
_("gdbarch: Attempt to register unknown architecture (%d)"),
|
_("gdbarch: Attempt to register "
|
||||||
|
"unknown architecture (%d)"),
|
||||||
bfd_architecture);
|
bfd_architecture);
|
||||||
}
|
}
|
||||||
/* Check that we haven't seen this architecture before */
|
/* Check that we haven't seen this architecture before. */
|
||||||
for (curr = &gdbarch_registry;
|
for (curr = &gdbarch_registry;
|
||||||
(*curr) != NULL;
|
(*curr) != NULL;
|
||||||
curr = &(*curr)->next)
|
curr = &(*curr)->next)
|
||||||
{
|
{
|
||||||
if (bfd_architecture == (*curr)->bfd_architecture)
|
if (bfd_architecture == (*curr)->bfd_architecture)
|
||||||
internal_error (__FILE__, __LINE__,
|
internal_error (__FILE__, __LINE__,
|
||||||
_("gdbarch: Duplicate registraration of architecture (%s)"),
|
_("gdbarch: Duplicate registraration "
|
||||||
|
"of architecture (%s)"),
|
||||||
bfd_arch_info->printable_name);
|
bfd_arch_info->printable_name);
|
||||||
}
|
}
|
||||||
/* log it */
|
/* log it */
|
||||||
|
|
|
@ -1151,7 +1151,7 @@ extern void *gdbarch_obstack_zalloc (struct gdbarch *gdbarch, long size);
|
||||||
architecture. INFO should be initialized to zero and then selected
|
architecture. INFO should be initialized to zero and then selected
|
||||||
fields should be updated.
|
fields should be updated.
|
||||||
|
|
||||||
Returns non-zero if the update succeeds */
|
Returns non-zero if the update succeeds. */
|
||||||
|
|
||||||
extern int gdbarch_update_p (struct gdbarch_info info);
|
extern int gdbarch_update_p (struct gdbarch_info info);
|
||||||
|
|
||||||
|
@ -1209,7 +1209,7 @@ extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *);
|
||||||
|
|
||||||
|
|
||||||
/* Set the dynamic target-system-dependent parameters (architecture,
|
/* Set the dynamic target-system-dependent parameters (architecture,
|
||||||
byte-order, ...) using information found in the BFD */
|
byte-order, ...) using information found in the BFD. */
|
||||||
|
|
||||||
extern void set_gdbarch_from_file (bfd *);
|
extern void set_gdbarch_from_file (bfd *);
|
||||||
|
|
||||||
|
|
|
@ -1155,7 +1155,7 @@ extern void *gdbarch_obstack_zalloc (struct gdbarch *gdbarch, long size);
|
||||||
architecture. INFO should be initialized to zero and then selected
|
architecture. INFO should be initialized to zero and then selected
|
||||||
fields should be updated.
|
fields should be updated.
|
||||||
|
|
||||||
Returns non-zero if the update succeeds */
|
Returns non-zero if the update succeeds. */
|
||||||
|
|
||||||
extern int gdbarch_update_p (struct gdbarch_info info);
|
extern int gdbarch_update_p (struct gdbarch_info info);
|
||||||
|
|
||||||
|
@ -1213,7 +1213,7 @@ extern void *gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *);
|
||||||
|
|
||||||
|
|
||||||
/* Set the dynamic target-system-dependent parameters (architecture,
|
/* Set the dynamic target-system-dependent parameters (architecture,
|
||||||
byte-order, ...) using information found in the BFD */
|
byte-order, ...) using information found in the BFD. */
|
||||||
|
|
||||||
extern void set_gdbarch_from_file (bfd *);
|
extern void set_gdbarch_from_file (bfd *);
|
||||||
|
|
||||||
|
@ -1299,7 +1299,7 @@ EOF
|
||||||
|
|
||||||
# gdbarch open the gdbarch object
|
# gdbarch open the gdbarch object
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf "/* Maintain the struct gdbarch object */\n"
|
printf "/* Maintain the struct gdbarch object. */\n"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf "struct gdbarch\n"
|
printf "struct gdbarch\n"
|
||||||
printf "{\n"
|
printf "{\n"
|
||||||
|
@ -1309,7 +1309,7 @@ printf "\n"
|
||||||
printf " /* An obstack bound to the lifetime of the architecture. */\n"
|
printf " /* An obstack bound to the lifetime of the architecture. */\n"
|
||||||
printf " struct obstack *obstack;\n"
|
printf " struct obstack *obstack;\n"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf " /* basic architectural information */\n"
|
printf " /* basic architectural information. */\n"
|
||||||
function_list | while do_read
|
function_list | while do_read
|
||||||
do
|
do
|
||||||
if class_is_info_p
|
if class_is_info_p
|
||||||
|
@ -1322,11 +1322,11 @@ printf " /* target specific vector. */\n"
|
||||||
printf " struct gdbarch_tdep *tdep;\n"
|
printf " struct gdbarch_tdep *tdep;\n"
|
||||||
printf " gdbarch_dump_tdep_ftype *dump_tdep;\n"
|
printf " gdbarch_dump_tdep_ftype *dump_tdep;\n"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf " /* per-architecture data-pointers */\n"
|
printf " /* per-architecture data-pointers. */\n"
|
||||||
printf " unsigned nr_data;\n"
|
printf " unsigned nr_data;\n"
|
||||||
printf " void **data;\n"
|
printf " void **data;\n"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf " /* per-architecture swap-regions */\n"
|
printf " /* per-architecture swap-regions. */\n"
|
||||||
printf " struct gdbarch_swap *swap;\n"
|
printf " struct gdbarch_swap *swap;\n"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
@ -1383,7 +1383,7 @@ printf "struct gdbarch startup_gdbarch =\n"
|
||||||
printf "{\n"
|
printf "{\n"
|
||||||
printf " 1, /* Always initialized. */\n"
|
printf " 1, /* Always initialized. */\n"
|
||||||
printf " NULL, /* The obstack. */\n"
|
printf " NULL, /* The obstack. */\n"
|
||||||
printf " /* basic architecture information */\n"
|
printf " /* basic architecture information. */\n"
|
||||||
function_list | while do_read
|
function_list | while do_read
|
||||||
do
|
do
|
||||||
if class_is_info_p
|
if class_is_info_p
|
||||||
|
@ -1392,9 +1392,9 @@ do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
/* target specific vector and its dump routine */
|
/* target specific vector and its dump routine. */
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
/*per-architecture data-pointers and swap regions */
|
/*per-architecture data-pointers and swap regions. */
|
||||||
0, NULL, NULL,
|
0, NULL, NULL,
|
||||||
/* Multi-arch values */
|
/* Multi-arch values */
|
||||||
EOF
|
EOF
|
||||||
|
@ -1532,7 +1532,7 @@ do
|
||||||
printf " /* Skip verify of ${function}, invalid_p == 0 */\n"
|
printf " /* Skip verify of ${function}, invalid_p == 0 */\n"
|
||||||
elif class_is_predicate_p
|
elif class_is_predicate_p
|
||||||
then
|
then
|
||||||
printf " /* Skip verify of ${function}, has predicate */\n"
|
printf " /* Skip verify of ${function}, has predicate. */\n"
|
||||||
# FIXME: See do_read for potential simplification
|
# FIXME: See do_read for potential simplification
|
||||||
elif [ -n "${invalid_p}" -a -n "${postdefault}" ]
|
elif [ -n "${invalid_p}" -a -n "${postdefault}" ]
|
||||||
then
|
then
|
||||||
|
@ -1938,17 +1938,19 @@ gdbarch_register (enum bfd_architecture bfd_architecture,
|
||||||
if (bfd_arch_info == NULL)
|
if (bfd_arch_info == NULL)
|
||||||
{
|
{
|
||||||
internal_error (__FILE__, __LINE__,
|
internal_error (__FILE__, __LINE__,
|
||||||
_("gdbarch: Attempt to register unknown architecture (%d)"),
|
_("gdbarch: Attempt to register "
|
||||||
|
"unknown architecture (%d)"),
|
||||||
bfd_architecture);
|
bfd_architecture);
|
||||||
}
|
}
|
||||||
/* Check that we haven't seen this architecture before */
|
/* Check that we haven't seen this architecture before. */
|
||||||
for (curr = &gdbarch_registry;
|
for (curr = &gdbarch_registry;
|
||||||
(*curr) != NULL;
|
(*curr) != NULL;
|
||||||
curr = &(*curr)->next)
|
curr = &(*curr)->next)
|
||||||
{
|
{
|
||||||
if (bfd_architecture == (*curr)->bfd_architecture)
|
if (bfd_architecture == (*curr)->bfd_architecture)
|
||||||
internal_error (__FILE__, __LINE__,
|
internal_error (__FILE__, __LINE__,
|
||||||
_("gdbarch: Duplicate registraration of architecture (%s)"),
|
_("gdbarch: Duplicate registraration "
|
||||||
|
"of architecture (%s)"),
|
||||||
bfd_arch_info->printable_name);
|
bfd_arch_info->printable_name);
|
||||||
}
|
}
|
||||||
/* log it */
|
/* log it */
|
||||||
|
|
|
@ -68,8 +68,9 @@ extern ULONGEST read_memory_unsigned_integer (CORE_ADDR memaddr,
|
||||||
int len,
|
int len,
|
||||||
enum bfd_endian byte_order);
|
enum bfd_endian byte_order);
|
||||||
|
|
||||||
/* Read a null-terminated string from the debuggee's memory, given address,
|
/* Read a null-terminated string from the debuggee's memory, given
|
||||||
* a buffer into which to place the string, and the maximum available space */
|
address, a buffer into which to place the string, and the maximum
|
||||||
|
available space. */
|
||||||
|
|
||||||
extern void read_memory_string (CORE_ADDR, char *, int);
|
extern void read_memory_string (CORE_ADDR, char *, int);
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ struct thread_control_state
|
||||||
step for a single instruction (FIXME: it might clean up
|
step for a single instruction (FIXME: it might clean up
|
||||||
wait_for_inferior in a minor way if this were changed to the
|
wait_for_inferior in a minor way if this were changed to the
|
||||||
address of the instruction and that address plus one. But maybe
|
address of the instruction and that address plus one. But maybe
|
||||||
not.). */
|
not). */
|
||||||
CORE_ADDR step_range_start; /* Inclusive */
|
CORE_ADDR step_range_start; /* Inclusive */
|
||||||
CORE_ADDR step_range_end; /* Exclusive */
|
CORE_ADDR step_range_end; /* Exclusive */
|
||||||
|
|
||||||
|
|
|
@ -773,7 +773,7 @@ get_discrete_bounds (struct type *type, LONGEST *lowp, LONGEST *highp)
|
||||||
if (TYPE_NFIELDS (type) > 0)
|
if (TYPE_NFIELDS (type) > 0)
|
||||||
{
|
{
|
||||||
/* The enums may not be sorted by value, so search all
|
/* The enums may not be sorted by value, so search all
|
||||||
entries */
|
entries. */
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
*lowp = *highp = TYPE_FIELD_BITPOS (type, 0);
|
*lowp = *highp = TYPE_FIELD_BITPOS (type, 0);
|
||||||
|
@ -908,7 +908,7 @@ create_array_type (struct type *result_type,
|
||||||
TYPE_INDEX_TYPE (result_type) = range_type;
|
TYPE_INDEX_TYPE (result_type) = range_type;
|
||||||
TYPE_VPTR_FIELDNO (result_type) = -1;
|
TYPE_VPTR_FIELDNO (result_type) = -1;
|
||||||
|
|
||||||
/* TYPE_FLAG_TARGET_STUB will take care of zero length arrays */
|
/* TYPE_FLAG_TARGET_STUB will take care of zero length arrays. */
|
||||||
if (TYPE_LENGTH (result_type) == 0)
|
if (TYPE_LENGTH (result_type) == 0)
|
||||||
TYPE_TARGET_STUB (result_type) = 1;
|
TYPE_TARGET_STUB (result_type) = 1;
|
||||||
|
|
||||||
|
@ -1300,7 +1300,7 @@ lookup_struct_elt_type (struct type *type, char *name, int noerr)
|
||||||
#if 0
|
#if 0
|
||||||
/* FIXME: This change put in by Michael seems incorrect for the case
|
/* FIXME: This change put in by Michael seems incorrect for the case
|
||||||
where the structure tag name is the same as the member name.
|
where the structure tag name is the same as the member name.
|
||||||
I.E. when doing "ptype bell->bar" for "struct foo { int bar; int
|
I.e. when doing "ptype bell->bar" for "struct foo { int bar; int
|
||||||
foo; } bell;" Disabled by fnf. */
|
foo; } bell;" Disabled by fnf. */
|
||||||
{
|
{
|
||||||
char *typename;
|
char *typename;
|
||||||
|
@ -1736,7 +1736,7 @@ check_stub_method (struct type *type, int method_id, int signature_id)
|
||||||
argcount = 1;
|
argcount = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*p != ')') /* () means no args, skip while */
|
if (*p != ')') /* () means no args, skip while. */
|
||||||
{
|
{
|
||||||
depth = 0;
|
depth = 0;
|
||||||
while (*p)
|
while (*p)
|
||||||
|
@ -1986,7 +1986,7 @@ class_types_same_p (const struct type *a, const struct type *b)
|
||||||
of DCLASS.
|
of DCLASS.
|
||||||
Eg:
|
Eg:
|
||||||
|
|
||||||
distance_to_ancestor (A, D, 1) = -1 */
|
distance_to_ancestor (A, D, 1) = -1. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
distance_to_ancestor (struct type *base, struct type *dclass, int public)
|
distance_to_ancestor (struct type *base, struct type *dclass, int public)
|
||||||
|
@ -2132,7 +2132,7 @@ compare_ranks (struct rank a, struct rank b)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Functions for overload resolution begin here */
|
/* Functions for overload resolution begin here. */
|
||||||
|
|
||||||
/* Compare two badness vectors A and B and return the result.
|
/* Compare two badness vectors A and B and return the result.
|
||||||
0 => A and B are identical
|
0 => A and B are identical
|
||||||
|
@ -2193,7 +2193,7 @@ rank_function (struct type **parms, int nparms,
|
||||||
int min_len = nparms < nargs ? nparms : nargs;
|
int min_len = nparms < nargs ? nparms : nargs;
|
||||||
|
|
||||||
bv = xmalloc (sizeof (struct badness_vector));
|
bv = xmalloc (sizeof (struct badness_vector));
|
||||||
bv->length = nargs + 1; /* add 1 for the length-match rank */
|
bv->length = nargs + 1; /* add 1 for the length-match rank. */
|
||||||
bv->rank = xmalloc ((nargs + 1) * sizeof (int));
|
bv->rank = xmalloc ((nargs + 1) * sizeof (int));
|
||||||
|
|
||||||
/* First compare the lengths of the supplied lists.
|
/* First compare the lengths of the supplied lists.
|
||||||
|
@ -2207,11 +2207,11 @@ rank_function (struct type **parms, int nparms,
|
||||||
? LENGTH_MISMATCH_BADNESS
|
? LENGTH_MISMATCH_BADNESS
|
||||||
: EXACT_MATCH_BADNESS;
|
: EXACT_MATCH_BADNESS;
|
||||||
|
|
||||||
/* Now rank all the parameters of the candidate function */
|
/* Now rank all the parameters of the candidate function. */
|
||||||
for (i = 1; i <= min_len; i++)
|
for (i = 1; i <= min_len; i++)
|
||||||
bv->rank[i] = rank_one_type (parms[i-1], args[i-1]);
|
bv->rank[i] = rank_one_type (parms[i-1], args[i-1]);
|
||||||
|
|
||||||
/* If more arguments than parameters, add dummy entries */
|
/* If more arguments than parameters, add dummy entries. */
|
||||||
for (i = min_len + 1; i <= nargs; i++)
|
for (i = min_len + 1; i <= nargs; i++)
|
||||||
bv->rank[i] = TOO_FEW_PARAMS_BADNESS;
|
bv->rank[i] = TOO_FEW_PARAMS_BADNESS;
|
||||||
|
|
||||||
|
@ -2288,12 +2288,10 @@ types_equal (struct type *a, struct type *b)
|
||||||
return types_equal (TYPE_TARGET_TYPE (a),
|
return types_equal (TYPE_TARGET_TYPE (a),
|
||||||
TYPE_TARGET_TYPE (b));
|
TYPE_TARGET_TYPE (b));
|
||||||
|
|
||||||
/*
|
/* Well, damnit, if the names are exactly the same, I'll say they
|
||||||
Well, damnit, if the names are exactly the same, I'll say they
|
|
||||||
are exactly the same. This happens when we generate method
|
are exactly the same. This happens when we generate method
|
||||||
stubs. The types won't point to the same address, but they
|
stubs. The types won't point to the same address, but they
|
||||||
really are the same.
|
really are the same. */
|
||||||
*/
|
|
||||||
|
|
||||||
if (TYPE_NAME (a) && TYPE_NAME (b)
|
if (TYPE_NAME (a) && TYPE_NAME (b)
|
||||||
&& strcmp (TYPE_NAME (a), TYPE_NAME (b)) == 0)
|
&& strcmp (TYPE_NAME (a), TYPE_NAME (b)) == 0)
|
||||||
|
@ -2345,7 +2343,7 @@ rank_one_type (struct type *parm, struct type *arg)
|
||||||
TYPE_NAME (arg), TYPE_CODE (arg),
|
TYPE_NAME (arg), TYPE_CODE (arg),
|
||||||
TYPE_NAME (parm), TYPE_CODE (parm));
|
TYPE_NAME (parm), TYPE_CODE (parm));
|
||||||
|
|
||||||
/* x -> y means arg of type x being supplied for parameter of type y */
|
/* x -> y means arg of type x being supplied for parameter of type y. */
|
||||||
|
|
||||||
switch (TYPE_CODE (parm))
|
switch (TYPE_CODE (parm))
|
||||||
{
|
{
|
||||||
|
@ -2411,7 +2409,7 @@ rank_one_type (struct type *parm, struct type *arg)
|
||||||
signed and unsigned ints. */
|
signed and unsigned ints. */
|
||||||
if (TYPE_NOSIGN (parm))
|
if (TYPE_NOSIGN (parm))
|
||||||
{
|
{
|
||||||
/* This case only for character types */
|
/* This case only for character types. */
|
||||||
if (TYPE_NOSIGN (arg))
|
if (TYPE_NOSIGN (arg))
|
||||||
return EXACT_MATCH_BADNESS; /* plain char -> plain char */
|
return EXACT_MATCH_BADNESS; /* plain char -> plain char */
|
||||||
else /* signed/unsigned char -> plain char */
|
else /* signed/unsigned char -> plain char */
|
||||||
|
@ -2602,7 +2600,7 @@ rank_one_type (struct type *parm, struct type *arg)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_CODE_STRUCT:
|
case TYPE_CODE_STRUCT:
|
||||||
/* currently same as TYPE_CODE_CLASS */
|
/* currently same as TYPE_CODE_CLASS. */
|
||||||
switch (TYPE_CODE (arg))
|
switch (TYPE_CODE (arg))
|
||||||
{
|
{
|
||||||
case TYPE_CODE_STRUCT:
|
case TYPE_CODE_STRUCT:
|
||||||
|
@ -2665,7 +2663,7 @@ rank_one_type (struct type *parm, struct type *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* End of functions for overload resolution */
|
/* End of functions for overload resolution. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_bit_vector (B_TYPE *bits, int nbits)
|
print_bit_vector (B_TYPE *bits, int nbits)
|
||||||
|
|
|
@ -87,7 +87,7 @@ enum type_code
|
||||||
TYPE_CODE_VOID,
|
TYPE_CODE_VOID,
|
||||||
|
|
||||||
TYPE_CODE_SET, /* Pascal sets */
|
TYPE_CODE_SET, /* Pascal sets */
|
||||||
TYPE_CODE_RANGE, /* Range (integers within spec'd bounds) */
|
TYPE_CODE_RANGE, /* Range (integers within spec'd bounds). */
|
||||||
|
|
||||||
/* A string type which is like an array of character but prints
|
/* A string type which is like an array of character but prints
|
||||||
differently (at least for (the deleted) CHILL). It does not
|
differently (at least for (the deleted) CHILL). It does not
|
||||||
|
@ -215,16 +215,16 @@ enum type_instance_flag_value
|
||||||
#define TYPE_TARGET_STUB(t) (TYPE_MAIN_TYPE (t)->flag_target_stub)
|
#define TYPE_TARGET_STUB(t) (TYPE_MAIN_TYPE (t)->flag_target_stub)
|
||||||
|
|
||||||
/* Static type. If this is set, the corresponding type had
|
/* Static type. If this is set, the corresponding type had
|
||||||
* a static modifier.
|
a static modifier.
|
||||||
* Note: This may be unnecessary, since static data members
|
Note: This may be unnecessary, since static data members
|
||||||
* are indicated by other means (bitpos == -1)
|
are indicated by other means (bitpos == -1). */
|
||||||
*/
|
|
||||||
|
|
||||||
#define TYPE_STATIC(t) (TYPE_MAIN_TYPE (t)->flag_static)
|
#define TYPE_STATIC(t) (TYPE_MAIN_TYPE (t)->flag_static)
|
||||||
|
|
||||||
/* This is a function type which appears to have a prototype. We need this
|
/* This is a function type which appears to have a prototype. We need
|
||||||
for function calls in order to tell us if it's necessary to coerce the args,
|
this for function calls in order to tell us if it's necessary to
|
||||||
or to just do the standard conversions. This is used with a short field. */
|
coerce the args, or to just do the standard conversions. This is
|
||||||
|
used with a short field. */
|
||||||
|
|
||||||
#define TYPE_PROTOTYPED(t) (TYPE_MAIN_TYPE (t)->flag_prototyped)
|
#define TYPE_PROTOTYPED(t) (TYPE_MAIN_TYPE (t)->flag_prototyped)
|
||||||
|
|
||||||
|
@ -286,14 +286,12 @@ enum type_instance_flag_value
|
||||||
#define TYPE_DECLARED_CLASS(t) (TYPE_MAIN_TYPE (t)->flag_declared_class)
|
#define TYPE_DECLARED_CLASS(t) (TYPE_MAIN_TYPE (t)->flag_declared_class)
|
||||||
|
|
||||||
/* Constant type. If this is set, the corresponding type has a
|
/* Constant type. If this is set, the corresponding type has a
|
||||||
* const modifier.
|
const modifier. */
|
||||||
*/
|
|
||||||
|
|
||||||
#define TYPE_CONST(t) (TYPE_INSTANCE_FLAGS (t) & TYPE_INSTANCE_FLAG_CONST)
|
#define TYPE_CONST(t) (TYPE_INSTANCE_FLAGS (t) & TYPE_INSTANCE_FLAG_CONST)
|
||||||
|
|
||||||
/* Volatile type. If this is set, the corresponding type has a
|
/* Volatile type. If this is set, the corresponding type has a
|
||||||
* volatile modifier.
|
volatile modifier. */
|
||||||
*/
|
|
||||||
|
|
||||||
#define TYPE_VOLATILE(t) \
|
#define TYPE_VOLATILE(t) \
|
||||||
(TYPE_INSTANCE_FLAGS (t) & TYPE_INSTANCE_FLAG_VOLATILE)
|
(TYPE_INSTANCE_FLAGS (t) & TYPE_INSTANCE_FLAG_VOLATILE)
|
||||||
|
@ -371,7 +369,7 @@ enum type_specific_kind
|
||||||
|
|
||||||
struct main_type
|
struct main_type
|
||||||
{
|
{
|
||||||
/* Code for kind of type */
|
/* Code for kind of type. */
|
||||||
|
|
||||||
ENUM_BITFIELD(type_code) code : 8;
|
ENUM_BITFIELD(type_code) code : 8;
|
||||||
|
|
||||||
|
@ -728,8 +726,8 @@ struct cplus_struct_type
|
||||||
|
|
||||||
B_TYPE *protected_field_bits;
|
B_TYPE *protected_field_bits;
|
||||||
|
|
||||||
/* for classes with fields to be ignored, either this is optimized out
|
/* For classes with fields to be ignored, either this is optimized out
|
||||||
or this field has length 0 */
|
or this field has length 0. */
|
||||||
|
|
||||||
B_TYPE *ignore_field_bits;
|
B_TYPE *ignore_field_bits;
|
||||||
|
|
||||||
|
@ -817,8 +815,7 @@ struct cplus_struct_type
|
||||||
*fn_fieldlists;
|
*fn_fieldlists;
|
||||||
|
|
||||||
/* Pointer to information about enclosing scope, if this is a
|
/* Pointer to information about enclosing scope, if this is a
|
||||||
* local type. If it is not a local type, this is NULL
|
local type. If it is not a local type, this is NULL. */
|
||||||
*/
|
|
||||||
struct local_type_info
|
struct local_type_info
|
||||||
{
|
{
|
||||||
char *file;
|
char *file;
|
||||||
|
@ -845,7 +842,7 @@ struct cplus_struct_type
|
||||||
struct symbol **template_arguments;
|
struct symbol **template_arguments;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Struct used in computing virtual base list */
|
/* Struct used in computing virtual base list. */
|
||||||
struct vbase
|
struct vbase
|
||||||
{
|
{
|
||||||
struct type *vbasetype; /* pointer to virtual base */
|
struct type *vbasetype; /* pointer to virtual base */
|
||||||
|
@ -866,7 +863,7 @@ struct rank
|
||||||
short subrank;
|
short subrank;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Struct used for ranking a function for overload resolution */
|
/* Struct used for ranking a function for overload resolution. */
|
||||||
struct badness_vector
|
struct badness_vector
|
||||||
{
|
{
|
||||||
int length;
|
int length;
|
||||||
|
@ -941,7 +938,7 @@ extern void allocate_gnat_aux_type (struct type *);
|
||||||
#define TYPE_HIGH_BOUND_UNDEFINED(range_type) \
|
#define TYPE_HIGH_BOUND_UNDEFINED(range_type) \
|
||||||
TYPE_RANGE_DATA(range_type)->high_undefined
|
TYPE_RANGE_DATA(range_type)->high_undefined
|
||||||
|
|
||||||
/* Moto-specific stuff for FORTRAN arrays */
|
/* Moto-specific stuff for FORTRAN arrays. */
|
||||||
|
|
||||||
#define TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED(arraytype) \
|
#define TYPE_ARRAY_UPPER_BOUND_IS_UNDEFINED(arraytype) \
|
||||||
TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype))
|
TYPE_HIGH_BOUND_UNDEFINED(TYPE_INDEX_TYPE(arraytype))
|
||||||
|
@ -1247,7 +1244,7 @@ extern const struct floatformat *floatformats_ibm_long_double[BFD_ENDIAN_UNKNOWN
|
||||||
|
|
||||||
/* Allocate space for storing data associated with a particular type.
|
/* Allocate space for storing data associated with a particular type.
|
||||||
We ensure that the space is allocated using the same mechanism that
|
We ensure that the space is allocated using the same mechanism that
|
||||||
was used to allocate the space for the type structure itself. I.E.
|
was used to allocate the space for the type structure itself. I.e.
|
||||||
if the type is on an objfile's objfile_obstack, then the space for data
|
if the type is on an objfile's objfile_obstack, then the space for data
|
||||||
associated with that type will also be allocated on the objfile_obstack.
|
associated with that type will also be allocated on the objfile_obstack.
|
||||||
If the type is not associated with any particular objfile (such as
|
If the type is not associated with any particular objfile (such as
|
||||||
|
@ -1417,41 +1414,41 @@ extern int is_unique_ancestor (struct type *, struct value *);
|
||||||
|
|
||||||
#define LENGTH_MATCH(bv) ((bv)->rank[0])
|
#define LENGTH_MATCH(bv) ((bv)->rank[0])
|
||||||
|
|
||||||
/* Badness if parameter list length doesn't match arg list length */
|
/* Badness if parameter list length doesn't match arg list length. */
|
||||||
extern const struct rank LENGTH_MISMATCH_BADNESS;
|
extern const struct rank LENGTH_MISMATCH_BADNESS;
|
||||||
|
|
||||||
/* Dummy badness value for nonexistent parameter positions */
|
/* Dummy badness value for nonexistent parameter positions. */
|
||||||
extern const struct rank TOO_FEW_PARAMS_BADNESS;
|
extern const struct rank TOO_FEW_PARAMS_BADNESS;
|
||||||
/* Badness if no conversion among types */
|
/* Badness if no conversion among types. */
|
||||||
extern const struct rank INCOMPATIBLE_TYPE_BADNESS;
|
extern const struct rank INCOMPATIBLE_TYPE_BADNESS;
|
||||||
|
|
||||||
/* Badness of an exact match. */
|
/* Badness of an exact match. */
|
||||||
extern const struct rank EXACT_MATCH_BADNESS;
|
extern const struct rank EXACT_MATCH_BADNESS;
|
||||||
|
|
||||||
/* Badness of integral promotion */
|
/* Badness of integral promotion. */
|
||||||
extern const struct rank INTEGER_PROMOTION_BADNESS;
|
extern const struct rank INTEGER_PROMOTION_BADNESS;
|
||||||
/* Badness of floating promotion */
|
/* Badness of floating promotion. */
|
||||||
extern const struct rank FLOAT_PROMOTION_BADNESS;
|
extern const struct rank FLOAT_PROMOTION_BADNESS;
|
||||||
/* Badness of converting a derived class pointer
|
/* Badness of converting a derived class pointer
|
||||||
to a base class pointer. */
|
to a base class pointer. */
|
||||||
extern const struct rank BASE_PTR_CONVERSION_BADNESS;
|
extern const struct rank BASE_PTR_CONVERSION_BADNESS;
|
||||||
/* Badness of integral conversion */
|
/* Badness of integral conversion. */
|
||||||
extern const struct rank INTEGER_CONVERSION_BADNESS;
|
extern const struct rank INTEGER_CONVERSION_BADNESS;
|
||||||
/* Badness of floating conversion */
|
/* Badness of floating conversion. */
|
||||||
extern const struct rank FLOAT_CONVERSION_BADNESS;
|
extern const struct rank FLOAT_CONVERSION_BADNESS;
|
||||||
/* Badness of integer<->floating conversions */
|
/* Badness of integer<->floating conversions. */
|
||||||
extern const struct rank INT_FLOAT_CONVERSION_BADNESS;
|
extern const struct rank INT_FLOAT_CONVERSION_BADNESS;
|
||||||
/* Badness of conversion of pointer to void pointer */
|
/* Badness of conversion of pointer to void pointer. */
|
||||||
extern const struct rank VOID_PTR_CONVERSION_BADNESS;
|
extern const struct rank VOID_PTR_CONVERSION_BADNESS;
|
||||||
/* Badness of conversion of pointer to boolean. */
|
/* Badness of conversion of pointer to boolean. */
|
||||||
extern const struct rank BOOL_PTR_CONVERSION_BADNESS;
|
extern const struct rank BOOL_PTR_CONVERSION_BADNESS;
|
||||||
/* Badness of converting derived to base class */
|
/* Badness of converting derived to base class. */
|
||||||
extern const struct rank BASE_CONVERSION_BADNESS;
|
extern const struct rank BASE_CONVERSION_BADNESS;
|
||||||
/* Badness of converting from non-reference to reference */
|
/* Badness of converting from non-reference to reference. */
|
||||||
extern const struct rank REFERENCE_CONVERSION_BADNESS;
|
extern const struct rank REFERENCE_CONVERSION_BADNESS;
|
||||||
|
|
||||||
/* Non-standard conversions allowed by the debugger */
|
/* Non-standard conversions allowed by the debugger */
|
||||||
/* Converting a pointer to an int is usually OK */
|
/* Converting a pointer to an int is usually OK. */
|
||||||
extern const struct rank NS_POINTER_CONVERSION_BADNESS;
|
extern const struct rank NS_POINTER_CONVERSION_BADNESS;
|
||||||
|
|
||||||
|
|
||||||
|
|
114
gdb/gnu-nat.c
114
gdb/gnu-nat.c
|
@ -150,7 +150,7 @@ int proc_trace (struct proc *proc, int set);
|
||||||
/* The state passed by an exception message. */
|
/* The state passed by an exception message. */
|
||||||
struct exc_state
|
struct exc_state
|
||||||
{
|
{
|
||||||
int exception; /* The exception code */
|
int exception; /* The exception code. */
|
||||||
int code, subcode;
|
int code, subcode;
|
||||||
mach_port_t handler; /* The real exception port to handle this. */
|
mach_port_t handler; /* The real exception port to handle this. */
|
||||||
mach_port_t reply; /* The reply port from the exception call. */
|
mach_port_t reply; /* The reply port from the exception call. */
|
||||||
|
@ -173,17 +173,18 @@ struct inf
|
||||||
struct proc *task; /* The mach task. */
|
struct proc *task; /* The mach task. */
|
||||||
struct proc *threads; /* A linked list of all threads in TASK. */
|
struct proc *threads; /* A linked list of all threads in TASK. */
|
||||||
|
|
||||||
/* True if THREADS needn't be validated by querying the task. We assume that
|
/* True if THREADS needn't be validated by querying the task. We
|
||||||
we and the task in question are the only ones frobbing the thread list,
|
assume that we and the task in question are the only ones
|
||||||
so as long as we don't let any code run, we don't have to worry about
|
frobbing the thread list, so as long as we don't let any code
|
||||||
THREADS changing. */
|
run, we don't have to worry about THREADS changing. */
|
||||||
int threads_up_to_date;
|
int threads_up_to_date;
|
||||||
|
|
||||||
pid_t pid; /* The real system PID. */
|
pid_t pid; /* The real system PID. */
|
||||||
|
|
||||||
struct inf_wait wait; /* What to return from target_wait. */
|
struct inf_wait wait; /* What to return from target_wait. */
|
||||||
|
|
||||||
/* One thread proc in INF may be in `single-stepping mode'. This is it. */
|
/* One thread proc in INF may be in `single-stepping mode'. This
|
||||||
|
is it. */
|
||||||
struct proc *step_thread;
|
struct proc *step_thread;
|
||||||
|
|
||||||
/* The thread we think is the signal thread. */
|
/* The thread we think is the signal thread. */
|
||||||
|
@ -215,7 +216,7 @@ struct inf
|
||||||
expect to happen. */
|
expect to happen. */
|
||||||
unsigned pending_execs;
|
unsigned pending_execs;
|
||||||
|
|
||||||
/* Fields describing global state */
|
/* Fields describing global state. */
|
||||||
|
|
||||||
/* The task suspend count used when gdb has control. This is normally 1 to
|
/* The task suspend count used when gdb has control. This is normally 1 to
|
||||||
make things easier for us, but sometimes (like when attaching to vital
|
make things easier for us, but sometimes (like when attaching to vital
|
||||||
|
@ -433,8 +434,9 @@ _proc_get_exc_port (struct proc *proc)
|
||||||
return exc_port;
|
return exc_port;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Replace PROC's exception port with EXC_PORT, unless it's already been
|
/* Replace PROC's exception port with EXC_PORT, unless it's already
|
||||||
done. Stash away any existing exception port so we can restore it later. */
|
been done. Stash away any existing exception port so we can
|
||||||
|
restore it later. */
|
||||||
void
|
void
|
||||||
proc_steal_exc_port (struct proc *proc, mach_port_t exc_port)
|
proc_steal_exc_port (struct proc *proc, mach_port_t exc_port)
|
||||||
{
|
{
|
||||||
|
@ -514,7 +516,7 @@ proc_trace (struct proc *proc, int set)
|
||||||
thread_state_t state = proc_get_state (proc, 1);
|
thread_state_t state = proc_get_state (proc, 1);
|
||||||
|
|
||||||
if (!state)
|
if (!state)
|
||||||
return 0; /* the thread must be dead. */
|
return 0; /* The thread must be dead. */
|
||||||
|
|
||||||
proc_debug (proc, "tracing %s", set ? "on" : "off");
|
proc_debug (proc, "tracing %s", set ? "on" : "off");
|
||||||
|
|
||||||
|
@ -752,7 +754,8 @@ inf_set_pid (struct inf *inf, pid_t pid)
|
||||||
error_t err = proc_pid2task (proc_server, pid, &task_port);
|
error_t err = proc_pid2task (proc_server, pid, &task_port);
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
error (_("Error getting task for pid %d: %s"), pid, safe_strerror (err));
|
error (_("Error getting task for pid %d: %s"),
|
||||||
|
pid, safe_strerror (err));
|
||||||
}
|
}
|
||||||
|
|
||||||
inf_debug (inf, "setting task: %d", task_port);
|
inf_debug (inf, "setting task: %d", task_port);
|
||||||
|
@ -1579,8 +1582,10 @@ rewait:
|
||||||
/* We're done! */
|
/* We're done! */
|
||||||
{
|
{
|
||||||
#if 0 /* do we need this? */
|
#if 0 /* do we need this? */
|
||||||
prune_threads (1); /* Get rid of the old shell threads */
|
prune_threads (1); /* Get rid of the old shell
|
||||||
renumber_threads (0); /* Give our threads reasonable names. */
|
threads. */
|
||||||
|
renumber_threads (0); /* Give our threads reasonable
|
||||||
|
names. */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
inf_debug (inf, "pending exec completed, pending_execs => %d",
|
inf_debug (inf, "pending exec completed, pending_execs => %d",
|
||||||
|
@ -1619,7 +1624,9 @@ rewait:
|
||||||
{
|
{
|
||||||
/* TID is dead; try and find a new thread. */
|
/* TID is dead; try and find a new thread. */
|
||||||
if (inf_update_procs (inf) && inf->threads)
|
if (inf_update_procs (inf) && inf->threads)
|
||||||
ptid = ptid_build (inf->pid, 0, inf->threads->tid); /* The first available thread. */
|
ptid = ptid_build (inf->pid, 0, inf->threads->tid); /* The first
|
||||||
|
available
|
||||||
|
thread. */
|
||||||
else
|
else
|
||||||
ptid = inferior_ptid; /* let wait_for_inferior handle exit case */
|
ptid = inferior_ptid; /* let wait_for_inferior handle exit case */
|
||||||
}
|
}
|
||||||
|
@ -1717,8 +1724,9 @@ S_exception_raise_request (mach_port_t port, mach_port_t reply_port,
|
||||||
inf->wait.exc.subcode = subcode;
|
inf->wait.exc.subcode = subcode;
|
||||||
inf->wait.exc.reply = reply_port;
|
inf->wait.exc.reply = reply_port;
|
||||||
|
|
||||||
/* Exceptions are encoded in the signal space by putting them after
|
/* Exceptions are encoded in the signal space by putting
|
||||||
_NSIG; this assumes they're positive (and not extremely large)! */
|
them after _NSIG; this assumes they're positive (and not
|
||||||
|
extremely large)! */
|
||||||
inf->wait.status.value.sig =
|
inf->wait.status.value.sig =
|
||||||
target_signal_from_host (_NSIG + exception);
|
target_signal_from_host (_NSIG + exception);
|
||||||
}
|
}
|
||||||
|
@ -1739,7 +1747,8 @@ S_exception_raise_request (mach_port_t port, mach_port_t reply_port,
|
||||||
void
|
void
|
||||||
inf_task_died_status (struct inf *inf)
|
inf_task_died_status (struct inf *inf)
|
||||||
{
|
{
|
||||||
warning (_("Pid %d died with unknown exit status, using SIGKILL."), inf->pid);
|
warning (_("Pid %d died with unknown exit status, using SIGKILL."),
|
||||||
|
inf->pid);
|
||||||
inf->wait.status.kind = TARGET_WAITKIND_SIGNALLED;
|
inf->wait.status.kind = TARGET_WAITKIND_SIGNALLED;
|
||||||
inf->wait.status.value.sig = TARGET_SIGNAL_KILL;
|
inf->wait.status.value.sig = TARGET_SIGNAL_KILL;
|
||||||
}
|
}
|
||||||
|
@ -1781,7 +1790,7 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
|
||||||
}
|
}
|
||||||
|
|
||||||
mach_port_deallocate (mach_task_self (), dead_port);
|
mach_port_deallocate (mach_task_self (), dead_port);
|
||||||
inf->threads_up_to_date = 0; /* Just in case */
|
inf->threads_up_to_date = 0; /* Just in case. */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1855,7 +1864,8 @@ S_proc_wait_reply (mach_port_t reply, error_t err,
|
||||||
{
|
{
|
||||||
if (err != EINTR)
|
if (err != EINTR)
|
||||||
{
|
{
|
||||||
warning (_("Can't wait for pid %d: %s"), inf->pid, safe_strerror (err));
|
warning (_("Can't wait for pid %d: %s"),
|
||||||
|
inf->pid, safe_strerror (err));
|
||||||
inf->no_wait = 1;
|
inf->no_wait = 1;
|
||||||
|
|
||||||
/* Since we can't see the inferior's signals, don't trap them. */
|
/* Since we can't see the inferior's signals, don't trap them. */
|
||||||
|
@ -1961,8 +1971,8 @@ port_msgs_queued (mach_port_t port)
|
||||||
|
|
||||||
Note that a resume may not `take' if there are pending exceptions/&c
|
Note that a resume may not `take' if there are pending exceptions/&c
|
||||||
still unprocessed from the last resume we did (any given resume may result
|
still unprocessed from the last resume we did (any given resume may result
|
||||||
in multiple events returned by wait).
|
in multiple events returned by wait). */
|
||||||
*/
|
|
||||||
static void
|
static void
|
||||||
gnu_resume (struct target_ops *ops,
|
gnu_resume (struct target_ops *ops,
|
||||||
ptid_t ptid, int step, enum target_signal sig)
|
ptid_t ptid, int step, enum target_signal sig)
|
||||||
|
@ -2230,7 +2240,7 @@ gnu_detach (struct target_ops *ops, char *args, int from_tty)
|
||||||
inferior_ptid = null_ptid;
|
inferior_ptid = null_ptid;
|
||||||
detach_inferior (pid);
|
detach_inferior (pid);
|
||||||
|
|
||||||
unpush_target (ops); /* Pop out of handling an inferior */
|
unpush_target (ops); /* Pop out of handling an inferior. */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2268,12 +2278,13 @@ gnu_read_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
|
||||||
pointer_t copied;
|
pointer_t copied;
|
||||||
int copy_count;
|
int copy_count;
|
||||||
|
|
||||||
/* Get memory from inferior with page aligned addresses */
|
/* Get memory from inferior with page aligned addresses. */
|
||||||
err = vm_read (task, low_address, aligned_length, &copied, ©_count);
|
err = vm_read (task, low_address, aligned_length, &copied, ©_count);
|
||||||
if (err)
|
if (err)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err = hurd_safe_copyin (myaddr, (void *) (addr - low_address + copied), length);
|
err = hurd_safe_copyin (myaddr, (void *) (addr - low_address + copied),
|
||||||
|
length);
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
warning (_("Read from inferior faulted: %s"), safe_strerror (err));
|
warning (_("Read from inferior faulted: %s"), safe_strerror (err));
|
||||||
|
@ -2282,7 +2293,8 @@ gnu_read_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
|
||||||
|
|
||||||
err = vm_deallocate (mach_task_self (), copied, copy_count);
|
err = vm_deallocate (mach_task_self (), copied, copy_count);
|
||||||
if (err)
|
if (err)
|
||||||
warning (_("gnu_read_inferior vm_deallocate failed: %s"), safe_strerror (err));
|
warning (_("gnu_read_inferior vm_deallocate failed: %s"),
|
||||||
|
safe_strerror (err));
|
||||||
|
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
@ -2318,7 +2330,7 @@ gnu_write_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
|
||||||
struct vm_region_list *region_element;
|
struct vm_region_list *region_element;
|
||||||
struct vm_region_list *region_head = (struct vm_region_list *) NULL;
|
struct vm_region_list *region_head = (struct vm_region_list *) NULL;
|
||||||
|
|
||||||
/* Get memory from inferior with page aligned addresses */
|
/* Get memory from inferior with page aligned addresses. */
|
||||||
err = vm_read (task,
|
err = vm_read (task,
|
||||||
low_address,
|
low_address,
|
||||||
aligned_length,
|
aligned_length,
|
||||||
|
@ -2364,7 +2376,7 @@ gnu_write_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
|
||||||
&offset);
|
&offset);
|
||||||
CHK_GOTO_OUT ("vm_region failed", err);
|
CHK_GOTO_OUT ("vm_region failed", err);
|
||||||
|
|
||||||
/* Check for holes in memory */
|
/* Check for holes in memory. */
|
||||||
if (old_address != region_address)
|
if (old_address != region_address)
|
||||||
{
|
{
|
||||||
warning (_("No memory at 0x%x. Nothing written"),
|
warning (_("No memory at 0x%x. Nothing written"),
|
||||||
|
@ -2376,14 +2388,15 @@ gnu_write_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
|
||||||
|
|
||||||
if (!(max_protection & VM_PROT_WRITE))
|
if (!(max_protection & VM_PROT_WRITE))
|
||||||
{
|
{
|
||||||
warning (_("Memory at address 0x%x is unwritable. Nothing written"),
|
warning (_("Memory at address 0x%x is unwritable. "
|
||||||
|
"Nothing written"),
|
||||||
old_address);
|
old_address);
|
||||||
err = KERN_SUCCESS;
|
err = KERN_SUCCESS;
|
||||||
length = 0;
|
length = 0;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Chain the regions for later use */
|
/* Chain the regions for later use. */
|
||||||
region_element =
|
region_element =
|
||||||
(struct vm_region_list *)
|
(struct vm_region_list *)
|
||||||
obstack_alloc (®ion_obstack, sizeof (struct vm_region_list));
|
obstack_alloc (®ion_obstack, sizeof (struct vm_region_list));
|
||||||
|
@ -2392,7 +2405,7 @@ gnu_write_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
|
||||||
region_element->start = region_address;
|
region_element->start = region_address;
|
||||||
region_element->length = region_length;
|
region_element->length = region_length;
|
||||||
|
|
||||||
/* Chain the regions along with protections */
|
/* Chain the regions along with protections. */
|
||||||
region_element->next = region_head;
|
region_element->next = region_head;
|
||||||
region_head = region_element;
|
region_head = region_element;
|
||||||
|
|
||||||
|
@ -2403,7 +2416,7 @@ gnu_write_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
|
||||||
/* If things fail after this, we give up.
|
/* If things fail after this, we give up.
|
||||||
Somebody is messing up inferior_task's mappings. */
|
Somebody is messing up inferior_task's mappings. */
|
||||||
|
|
||||||
/* Enable writes to the chained vm regions */
|
/* Enable writes to the chained vm regions. */
|
||||||
for (scan = region_head; scan; scan = scan->next)
|
for (scan = region_head; scan; scan = scan->next)
|
||||||
{
|
{
|
||||||
if (!(scan->protection & VM_PROT_WRITE))
|
if (!(scan->protection & VM_PROT_WRITE))
|
||||||
|
@ -2423,7 +2436,7 @@ gnu_write_inferior (task_t task, CORE_ADDR addr, char *myaddr, int length)
|
||||||
aligned_length);
|
aligned_length);
|
||||||
CHK_GOTO_OUT ("vm_write failed", err);
|
CHK_GOTO_OUT ("vm_write failed", err);
|
||||||
|
|
||||||
/* Set up the original region protections, if they were changed */
|
/* Set up the original region protections, if they were changed. */
|
||||||
for (scan = region_head; scan; scan = scan->next)
|
for (scan = region_head; scan; scan = scan->next)
|
||||||
{
|
{
|
||||||
if (!(scan->protection & VM_PROT_WRITE))
|
if (!(scan->protection & VM_PROT_WRITE))
|
||||||
|
@ -2645,25 +2658,29 @@ struct cmd_list_element *show_thread_default_cmd_list = NULL;
|
||||||
static void
|
static void
|
||||||
set_thread_cmd (char *args, int from_tty)
|
set_thread_cmd (char *args, int from_tty)
|
||||||
{
|
{
|
||||||
printf_unfiltered ("\"set thread\" must be followed by the name of a thread property, or \"default\".\n");
|
printf_unfiltered ("\"set thread\" must be followed by the "
|
||||||
|
"name of a thread property, or \"default\".\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
show_thread_cmd (char *args, int from_tty)
|
show_thread_cmd (char *args, int from_tty)
|
||||||
{
|
{
|
||||||
printf_unfiltered ("\"show thread\" must be followed by the name of a thread property, or \"default\".\n");
|
printf_unfiltered ("\"show thread\" must be followed by the "
|
||||||
|
"name of a thread property, or \"default\".\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_thread_default_cmd (char *args, int from_tty)
|
set_thread_default_cmd (char *args, int from_tty)
|
||||||
{
|
{
|
||||||
printf_unfiltered ("\"set thread default\" must be followed by the name of a thread property.\n");
|
printf_unfiltered ("\"set thread default\" must be followed "
|
||||||
|
"by the name of a thread property.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
show_thread_default_cmd (char *args, int from_tty)
|
show_thread_default_cmd (char *args, int from_tty)
|
||||||
{
|
{
|
||||||
printf_unfiltered ("\"show thread default\" must be followed by the name of a thread property.\n");
|
printf_unfiltered ("\"show thread default\" must be followed "
|
||||||
|
"by the name of a thread property.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -2677,7 +2694,8 @@ parse_int_arg (char *args, char *cmd_prefix)
|
||||||
if (*args && *arg_end == '\0')
|
if (*args && *arg_end == '\0')
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
error (_("Illegal argument for \"%s\" command, should be an integer."), cmd_prefix);
|
error (_("Illegal argument for \"%s\" command, should be an integer."),
|
||||||
|
cmd_prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -2688,7 +2706,8 @@ _parse_bool_arg (char *args, char *t_val, char *f_val, char *cmd_prefix)
|
||||||
else if (strcmp (args, f_val) == 0)
|
else if (strcmp (args, f_val) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
error (_("Illegal argument for \"%s\" command, should be \"%s\" or \"%s\"."),
|
error (_("Illegal argument for \"%s\" command, "
|
||||||
|
"should be \"%s\" or \"%s\"."),
|
||||||
cmd_prefix, t_val, f_val);
|
cmd_prefix, t_val, f_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2755,14 +2774,16 @@ show_task_pause_cmd (char *args, int from_tty)
|
||||||
static void
|
static void
|
||||||
set_task_detach_sc_cmd (char *args, int from_tty)
|
set_task_detach_sc_cmd (char *args, int from_tty)
|
||||||
{
|
{
|
||||||
cur_inf ()->detach_sc = parse_int_arg (args, "set task detach-suspend-count");
|
cur_inf ()->detach_sc = parse_int_arg (args,
|
||||||
|
"set task detach-suspend-count");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
show_task_detach_sc_cmd (char *args, int from_tty)
|
show_task_detach_sc_cmd (char *args, int from_tty)
|
||||||
{
|
{
|
||||||
check_empty (args, "show task detach-suspend-count");
|
check_empty (args, "show task detach-suspend-count");
|
||||||
printf_unfiltered ("The inferior task will be left with a suspend count of %d when detaching.\n",
|
printf_unfiltered ("The inferior task will be left with a "
|
||||||
|
"suspend count of %d when detaching.\n",
|
||||||
cur_inf ()->detach_sc);
|
cur_inf ()->detach_sc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2849,8 +2870,9 @@ steal_exc_port (struct proc *proc, mach_port_t name)
|
||||||
proc->saved_exc_port = port;
|
proc->saved_exc_port = port;
|
||||||
|
|
||||||
if (!proc->exc_port)
|
if (!proc->exc_port)
|
||||||
/* If PROC is a thread, we may not have set its exception port before.
|
/* If PROC is a thread, we may not have set its exception port
|
||||||
We can't use proc_steal_exc_port because it also sets saved_exc_port. */
|
before. We can't use proc_steal_exc_port because it also sets
|
||||||
|
saved_exc_port. */
|
||||||
{
|
{
|
||||||
proc->exc_port = proc->inf->event_port;
|
proc->exc_port = proc->inf->event_port;
|
||||||
err = proc_set_exception_port (proc, proc->exc_port);
|
err = proc_set_exception_port (proc, proc->exc_port);
|
||||||
|
@ -2901,7 +2923,8 @@ set_sig_thread_cmd (char *args, int from_tty)
|
||||||
int tid = ptid_get_tid (thread_id_to_pid (atoi (args)));
|
int tid = ptid_get_tid (thread_id_to_pid (atoi (args)));
|
||||||
|
|
||||||
if (tid < 0)
|
if (tid < 0)
|
||||||
error (_("Thread ID %s not known. Use the \"info threads\" command to\n"
|
error (_("Thread ID %s not known. "
|
||||||
|
"Use the \"info threads\" command to\n"
|
||||||
"see the IDs of currently known threads."), args);
|
"see the IDs of currently known threads."), args);
|
||||||
inf->signal_thread = inf_tid_to_thread (inf, tid);
|
inf->signal_thread = inf_tid_to_thread (inf, tid);
|
||||||
}
|
}
|
||||||
|
@ -3171,7 +3194,8 @@ used to pause individual threads by default instead."),
|
||||||
_("Set the suspend count will leave on the thread when detaching."),
|
_("Set the suspend count will leave on the thread when detaching."),
|
||||||
&set_task_cmd_list);
|
&set_task_cmd_list);
|
||||||
add_cmd ("detach-suspend-count", no_class, show_task_detach_sc_cmd,
|
add_cmd ("detach-suspend-count", no_class, show_task_detach_sc_cmd,
|
||||||
_("Show the suspend count will leave on the thread when detaching."),
|
_("Show the suspend count will leave "
|
||||||
|
"on the thread when detaching."),
|
||||||
&show_task_cmd_list);
|
&show_task_cmd_list);
|
||||||
|
|
||||||
add_cmd ("exception-port", no_class, set_task_exc_port_cmd, _("\
|
add_cmd ("exception-port", no_class, set_task_exc_port_cmd, _("\
|
||||||
|
@ -3409,7 +3433,7 @@ _initialize_gnu_nat (void)
|
||||||
/* When over-writing code on some machines the I-Cache must be flushed
|
/* When over-writing code on some machines the I-Cache must be flushed
|
||||||
explicitly, because it is not kept coherent by the lazy hardware.
|
explicitly, because it is not kept coherent by the lazy hardware.
|
||||||
This definitely includes breakpoints, for instance, or else we
|
This definitely includes breakpoints, for instance, or else we
|
||||||
end up looping in mysterious Bpt traps */
|
end up looping in mysterious Bpt traps. */
|
||||||
|
|
||||||
void
|
void
|
||||||
flush_inferior_icache (CORE_ADDR pc, int amount)
|
flush_inferior_icache (CORE_ADDR pc, int amount)
|
||||||
|
|
|
@ -96,7 +96,8 @@ extern int gnu_debug_flag;
|
||||||
|
|
||||||
#define debug(msg, args...) \
|
#define debug(msg, args...) \
|
||||||
do { if (gnu_debug_flag) \
|
do { if (gnu_debug_flag) \
|
||||||
fprintf_unfiltered (gdb_stdlog, "%s:%d: " msg "\r\n", __FILE__ , __LINE__ , ##args); } while (0)
|
fprintf_unfiltered (gdb_stdlog, "%s:%d: " msg "\r\n", \
|
||||||
|
__FILE__ , __LINE__ , ##args); } while (0)
|
||||||
|
|
||||||
/* Create a prototype generic GNU/Hurd target. The client can
|
/* Create a prototype generic GNU/Hurd target. The client can
|
||||||
override it with local methods. */
|
override it with local methods. */
|
||||||
|
|
|
@ -149,7 +149,8 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Handle the case where the vtbl field points directly to a structure. */
|
/* Handle the case where the vtbl field points directly to a
|
||||||
|
structure. */
|
||||||
vtbl = value_ptradd (vtbl, vi);
|
vtbl = value_ptradd (vtbl, vi);
|
||||||
entry = value_ind (vtbl);
|
entry = value_ind (vtbl);
|
||||||
}
|
}
|
||||||
|
@ -159,7 +160,8 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
|
||||||
if (TYPE_CODE (entry_type) == TYPE_CODE_STRUCT)
|
if (TYPE_CODE (entry_type) == TYPE_CODE_STRUCT)
|
||||||
{
|
{
|
||||||
/* Move the `this' pointer according to the virtual function table. */
|
/* Move the `this' pointer according to the virtual function table. */
|
||||||
set_value_offset (arg1, value_offset (arg1) + value_as_long (value_field (entry, 0)));
|
set_value_offset (arg1, value_offset (arg1)
|
||||||
|
+ value_as_long (value_field (entry, 0)));
|
||||||
|
|
||||||
if (!value_lazy (arg1))
|
if (!value_lazy (arg1))
|
||||||
{
|
{
|
||||||
|
@ -174,7 +176,8 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
|
||||||
else
|
else
|
||||||
error (_("I'm confused: virtual function table has bad type"));
|
error (_("I'm confused: virtual function table has bad type"));
|
||||||
/* Reinstantiate the function pointer with the correct type. */
|
/* Reinstantiate the function pointer with the correct type. */
|
||||||
deprecated_set_value_type (vfn, lookup_pointer_type (TYPE_FN_FIELD_TYPE (f, j)));
|
deprecated_set_value_type (vfn,
|
||||||
|
lookup_pointer_type (TYPE_FN_FIELD_TYPE (f, j)));
|
||||||
|
|
||||||
*arg1p = arg1;
|
*arg1p = arg1;
|
||||||
return vfn;
|
return vfn;
|
||||||
|
@ -200,10 +203,10 @@ gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
|
||||||
if (using_enc)
|
if (using_enc)
|
||||||
*using_enc = 0;
|
*using_enc = 0;
|
||||||
|
|
||||||
/* Get declared type */
|
/* Get declared type. */
|
||||||
known_type = value_type (v);
|
known_type = value_type (v);
|
||||||
CHECK_TYPEDEF (known_type);
|
CHECK_TYPEDEF (known_type);
|
||||||
/* RTTI works only or class objects */
|
/* RTTI works only or class objects. */
|
||||||
if (TYPE_CODE (known_type) != TYPE_CODE_CLASS)
|
if (TYPE_CODE (known_type) != TYPE_CODE_CLASS)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -221,8 +224,7 @@ gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Make sure our basetype and known type match, otherwise, cast
|
/* Make sure our basetype and known type match, otherwise, cast
|
||||||
so we can get at the vtable properly.
|
so we can get at the vtable properly. */
|
||||||
*/
|
|
||||||
btype = known_type_vptr_basetype;
|
btype = known_type_vptr_basetype;
|
||||||
CHECK_TYPEDEF (btype);
|
CHECK_TYPEDEF (btype);
|
||||||
if (btype != known_type )
|
if (btype != known_type )
|
||||||
|
@ -231,30 +233,28 @@ gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
|
||||||
if (using_enc)
|
if (using_enc)
|
||||||
*using_enc=1;
|
*using_enc=1;
|
||||||
}
|
}
|
||||||
/*
|
/* We can't use value_ind here, because it would want to use RTTI, and
|
||||||
We can't use value_ind here, because it would want to use RTTI, and
|
|
||||||
we'd waste a bunch of time figuring out we already know the type.
|
we'd waste a bunch of time figuring out we already know the type.
|
||||||
Besides, we don't care about the type, just the actual pointer
|
Besides, we don't care about the type, just the actual pointer. */
|
||||||
*/
|
|
||||||
if (value_address (value_field (v, known_type_vptr_fieldno)) == 0)
|
if (value_address (value_field (v, known_type_vptr_fieldno)) == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
vtbl = value_as_address (value_field (v, known_type_vptr_fieldno));
|
vtbl = value_as_address (value_field (v, known_type_vptr_fieldno));
|
||||||
|
|
||||||
/* Try to find a symbol that is the vtable */
|
/* Try to find a symbol that is the vtable. */
|
||||||
minsym=lookup_minimal_symbol_by_pc(vtbl);
|
minsym=lookup_minimal_symbol_by_pc(vtbl);
|
||||||
if (minsym==NULL
|
if (minsym==NULL
|
||||||
|| (demangled_name=SYMBOL_LINKAGE_NAME (minsym))==NULL
|
|| (demangled_name=SYMBOL_LINKAGE_NAME (minsym))==NULL
|
||||||
|| !is_vtable_name (demangled_name))
|
|| !is_vtable_name (demangled_name))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* If we just skip the prefix, we get screwed by namespaces */
|
/* If we just skip the prefix, we get screwed by namespaces. */
|
||||||
demangled_name=cplus_demangle(demangled_name,DMGL_PARAMS|DMGL_ANSI);
|
demangled_name=cplus_demangle(demangled_name,DMGL_PARAMS|DMGL_ANSI);
|
||||||
p = strchr (demangled_name, ' ');
|
p = strchr (demangled_name, ' ');
|
||||||
if (p)
|
if (p)
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
|
||||||
/* Lookup the type for the name */
|
/* Lookup the type for the name. */
|
||||||
/* FIXME: chastain/2003-11-26: block=NULL is bogus. See pr gdb/1465. */
|
/* FIXME: chastain/2003-11-26: block=NULL is bogus. See pr gdb/1465. */
|
||||||
rtti_type = cp_lookup_rtti_type (demangled_name, NULL);
|
rtti_type = cp_lookup_rtti_type (demangled_name, NULL);
|
||||||
if (rtti_type == NULL)
|
if (rtti_type == NULL)
|
||||||
|
@ -263,7 +263,8 @@ gnuv2_value_rtti_type (struct value *v, int *full, int *top, int *using_enc)
|
||||||
if (TYPE_N_BASECLASSES(rtti_type) > 1 && full && (*full) != 1)
|
if (TYPE_N_BASECLASSES(rtti_type) > 1 && full && (*full) != 1)
|
||||||
{
|
{
|
||||||
if (top)
|
if (top)
|
||||||
*top=TYPE_BASECLASS_BITPOS(rtti_type,TYPE_VPTR_FIELDNO(rtti_type))/8;
|
*top = TYPE_BASECLASS_BITPOS (rtti_type,
|
||||||
|
TYPE_VPTR_FIELDNO(rtti_type)) / 8;
|
||||||
if (top && ((*top) >0))
|
if (top && ((*top) >0))
|
||||||
{
|
{
|
||||||
if (TYPE_LENGTH(rtti_type) > TYPE_LENGTH(known_type))
|
if (TYPE_LENGTH(rtti_type) > TYPE_LENGTH(known_type))
|
||||||
|
|
|
@ -265,7 +265,8 @@ gnuv3_get_vtable (struct gdbarch *gdbarch,
|
||||||
/* Correct it to point at the start of the virtual table, rather
|
/* Correct it to point at the start of the virtual table, rather
|
||||||
than the address point. */
|
than the address point. */
|
||||||
return value_at_lazy (vtable_type,
|
return value_at_lazy (vtable_type,
|
||||||
vtable_address - vtable_address_point_offset (gdbarch));
|
vtable_address
|
||||||
|
- vtable_address_point_offset (gdbarch));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -408,6 +409,7 @@ gnuv3_virtual_fn_field (struct value **value_p,
|
||||||
to (the address of)(ARG) + OFFSET.
|
to (the address of)(ARG) + OFFSET.
|
||||||
|
|
||||||
-1 is returned on error. */
|
-1 is returned on error. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
gnuv3_baseclass_offset (struct type *type, int index, const bfd_byte *valaddr,
|
gnuv3_baseclass_offset (struct type *type, int index, const bfd_byte *valaddr,
|
||||||
CORE_ADDR address)
|
CORE_ADDR address)
|
||||||
|
@ -825,7 +827,8 @@ gnuv3_pass_by_reference (struct type *type)
|
||||||
a reference to this class, then it is a copy constructor. */
|
a reference to this class, then it is a copy constructor. */
|
||||||
if (TYPE_NFIELDS (fieldtype) == 2
|
if (TYPE_NFIELDS (fieldtype) == 2
|
||||||
&& TYPE_CODE (TYPE_FIELD_TYPE (fieldtype, 1)) == TYPE_CODE_REF
|
&& TYPE_CODE (TYPE_FIELD_TYPE (fieldtype, 1)) == TYPE_CODE_REF
|
||||||
&& check_typedef (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (fieldtype, 1))) == type)
|
&& check_typedef (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (fieldtype,
|
||||||
|
1))) == type)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -847,7 +850,8 @@ gnuv3_pass_by_reference (struct type *type)
|
||||||
static void
|
static void
|
||||||
init_gnuv3_ops (void)
|
init_gnuv3_ops (void)
|
||||||
{
|
{
|
||||||
vtable_type_gdbarch_data = gdbarch_data_register_post_init (build_gdb_vtable_type);
|
vtable_type_gdbarch_data
|
||||||
|
= gdbarch_data_register_post_init (build_gdb_vtable_type);
|
||||||
|
|
||||||
gnu_v3_abi_ops.shortname = "gnu-v3";
|
gnu_v3_abi_ops.shortname = "gnu-v3";
|
||||||
gnu_v3_abi_ops.longname = "GNU G++ Version 3 ABI";
|
gnu_v3_abi_ops.longname = "GNU G++ Version 3 ABI";
|
||||||
|
|
|
@ -122,7 +122,7 @@
|
||||||
|
|
||||||
#if __DJGPP_MINOR__ < 3
|
#if __DJGPP_MINOR__ < 3
|
||||||
/* This code will be provided from DJGPP 2.03 on. Until then I code it
|
/* This code will be provided from DJGPP 2.03 on. Until then I code it
|
||||||
here */
|
here. */
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
unsigned short sig0;
|
unsigned short sig0;
|
||||||
|
@ -149,8 +149,8 @@ NPX;
|
||||||
|
|
||||||
static NPX npx;
|
static NPX npx;
|
||||||
|
|
||||||
static void save_npx (void); /* Save the FPU of the debugged program */
|
static void save_npx (void); /* Save the FPU of the debugged program. */
|
||||||
static void load_npx (void); /* Restore the FPU of the debugged program */
|
static void load_npx (void); /* Restore the FPU of the debugged program. */
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
/* Store the contents of the NPX in the global variable `npx'. */
|
/* Store the contents of the NPX in the global variable `npx'. */
|
||||||
|
@ -423,7 +423,7 @@ go32_wait (struct target_ops *ops,
|
||||||
unsigned long INT3_addr = 0;
|
unsigned long INT3_addr = 0;
|
||||||
int stepping_over_INT = 0;
|
int stepping_over_INT = 0;
|
||||||
|
|
||||||
a_tss.tss_eflags &= 0xfeff; /* reset the single-step flag (TF) */
|
a_tss.tss_eflags &= 0xfeff; /* Reset the single-step flag (TF). */
|
||||||
if (resume_is_step)
|
if (resume_is_step)
|
||||||
{
|
{
|
||||||
/* If the next instruction is INT xx or INTO, we need to handle
|
/* If the next instruction is INT xx or INTO, we need to handle
|
||||||
|
@ -464,7 +464,7 @@ go32_wait (struct target_ops *ops,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
a_tss.tss_trap = 0xffff; /* run_child looks for this */
|
a_tss.tss_trap = 0xffff; /* run_child looks for this. */
|
||||||
a_tss.tss_irqn = resume_signal;
|
a_tss.tss_irqn = resume_signal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ go32_wait (struct target_ops *ops,
|
||||||
if (stepping_over_INT && a_tss.tss_eip == INT3_addr + 1)
|
if (stepping_over_INT && a_tss.tss_eip == INT3_addr + 1)
|
||||||
{
|
{
|
||||||
/* Restore the original opcode. */
|
/* Restore the original opcode. */
|
||||||
a_tss.tss_eip--; /* EIP points *after* the INT3 instruction */
|
a_tss.tss_eip--; /* EIP points *after* the INT3 instruction. */
|
||||||
write_child (a_tss.tss_eip, &saved_opcode, 1);
|
write_child (a_tss.tss_eip, &saved_opcode, 1);
|
||||||
/* Simulate a TRAP exception. */
|
/* Simulate a TRAP exception. */
|
||||||
a_tss.tss_irqn = 1;
|
a_tss.tss_irqn = 1;
|
||||||
|
@ -540,7 +540,8 @@ fetch_register (struct regcache *regcache, int regno)
|
||||||
if (regno < gdbarch_fp0_regnum (gdbarch))
|
if (regno < gdbarch_fp0_regnum (gdbarch))
|
||||||
regcache_raw_supply (regcache, regno,
|
regcache_raw_supply (regcache, regno,
|
||||||
(char *) &a_tss + regno_mapping[regno].tss_ofs);
|
(char *) &a_tss + regno_mapping[regno].tss_ofs);
|
||||||
else if (i386_fp_regnum_p (gdbarch, regno) || i386_fpc_regnum_p (gdbarch, regno))
|
else if (i386_fp_regnum_p (gdbarch, regno) || i386_fpc_regnum_p (gdbarch,
|
||||||
|
regno))
|
||||||
i387_supply_fsave (regcache, regno, &npx);
|
i387_supply_fsave (regcache, regno, &npx);
|
||||||
else
|
else
|
||||||
internal_error (__FILE__, __LINE__,
|
internal_error (__FILE__, __LINE__,
|
||||||
|
@ -570,7 +571,8 @@ store_register (const struct regcache *regcache, int regno)
|
||||||
if (regno < gdbarch_fp0_regnum (gdbarch))
|
if (regno < gdbarch_fp0_regnum (gdbarch))
|
||||||
regcache_raw_collect (regcache, regno,
|
regcache_raw_collect (regcache, regno,
|
||||||
(char *) &a_tss + regno_mapping[regno].tss_ofs);
|
(char *) &a_tss + regno_mapping[regno].tss_ofs);
|
||||||
else if (i386_fp_regnum_p (gdbarch, regno) || i386_fpc_regnum_p (gdbarch, regno))
|
else if (i386_fp_regnum_p (gdbarch, regno) || i386_fpc_regnum_p (gdbarch,
|
||||||
|
regno))
|
||||||
i387_collect_fsave (regcache, regno, &npx);
|
i387_collect_fsave (regcache, regno, &npx);
|
||||||
else
|
else
|
||||||
internal_error (__FILE__, __LINE__,
|
internal_error (__FILE__, __LINE__,
|
||||||
|
@ -626,7 +628,7 @@ go32_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static cmdline_t child_cmd; /* parsed child's command line kept here */
|
static cmdline_t child_cmd; /* Parsed child's command line kept here. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
go32_files_info (struct target_ops *target)
|
go32_files_info (struct target_ops *target)
|
||||||
|
@ -666,7 +668,8 @@ go32_create_inferior (struct target_ops *ops, char *exec_file,
|
||||||
/* Init command line storage. */
|
/* Init command line storage. */
|
||||||
if (redir_debug_init (&child_cmd) == -1)
|
if (redir_debug_init (&child_cmd) == -1)
|
||||||
internal_error (__FILE__, __LINE__,
|
internal_error (__FILE__, __LINE__,
|
||||||
_("Cannot allocate redirection storage: not enough memory.\n"));
|
_("Cannot allocate redirection storage: "
|
||||||
|
"not enough memory.\n"));
|
||||||
|
|
||||||
/* Parse the command line and create redirections. */
|
/* Parse the command line and create redirections. */
|
||||||
if (strpbrk (args, "<>"))
|
if (strpbrk (args, "<>"))
|
||||||
|
@ -696,7 +699,7 @@ go32_create_inferior (struct target_ops *ops, char *exec_file,
|
||||||
cmdline[cmdlen + 1] = 13;
|
cmdline[cmdlen + 1] = 13;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cmdline[0] = 0xff; /* signal v2loadimage it's a long command */
|
cmdline[0] = 0xff; /* Signal v2loadimage it's a long command. */
|
||||||
|
|
||||||
environ = env;
|
environ = env;
|
||||||
|
|
||||||
|
@ -819,11 +822,11 @@ device_mode (int fd, int raw_p)
|
||||||
else
|
else
|
||||||
newmode &= ~0x20;
|
newmode &= ~0x20;
|
||||||
|
|
||||||
if (oldmode & 0x80) /* Only for character dev */
|
if (oldmode & 0x80) /* Only for character dev. */
|
||||||
{
|
{
|
||||||
regs.x.ax = 0x4401;
|
regs.x.ax = 0x4401;
|
||||||
regs.x.bx = fd;
|
regs.x.bx = fd;
|
||||||
regs.x.dx = newmode & 0xff; /* Force upper byte zero, else it fails */
|
regs.x.dx = newmode & 0xff; /* Force upper byte zero, else it fails. */
|
||||||
__dpmi_int (0x21, ®s);
|
__dpmi_int (0x21, ®s);
|
||||||
if (regs.x.flags & 1)
|
if (regs.x.flags & 1)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -844,7 +847,7 @@ static int terminal_is_ours = 1;
|
||||||
static void
|
static void
|
||||||
go32_terminal_init (void)
|
go32_terminal_init (void)
|
||||||
{
|
{
|
||||||
inf_mode_valid = 0; /* reinitialize, in case they are restarting child */
|
inf_mode_valid = 0; /* Reinitialize, in case they are restarting child. */
|
||||||
terminal_is_ours = 1;
|
terminal_is_ours = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -889,8 +892,8 @@ go32_terminal_inferior (void)
|
||||||
error (_("Cannot redirect standard handles for program: %s."),
|
error (_("Cannot redirect standard handles for program: %s."),
|
||||||
safe_strerror (errno));
|
safe_strerror (errno));
|
||||||
}
|
}
|
||||||
/* set the console device of the inferior to whatever mode
|
/* Set the console device of the inferior to whatever mode
|
||||||
(raw or cooked) we found it last time */
|
(raw or cooked) we found it last time. */
|
||||||
if (terminal_is_ours)
|
if (terminal_is_ours)
|
||||||
{
|
{
|
||||||
if (inf_mode_valid)
|
if (inf_mode_valid)
|
||||||
|
@ -903,7 +906,7 @@ static void
|
||||||
go32_terminal_ours (void)
|
go32_terminal_ours (void)
|
||||||
{
|
{
|
||||||
/* Switch to cooked mode on the gdb terminal and save the inferior
|
/* Switch to cooked mode on the gdb terminal and save the inferior
|
||||||
terminal mode to be restored when it is resumed */
|
terminal mode to be restored when it is resumed. */
|
||||||
if (!terminal_is_ours)
|
if (!terminal_is_ours)
|
||||||
{
|
{
|
||||||
inf_terminal_mode = device_mode (0, 0);
|
inf_terminal_mode = device_mode (0, 0);
|
||||||
|
@ -994,7 +997,8 @@ init_go32_ops (void)
|
||||||
/* Initialize child's command line storage. */
|
/* Initialize child's command line storage. */
|
||||||
if (redir_debug_init (&child_cmd) == -1)
|
if (redir_debug_init (&child_cmd) == -1)
|
||||||
internal_error (__FILE__, __LINE__,
|
internal_error (__FILE__, __LINE__,
|
||||||
_("Cannot allocate redirection storage: not enough memory.\n"));
|
_("Cannot allocate redirection storage: "
|
||||||
|
"not enough memory.\n"));
|
||||||
|
|
||||||
/* We are always processing GCC-compiled programs. */
|
/* We are always processing GCC-compiled programs. */
|
||||||
processing_gcc_compilation = 2;
|
processing_gcc_compilation = 2;
|
||||||
|
@ -1032,7 +1036,7 @@ nl_langinfo (nl_item item)
|
||||||
int blen = sizeof (buf);
|
int blen = sizeof (buf);
|
||||||
int needed = snprintf (buf, blen, "CP%d", dos_codepage ());
|
int needed = snprintf (buf, blen, "CP%d", dos_codepage ());
|
||||||
|
|
||||||
if (needed > blen) /* should never happen */
|
if (needed > blen) /* Should never happen. */
|
||||||
buf[0] = 0;
|
buf[0] = 0;
|
||||||
retval = xstrdup (buf);
|
retval = xstrdup (buf);
|
||||||
}
|
}
|
||||||
|
@ -1256,7 +1260,7 @@ go32_sysinfo (char *arg, int from_tty)
|
||||||
/* We only list features which might be useful in the DPMI
|
/* We only list features which might be useful in the DPMI
|
||||||
environment. */
|
environment. */
|
||||||
if ((cpuid_edx & 1) == 0)
|
if ((cpuid_edx & 1) == 0)
|
||||||
puts_filtered ("No FPU "); /* it's unusual to not have an FPU */
|
puts_filtered ("No FPU "); /* It's unusual to not have an FPU. */
|
||||||
if ((cpuid_edx & (1 << 1)) != 0)
|
if ((cpuid_edx & (1 << 1)) != 0)
|
||||||
puts_filtered ("VME ");
|
puts_filtered ("VME ");
|
||||||
if ((cpuid_edx & (1 << 2)) != 0)
|
if ((cpuid_edx & (1 << 2)) != 0)
|
||||||
|
@ -1325,7 +1329,8 @@ go32_sysinfo (char *arg, int from_tty)
|
||||||
printf_filtered ("%s)\n", windows_flavor);
|
printf_filtered ("%s)\n", windows_flavor);
|
||||||
}
|
}
|
||||||
else if (true_dos_version == 0x532 && advertized_dos_version == 0x500)
|
else if (true_dos_version == 0x532 && advertized_dos_version == 0x500)
|
||||||
printf_filtered ("Windows Version................Windows NT family (W2K/XP/W2K3/Vista/W2K8)\n");
|
printf_filtered ("Windows Version................"
|
||||||
|
"Windows NT family (W2K/XP/W2K3/Vista/W2K8)\n");
|
||||||
puts_filtered ("\n");
|
puts_filtered ("\n");
|
||||||
/* On some versions of Windows, __dpmi_get_capabilities returns
|
/* On some versions of Windows, __dpmi_get_capabilities returns
|
||||||
zero, but the buffer is not filled with info, so we fill the
|
zero, but the buffer is not filled with info, so we fill the
|
||||||
|
@ -1341,7 +1346,8 @@ go32_sysinfo (char *arg, int from_tty)
|
||||||
I don't trust the vendors to follow that... */
|
I don't trust the vendors to follow that... */
|
||||||
if (!memchr (&dpmi_vendor_info[2], 0, 126))
|
if (!memchr (&dpmi_vendor_info[2], 0, 126))
|
||||||
dpmi_vendor_info[128] = '\0';
|
dpmi_vendor_info[128] = '\0';
|
||||||
printf_filtered ("DPMI Host......................%s v%d.%d (capabilities: %#x)\n",
|
printf_filtered ("DPMI Host......................"
|
||||||
|
"%s v%d.%d (capabilities: %#x)\n",
|
||||||
&dpmi_vendor_info[2],
|
&dpmi_vendor_info[2],
|
||||||
(unsigned)dpmi_vendor_info[0],
|
(unsigned)dpmi_vendor_info[0],
|
||||||
(unsigned)dpmi_vendor_info[1],
|
(unsigned)dpmi_vendor_info[1],
|
||||||
|
@ -1352,7 +1358,8 @@ go32_sysinfo (char *arg, int from_tty)
|
||||||
__dpmi_get_version (&dpmi_version_data);
|
__dpmi_get_version (&dpmi_version_data);
|
||||||
printf_filtered ("DPMI Version...................%d.%02d\n",
|
printf_filtered ("DPMI Version...................%d.%02d\n",
|
||||||
dpmi_version_data.major, dpmi_version_data.minor);
|
dpmi_version_data.major, dpmi_version_data.minor);
|
||||||
printf_filtered ("DPMI Info......................%s-bit DPMI, with%s Virtual Memory support\n",
|
printf_filtered ("DPMI Info......................"
|
||||||
|
"%s-bit DPMI, with%s Virtual Memory support\n",
|
||||||
(dpmi_version_data.flags & 1) ? "32" : "16",
|
(dpmi_version_data.flags & 1) ? "32" : "16",
|
||||||
(dpmi_version_data.flags & 4) ? "" : "out");
|
(dpmi_version_data.flags & 4) ? "" : "out");
|
||||||
printfi_filtered (31, "Interrupts reflected to %s mode\n",
|
printfi_filtered (31, "Interrupts reflected to %s mode\n",
|
||||||
|
@ -1366,7 +1373,8 @@ go32_sysinfo (char *arg, int from_tty)
|
||||||
if (prog_has_started)
|
if (prog_has_started)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("pushfl ; popl %0" : "=g" (eflags));
|
__asm__ __volatile__ ("pushfl ; popl %0" : "=g" (eflags));
|
||||||
printf_filtered ("Protection.....................Ring %d (in %s), with%s I/O protection\n",
|
printf_filtered ("Protection....................."
|
||||||
|
"Ring %d (in %s), with%s I/O protection\n",
|
||||||
a_tss.tss_cs & 3, (a_tss.tss_cs & 4) ? "LDT" : "GDT",
|
a_tss.tss_cs & 3, (a_tss.tss_cs & 4) ? "LDT" : "GDT",
|
||||||
(a_tss.tss_cs & 3) > ((eflags >> 12) & 3) ? "" : "out");
|
(a_tss.tss_cs & 3) > ((eflags >> 12) & 3) ? "" : "out");
|
||||||
}
|
}
|
||||||
|
@ -1617,7 +1625,8 @@ display_descriptor (unsigned type, unsigned long base_addr, int idx, int force)
|
||||||
case 23:
|
case 23:
|
||||||
printf_filtered (" %s-bit Data (%s Exp-%s%s)",
|
printf_filtered (" %s-bit Data (%s Exp-%s%s)",
|
||||||
descr.bit32 ? "32" : "16",
|
descr.bit32 ? "32" : "16",
|
||||||
descr.stype & 2 ? "Read/Write," : "Read-Only, ",
|
descr.stype & 2
|
||||||
|
? "Read/Write," : "Read-Only, ",
|
||||||
descr.stype & 4 ? "down" : "up",
|
descr.stype & 4 ? "down" : "up",
|
||||||
descr.stype & 1 ? "" : ", N.Acc");
|
descr.stype & 1 ? "" : ", N.Acc");
|
||||||
break;
|
break;
|
||||||
|
@ -1747,7 +1756,8 @@ go32_sgdt (char *arg, int from_tty)
|
||||||
{
|
{
|
||||||
gdt_entry = parse_and_eval_long (arg);
|
gdt_entry = parse_and_eval_long (arg);
|
||||||
if (gdt_entry < 0 || (gdt_entry & 7) != 0)
|
if (gdt_entry < 0 || (gdt_entry & 7) != 0)
|
||||||
error (_("Invalid GDT entry 0x%03lx: not an integral multiple of 8."),
|
error (_("Invalid GDT entry 0x%03lx: "
|
||||||
|
"not an integral multiple of 8."),
|
||||||
(unsigned long)gdt_entry);
|
(unsigned long)gdt_entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1794,7 +1804,7 @@ go32_sidt (char *arg, int from_tty)
|
||||||
|
|
||||||
__asm__ __volatile__ ("sidt %0" : "=m" (idtr) : /* no inputs */ );
|
__asm__ __volatile__ ("sidt %0" : "=m" (idtr) : /* no inputs */ );
|
||||||
max_entry = (idtr.limit + 1) / 8;
|
max_entry = (idtr.limit + 1) / 8;
|
||||||
if (max_entry > 0x100) /* no more than 256 entries */
|
if (max_entry > 0x100) /* No more than 256 entries. */
|
||||||
max_entry = 0x100;
|
max_entry = 0x100;
|
||||||
|
|
||||||
if (idt_entry >= 0)
|
if (idt_entry >= 0)
|
||||||
|
@ -1857,7 +1867,7 @@ get_cr3 (void)
|
||||||
cr3 = _farnspeekl (taskbase + 0x1c) & ~0xfff;
|
cr3 = _farnspeekl (taskbase + 0x1c) & ~0xfff;
|
||||||
if (cr3 > 0xfffff)
|
if (cr3 > 0xfffff)
|
||||||
{
|
{
|
||||||
#if 0 /* not fullly supported yet */
|
#if 0 /* Not fullly supported yet. */
|
||||||
/* The Page Directory is in UMBs. In that case, CWSDPMI puts
|
/* The Page Directory is in UMBs. In that case, CWSDPMI puts
|
||||||
the first Page Table right below the Page Directory. Thus,
|
the first Page Table right below the Page Directory. Thus,
|
||||||
the first Page Table's entry for its own address and the Page
|
the first Page Table's entry for its own address and the Page
|
||||||
|
@ -1911,7 +1921,7 @@ get_pte (unsigned long pde, int n)
|
||||||
page tables, for now. */
|
page tables, for now. */
|
||||||
if ((pde & 1) && !(pde & 0x80) && n >= 0 && n < 1024)
|
if ((pde & 1) && !(pde & 0x80) && n >= 0 && n < 1024)
|
||||||
{
|
{
|
||||||
pde &= ~0xfff; /* clear non-address bits */
|
pde &= ~0xfff; /* Clear non-address bits. */
|
||||||
pte = _farpeekl (_dos_ds, pde + 4*n);
|
pte = _farpeekl (_dos_ds, pde + 4*n);
|
||||||
}
|
}
|
||||||
return pte;
|
return pte;
|
||||||
|
@ -1965,7 +1975,8 @@ go32_pde (char *arg, int from_tty)
|
||||||
|
|
||||||
pdbr = get_cr3 ();
|
pdbr = get_cr3 ();
|
||||||
if (!pdbr)
|
if (!pdbr)
|
||||||
puts_filtered ("Access to Page Directories is not supported on this system.\n");
|
puts_filtered ("Access to Page Directories is "
|
||||||
|
"not supported on this system.\n");
|
||||||
else if (pde_idx >= 0)
|
else if (pde_idx >= 0)
|
||||||
display_ptable_entry (get_pde (pde_idx), 1, 1, 0);
|
display_ptable_entry (get_pde (pde_idx), 1, 1, 0);
|
||||||
else
|
else
|
||||||
|
@ -1985,7 +1996,8 @@ display_page_table (long n, int force)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
printf_filtered ("Page Table pointed to by Page Directory entry 0x%lx:\n", n);
|
printf_filtered ("Page Table pointed to by "
|
||||||
|
"Page Directory entry 0x%lx:\n", n);
|
||||||
for (i = 0; i < 1024; i++)
|
for (i = 0; i < 1024; i++)
|
||||||
display_ptable_entry (get_pte (pde, i), 0, 0, 0);
|
display_ptable_entry (get_pte (pde, i), 0, 0, 0);
|
||||||
puts_filtered ("\n");
|
puts_filtered ("\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue