2011-01-05 Michael Snyder <msnyder@vmware.com>
* addrmap.c: Shorten lines of >= 80 columns. * arch-utils.c: Ditto. * arch-utils.h: Ditto. * ax-gdb.c: Ditto. * ax-general.c: Ditto. * bcache.c: Ditto. * blockframe.c: Ditto. * breakpoint.c: Ditto. * buildsym.c: Ditto. * c-lang.c: Ditto. * c-typeprint.c: Ditto. * charset.c: Ditto. * coffread.c: Ditto. * command.h: Ditto. * corelow.c: Ditto. * cp-abi.c: Ditto. * cp-namespace.c: Ditto. * cp-support.c: Ditto. * dbug-rom.c: Ditto. * dbxread.c: Ditto. * defs.h: Ditto. * dfp.c: Ditto. * dfp.h: Ditto. * dictionary.c: Ditto. * disasm.c: Ditto. * doublest.c: Ditto. * dwarf2-frame.c: Ditto. * dwarf2expr.c: Ditto. * dwarf2loc.c: Ditto. * dwarf2read.c: Ditto. * elfread.c: Ditto. * eval.c: Ditto. * event-loop.c: Ditto. * event-loop.h: Ditto. * exceptions.h: Ditto. * exec.c: Ditto. * expprint.c: Ditto. * expression.h: Ditto. * f-lang.c: Ditto. * f-valprint.c: Ditto. * findcmd.c: Ditto. * frame-base.c: Ditto. * frame-unwind.c: Ditto. * frame-unwind.h: Ditto. * frame.c: Ditto. * frame.h: Ditto. * gcore.c: Ditto. * gdb-stabs.h: Ditto. * gdb_assert.h: Ditto. * gdb_dirent.h: Ditto. * gdb_obstack.h: Ditto. * gdbcore.h: Ditto. * gdbtypes.c: Ditto. * gdbtypes.h: Ditto. * inf-ttrace.c: Ditto. * infcall.c: Ditto. * infcmd.c: Ditto. * inflow.c: Ditto. * infrun.c: Ditto. * inline-frame.h: Ditto. * language.c: Ditto. * language.h: Ditto. * libunwind-frame.c: Ditto. * libunwind-frame.h: Ditto. * linespec.c: Ditto. * linux-nat.c: Ditto. * linux-nat.h: Ditto. * linux-thread-db.c: Ditto. * machoread.c: Ditto. * macroexp.c: Ditto. * macrotab.c: Ditto. * main.c: Ditto. * maint.c: Ditto. * mdebugread.c: Ditto. * memattr.c: Ditto. * minsyms.c: Ditto. * monitor.c: Ditto. * monitor.h: Ditto. * objfiles.c: Ditto. * objfiles.h: Ditto. * osabi.c: Ditto. * p-typeprint.c: Ditto. * p-valprint.c: Ditto. * parse.c: Ditto. * printcmd.c: Ditto. * proc-events.c: Ditto. * procfs.c: Ditto. * progspace.c: Ditto. * progspace.h: Ditto. * psympriv.h: Ditto. * psymtab.c: Ditto. * record.c: Ditto. * regcache.c: Ditto. * regcache.h: Ditto. * remote-fileio.c: Ditto. * remote.c: Ditto. * ser-mingw.c: Ditto. * ser-tcp.c: Ditto. * ser-unix.c: Ditto. * serial.c: Ditto. * serial.h: Ditto. * solib-frv.c: Ditto. * solib-irix.c: Ditto. * solib-osf.c: Ditto. * solib-pa64.c: Ditto. * solib-som.c: Ditto. * solib-sunos.c: Ditto. * solib-svr4.c: Ditto. * solib-target.c: Ditto. * solib.c: Ditto. * somread.c: Ditto. * source.c: Ditto. * stabsread.c: Ditto. * stabsread.c: Ditto. * stack.c: Ditto. * stack.h: Ditto. * symfile-mem.c: Ditto. * symfile.c: Ditto. * symfile.h: Ditto. * symmisc.c: Ditto. * symtab.c: Ditto. * symtab.h: Ditto. * target-descriptions.c: Ditto. * target-memory.c: Ditto. * target.c: Ditto. * target.h: Ditto. * terminal.h: Ditto. * thread.c: Ditto. * top.c: Ditto. * tracepoint.c: Ditto. * tracepoint.h: Ditto. * ui-file.c: Ditto. * ui-file.h: Ditto. * ui-out.h: Ditto. * user-regs.c: Ditto. * user-regs.h: Ditto. * utils.c: Ditto. * valarith.c: Ditto. * valops.c: Ditto. * valprint.c: Ditto. * valprint.h: Ditto. * value.c: Ditto. * varobj.c: Ditto. * varobj.h: Ditto. * vec.h: Ditto. * xcoffread.c: Ditto. * xcoffsolib.c: Ditto. * xcoffsolib.h: Ditto. * xml-syscall.c: Ditto. * xml-tdesc.c: Ditto.
This commit is contained in:
parent
9689e3a3a7
commit
3e43a32aaa
151 changed files with 2974 additions and 1820 deletions
153
gdb/ChangeLog
153
gdb/ChangeLog
|
@ -1,3 +1,156 @@
|
|||
2011-01-05 Michael Snyder <msnyder@vmware.com>
|
||||
|
||||
* addrmap.c: Shorten lines of >= 80 columns.
|
||||
* arch-utils.c: Ditto.
|
||||
* arch-utils.h: Ditto.
|
||||
* ax-gdb.c: Ditto.
|
||||
* ax-general.c: Ditto.
|
||||
* bcache.c: Ditto.
|
||||
* blockframe.c: Ditto.
|
||||
* breakpoint.c: Ditto.
|
||||
* buildsym.c: Ditto.
|
||||
* c-lang.c: Ditto.
|
||||
* c-typeprint.c: Ditto.
|
||||
* charset.c: Ditto.
|
||||
* coffread.c: Ditto.
|
||||
* command.h: Ditto.
|
||||
* corelow.c: Ditto.
|
||||
* cp-abi.c: Ditto.
|
||||
* cp-namespace.c: Ditto.
|
||||
* cp-support.c: Ditto.
|
||||
* dbug-rom.c: Ditto.
|
||||
* dbxread.c: Ditto.
|
||||
* defs.h: Ditto.
|
||||
* dfp.c: Ditto.
|
||||
* dfp.h: Ditto.
|
||||
* dictionary.c: Ditto.
|
||||
* disasm.c: Ditto.
|
||||
* doublest.c: Ditto.
|
||||
* dwarf2-frame.c: Ditto.
|
||||
* dwarf2expr.c: Ditto.
|
||||
* dwarf2loc.c: Ditto.
|
||||
* dwarf2read.c: Ditto.
|
||||
* elfread.c: Ditto.
|
||||
* eval.c: Ditto.
|
||||
* event-loop.c: Ditto.
|
||||
* event-loop.h: Ditto.
|
||||
* exceptions.h: Ditto.
|
||||
* exec.c: Ditto.
|
||||
* expprint.c: Ditto.
|
||||
* expression.h: Ditto.
|
||||
* f-lang.c: Ditto.
|
||||
* f-valprint.c: Ditto.
|
||||
* findcmd.c: Ditto.
|
||||
* frame-base.c: Ditto.
|
||||
* frame-unwind.c: Ditto.
|
||||
* frame-unwind.h: Ditto.
|
||||
* frame.c: Ditto.
|
||||
* frame.h: Ditto.
|
||||
* gcore.c: Ditto.
|
||||
* gdb-stabs.h: Ditto.
|
||||
* gdb_assert.h: Ditto.
|
||||
* gdb_dirent.h: Ditto.
|
||||
* gdb_obstack.h: Ditto.
|
||||
* gdbcore.h: Ditto.
|
||||
* gdbtypes.c: Ditto.
|
||||
* gdbtypes.h: Ditto.
|
||||
* inf-ttrace.c: Ditto.
|
||||
* infcall.c: Ditto.
|
||||
* infcmd.c: Ditto.
|
||||
* inflow.c: Ditto.
|
||||
* infrun.c: Ditto.
|
||||
* inline-frame.h: Ditto.
|
||||
* language.c: Ditto.
|
||||
* language.h: Ditto.
|
||||
* libunwind-frame.c: Ditto.
|
||||
* libunwind-frame.h: Ditto.
|
||||
* linespec.c: Ditto.
|
||||
* linux-nat.c: Ditto.
|
||||
* linux-nat.h: Ditto.
|
||||
* linux-thread-db.c: Ditto.
|
||||
* machoread.c: Ditto.
|
||||
* macroexp.c: Ditto.
|
||||
* macrotab.c: Ditto.
|
||||
* main.c: Ditto.
|
||||
* maint.c: Ditto.
|
||||
* mdebugread.c: Ditto.
|
||||
* memattr.c: Ditto.
|
||||
* minsyms.c: Ditto.
|
||||
* monitor.c: Ditto.
|
||||
* monitor.h: Ditto.
|
||||
* objfiles.c: Ditto.
|
||||
* objfiles.h: Ditto.
|
||||
* osabi.c: Ditto.
|
||||
* p-typeprint.c: Ditto.
|
||||
* p-valprint.c: Ditto.
|
||||
* parse.c: Ditto.
|
||||
* printcmd.c: Ditto.
|
||||
* proc-events.c: Ditto.
|
||||
* procfs.c: Ditto.
|
||||
* progspace.c: Ditto.
|
||||
* progspace.h: Ditto.
|
||||
* psympriv.h: Ditto.
|
||||
* psymtab.c: Ditto.
|
||||
* record.c: Ditto.
|
||||
* regcache.c: Ditto.
|
||||
* regcache.h: Ditto.
|
||||
* remote-fileio.c: Ditto.
|
||||
* remote.c: Ditto.
|
||||
* ser-mingw.c: Ditto.
|
||||
* ser-tcp.c: Ditto.
|
||||
* ser-unix.c: Ditto.
|
||||
* serial.c: Ditto.
|
||||
* serial.h: Ditto.
|
||||
* solib-frv.c: Ditto.
|
||||
* solib-irix.c: Ditto.
|
||||
* solib-osf.c: Ditto.
|
||||
* solib-pa64.c: Ditto.
|
||||
* solib-som.c: Ditto.
|
||||
* solib-sunos.c: Ditto.
|
||||
* solib-svr4.c: Ditto.
|
||||
* solib-target.c: Ditto.
|
||||
* solib.c: Ditto.
|
||||
* somread.c: Ditto.
|
||||
* source.c: Ditto.
|
||||
* stabsread.c: Ditto.
|
||||
* stabsread.c: Ditto.
|
||||
* stack.c: Ditto.
|
||||
* stack.h: Ditto.
|
||||
* symfile-mem.c: Ditto.
|
||||
* symfile.c: Ditto.
|
||||
* symfile.h: Ditto.
|
||||
* symmisc.c: Ditto.
|
||||
* symtab.c: Ditto.
|
||||
* symtab.h: Ditto.
|
||||
* target-descriptions.c: Ditto.
|
||||
* target-memory.c: Ditto.
|
||||
* target.c: Ditto.
|
||||
* target.h: Ditto.
|
||||
* terminal.h: Ditto.
|
||||
* thread.c: Ditto.
|
||||
* top.c: Ditto.
|
||||
* tracepoint.c: Ditto.
|
||||
* tracepoint.h: Ditto.
|
||||
* ui-file.c: Ditto.
|
||||
* ui-file.h: Ditto.
|
||||
* ui-out.h: Ditto.
|
||||
* user-regs.c: Ditto.
|
||||
* user-regs.h: Ditto.
|
||||
* utils.c: Ditto.
|
||||
* valarith.c: Ditto.
|
||||
* valops.c: Ditto.
|
||||
* valprint.c: Ditto.
|
||||
* valprint.h: Ditto.
|
||||
* value.c: Ditto.
|
||||
* varobj.c: Ditto.
|
||||
* varobj.h: Ditto.
|
||||
* vec.h: Ditto.
|
||||
* xcoffread.c: Ditto.
|
||||
* xcoffsolib.c: Ditto.
|
||||
* xcoffsolib.h: Ditto.
|
||||
* xml-syscall.c: Ditto.
|
||||
* xml-tdesc.c: Ditto.
|
||||
|
||||
2011-01-05 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* configure.ac, gdb.1: Copyright year update.
|
||||
|
|
|
@ -307,7 +307,8 @@ addrmap_node_set_value (splay_tree_node node, void *value)
|
|||
|
||||
|
||||
static void
|
||||
addrmap_splay_tree_insert (struct addrmap_mutable *map, CORE_ADDR key, void *value)
|
||||
addrmap_splay_tree_insert (struct addrmap_mutable *map,
|
||||
CORE_ADDR key, void *value)
|
||||
{
|
||||
splay_tree_insert (map->tree,
|
||||
allocate_key (map, key),
|
||||
|
|
|
@ -279,7 +279,7 @@ show_endian (struct ui_file *file, int from_tty, struct cmd_list_element *c,
|
|||
"(currently big endian)\n"));
|
||||
else
|
||||
fprintf_unfiltered (file, _("The target endianness is set automatically "
|
||||
"(currently little endian)\n"));
|
||||
"(currently little endian)\n"));
|
||||
else
|
||||
if (target_byte_order_user == BFD_ENDIAN_BIG)
|
||||
fprintf_unfiltered (file,
|
||||
|
@ -435,12 +435,12 @@ show_architecture (struct ui_file *file, int from_tty,
|
|||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
if (target_architecture_user == NULL)
|
||||
fprintf_filtered (file, _("\
|
||||
The target architecture is set automatically (currently %s)\n"),
|
||||
gdbarch_bfd_arch_info (get_current_arch ())->printable_name);
|
||||
fprintf_filtered (file, _("The target architecture is set "
|
||||
"automatically (currently %s)\n"),
|
||||
gdbarch_bfd_arch_info (get_current_arch ())->printable_name);
|
||||
else
|
||||
fprintf_filtered (file, _("\
|
||||
The target architecture is assumed to be %s\n"), set_architecture_string);
|
||||
fprintf_filtered (file, _("The target architecture is assumed to be %s\n"),
|
||||
set_architecture_string);
|
||||
}
|
||||
|
||||
|
||||
|
@ -662,9 +662,9 @@ initialize_current_architecture (void)
|
|||
arches[nr + 0] = "auto";
|
||||
arches[nr + 1] = NULL;
|
||||
add_setshow_enum_cmd ("architecture", class_support,
|
||||
arches, &set_architecture_string, _("\
|
||||
Set architecture of target."), _("\
|
||||
Show architecture of target."), NULL,
|
||||
arches, &set_architecture_string,
|
||||
_("Set architecture of target."),
|
||||
_("Show architecture of target."), NULL,
|
||||
set_architecture, show_architecture,
|
||||
&setlist, &showlist);
|
||||
add_alias_cmd ("processor", "architecture", class_support, 1, &setlist);
|
||||
|
@ -788,15 +788,16 @@ default_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr,
|
|||
|
||||
/* */
|
||||
|
||||
extern initialize_file_ftype _initialize_gdbarch_utils; /* -Wmissing-prototypes */
|
||||
/* -Wmissing-prototypes */
|
||||
extern initialize_file_ftype _initialize_gdbarch_utils;
|
||||
|
||||
void
|
||||
_initialize_gdbarch_utils (void)
|
||||
{
|
||||
add_setshow_enum_cmd ("endian", class_support,
|
||||
endian_enum, &set_endian_string, _("\
|
||||
Set endianness of target."), _("\
|
||||
Show endianness of target."), NULL,
|
||||
set_endian, show_endian,
|
||||
endian_enum, &set_endian_string,
|
||||
_("Set endianness of target."),
|
||||
_("Show endianness of target."),
|
||||
NULL, set_endian, show_endian,
|
||||
&setlist, &showlist);
|
||||
}
|
||||
|
|
|
@ -51,8 +51,8 @@ extern void
|
|||
|
||||
/* Default implementation of gdbarch_displaced_hw_singlestep. */
|
||||
extern int
|
||||
default_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
|
||||
struct displaced_step_closure *closure);
|
||||
default_displaced_step_hw_singlestep (struct gdbarch *,
|
||||
struct displaced_step_closure *);
|
||||
|
||||
/* Possible value for gdbarch_displaced_step_location:
|
||||
Place displaced instructions at the program's entry point,
|
||||
|
@ -74,7 +74,8 @@ extern int no_op_reg_to_regnum (struct gdbarch *gdbarch, int reg);
|
|||
|
||||
/* Do nothing version of elf_make_msymbol_special. */
|
||||
|
||||
void default_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym);
|
||||
void default_elf_make_msymbol_special (asymbol *sym,
|
||||
struct minimal_symbol *msym);
|
||||
|
||||
/* Do nothing version of coff_make_msymbol_special. */
|
||||
|
||||
|
@ -100,7 +101,8 @@ extern CORE_ADDR generic_skip_solib_resolver (struct gdbarch *gdbarch,
|
|||
extern int generic_in_solib_return_trampoline (struct gdbarch *gdbarch,
|
||||
CORE_ADDR pc, char *name);
|
||||
|
||||
extern int generic_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc);
|
||||
extern int generic_in_function_epilogue_p (struct gdbarch *gdbarch,
|
||||
CORE_ADDR pc);
|
||||
|
||||
/* By default, registers are not convertible. */
|
||||
extern int generic_convert_register_p (struct gdbarch *gdbarch, int regnum,
|
||||
|
|
50
gdb/ax-gdb.c
50
gdb/ax-gdb.c
|
@ -70,7 +70,8 @@ static struct value *const_var_ref (struct symbol *var);
|
|||
static struct value *const_expr (union exp_element **pc);
|
||||
static struct value *maybe_const_expr (union exp_element **pc);
|
||||
|
||||
static void gen_traced_pop (struct gdbarch *, struct agent_expr *, struct axs_value *);
|
||||
static void gen_traced_pop (struct gdbarch *, struct agent_expr *,
|
||||
struct axs_value *);
|
||||
|
||||
static void gen_sign_extend (struct agent_expr *, struct type *);
|
||||
static void gen_extend (struct agent_expr *, struct type *);
|
||||
|
@ -633,7 +634,8 @@ gen_var_ref (struct gdbarch *gdbarch, struct agent_expr *ax,
|
|||
|
||||
case LOC_CONST_BYTES:
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("gen_var_ref: LOC_CONST_BYTES symbols are not supported"));
|
||||
_("gen_var_ref: LOC_CONST_BYTES "
|
||||
"symbols are not supported"));
|
||||
|
||||
/* Variable at a fixed location in memory. Easy. */
|
||||
case LOC_STATIC:
|
||||
|
@ -1092,9 +1094,8 @@ gen_ptrdiff (struct agent_expr *ax, struct axs_value *value,
|
|||
|
||||
if (TYPE_LENGTH (TYPE_TARGET_TYPE (value1->type))
|
||||
!= TYPE_LENGTH (TYPE_TARGET_TYPE (value2->type)))
|
||||
error (_("\
|
||||
First argument of `-' is a pointer, but second argument is neither\n\
|
||||
an integer nor a pointer of the same type."));
|
||||
error (_("First argument of `-' is a pointer, but second argument "
|
||||
"is neither\nan integer nor a pointer of the same type."));
|
||||
|
||||
ax_simple (ax, aop_sub);
|
||||
gen_scale (ax, aop_div_unsigned, value1->type);
|
||||
|
@ -1138,8 +1139,9 @@ gen_less (struct agent_expr *ax, struct axs_value *value,
|
|||
operator, used in error messages */
|
||||
static void
|
||||
gen_binop (struct agent_expr *ax, struct axs_value *value,
|
||||
struct axs_value *value1, struct axs_value *value2, enum agent_op op,
|
||||
enum agent_op op_unsigned, int may_carry, char *name)
|
||||
struct axs_value *value1, struct axs_value *value2,
|
||||
enum agent_op op, enum agent_op op_unsigned,
|
||||
int may_carry, char *name)
|
||||
{
|
||||
/* We only handle INT op INT. */
|
||||
if ((TYPE_CODE (value1->type) != TYPE_CODE_INT)
|
||||
|
@ -1447,7 +1449,8 @@ gen_struct_ref_recursive (struct expression *exp, struct agent_expr *ax,
|
|||
{
|
||||
gen_static_field (exp->gdbarch, ax, value, type, i);
|
||||
if (value->optimized_out)
|
||||
error (_("static field `%s' has been optimized out, cannot use"),
|
||||
error (_("static field `%s' has been "
|
||||
"optimized out, cannot use"),
|
||||
field);
|
||||
return 1;
|
||||
}
|
||||
|
@ -1469,7 +1472,8 @@ gen_struct_ref_recursive (struct expression *exp, struct agent_expr *ax,
|
|||
struct type *basetype = check_typedef (TYPE_BASECLASS (type, i));
|
||||
|
||||
rslt = gen_struct_ref_recursive (exp, ax, value, field,
|
||||
offset + TYPE_BASECLASS_BITPOS (type, i) / TARGET_CHAR_BIT,
|
||||
offset + TYPE_BASECLASS_BITPOS (type, i)
|
||||
/ TARGET_CHAR_BIT,
|
||||
basetype);
|
||||
if (rslt)
|
||||
return 1;
|
||||
|
@ -1587,7 +1591,8 @@ gen_struct_elt_for_reference (struct expression *exp,
|
|||
{
|
||||
gen_static_field (exp->gdbarch, ax, value, t, i);
|
||||
if (value->optimized_out)
|
||||
error (_("static field `%s' has been optimized out, cannot use"),
|
||||
error (_("static field `%s' has been "
|
||||
"optimized out, cannot use"),
|
||||
fieldname);
|
||||
return 1;
|
||||
}
|
||||
|
@ -1706,7 +1711,8 @@ gen_repeat (struct expression *exp, union exp_element **pc,
|
|||
int length;
|
||||
|
||||
if (!v)
|
||||
error (_("Right operand of `@' must be a constant, in agent expressions."));
|
||||
error (_("Right operand of `@' must be a "
|
||||
"constant, in agent expressions."));
|
||||
if (TYPE_CODE (value_type (v)) != TYPE_CODE_INT)
|
||||
error (_("Right operand of `@' must be an integer."));
|
||||
length = value_as_long (v);
|
||||
|
@ -1890,7 +1896,8 @@ gen_expr (struct expression *exp, union exp_element **pc,
|
|||
ax_tsv (ax, aop_tracev, tsv->number);
|
||||
}
|
||||
else
|
||||
error (_("$%s is not a trace state variable, may not assign to it"), name);
|
||||
error (_("$%s is not a trace state variable, "
|
||||
"may not assign to it"), name);
|
||||
}
|
||||
else
|
||||
error (_("May only assign to trace state variables"));
|
||||
|
@ -1925,7 +1932,8 @@ gen_expr (struct expression *exp, union exp_element **pc,
|
|||
ax_tsv (ax, aop_tracev, tsv->number);
|
||||
}
|
||||
else
|
||||
error (_("$%s is not a trace state variable, may not assign to it"), name);
|
||||
error (_("$%s is not a trace state variable, "
|
||||
"may not assign to it"), name);
|
||||
}
|
||||
else
|
||||
error (_("May only assign to trace state variables"));
|
||||
|
@ -2007,7 +2015,8 @@ gen_expr (struct expression *exp, union exp_element **pc,
|
|||
value->type = builtin_type (exp->gdbarch)->builtin_long_long;
|
||||
}
|
||||
else
|
||||
error (_("$%s is not a trace state variable; GDB agent expressions cannot use convenience variables."), name);
|
||||
error (_("$%s is not a trace state variable; GDB agent "
|
||||
"expressions cannot use convenience variables."), name);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2247,8 +2256,8 @@ gen_expr_binop_rest (struct expression *exp,
|
|||
|
||||
if (binop_types_user_defined_p (op, value1->type, value2->type))
|
||||
{
|
||||
error (_("\
|
||||
cannot subscript requested type: cannot call user defined functions"));
|
||||
error (_("cannot subscript requested type: "
|
||||
"cannot call user defined functions"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2268,7 +2277,8 @@ cannot subscript requested type: cannot call user defined functions"));
|
|||
}
|
||||
|
||||
if (!is_integral_type (value2->type))
|
||||
error (_("Argument to arithmetic operation not a number or boolean."));
|
||||
error (_("Argument to arithmetic operation "
|
||||
"not a number or boolean."));
|
||||
|
||||
gen_ptradd (ax, value, value1, value2);
|
||||
gen_deref (ax, value);
|
||||
|
@ -2511,10 +2521,12 @@ void
|
|||
_initialize_ax_gdb (void)
|
||||
{
|
||||
add_cmd ("agent", class_maintenance, agent_command,
|
||||
_("Translate an expression into remote agent bytecode for tracing."),
|
||||
_("Translate an expression into "
|
||||
"remote agent bytecode for tracing."),
|
||||
&maintenancelist);
|
||||
|
||||
add_cmd ("agent-eval", class_maintenance, agent_eval_command,
|
||||
_("Translate an expression into remote agent bytecode for evaluation."),
|
||||
_("Translate an expression into remote "
|
||||
"agent bytecode for evaluation."),
|
||||
&maintenancelist);
|
||||
}
|
||||
|
|
|
@ -154,7 +154,8 @@ generic_ext (struct agent_expr *x, enum agent_op op, int n)
|
|||
error (_("GDB bug: ax-general.c (generic_ext): bit count out of range"));
|
||||
/* That had better be enough range. */
|
||||
if (sizeof (LONGEST) * 8 > 255)
|
||||
error (_("GDB bug: ax-general.c (generic_ext): opcode has inadequate range"));
|
||||
error (_("GDB bug: ax-general.c (generic_ext): "
|
||||
"opcode has inadequate range"));
|
||||
|
||||
grow_expr (x, 2);
|
||||
x->buf[x->len++] = op;
|
||||
|
@ -184,7 +185,8 @@ ax_trace_quick (struct agent_expr *x, int n)
|
|||
{
|
||||
/* N must fit in a byte. */
|
||||
if (n < 0 || n > 255)
|
||||
error (_("GDB bug: ax-general.c (ax_trace_quick): size out of range for trace_quick"));
|
||||
error (_("GDB bug: ax-general.c (ax_trace_quick): "
|
||||
"size out of range for trace_quick"));
|
||||
|
||||
grow_expr (x, 2);
|
||||
x->buf[x->len++] = aop_trace_quick;
|
||||
|
@ -265,7 +267,8 @@ void
|
|||
ax_const_d (struct agent_expr *x, LONGEST d)
|
||||
{
|
||||
/* FIXME: floating-point support not present yet. */
|
||||
error (_("GDB bug: ax-general.c (ax_const_d): floating point not supported yet"));
|
||||
error (_("GDB bug: ax-general.c (ax_const_d): "
|
||||
"floating point not supported yet"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -289,7 +292,8 @@ ax_reg (struct agent_expr *x, int reg)
|
|||
{
|
||||
/* Make sure the register number is in range. */
|
||||
if (reg < 0 || reg > 0xffff)
|
||||
error (_("GDB bug: ax-general.c (ax_reg): register number out of range"));
|
||||
error (_("GDB bug: ax-general.c (ax_reg): "
|
||||
"register number out of range"));
|
||||
grow_expr (x, 3);
|
||||
x->buf[x->len] = aop_reg;
|
||||
x->buf[x->len + 1] = (reg >> 8) & 0xff;
|
||||
|
@ -305,7 +309,9 @@ ax_tsv (struct agent_expr *x, enum agent_op op, int num)
|
|||
{
|
||||
/* Make sure the tsv number is in range. */
|
||||
if (num < 0 || num > 0xffff)
|
||||
internal_error (__FILE__, __LINE__, _("ax-general.c (ax_tsv): variable number is %d, out of range"), num);
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("ax-general.c (ax_tsv): variable "
|
||||
"number is %d, out of range"), num);
|
||||
|
||||
grow_expr (x, 3);
|
||||
x->buf[x->len] = op;
|
||||
|
|
|
@ -455,7 +455,8 @@ print_bcache_statistics (struct bcache *c, char *type)
|
|||
printf_filtered (_(" Median entry size: %d\n"), median_entry_size);
|
||||
printf_filtered ("\n");
|
||||
|
||||
printf_filtered (_(" Total memory used by bcache, including overhead: %ld\n"),
|
||||
printf_filtered (_(" \
|
||||
Total memory used by bcache, including overhead: %ld\n"),
|
||||
c->structure_size);
|
||||
printf_filtered (_(" Percentage memory overhead: "));
|
||||
print_percentage (c->structure_size - c->unique_size, c->unique_size);
|
||||
|
|
|
@ -281,13 +281,16 @@ find_pc_partial_function (CORE_ADDR pc, char **name, CORE_ADDR *address,
|
|||
|
||||
for (i = 1; SYMBOL_LINKAGE_NAME (msymbol + i) != NULL; i++)
|
||||
{
|
||||
if (SYMBOL_VALUE_ADDRESS (msymbol + i) != SYMBOL_VALUE_ADDRESS (msymbol)
|
||||
&& SYMBOL_OBJ_SECTION (msymbol + i) == SYMBOL_OBJ_SECTION (msymbol))
|
||||
if (SYMBOL_VALUE_ADDRESS (msymbol + i)
|
||||
!= SYMBOL_VALUE_ADDRESS (msymbol)
|
||||
&& SYMBOL_OBJ_SECTION (msymbol + i)
|
||||
== SYMBOL_OBJ_SECTION (msymbol))
|
||||
break;
|
||||
}
|
||||
|
||||
if (SYMBOL_LINKAGE_NAME (msymbol + i) != NULL
|
||||
&& SYMBOL_VALUE_ADDRESS (msymbol + i) < obj_section_endaddr (section))
|
||||
&& SYMBOL_VALUE_ADDRESS (msymbol + i)
|
||||
< obj_section_endaddr (section))
|
||||
cache_pc_function_high = SYMBOL_VALUE_ADDRESS (msymbol + i);
|
||||
else
|
||||
/* We got the start address from the last msymbol in the objfile.
|
||||
|
|
170
gdb/breakpoint.c
170
gdb/breakpoint.c
|
@ -268,8 +268,9 @@ show_can_use_hw_watchpoints (struct ui_file *file, int from_tty,
|
|||
struct cmd_list_element *c,
|
||||
const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
Debugger's willingness to use watchpoint hardware is %s.\n"),
|
||||
fprintf_filtered (file,
|
||||
_("Debugger's willingness to use "
|
||||
"watchpoint hardware is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -283,8 +284,9 @@ show_pending_break_support (struct ui_file *file, int from_tty,
|
|||
struct cmd_list_element *c,
|
||||
const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
Debugger's behavior regarding pending breakpoints is %s.\n"),
|
||||
fprintf_filtered (file,
|
||||
_("Debugger's behavior regarding "
|
||||
"pending breakpoints is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -298,8 +300,8 @@ show_automatic_hardware_breakpoints (struct ui_file *file, int from_tty,
|
|||
struct cmd_list_element *c,
|
||||
const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
Automatic usage of hardware breakpoints is %s.\n"),
|
||||
fprintf_filtered (file,
|
||||
_("Automatic usage of hardware breakpoints is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -324,12 +326,14 @@ show_always_inserted_mode (struct ui_file *file, int from_tty,
|
|||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
if (always_inserted_mode == always_inserted_auto)
|
||||
fprintf_filtered (file, _("\
|
||||
Always inserted breakpoint mode is %s (currently %s).\n"),
|
||||
fprintf_filtered (file,
|
||||
_("Always inserted breakpoint "
|
||||
"mode is %s (currently %s).\n"),
|
||||
value,
|
||||
breakpoints_always_inserted_mode () ? "on" : "off");
|
||||
else
|
||||
fprintf_filtered (file, _("Always inserted breakpoint mode is %s.\n"), value);
|
||||
fprintf_filtered (file, _("Always inserted breakpoint mode is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -585,7 +589,8 @@ get_number_trailer (char **pp, int trailer)
|
|||
retval = (int) val;
|
||||
else
|
||||
{
|
||||
printf_filtered (_("Convenience variable must have integer value.\n"));
|
||||
printf_filtered (_("Convenience variable must "
|
||||
"have integer value.\n"));
|
||||
retval = 0;
|
||||
}
|
||||
}
|
||||
|
@ -816,7 +821,8 @@ check_no_tracepoint_commands (struct command_line *commands)
|
|||
int i;
|
||||
|
||||
if (c->control_type == while_stepping_control)
|
||||
error (_("The 'while-stepping' command can only be used for tracepoints"));
|
||||
error (_("The 'while-stepping' command can "
|
||||
"only be used for tracepoints"));
|
||||
|
||||
for (i = 0; i < c->body_count; ++i)
|
||||
check_no_tracepoint_commands ((c->body_list)[i]);
|
||||
|
@ -863,14 +869,15 @@ validate_commands_for_breakpoint (struct breakpoint *b,
|
|||
if (c->control_type == while_stepping_control)
|
||||
{
|
||||
if (b->type == bp_fast_tracepoint)
|
||||
error (_("\
|
||||
The 'while-stepping' command cannot be used for fast tracepoint"));
|
||||
error (_("The 'while-stepping' command "
|
||||
"cannot be used for fast tracepoint"));
|
||||
else if (b->type == bp_static_tracepoint)
|
||||
error (_("\
|
||||
The 'while-stepping' command cannot be used for static tracepoint"));
|
||||
error (_("The 'while-stepping' command "
|
||||
"cannot be used for static tracepoint"));
|
||||
|
||||
if (while_stepping)
|
||||
error (_("The 'while-stepping' command can be used only once"));
|
||||
error (_("The 'while-stepping' command "
|
||||
"can be used only once"));
|
||||
else
|
||||
while_stepping = c;
|
||||
}
|
||||
|
@ -977,7 +984,8 @@ do_map_commands_command (struct breakpoint *b, void *data)
|
|||
struct cleanup *old_chain;
|
||||
char *str;
|
||||
|
||||
str = xstrprintf (_("Type commands for breakpoint(s) %s, one per line."),
|
||||
str = xstrprintf (_("Type commands for breakpoint(s) "
|
||||
"%s, one per line."),
|
||||
info->arg);
|
||||
|
||||
old_chain = make_cleanup (xfree, str);
|
||||
|
@ -1530,9 +1538,9 @@ update_watchpoint (struct breakpoint *b, int reparse)
|
|||
}
|
||||
else if (!within_current_scope)
|
||||
{
|
||||
printf_filtered (_("\
|
||||
Watchpoint %d deleted because the program has left the block\n\
|
||||
in which its expression is valid.\n"),
|
||||
printf_filtered (_("Watchpoint %d deleted because "
|
||||
"the program has left the block\n"
|
||||
"in which its expression is valid.\n"),
|
||||
b->number);
|
||||
if (b->related_breakpoint)
|
||||
{
|
||||
|
@ -1648,15 +1656,18 @@ insert_bp_location (struct bp_location *bl,
|
|||
bl->loc_type = new_type;
|
||||
if (!said)
|
||||
{
|
||||
fprintf_filtered (gdb_stdout, _("\
|
||||
Note: automatically using hardware breakpoints for read-only addresses.\n"));
|
||||
fprintf_filtered (gdb_stdout,
|
||||
_("Note: automatically using "
|
||||
"hardware breakpoints for "
|
||||
"read-only addresses.\n"));
|
||||
said = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (bl->loc_type == bp_loc_software_breakpoint
|
||||
&& mr->attrib.mode != MEM_RW)
|
||||
warning (_("cannot set software breakpoint at readonly address %s"),
|
||||
warning (_("cannot set software breakpoint "
|
||||
"at readonly address %s"),
|
||||
paddress (bl->gdbarch, bl->address));
|
||||
}
|
||||
}
|
||||
|
@ -1698,7 +1709,8 @@ Note: automatically using hardware breakpoints for read-only addresses.\n"));
|
|||
&bl->overlay_target_info);
|
||||
if (val != 0)
|
||||
fprintf_unfiltered (tmp_error_stream,
|
||||
"Overlay breakpoint %d failed: in ROM?\n",
|
||||
"Overlay breakpoint %d "
|
||||
"failed: in ROM?\n",
|
||||
bl->owner->number);
|
||||
}
|
||||
}
|
||||
|
@ -1735,7 +1747,8 @@ Note: automatically using hardware breakpoints for read-only addresses.\n"));
|
|||
"Cannot insert breakpoint %d.\n",
|
||||
bl->owner->number);
|
||||
fprintf_unfiltered (tmp_error_stream,
|
||||
"Temporarily disabling shared library breakpoints:\n");
|
||||
"Temporarily disabling shared "
|
||||
"library breakpoints:\n");
|
||||
}
|
||||
*disabled_breaks = 1;
|
||||
fprintf_unfiltered (tmp_error_stream,
|
||||
|
@ -1746,8 +1759,9 @@ Note: automatically using hardware breakpoints for read-only addresses.\n"));
|
|||
if (bl->loc_type == bp_loc_hardware_breakpoint)
|
||||
{
|
||||
*hw_breakpoint_error = 1;
|
||||
fprintf_unfiltered (tmp_error_stream,
|
||||
"Cannot insert hardware breakpoint %d.\n",
|
||||
fprintf_unfiltered (tmp_error_stream,
|
||||
"Cannot insert hardware "
|
||||
"breakpoint %d.\n",
|
||||
bl->owner->number);
|
||||
}
|
||||
else
|
||||
|
@ -2799,7 +2813,8 @@ breakpoint_inserted_here_p (struct address_space *aspace, CORE_ADDR pc)
|
|||
inserted at PC. */
|
||||
|
||||
int
|
||||
software_breakpoint_inserted_here_p (struct address_space *aspace, CORE_ADDR pc)
|
||||
software_breakpoint_inserted_here_p (struct address_space *aspace,
|
||||
CORE_ADDR pc)
|
||||
{
|
||||
struct bp_location *bl, **blp_tmp;
|
||||
|
||||
|
@ -3313,13 +3328,15 @@ print_it_typical (bpstat bs)
|
|||
|
||||
case bp_std_terminate_master:
|
||||
/* These should never be enabled. */
|
||||
printf_filtered (_("std::terminate Master Breakpoint: gdb should not stop!\n"));
|
||||
printf_filtered (_("std::terminate Master Breakpoint: "
|
||||
"gdb should not stop!\n"));
|
||||
result = PRINT_NOTHING;
|
||||
break;
|
||||
|
||||
case bp_exception_master:
|
||||
/* These should never be enabled. */
|
||||
printf_filtered (_("Exception Master Breakpoint: gdb should not stop!\n"));
|
||||
printf_filtered (_("Exception Master Breakpoint: "
|
||||
"gdb should not stop!\n"));
|
||||
result = PRINT_NOTHING;
|
||||
break;
|
||||
|
||||
|
@ -3745,7 +3762,8 @@ watchpoint_check (void *p)
|
|||
(uiout, "reason", async_reason_lookup (EXEC_ASYNC_WATCHPOINT_SCOPE));
|
||||
ui_out_text (uiout, "\nWatchpoint ");
|
||||
ui_out_field_int (uiout, "wpnum", b->number);
|
||||
ui_out_text (uiout, " deleted because the program has left the block in\n\
|
||||
ui_out_text (uiout,
|
||||
" deleted because the program has left the block in\n\
|
||||
which its expression is valid.\n");
|
||||
|
||||
if (b->related_breakpoint)
|
||||
|
@ -3859,8 +3877,9 @@ bpstat_check_watchpoint (bpstat bs)
|
|||
|
||||
if (must_check_value)
|
||||
{
|
||||
char *message = xstrprintf ("Error evaluating expression for watchpoint %d\n",
|
||||
b->number);
|
||||
char *message
|
||||
= xstrprintf ("Error evaluating expression for watchpoint %d\n",
|
||||
b->number);
|
||||
struct cleanup *cleanups = make_cleanup (xfree, message);
|
||||
int e = catch_errors (watchpoint_check, bs, message,
|
||||
RETURN_MASK_ALL);
|
||||
|
@ -5071,11 +5090,13 @@ breakpoint_1 (int bnum, int allflag,
|
|||
|
||||
if (opts.addressprint)
|
||||
bkpttbl_chain
|
||||
= make_cleanup_ui_out_table_begin_end (uiout, 6, nr_printable_breakpoints,
|
||||
= make_cleanup_ui_out_table_begin_end (uiout, 6,
|
||||
nr_printable_breakpoints,
|
||||
"BreakpointTable");
|
||||
else
|
||||
bkpttbl_chain
|
||||
= make_cleanup_ui_out_table_begin_end (uiout, 5, nr_printable_breakpoints,
|
||||
= make_cleanup_ui_out_table_begin_end (uiout, 5,
|
||||
nr_printable_breakpoints,
|
||||
"BreakpointTable");
|
||||
|
||||
if (nr_printable_breakpoints > 0)
|
||||
|
@ -5962,7 +5983,8 @@ disable_breakpoints_in_unloaded_shlib (struct so_list *solib)
|
|||
if (!disabled_shlib_breaks)
|
||||
{
|
||||
target_terminal_ours_for_output ();
|
||||
warning (_("Temporarily disabling breakpoints for unloaded shared library \"%s\""),
|
||||
warning (_("Temporarily disabling breakpoints "
|
||||
"for unloaded shared library \"%s\""),
|
||||
solib->so_name);
|
||||
}
|
||||
disabled_shlib_breaks = 1;
|
||||
|
@ -6187,7 +6209,8 @@ insert_catch_syscall (struct breakpoint *b)
|
|||
if (iter >= VEC_length (int, inf->syscalls_counts))
|
||||
{
|
||||
int old_size = VEC_length (int, inf->syscalls_counts);
|
||||
uintptr_t vec_addr_offset = old_size * ((uintptr_t) sizeof (int));
|
||||
uintptr_t vec_addr_offset
|
||||
= old_size * ((uintptr_t) sizeof (int));
|
||||
uintptr_t vec_addr;
|
||||
VEC_safe_grow (int, inf->syscalls_counts, iter + 1);
|
||||
vec_addr = (uintptr_t) VEC_address (int, inf->syscalls_counts) +
|
||||
|
@ -6239,7 +6262,8 @@ remove_catch_syscall (struct breakpoint *b)
|
|||
inf->total_syscalls_count != 0,
|
||||
inf->any_syscall_count,
|
||||
VEC_length (int, inf->syscalls_counts),
|
||||
VEC_address (int, inf->syscalls_counts));
|
||||
VEC_address (int,
|
||||
inf->syscalls_counts));
|
||||
}
|
||||
|
||||
/* Implement the "breakpoint_hit" breakpoint_ops method for syscall
|
||||
|
@ -6839,7 +6863,8 @@ mention (struct breakpoint *b)
|
|||
switch (b->type)
|
||||
{
|
||||
case bp_none:
|
||||
printf_filtered (_("(apparently deleted?) Eventpoint %d: "), b->number);
|
||||
printf_filtered (_("(apparently deleted?) Eventpoint %d: "),
|
||||
b->number);
|
||||
break;
|
||||
case bp_watchpoint:
|
||||
ui_out_text (uiout, "Watchpoint ");
|
||||
|
@ -7132,7 +7157,8 @@ create_breakpoint_sal (struct gdbarch *gdbarch,
|
|||
marker_str = savestring (p, endp - p);
|
||||
b->static_trace_marker_id = marker_str;
|
||||
|
||||
printf_filtered (_("Probed static tracepoint marker \"%s\"\n"),
|
||||
printf_filtered (_("Probed static tracepoint "
|
||||
"marker \"%s\"\n"),
|
||||
b->static_trace_marker_id);
|
||||
}
|
||||
else if (target_static_tracepoint_marker_at (sal.pc, &marker))
|
||||
|
@ -7140,12 +7166,13 @@ create_breakpoint_sal (struct gdbarch *gdbarch,
|
|||
b->static_trace_marker_id = xstrdup (marker.str_id);
|
||||
release_static_tracepoint_marker (&marker);
|
||||
|
||||
printf_filtered (_("Probed static tracepoint marker \"%s\"\n"),
|
||||
printf_filtered (_("Probed static tracepoint "
|
||||
"marker \"%s\"\n"),
|
||||
b->static_trace_marker_id);
|
||||
}
|
||||
else
|
||||
warning (_("\
|
||||
Couldn't determine the static tracepoint marker to probe"));
|
||||
warning (_("Couldn't determine the static "
|
||||
"tracepoint marker to probe"));
|
||||
}
|
||||
|
||||
if (enabled && b->pspace->executing_startup
|
||||
|
@ -7701,7 +7728,8 @@ create_breakpoint (struct gdbarch *gdbarch,
|
|||
/* If pending breakpoint support is auto query and the user
|
||||
selects no, then simply return the error code. */
|
||||
if (pending_break_support == AUTO_BOOLEAN_AUTO
|
||||
&& !nquery (_("Make breakpoint pending on future shared library load? ")))
|
||||
&& !nquery (_("Make breakpoint pending on "
|
||||
"future shared library load? ")))
|
||||
return 0;
|
||||
|
||||
/* At this point, either the user was queried about setting
|
||||
|
@ -7836,7 +7864,8 @@ create_breakpoint (struct gdbarch *gdbarch,
|
|||
}
|
||||
else
|
||||
create_breakpoints_sal (gdbarch, sals, addr_string, cond_string,
|
||||
type_wanted, tempflag ? disp_del : disp_donttouch,
|
||||
type_wanted,
|
||||
tempflag ? disp_del : disp_donttouch,
|
||||
thread, task, ignore_count, ops, from_tty,
|
||||
enabled, internal);
|
||||
}
|
||||
|
@ -7874,8 +7903,8 @@ create_breakpoint (struct gdbarch *gdbarch,
|
|||
|
||||
if (sals.nelts > 1)
|
||||
{
|
||||
warning (_("Multiple breakpoints were set.\n"
|
||||
"Use the \"delete\" command to delete unwanted breakpoints."));
|
||||
warning (_("Multiple breakpoints were set.\nUse the "
|
||||
"\"delete\" command to delete unwanted breakpoints."));
|
||||
prev_breakpoint_count = prev_bkpt_count;
|
||||
}
|
||||
|
||||
|
@ -8350,7 +8379,8 @@ watch_command_1 (char *arg, int accessflag, int from_tty,
|
|||
error (_("Target does not support this type of hardware watchpoint."));
|
||||
|
||||
if (target_resources_ok < 0 && bp_type != bp_hardware_watchpoint)
|
||||
error (_("Target can only support one kind of HW watchpoint at a time."));
|
||||
error (_("Target can only support one kind "
|
||||
"of HW watchpoint at a time."));
|
||||
}
|
||||
|
||||
/* Change the type of breakpoint to an ordinary watchpoint if a
|
||||
|
@ -9208,7 +9238,8 @@ this architeture yet."));
|
|||
/* Implement the "catch assert" command. */
|
||||
|
||||
static void
|
||||
catch_assert_command (char *arg, int from_tty, struct cmd_list_element *command)
|
||||
catch_assert_command (char *arg, int from_tty,
|
||||
struct cmd_list_element *command)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_current_arch ();
|
||||
int tempflag;
|
||||
|
@ -9333,7 +9364,8 @@ clear_command (char *arg, int from_tty)
|
|||
&& b->source_file != NULL
|
||||
&& sal.symtab != NULL
|
||||
&& sal.pspace == loc->pspace
|
||||
&& strcmp (b->source_file, sal.symtab->filename) == 0
|
||||
&& strcmp (b->source_file,
|
||||
sal.symtab->filename) == 0
|
||||
&& b->line_number == sal.line);
|
||||
if (pc_match || line_match)
|
||||
{
|
||||
|
@ -9642,7 +9674,8 @@ update_global_location_list (int should_insert)
|
|||
Note that at this point, old_loc->owner is still
|
||||
valid, as delete_breakpoint frees the breakpoint
|
||||
only after calling us. */
|
||||
printf_filtered (_("warning: Error removing breakpoint %d\n"),
|
||||
printf_filtered (_("warning: Error removing "
|
||||
"breakpoint %d\n"),
|
||||
old_loc->owner->number);
|
||||
}
|
||||
removed = 1;
|
||||
|
@ -10221,7 +10254,8 @@ update_breakpoint_locations (struct breakpoint *b,
|
|||
}
|
||||
if (e.reason < 0)
|
||||
{
|
||||
warning (_("failed to reevaluate condition for breakpoint %d: %s"),
|
||||
warning (_("failed to reevaluate condition "
|
||||
"for breakpoint %d: %s"),
|
||||
b->number, e.message);
|
||||
new_loc->enabled = 0;
|
||||
}
|
||||
|
@ -10348,8 +10382,8 @@ breakpoint_re_set_one (void *bint)
|
|||
error (_("marker %s not found"), b->static_trace_marker_id);
|
||||
}
|
||||
else
|
||||
sals = decode_line_1 (&s, 1, (struct symtab *) NULL, 0, (char ***) NULL,
|
||||
not_found_ptr);
|
||||
sals = decode_line_1 (&s, 1, (struct symtab *) NULL, 0,
|
||||
(char ***) NULL, not_found_ptr);
|
||||
}
|
||||
if (e.reason < 0)
|
||||
{
|
||||
|
@ -10576,13 +10610,15 @@ set_ignore_count (int bptnum, int count, int from_tty)
|
|||
if (from_tty)
|
||||
{
|
||||
if (count == 0)
|
||||
printf_filtered (_("Will stop next time breakpoint %d is reached."),
|
||||
printf_filtered (_("Will stop next time "
|
||||
"breakpoint %d is reached."),
|
||||
bptnum);
|
||||
else if (count == 1)
|
||||
printf_filtered (_("Will ignore next crossing of breakpoint %d."),
|
||||
bptnum);
|
||||
else
|
||||
printf_filtered (_("Will ignore next %d crossings of breakpoint %d."),
|
||||
printf_filtered (_("Will ignore next %d "
|
||||
"crossings of breakpoint %d."),
|
||||
count, bptnum);
|
||||
}
|
||||
breakpoints_changed ();
|
||||
|
@ -11295,7 +11331,8 @@ create_tracepoint_from_upload (struct uploaded_tp *utp)
|
|||
address. Since there is no way to confirm that the address
|
||||
means the same thing as when the trace was started, warn the
|
||||
user. */
|
||||
warning (_("Uploaded tracepoint %d has no source location, using raw address"),
|
||||
warning (_("Uploaded tracepoint %d has no "
|
||||
"source location, using raw address"),
|
||||
utp->number);
|
||||
sprintf (small_buf, "*%s", hex_string (utp->addr));
|
||||
addr_str = small_buf;
|
||||
|
@ -11303,7 +11340,8 @@ create_tracepoint_from_upload (struct uploaded_tp *utp)
|
|||
|
||||
/* There's not much we can do with a sequence of bytecodes. */
|
||||
if (utp->cond && !utp->cond_string)
|
||||
warning (_("Uploaded tracepoint %d condition has no source form, ignoring it"),
|
||||
warning (_("Uploaded tracepoint %d condition "
|
||||
"has no source form, ignoring it"),
|
||||
utp->number);
|
||||
|
||||
if (!create_breakpoint (get_current_arch (),
|
||||
|
@ -11349,7 +11387,8 @@ create_tracepoint_from_upload (struct uploaded_tp *utp)
|
|||
}
|
||||
else if (!VEC_empty (char_ptr, utp->actions)
|
||||
|| !VEC_empty (char_ptr, utp->step_actions))
|
||||
warning (_("Uploaded tracepoint %d actions have no source form, ignoring them"),
|
||||
warning (_("Uploaded tracepoint %d actions "
|
||||
"have no source form, ignoring them"),
|
||||
utp->number);
|
||||
|
||||
return tp;
|
||||
|
@ -11450,7 +11489,8 @@ trace_pass_command (char *args, int from_tty)
|
|||
int all = 0;
|
||||
|
||||
if (args == 0 || *args == 0)
|
||||
error (_("passcount command requires an argument (count + optional TP num)"));
|
||||
error (_("passcount command requires an "
|
||||
"argument (count + optional TP num)"));
|
||||
|
||||
count = strtoul (args, &args, 10); /* Count comes first, then TP num. */
|
||||
|
||||
|
@ -11477,7 +11517,8 @@ trace_pass_command (char *args, int from_tty)
|
|||
t2->pass_count = count;
|
||||
observer_notify_tracepoint_modified (t2->number);
|
||||
if (from_tty)
|
||||
printf_filtered (_("Setting tracepoint %d's passcount to %d\n"),
|
||||
printf_filtered (_("Setting tracepoint %d's "
|
||||
"passcount to %d\n"),
|
||||
t2->number, count);
|
||||
}
|
||||
if (! all && *args)
|
||||
|
@ -11543,7 +11584,8 @@ get_tracepoint_by_number (char **arg, int multi_p, int optional_p)
|
|||
printf_filtered (_("bad tracepoint number at or near '%s'\n"),
|
||||
instring);
|
||||
else
|
||||
printf_filtered (_("Tracepoint argument missing and no previous tracepoint\n"));
|
||||
printf_filtered (_("Tracepoint argument missing "
|
||||
"and no previous tracepoint\n"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -11834,8 +11876,8 @@ clear_syscall_counts (struct inferior *inf)
|
|||
static void
|
||||
save_command (char *arg, int from_tty)
|
||||
{
|
||||
printf_unfiltered (_("\
|
||||
\"save\" must be followed by the name of a save subcommand.\n"));
|
||||
printf_unfiltered (_("\"save\" must be followed by "
|
||||
"the name of a save subcommand.\n"));
|
||||
help_list (save_cmdlist, "save ", -1, gdb_stdout);
|
||||
}
|
||||
|
||||
|
|
|
@ -326,13 +326,15 @@ finish_block (struct symbol *symbol, struct pending **listhead,
|
|||
if (symbol)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("block end address less than block start address in %s (patched it)"),
|
||||
_("block end address less than block "
|
||||
"start address in %s (patched it)"),
|
||||
SYMBOL_PRINT_NAME (symbol));
|
||||
}
|
||||
else
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("block end address %s less than block start address %s (patched it)"),
|
||||
_("block end address %s less than block "
|
||||
"start address %s (patched it)"),
|
||||
paddress (gdbarch, BLOCK_END (block)),
|
||||
paddress (gdbarch, BLOCK_START (block)));
|
||||
}
|
||||
|
@ -370,7 +372,8 @@ finish_block (struct symbol *symbol, struct pending **listhead,
|
|||
else
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("inner block (%s-%s) not inside outer block (%s-%s)"),
|
||||
_("inner block (%s-%s) not "
|
||||
"inside outer block (%s-%s)"),
|
||||
paddress (gdbarch, BLOCK_START (pblock->block)),
|
||||
paddress (gdbarch, BLOCK_END (pblock->block)),
|
||||
paddress (gdbarch, BLOCK_START (block)),
|
||||
|
@ -695,7 +698,8 @@ pop_subfile (void)
|
|||
|
||||
if (link == NULL)
|
||||
{
|
||||
internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("failed internal consistency check"));
|
||||
}
|
||||
name = link->name;
|
||||
subfile_stack = link->next;
|
||||
|
|
|
@ -1049,7 +1049,8 @@ evaluate_subexp_c (struct type *expect_type, struct expression *exp,
|
|||
LONGEST value;
|
||||
|
||||
if (obstack_object_size (&output) != TYPE_LENGTH (type))
|
||||
error (_("Could not convert character constant to target character set"));
|
||||
error (_("Could not convert character "
|
||||
"constant to target character set"));
|
||||
value = unpack_long (type, obstack_base (&output));
|
||||
result = value_from_longest (type, value);
|
||||
}
|
||||
|
|
|
@ -843,7 +843,8 @@ c_type_print_base (struct type *type, struct ui_file *stream,
|
|||
{
|
||||
len = TYPE_FN_FIELDLIST_LENGTH (type, j);
|
||||
for (i = 0; i < len; i++)
|
||||
if (!TYPE_FN_FIELD_PRIVATE (TYPE_FN_FIELDLIST1 (type, j), i))
|
||||
if (!TYPE_FN_FIELD_PRIVATE (TYPE_FN_FIELDLIST1 (type,
|
||||
j), i))
|
||||
{
|
||||
need_access_label = 1;
|
||||
break;
|
||||
|
@ -873,8 +874,11 @@ c_type_print_base (struct type *type, struct ui_file *stream,
|
|||
QUIT;
|
||||
len = TYPE_FN_FIELDLIST_LENGTH (type, j);
|
||||
for (i = 0; i < len; i++)
|
||||
if (TYPE_FN_FIELD_PRIVATE (TYPE_FN_FIELDLIST1 (type, j), i)
|
||||
|| TYPE_FN_FIELD_PROTECTED (TYPE_FN_FIELDLIST1 (type, j), i))
|
||||
if (TYPE_FN_FIELD_PROTECTED (TYPE_FN_FIELDLIST1 (type,
|
||||
j), i)
|
||||
|| TYPE_FN_FIELD_PRIVATE (TYPE_FN_FIELDLIST1 (type,
|
||||
j),
|
||||
i))
|
||||
{
|
||||
need_access_label = 1;
|
||||
break;
|
||||
|
|
|
@ -522,8 +522,8 @@ convert_between_encodings (const char *from, const char *to,
|
|||
|
||||
/* Invalid input sequence. */
|
||||
if (translit == translit_none)
|
||||
error (_("Could not convert character to `%s' character set"),
|
||||
to);
|
||||
error (_("Could not convert character "
|
||||
"to `%s' character set"), to);
|
||||
|
||||
/* We emit escape sequence for the bytes, skip them,
|
||||
and try again. */
|
||||
|
@ -553,7 +553,8 @@ convert_between_encodings (const char *from, const char *to,
|
|||
break;
|
||||
|
||||
default:
|
||||
perror_with_name ("Internal error while converting character sets");
|
||||
perror_with_name ("Internal error while "
|
||||
"converting character sets");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -693,7 +694,8 @@ wchar_iterate (struct wchar_iterator *iter,
|
|||
return 0;
|
||||
|
||||
default:
|
||||
perror_with_name ("Internal error while converting character sets");
|
||||
perror_with_name ("Internal error while "
|
||||
"converting character sets");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -946,7 +948,8 @@ _initialize_charset (void)
|
|||
auto_target_charset_name = auto_host_charset_name;
|
||||
#elif defined (USE_WIN32API)
|
||||
{
|
||||
static char w32_host_default_charset[16]; /* "CP" + x<=5 digits + paranoia. */
|
||||
/* "CP" + x<=5 digits + paranoia. */
|
||||
static char w32_host_default_charset[16];
|
||||
|
||||
snprintf (w32_host_default_charset, sizeof w32_host_default_charset,
|
||||
"CP%d", GetACP());
|
||||
|
@ -978,8 +981,8 @@ Set the host character set."), _("\
|
|||
Show the host character set."), _("\
|
||||
The `host character set' is the one used by the system GDB is running on.\n\
|
||||
You may only use supersets of ASCII for your host character set; GDB does\n\
|
||||
not support any others.\n\
|
||||
To see a list of the character sets GDB supports, type `set host-charset <TAB>'."),
|
||||
not support any others.\nTo see a list of the character sets GDB supports, \
|
||||
type `set host-charset <TAB>'."),
|
||||
set_host_charset_sfunc,
|
||||
show_host_charset_name,
|
||||
&setlist, &showlist);
|
||||
|
@ -990,8 +993,8 @@ Set the target character set."), _("\
|
|||
Show the target character set."), _("\
|
||||
The `target character set' is the one used by the program being debugged.\n\
|
||||
GDB translates characters and strings between the host and target\n\
|
||||
character sets as needed.\n\
|
||||
To see a list of the character sets GDB supports, type `set target-charset'<TAB>"),
|
||||
character sets as needed.\nTo see a list of the character sets GDB supports, \
|
||||
type `set target-charset'<TAB>"),
|
||||
set_target_charset_sfunc,
|
||||
show_target_charset_name,
|
||||
&setlist, &showlist);
|
||||
|
@ -1001,8 +1004,8 @@ To see a list of the character sets GDB supports, type `set target-charset'<TAB>
|
|||
_("\
|
||||
Set the target wide character set."), _("\
|
||||
Show the target wide character set."), _("\
|
||||
The `target wide character set' is the one used by the program being debugged.\n\
|
||||
In particular it is the encoding used by `wchar_t'.\n\
|
||||
The `target wide character set' is the one used by the program being debugged.\
|
||||
\nIn particular it is the encoding used by `wchar_t'.\n\
|
||||
GDB translates characters and strings between the host and target\n\
|
||||
character sets as needed.\n\
|
||||
To see a list of the character sets GDB supports, type\n\
|
||||
|
|
|
@ -623,8 +623,8 @@ coff_symfile_read (struct objfile *objfile, int symfile_flags)
|
|||
{
|
||||
if (!info->stabstrsect)
|
||||
{
|
||||
error (_("The debugging information in `%s' is corrupted.\n"
|
||||
"The file has a `.stabs' section, but no `.stabstr' section."),
|
||||
error (_("The debugging information in `%s' is corrupted.\nThe "
|
||||
"file has a `.stabs' section, but no `.stabstr' section."),
|
||||
name);
|
||||
}
|
||||
|
||||
|
@ -1023,7 +1023,8 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
|
|||
if (context_stack_depth <= 0)
|
||||
{ /* We attempted to pop an empty context stack. */
|
||||
complaint (&symfile_complaints,
|
||||
_("`.ef' symbol without matching `.bf' symbol ignored starting at symnum %d"),
|
||||
_("`.ef' symbol without matching `.bf' "
|
||||
"symbol ignored starting at symnum %d"),
|
||||
cs->c_symnum);
|
||||
within_function = 0;
|
||||
break;
|
||||
|
@ -1034,7 +1035,8 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
|
|||
if (context_stack_depth > 0 || new == NULL)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("Unmatched .ef symbol(s) ignored starting at symnum %d"),
|
||||
_("Unmatched .ef symbol(s) ignored "
|
||||
"starting at symnum %d"),
|
||||
cs->c_symnum);
|
||||
within_function = 0;
|
||||
break;
|
||||
|
@ -1090,7 +1092,8 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
|
|||
if (context_stack_depth <= 0)
|
||||
{ /* We attempted to pop an empty context stack. */
|
||||
complaint (&symfile_complaints,
|
||||
_("`.eb' symbol without matching `.bb' symbol ignored starting at symnum %d"),
|
||||
_("`.eb' symbol without matching `.bb' "
|
||||
"symbol ignored starting at symnum %d"),
|
||||
cs->c_symnum);
|
||||
break;
|
||||
}
|
||||
|
@ -1098,8 +1101,9 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
|
|||
new = pop_context ();
|
||||
if (depth-- != new->depth)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("Mismatched .eb symbol ignored starting at symnum %d"),
|
||||
complaint (&symfile_complaints,
|
||||
_("Mismatched .eb symbol ignored "
|
||||
"starting at symnum %d"),
|
||||
symnum);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -140,9 +140,9 @@ typedef void cmd_sfunc_ftype (char *args, int from_tty,
|
|||
extern void set_cmd_sfunc (struct cmd_list_element *cmd,
|
||||
cmd_sfunc_ftype *sfunc);
|
||||
|
||||
extern void set_cmd_completer (struct cmd_list_element *cmd,
|
||||
char **(*completer) (struct cmd_list_element *cmd,
|
||||
char *text, char *word));
|
||||
extern void set_cmd_completer (struct cmd_list_element *,
|
||||
char **(*completer) (struct cmd_list_element *,
|
||||
char *, char *));
|
||||
|
||||
/* HACK: cagney/2002-02-23: Code, mostly in tracepoints.c, grubs
|
||||
around in cmd objects to test the value of the commands sfunc(). */
|
||||
|
|
|
@ -162,7 +162,8 @@ sniff_core_bfd (bfd *abfd)
|
|||
}
|
||||
else if (matches == 0)
|
||||
{
|
||||
warning (_("\"%s\": no core file handler recognizes format, using default"),
|
||||
warning (_("\"%s\": no core file handler "
|
||||
"recognizes format, using default"),
|
||||
bfd_get_filename (abfd));
|
||||
}
|
||||
if (yummy == NULL)
|
||||
|
@ -294,7 +295,8 @@ core_open (char *filename, int from_tty)
|
|||
if (!filename)
|
||||
{
|
||||
if (core_bfd)
|
||||
error (_("No core file specified. (Use `detach' to stop debugging a core file.)"));
|
||||
error (_("No core file specified. (Use `detach' "
|
||||
"to stop debugging a core file.)"));
|
||||
else
|
||||
error (_("No core file specified."));
|
||||
}
|
||||
|
|
|
@ -184,7 +184,8 @@ register_cp_abi (struct cp_abi_ops *abi)
|
|||
{
|
||||
if (num_cp_abis == CP_ABI_MAX)
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("Too many C++ ABIs, please increase CP_ABI_MAX in cp-abi.c"));
|
||||
_("Too many C++ ABIs, please increase "
|
||||
"CP_ABI_MAX in cp-abi.c"));
|
||||
|
||||
cp_abis[num_cp_abis++] = abi;
|
||||
|
||||
|
@ -308,9 +309,9 @@ _initialize_cp_abi (void)
|
|||
register_cp_abi (&auto_cp_abi);
|
||||
switch_to_cp_abi ("auto");
|
||||
|
||||
add_cmd ("cp-abi", class_obscure, set_cp_abi_cmd, _("\
|
||||
Set the ABI used for inspecting C++ objects.\n\
|
||||
\"set cp-abi\" with no arguments will list the available ABIs."),
|
||||
add_cmd ("cp-abi", class_obscure, set_cp_abi_cmd,
|
||||
_("Set the ABI used for inspecting C++ objects.\n\"set cp-abi\" "
|
||||
"with no arguments will list the available ABIs."),
|
||||
&setlist);
|
||||
|
||||
add_cmd ("cp-abi", class_obscure, show_cp_abi_cmd,
|
||||
|
|
|
@ -709,7 +709,8 @@ cp_lookup_nested_type (struct type *parent_type,
|
|||
}
|
||||
default:
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("cp_lookup_nested_type called on a non-aggregate type."));
|
||||
_("cp_lookup_nested_type called "
|
||||
"on a non-aggregate type."));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1016,7 +1016,8 @@ cp_lookup_rtti_type (const char *name, struct block *block)
|
|||
static void
|
||||
maint_cplus_command (char *arg, int from_tty)
|
||||
{
|
||||
printf_unfiltered (_("\"maintenance cplus\" must be followed by the name of a command.\n"));
|
||||
printf_unfiltered (_("\"maintenance cplus\" must be followed "
|
||||
"by the name of a command.\n"));
|
||||
help_list (maint_cplus_cmd_list,
|
||||
"maintenance cplus ",
|
||||
-1, gdb_stdout);
|
||||
|
|
|
@ -107,7 +107,8 @@ static char *dbug_inits[] =
|
|||
static void
|
||||
init_dbug_cmds (void)
|
||||
{
|
||||
dbug_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_GETMEM_NEEDS_RANGE | MO_FILL_USES_ADDR;
|
||||
dbug_cmds.flags = MO_CLR_BREAK_USES_ADDR
|
||||
| MO_GETMEM_NEEDS_RANGE | MO_FILL_USES_ADDR;
|
||||
dbug_cmds.init = dbug_inits; /* Init strings */
|
||||
dbug_cmds.cont = "go\r"; /* continue command */
|
||||
dbug_cmds.step = "trace\r"; /* single step */
|
||||
|
@ -139,7 +140,8 @@ init_dbug_cmds (void)
|
|||
dbug_cmds.getreg.term = NULL; /* getreg.term */
|
||||
dbug_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
|
||||
dbug_cmds.dump_registers = "rd\r"; /* dump_registers */
|
||||
dbug_cmds.register_pattern = "\\(\\w+\\) +:\\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
|
||||
/* register_pattern */
|
||||
dbug_cmds.register_pattern = "\\(\\w+\\) +:\\([0-9a-fA-F]+\\b\\)";
|
||||
dbug_cmds.supply_register = dbug_supply_register;
|
||||
dbug_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
|
||||
dbug_cmds.load = "dl\r"; /* download command */
|
||||
|
|
|
@ -177,8 +177,8 @@ static void
|
|||
repeated_header_complaint (const char *arg1, int arg2)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("\"repeated\" header file %s not previously seen, at symtab \
|
||||
pos %d"),
|
||||
_("\"repeated\" header file %s not "
|
||||
"previously seen, at symtab pos %d"),
|
||||
arg1, arg2);
|
||||
}
|
||||
|
||||
|
@ -968,7 +968,8 @@ set_namestring (struct objfile *objfile, const struct internal_nlist *nlist)
|
|||
>= DBX_STRINGTAB_SIZE (objfile)
|
||||
|| nlist->n_strx + file_string_table_offset < nlist->n_strx)
|
||||
{
|
||||
complaint (&symfile_complaints, _("bad string table offset in symbol %d"),
|
||||
complaint (&symfile_complaints,
|
||||
_("bad string table offset in symbol %d"),
|
||||
symnum);
|
||||
namestring = "<bad string table offset>";
|
||||
}
|
||||
|
@ -1172,8 +1173,8 @@ static void
|
|||
function_outside_compilation_unit_complaint (const char *arg1)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("function `%s' appears to be defined outside of all compilation \
|
||||
units"),
|
||||
_("function `%s' appears to be defined "
|
||||
"outside of all compilation units"),
|
||||
arg1);
|
||||
}
|
||||
|
||||
|
@ -1579,8 +1580,8 @@ read_dbx_symtab (struct objfile *objfile)
|
|||
/* FIXME: we should not get here without a PST to work on.
|
||||
Attempt to recover. */
|
||||
complaint (&symfile_complaints,
|
||||
_("N_BINCL %s not in entries for any file, at symtab \
|
||||
pos %d"),
|
||||
_("N_BINCL %s not in entries for "
|
||||
"any file, at symtab pos %d"),
|
||||
namestring, symnum);
|
||||
continue;
|
||||
}
|
||||
|
@ -2040,7 +2041,8 @@ pos %d"),
|
|||
time searching to the end of every string looking for
|
||||
a backslash. */
|
||||
|
||||
complaint (&symfile_complaints, _("unknown symbol descriptor `%c'"),
|
||||
complaint (&symfile_complaints,
|
||||
_("unknown symbol descriptor `%c'"),
|
||||
p[1]);
|
||||
|
||||
/* Ignore it; perhaps it is an extension that we don't
|
||||
|
@ -2094,7 +2096,8 @@ pos %d"),
|
|||
* sizeof (struct partial_symtab *)));
|
||||
#ifdef DEBUG_INFO
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"Had to reallocate dependency list.\n");
|
||||
"Had to reallocate "
|
||||
"dependency list.\n");
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"New dependencies allocated: %d\n",
|
||||
dependencies_allocated);
|
||||
|
@ -2113,8 +2116,8 @@ pos %d"),
|
|||
{
|
||||
end_psymtab (pst, psymtab_include_list, includes_used,
|
||||
symnum * symbol_size,
|
||||
(CORE_ADDR) 0,
|
||||
dependency_list, dependencies_used, textlow_not_set);
|
||||
(CORE_ADDR) 0, dependency_list,
|
||||
dependencies_used, textlow_not_set);
|
||||
pst = (struct partial_symtab *) 0;
|
||||
includes_used = 0;
|
||||
dependencies_used = 0;
|
||||
|
@ -2884,9 +2887,9 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
|
|||
2000 would output N_LSYM entries after N_LBRAC
|
||||
entries. As a consequence, these symbols are simply
|
||||
discarded. Complain if this is the case. */
|
||||
complaint (&symfile_complaints, _("\
|
||||
misplaced N_LBRAC entry; discarding local symbols which have \
|
||||
no enclosing block"));
|
||||
complaint (&symfile_complaints,
|
||||
_("misplaced N_LBRAC entry; discarding local "
|
||||
"symbols which have no enclosing block"));
|
||||
}
|
||||
local_symbols = new->locals;
|
||||
|
||||
|
@ -3542,13 +3545,16 @@ section (%s)"),
|
|||
DBX_SYMCOUNT (objfile) = bfd_section_size (sym_bfd, stabsect)
|
||||
/ DBX_SYMBOL_SIZE (objfile);
|
||||
DBX_STRINGTAB_SIZE (objfile) = bfd_section_size (sym_bfd, stabstrsect);
|
||||
DBX_SYMTAB_OFFSET (objfile) = stabsect->filepos; /* XXX - FIXME: POKING INSIDE BFD DATA STRUCTURES */
|
||||
DBX_SYMTAB_OFFSET (objfile) = stabsect->filepos; /* XXX - FIXME: POKING
|
||||
INSIDE BFD DATA
|
||||
STRUCTURES */
|
||||
|
||||
if (DBX_STRINGTAB_SIZE (objfile) > bfd_get_size (sym_bfd))
|
||||
error (_("ridiculous string table size: %d bytes"),
|
||||
DBX_STRINGTAB_SIZE (objfile));
|
||||
DBX_STRINGTAB (objfile) = (char *)
|
||||
obstack_alloc (&objfile->objfile_obstack, DBX_STRINGTAB_SIZE (objfile) + 1);
|
||||
obstack_alloc (&objfile->objfile_obstack,
|
||||
DBX_STRINGTAB_SIZE (objfile) + 1);
|
||||
OBJSTAT (objfile, sz_strtab += DBX_STRINGTAB_SIZE (objfile) + 1);
|
||||
|
||||
/* Now read in the string table in one big gulp. */
|
||||
|
@ -3556,8 +3562,9 @@ section (%s)"),
|
|||
val = bfd_get_section_contents (sym_bfd, /* bfd */
|
||||
stabstrsect, /* bfd section */
|
||||
DBX_STRINGTAB (objfile), /* input buffer */
|
||||
0, /* offset into section */
|
||||
DBX_STRINGTAB_SIZE (objfile)); /* amount to read */
|
||||
0, /* offset into section */
|
||||
DBX_STRINGTAB_SIZE (objfile)); /* amount to
|
||||
read */
|
||||
|
||||
if (!val)
|
||||
perror_with_name (name);
|
||||
|
|
33
gdb/defs.h
33
gdb/defs.h
|
@ -482,11 +482,14 @@ extern void puts_debug (char *prefix, char *string, char *suffix);
|
|||
|
||||
extern void vprintf_filtered (const char *, va_list) ATTRIBUTE_PRINTF (1, 0);
|
||||
|
||||
extern void vfprintf_filtered (struct ui_file *, const char *, va_list) ATTRIBUTE_PRINTF (2, 0);
|
||||
extern void vfprintf_filtered (struct ui_file *, const char *, va_list)
|
||||
ATTRIBUTE_PRINTF (2, 0);
|
||||
|
||||
extern void fprintf_filtered (struct ui_file *, const char *, ...) ATTRIBUTE_PRINTF (2, 3);
|
||||
extern void fprintf_filtered (struct ui_file *, const char *, ...)
|
||||
ATTRIBUTE_PRINTF (2, 3);
|
||||
|
||||
extern void fprintfi_filtered (int, struct ui_file *, const char *, ...) ATTRIBUTE_PRINTF (3, 4);
|
||||
extern void fprintfi_filtered (int, struct ui_file *, const char *, ...)
|
||||
ATTRIBUTE_PRINTF (3, 4);
|
||||
|
||||
extern void printf_filtered (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
|
||||
|
||||
|
@ -494,9 +497,11 @@ extern void printfi_filtered (int, const char *, ...) ATTRIBUTE_PRINTF (2, 3);
|
|||
|
||||
extern void vprintf_unfiltered (const char *, va_list) ATTRIBUTE_PRINTF (1, 0);
|
||||
|
||||
extern void vfprintf_unfiltered (struct ui_file *, const char *, va_list) ATTRIBUTE_PRINTF (2, 0);
|
||||
extern void vfprintf_unfiltered (struct ui_file *, const char *, va_list)
|
||||
ATTRIBUTE_PRINTF (2, 0);
|
||||
|
||||
extern void fprintf_unfiltered (struct ui_file *, const char *, ...) ATTRIBUTE_PRINTF (2, 3);
|
||||
extern void fprintf_unfiltered (struct ui_file *, const char *, ...)
|
||||
ATTRIBUTE_PRINTF (2, 3);
|
||||
|
||||
extern void printf_unfiltered (const char *, ...) ATTRIBUTE_PRINTF (1, 2);
|
||||
|
||||
|
@ -506,13 +511,17 @@ extern void print_spaces_filtered (int, struct ui_file *);
|
|||
|
||||
extern char *n_spaces (int);
|
||||
|
||||
extern void fputstr_filtered (const char *str, int quotr, struct ui_file * stream);
|
||||
extern void fputstr_filtered (const char *str, int quotr,
|
||||
struct ui_file * stream);
|
||||
|
||||
extern void fputstr_unfiltered (const char *str, int quotr, struct ui_file * stream);
|
||||
extern void fputstr_unfiltered (const char *str, int quotr,
|
||||
struct ui_file * stream);
|
||||
|
||||
extern void fputstrn_filtered (const char *str, int n, int quotr, struct ui_file * stream);
|
||||
extern void fputstrn_filtered (const char *str, int n, int quotr,
|
||||
struct ui_file * stream);
|
||||
|
||||
extern void fputstrn_unfiltered (const char *str, int n, int quotr, struct ui_file * stream);
|
||||
extern void fputstrn_unfiltered (const char *str, int n, int quotr,
|
||||
struct ui_file * stream);
|
||||
|
||||
/* Display the host ADDR on STREAM formatted as ``0x%x''. */
|
||||
extern void gdb_print_host_address (const void *addr, struct ui_file *stream);
|
||||
|
@ -889,7 +898,8 @@ extern void *xzalloc (size_t);
|
|||
|
||||
/* Like asprintf/vasprintf but get an internal_error if the call
|
||||
fails. */
|
||||
extern void xasprintf (char **ret, const char *format, ...) ATTRIBUTE_PRINTF (2, 3);
|
||||
extern void xasprintf (char **ret, const char *format, ...)
|
||||
ATTRIBUTE_PRINTF (2, 3);
|
||||
extern void xvasprintf (char **ret, const char *format, va_list ap)
|
||||
ATTRIBUTE_PRINTF (2, 0);
|
||||
|
||||
|
@ -1112,7 +1122,8 @@ extern void (*deprecated_show_load_progress) (const char *section,
|
|||
unsigned long total_sent,
|
||||
unsigned long total_size);
|
||||
extern void (*deprecated_print_frame_info_listing_hook) (struct symtab * s,
|
||||
int line, int stopline,
|
||||
int line,
|
||||
int stopline,
|
||||
int noerror);
|
||||
extern int (*deprecated_query_hook) (const char *, va_list)
|
||||
ATTRIBUTE_FPTR_PRINTF(1,0);
|
||||
|
|
|
@ -89,7 +89,8 @@ decimal_check_errors (decContext *ctx)
|
|||
{
|
||||
/* Leave only the error bits in the status flags. */
|
||||
ctx->status &= DEC_IEEE_854_Invalid_operation;
|
||||
error (_("Cannot perform operation: %s"), decContextStatusToString (ctx));
|
||||
error (_("Cannot perform operation: %s"),
|
||||
decContextStatusToString (ctx));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,7 +218,8 @@ decimal_from_integral (struct value *from,
|
|||
|
||||
if (TYPE_LENGTH (type) > 4)
|
||||
/* libdecnumber can convert only 32-bit integers. */
|
||||
error (_("Conversion of large integer to a decimal floating type is not supported."));
|
||||
error (_("Conversion of large integer to a "
|
||||
"decimal floating type is not supported."));
|
||||
|
||||
l = value_as_long (from);
|
||||
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
#define MAX_DECIMAL_STRING 43
|
||||
|
||||
extern void decimal_to_string (const gdb_byte *, int, enum bfd_endian, char *);
|
||||
extern int decimal_from_string (gdb_byte *, int, enum bfd_endian, const char *);
|
||||
extern int decimal_from_string (gdb_byte *, int, enum bfd_endian,
|
||||
const char *);
|
||||
extern void decimal_from_integral (struct value *from, gdb_byte *to,
|
||||
int len, enum bfd_endian byte_order);
|
||||
extern void decimal_from_floating (struct value *from, gdb_byte *to,
|
||||
|
|
|
@ -540,7 +540,8 @@ dict_iter_match_first (const struct dictionary *dict,
|
|||
const char *name, symbol_compare_ftype *compare,
|
||||
struct dict_iterator *iterator)
|
||||
{
|
||||
return (DICT_VECTOR (dict))->iter_match_first (dict, name, compare, iterator);
|
||||
return (DICT_VECTOR (dict))->iter_match_first (dict, name,
|
||||
compare, iterator);
|
||||
}
|
||||
|
||||
struct symbol *
|
||||
|
|
|
@ -286,7 +286,8 @@ do_mixed_source_and_assembly (struct gdbarch *gdbarch, struct ui_out *uiout,
|
|||
else
|
||||
{
|
||||
ui_out_tuple_chain
|
||||
= make_cleanup_ui_out_tuple_begin_end (uiout, "src_and_asm_line");
|
||||
= make_cleanup_ui_out_tuple_begin_end (uiout,
|
||||
"src_and_asm_line");
|
||||
print_source_lines (symtab, mle[i].line, mle[i].line + 1, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -355,9 +355,10 @@ ldfrexp (long double value, int *eptr)
|
|||
long double tmp;
|
||||
int exp;
|
||||
|
||||
/* Unfortunately, there are no portable functions for extracting the exponent
|
||||
of a long double, so we have to do it iteratively by multiplying or dividing
|
||||
by two until the fraction is between 0.5 and 1.0. */
|
||||
/* Unfortunately, there are no portable functions for extracting the
|
||||
exponent of a long double, so we have to do it iteratively by
|
||||
multiplying or dividing by two until the fraction is between 0.5
|
||||
and 1.0. */
|
||||
|
||||
if (value < 0.0l)
|
||||
value = -value;
|
||||
|
@ -699,7 +700,8 @@ floatformat_mantissa (const struct floatformat *fmt,
|
|||
|
||||
static const struct floatformat *host_float_format = GDB_HOST_FLOAT_FORMAT;
|
||||
static const struct floatformat *host_double_format = GDB_HOST_DOUBLE_FORMAT;
|
||||
static const struct floatformat *host_long_double_format = GDB_HOST_LONG_DOUBLE_FORMAT;
|
||||
static const struct floatformat *host_long_double_format
|
||||
= GDB_HOST_LONG_DOUBLE_FORMAT;
|
||||
|
||||
void
|
||||
floatformat_to_doublest (const struct floatformat *fmt,
|
||||
|
@ -924,7 +926,8 @@ _initialize_doublest (void)
|
|||
floatformat_ieee_single[BFD_ENDIAN_BIG] = &floatformat_ieee_single_big;
|
||||
floatformat_ieee_double[BFD_ENDIAN_LITTLE] = &floatformat_ieee_double_little;
|
||||
floatformat_ieee_double[BFD_ENDIAN_BIG] = &floatformat_ieee_double_big;
|
||||
floatformat_arm_ext[BFD_ENDIAN_LITTLE] = &floatformat_arm_ext_littlebyte_bigword;
|
||||
floatformat_arm_ext[BFD_ENDIAN_LITTLE]
|
||||
= &floatformat_arm_ext_littlebyte_bigword;
|
||||
floatformat_arm_ext[BFD_ENDIAN_BIG] = &floatformat_arm_ext_big;
|
||||
floatformat_ia64_spill[BFD_ENDIAN_LITTLE] = &floatformat_ia64_spill_little;
|
||||
floatformat_ia64_spill[BFD_ENDIAN_BIG] = &floatformat_ia64_spill_big;
|
||||
|
|
|
@ -330,15 +330,15 @@ no_get_frame_cfa (void *baton)
|
|||
static CORE_ADDR
|
||||
no_get_frame_pc (void *baton)
|
||||
{
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("Support for DW_OP_GNU_implicit_pointer is unimplemented"));
|
||||
internal_error (__FILE__, __LINE__, _("\
|
||||
Support for DW_OP_GNU_implicit_pointer is unimplemented"));
|
||||
}
|
||||
|
||||
static CORE_ADDR
|
||||
no_get_tls_address (void *baton, CORE_ADDR offset)
|
||||
{
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("Support for DW_OP_GNU_push_tls_address is unimplemented"));
|
||||
internal_error (__FILE__, __LINE__, _("\
|
||||
Support for DW_OP_GNU_push_tls_address is unimplemented"));
|
||||
}
|
||||
|
||||
/* Helper function for execute_stack_op. */
|
||||
|
@ -416,7 +416,8 @@ execute_stack_op (const gdb_byte *exp, ULONGEST len, int addr_size,
|
|||
/* This is actually invalid DWARF, but if we ever do run across
|
||||
it somehow, we might as well support it. So, instead, report
|
||||
it as unimplemented. */
|
||||
error (_("Not implemented: computing unwound register using explicit value operator"));
|
||||
error (_("\
|
||||
Not implemented: computing unwound register using explicit value operator"));
|
||||
}
|
||||
|
||||
do_cleanups (old_chain);
|
||||
|
@ -704,7 +705,8 @@ bad CFI data; mismatched DW_CFA_restore_state at %s"),
|
|||
break;
|
||||
|
||||
default:
|
||||
internal_error (__FILE__, __LINE__, _("Unknown CFI encountered."));
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("Unknown CFI encountered."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -856,7 +858,8 @@ dwarf2_frame_set_adjust_regnum (struct gdbarch *gdbarch,
|
|||
register. */
|
||||
|
||||
static int
|
||||
dwarf2_frame_adjust_regnum (struct gdbarch *gdbarch, int regnum, int eh_frame_p)
|
||||
dwarf2_frame_adjust_regnum (struct gdbarch *gdbarch,
|
||||
int regnum, int eh_frame_p)
|
||||
{
|
||||
struct dwarf2_frame_ops *ops = gdbarch_data (gdbarch, dwarf2_frame_data);
|
||||
|
||||
|
@ -1486,7 +1489,8 @@ read_encoded_value (struct comp_unit *unit, gdb_byte encoding,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
internal_error (__FILE__, __LINE__, _("Invalid or unsupported encoding"));
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("Invalid or unsupported encoding"));
|
||||
}
|
||||
|
||||
if ((encoding & 0x07) == 0x00)
|
||||
|
@ -1533,7 +1537,8 @@ read_encoded_value (struct comp_unit *unit, gdb_byte encoding,
|
|||
*bytes_read_ptr += 8;
|
||||
return (base + bfd_get_signed_64 (unit->abfd, (bfd_byte *) buf));
|
||||
default:
|
||||
internal_error (__FILE__, __LINE__, _("Invalid or unsupported encoding"));
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("Invalid or unsupported encoding"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2025,15 +2030,15 @@ decode_frame_entry (struct comp_unit *unit, gdb_byte *start, int eh_frame_p,
|
|||
break;
|
||||
|
||||
case ALIGN4:
|
||||
complaint (&symfile_complaints,
|
||||
_("Corrupt data in %s:%s; align 4 workaround apparently succeeded"),
|
||||
complaint (&symfile_complaints, _("\
|
||||
Corrupt data in %s:%s; align 4 workaround apparently succeeded"),
|
||||
unit->dwarf_frame_section->owner->filename,
|
||||
unit->dwarf_frame_section->name);
|
||||
break;
|
||||
|
||||
case ALIGN8:
|
||||
complaint (&symfile_complaints,
|
||||
_("Corrupt data in %s:%s; align 8 workaround apparently succeeded"),
|
||||
complaint (&symfile_complaints, _("\
|
||||
Corrupt data in %s:%s; align 8 workaround apparently succeeded"),
|
||||
unit->dwarf_frame_section->owner->filename,
|
||||
unit->dwarf_frame_section->name);
|
||||
break;
|
||||
|
@ -2051,8 +2056,9 @@ decode_frame_entry (struct comp_unit *unit, gdb_byte *start, int eh_frame_p,
|
|||
|
||||
|
||||
/* Imported from dwarf2read.c. */
|
||||
extern void dwarf2_get_section_info (struct objfile *, const char *, asection **,
|
||||
gdb_byte **, bfd_size_type *);
|
||||
extern void dwarf2_get_section_info (struct objfile *, const char *,
|
||||
asection **, gdb_byte **,
|
||||
bfd_size_type *);
|
||||
|
||||
static int
|
||||
qsort_fde_cmp (const void *a, const void *b)
|
||||
|
|
|
@ -129,7 +129,8 @@ ULONGEST
|
|||
dwarf_expr_fetch (struct dwarf_expr_context *ctx, int n)
|
||||
{
|
||||
if (ctx->stack_len <= n)
|
||||
error (_("Asked for position %d of stack, stack only has %d elements on it."),
|
||||
error (_("Asked for position %d of stack, "
|
||||
"stack only has %d elements on it."),
|
||||
n, ctx->stack_len);
|
||||
return ctx->stack[ctx->stack_len - (1 + n)].value;
|
||||
|
||||
|
@ -183,7 +184,8 @@ int
|
|||
dwarf_expr_fetch_in_stack_memory (struct dwarf_expr_context *ctx, int n)
|
||||
{
|
||||
if (ctx->stack_len <= n)
|
||||
error (_("Asked for position %d of stack, stack only has %d elements on it."),
|
||||
error (_("Asked for position %d of stack, "
|
||||
"stack only has %d elements on it."),
|
||||
n, ctx->stack_len);
|
||||
return ctx->stack[ctx->stack_len - (1 + n)].in_stack_memory;
|
||||
|
||||
|
@ -620,7 +622,8 @@ execute_stack_op (struct dwarf_expr_context *ctx,
|
|||
else if (ctx->location == DWARF_VALUE_REGISTER)
|
||||
result = (ctx->read_reg) (ctx->baton, dwarf_expr_fetch (ctx, 0));
|
||||
else
|
||||
error (_("Not implemented: computing frame base using explicit value operator"));
|
||||
error (_("Not implemented: computing frame "
|
||||
"base using explicit value operator"));
|
||||
result = result + offset;
|
||||
in_stack_memory = 1;
|
||||
ctx->stack_len = before_stack_len;
|
||||
|
@ -648,7 +651,8 @@ execute_stack_op (struct dwarf_expr_context *ctx,
|
|||
struct dwarf_stack_value t1, t2;
|
||||
|
||||
if (ctx->stack_len < 2)
|
||||
error (_("Not enough elements for DW_OP_swap. Need 2, have %d."),
|
||||
error (_("Not enough elements for "
|
||||
"DW_OP_swap. Need 2, have %d."),
|
||||
ctx->stack_len);
|
||||
t1 = ctx->stack[ctx->stack_len - 1];
|
||||
t2 = ctx->stack[ctx->stack_len - 2];
|
||||
|
|
|
@ -85,7 +85,8 @@ dwarf2_find_location_expression (struct dwarf2_loclist_baton *baton,
|
|||
while (1)
|
||||
{
|
||||
if (buf_end - loc_ptr < 2 * addr_size)
|
||||
error (_("dwarf2_find_location_expression: Corrupted DWARF expression."));
|
||||
error (_("dwarf2_find_location_expression: "
|
||||
"Corrupted DWARF expression."));
|
||||
|
||||
if (signed_addr_p)
|
||||
low = extract_signed_integer (loc_ptr, addr_size, byte_order);
|
||||
|
@ -253,8 +254,9 @@ dwarf_expr_tls_address (void *baton, CORE_ADDR offset)
|
|||
return target_translate_tls_address (objfile, offset);
|
||||
}
|
||||
|
||||
/* Call DWARF subroutine from DW_AT_location of DIE at DIE_OFFSET in current CU
|
||||
(as is PER_CU). State of the CTX is not affected by the call and return. */
|
||||
/* Call DWARF subroutine from DW_AT_location of DIE at DIE_OFFSET in
|
||||
current CU (as is PER_CU). State of the CTX is not affected by the
|
||||
call and return. */
|
||||
|
||||
static void
|
||||
per_cu_dwarf_call (struct dwarf_expr_context *ctx, size_t die_offset,
|
||||
|
@ -502,7 +504,8 @@ read_pieced_value (struct value *v)
|
|||
long offset = 0;
|
||||
ULONGEST bits_to_skip;
|
||||
gdb_byte *contents;
|
||||
struct piece_closure *c = (struct piece_closure *) value_computed_closure (v);
|
||||
struct piece_closure *c
|
||||
= (struct piece_closure *) value_computed_closure (v);
|
||||
struct frame_info *frame = frame_find_by_id (VALUE_FRAME_ID (v));
|
||||
size_t type_len;
|
||||
size_t buffer_size = 0;
|
||||
|
@ -680,7 +683,8 @@ write_pieced_value (struct value *to, struct value *from)
|
|||
long offset = 0;
|
||||
ULONGEST bits_to_skip;
|
||||
const gdb_byte *contents;
|
||||
struct piece_closure *c = (struct piece_closure *) value_computed_closure (to);
|
||||
struct piece_closure *c
|
||||
= (struct piece_closure *) value_computed_closure (to);
|
||||
struct frame_info *frame = frame_find_by_id (VALUE_FRAME_ID (to));
|
||||
size_t type_len;
|
||||
size_t buffer_size = 0;
|
||||
|
@ -986,7 +990,8 @@ indirect_pieced_value (struct value *value)
|
|||
static void *
|
||||
copy_pieced_value_closure (const struct value *v)
|
||||
{
|
||||
struct piece_closure *c = (struct piece_closure *) value_computed_closure (v);
|
||||
struct piece_closure *c
|
||||
= (struct piece_closure *) value_computed_closure (v);
|
||||
|
||||
++c->refc;
|
||||
return c;
|
||||
|
@ -995,7 +1000,8 @@ copy_pieced_value_closure (const struct value *v)
|
|||
static void
|
||||
free_pieced_value_closure (struct value *v)
|
||||
{
|
||||
struct piece_closure *c = (struct piece_closure *) value_computed_closure (v);
|
||||
struct piece_closure *c
|
||||
= (struct piece_closure *) value_computed_closure (v);
|
||||
|
||||
--c->refc;
|
||||
if (c->refc == 0)
|
||||
|
@ -1023,7 +1029,8 @@ static struct lval_funcs pieced_value_funcs = {
|
|||
static void
|
||||
invalid_synthetic_pointer (void)
|
||||
{
|
||||
error (_("access outside bounds of object referenced via synthetic pointer"));
|
||||
error (_("access outside bounds of object "
|
||||
"referenced via synthetic pointer"));
|
||||
}
|
||||
|
||||
/* Evaluate a location description, starting at DATA and with length
|
||||
|
@ -2181,7 +2188,8 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream,
|
|||
buf_end = read_sleb128 (base_data + 1,
|
||||
base_data + base_size, &base_offset);
|
||||
if (buf_end != base_data + base_size)
|
||||
error (_("Unexpected opcode after DW_OP_breg%u for symbol \"%s\"."),
|
||||
error (_("Unexpected opcode after "
|
||||
"DW_OP_breg%u for symbol \"%s\"."),
|
||||
frame_reg, SYMBOL_PRINT_NAME (symbol));
|
||||
}
|
||||
else if (base_data[0] >= DW_OP_reg0 && base_data[0] <= DW_OP_reg31)
|
||||
|
@ -2199,7 +2207,8 @@ locexpr_describe_location_piece (struct symbol *symbol, struct ui_file *stream,
|
|||
|
||||
regno = gdbarch_dwarf2_reg_to_regnum (gdbarch, frame_reg);
|
||||
|
||||
fprintf_filtered (stream, _("a variable at frame base reg $%s offset %s+%s"),
|
||||
fprintf_filtered (stream,
|
||||
_("a variable at frame base reg $%s offset %s+%s"),
|
||||
gdbarch_register_name (gdbarch, regno),
|
||||
plongest (base_offset), plongest (frame_offset));
|
||||
}
|
||||
|
@ -2562,7 +2571,8 @@ locexpr_describe_location_1 (struct symbol *symbol, CORE_ADDR addr,
|
|||
|
||||
if (!dwarf2_always_disassemble)
|
||||
{
|
||||
data = locexpr_describe_location_piece (symbol, stream, addr, objfile,
|
||||
data = locexpr_describe_location_piece (symbol, stream,
|
||||
addr, objfile,
|
||||
data, end, addr_size);
|
||||
/* If we printed anything, or if we have an empty piece,
|
||||
then don't disassemble. */
|
||||
|
@ -2572,7 +2582,8 @@ locexpr_describe_location_1 (struct symbol *symbol, CORE_ADDR addr,
|
|||
disassemble = 0;
|
||||
}
|
||||
if (disassemble)
|
||||
data = disassemble_dwarf_expression (stream, get_objfile_arch (objfile),
|
||||
data = disassemble_dwarf_expression (stream,
|
||||
get_objfile_arch (objfile),
|
||||
addr_size, offset_size, data, end,
|
||||
dwarf2_always_disassemble);
|
||||
|
||||
|
@ -2636,7 +2647,8 @@ locexpr_describe_location (struct symbol *symbol, CORE_ADDR addr,
|
|||
unsigned int addr_size = dwarf2_per_cu_addr_size (dlbaton->per_cu);
|
||||
int offset_size = dwarf2_per_cu_offset_size (dlbaton->per_cu);
|
||||
|
||||
locexpr_describe_location_1 (symbol, addr, stream, dlbaton->data, dlbaton->size,
|
||||
locexpr_describe_location_1 (symbol, addr, stream,
|
||||
dlbaton->data, dlbaton->size,
|
||||
objfile, addr_size, offset_size);
|
||||
}
|
||||
|
||||
|
|
239
gdb/dwarf2read.c
239
gdb/dwarf2read.c
|
@ -787,8 +787,8 @@ static void
|
|||
show_dwarf2_max_cache_age (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
The upper bound on the age of cached dwarf2 compilation units is %s.\n"),
|
||||
fprintf_filtered (file, _("The upper bound on the age of cached "
|
||||
"dwarf2 compilation units is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -813,7 +813,8 @@ static void
|
|||
dwarf2_debug_line_missing_end_sequence_complaint (void)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_(".debug_line section has line program sequence without an end"));
|
||||
_(".debug_line section has line "
|
||||
"program sequence without an end"));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -827,8 +828,8 @@ dwarf2_const_value_length_mismatch_complaint (const char *arg1, int arg2,
|
|||
int arg3)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("const value length mismatch for '%s', got %d, expected %d"), arg1,
|
||||
arg2, arg3);
|
||||
_("const value length mismatch for '%s', got %d, expected %d"),
|
||||
arg1, arg2, arg3);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -842,7 +843,8 @@ static void
|
|||
dwarf2_macro_malformed_definition_complaint (const char *arg1)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("macro debug info contains a malformed macro definition:\n`%s'"),
|
||||
_("macro debug info contains a "
|
||||
"malformed macro definition:\n`%s'"),
|
||||
arg1);
|
||||
}
|
||||
|
||||
|
@ -850,7 +852,8 @@ static void
|
|||
dwarf2_invalid_attrib_class_complaint (const char *arg1, const char *arg2)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("invalid attribute class or form for '%s' in '%s'"), arg1, arg2);
|
||||
_("invalid attribute class or form for '%s' in '%s'"),
|
||||
arg1, arg2);
|
||||
}
|
||||
|
||||
/* local function prototypes */
|
||||
|
@ -1014,7 +1017,8 @@ static struct type *die_type (struct die_info *, struct dwarf2_cu *);
|
|||
|
||||
static int need_gnat_info (struct dwarf2_cu *);
|
||||
|
||||
static struct type *die_descriptive_type (struct die_info *, struct dwarf2_cu *);
|
||||
static struct type *die_descriptive_type (struct die_info *,
|
||||
struct dwarf2_cu *);
|
||||
|
||||
static void set_descriptive_type (struct type *, struct die_info *,
|
||||
struct dwarf2_cu *);
|
||||
|
@ -1068,7 +1072,8 @@ static void dwarf2_add_member_fn (struct field_info *,
|
|||
struct dwarf2_cu *);
|
||||
|
||||
static void dwarf2_attach_fn_fields_to_type (struct field_info *,
|
||||
struct type *, struct dwarf2_cu *);
|
||||
struct type *,
|
||||
struct dwarf2_cu *);
|
||||
|
||||
static void process_structure_scope (struct die_info *, struct dwarf2_cu *);
|
||||
|
||||
|
@ -1448,7 +1453,8 @@ zlib_decompress_section (struct objfile *objfile, asection *sectp,
|
|||
int header_size = 12;
|
||||
|
||||
if (bfd_seek (abfd, sectp->filepos, SEEK_SET) != 0
|
||||
|| bfd_bread (compressed_buffer, compressed_size, abfd) != compressed_size)
|
||||
|| bfd_bread (compressed_buffer,
|
||||
compressed_size, abfd) != compressed_size)
|
||||
error (_("Dwarf Error: Can't read DWARF data from '%s'"),
|
||||
bfd_get_filename (abfd));
|
||||
|
||||
|
@ -2992,7 +2998,8 @@ create_debug_types_hash_table (struct objfile *objfile)
|
|||
if (dwarf2_die_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "Signatured types:\n");
|
||||
|
||||
while (info_ptr < dwarf2_per_objfile->types.buffer + dwarf2_per_objfile->types.size)
|
||||
while (info_ptr < dwarf2_per_objfile->types.buffer
|
||||
+ dwarf2_per_objfile->types.size)
|
||||
{
|
||||
unsigned int offset;
|
||||
unsigned int offset_size;
|
||||
|
@ -3015,7 +3022,8 @@ create_debug_types_hash_table (struct objfile *objfile)
|
|||
> dwarf2_per_objfile->types.buffer + dwarf2_per_objfile->types.size)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("debug type entry runs off end of `.debug_types' section, ignored"));
|
||||
_("debug type entry runs off end "
|
||||
"of `.debug_types' section, ignored"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3402,7 +3410,8 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile)
|
|||
{
|
||||
struct dwarf2_per_cu_data *this_cu;
|
||||
|
||||
this_cu = dwarf2_find_comp_unit (info_ptr - dwarf2_per_objfile->info.buffer,
|
||||
this_cu = dwarf2_find_comp_unit (info_ptr
|
||||
- dwarf2_per_objfile->info.buffer,
|
||||
objfile);
|
||||
|
||||
info_ptr = process_psymtab_comp_unit (objfile, this_cu,
|
||||
|
@ -3521,7 +3530,8 @@ create_all_comp_units (struct objfile *objfile)
|
|||
all_comp_units = xmalloc (n_allocated
|
||||
* sizeof (struct dwarf2_per_cu_data *));
|
||||
|
||||
while (info_ptr < dwarf2_per_objfile->info.buffer + dwarf2_per_objfile->info.size)
|
||||
while (info_ptr < dwarf2_per_objfile->info.buffer
|
||||
+ dwarf2_per_objfile->info.size)
|
||||
{
|
||||
unsigned int length, initial_length_size;
|
||||
struct dwarf2_per_cu_data *this_cu;
|
||||
|
@ -3715,7 +3725,8 @@ partial_die_parent_scope (struct partial_die_info *pdi,
|
|||
if (grandparent_scope == NULL)
|
||||
parent->scope = parent->name;
|
||||
else
|
||||
parent->scope = typename_concat (&cu->comp_unit_obstack, grandparent_scope,
|
||||
parent->scope = typename_concat (&cu->comp_unit_obstack,
|
||||
grandparent_scope,
|
||||
parent->name, 0, cu);
|
||||
}
|
||||
else if (parent->tag == DW_TAG_enumerator)
|
||||
|
@ -4090,8 +4101,8 @@ peek_die_abbrev (gdb_byte *info_ptr, unsigned int *bytes_read,
|
|||
abbrev = dwarf2_lookup_abbrev (abbrev_number, cu);
|
||||
if (!abbrev)
|
||||
{
|
||||
error (_("Dwarf Error: Could not find abbrev number %d [in module %s]"), abbrev_number,
|
||||
bfd_get_filename (abfd));
|
||||
error (_("Dwarf Error: Could not find abbrev number %d [in module %s]"),
|
||||
abbrev_number, bfd_get_filename (abfd));
|
||||
}
|
||||
|
||||
return abbrev;
|
||||
|
@ -4140,7 +4151,8 @@ skip_one_die (gdb_byte *buffer, gdb_byte *info_ptr,
|
|||
read_attribute (&attr, &abbrev->attrs[i],
|
||||
abfd, info_ptr, cu);
|
||||
if (attr.form == DW_FORM_ref_addr)
|
||||
complaint (&symfile_complaints, _("ignoring absolute DW_AT_sibling"));
|
||||
complaint (&symfile_complaints,
|
||||
_("ignoring absolute DW_AT_sibling"));
|
||||
else
|
||||
return buffer + dwarf2_get_ref_die_offset (&attr);
|
||||
}
|
||||
|
@ -4216,7 +4228,8 @@ skip_one_die (gdb_byte *buffer, gdb_byte *info_ptr,
|
|||
goto skip_attribute;
|
||||
|
||||
default:
|
||||
error (_("Dwarf Error: Cannot handle %s in DWARF reader [in module %s]"),
|
||||
error (_("Dwarf Error: Cannot handle %s "
|
||||
"in DWARF reader [in module %s]"),
|
||||
dwarf_form_name (form),
|
||||
bfd_get_filename (abfd));
|
||||
}
|
||||
|
@ -4261,13 +4274,15 @@ dwarf2_psymtab_to_symtab (struct partial_symtab *pst)
|
|||
{
|
||||
if (pst->readin)
|
||||
{
|
||||
warning (_("bug: psymtab for %s is already read in."), pst->filename);
|
||||
warning (_("bug: psymtab for %s is already read in."),
|
||||
pst->filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (info_verbose)
|
||||
{
|
||||
printf_filtered (_("Reading in symbols for %s..."), pst->filename);
|
||||
printf_filtered (_("Reading in symbols for %s..."),
|
||||
pst->filename);
|
||||
gdb_flush (gdb_stdout);
|
||||
}
|
||||
|
||||
|
@ -4416,7 +4431,8 @@ psymtab_to_symtab_1 (struct partial_symtab *pst)
|
|||
/* Load the DIEs associated with PER_CU into memory. */
|
||||
|
||||
static void
|
||||
load_full_comp_unit (struct dwarf2_per_cu_data *per_cu, struct objfile *objfile)
|
||||
load_full_comp_unit (struct dwarf2_per_cu_data *per_cu,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
bfd *abfd = objfile->obfd;
|
||||
struct dwarf2_cu *cu;
|
||||
|
@ -4881,7 +4897,8 @@ dwarf2_compute_name (char *name, struct die_info *die, struct dwarf2_cu *cu,
|
|||
if (attr == NULL)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("template parameter missing DW_AT_const_value"));
|
||||
_("template parameter missing "
|
||||
"DW_AT_const_value"));
|
||||
fputs_unfiltered ("UNKNOWN_VALUE", buf);
|
||||
continue;
|
||||
}
|
||||
|
@ -4912,7 +4929,8 @@ dwarf2_compute_name (char *name, struct die_info *die, struct dwarf2_cu *cu,
|
|||
else
|
||||
v = value_from_longest (type, value);
|
||||
|
||||
/* Specify decimal so that we do not depend on the radix. */
|
||||
/* Specify decimal so that we do not depend on
|
||||
the radix. */
|
||||
get_formatted_print_options (&opts, 'd');
|
||||
opts.raw = 1;
|
||||
value_print (v, buf, &opts);
|
||||
|
@ -4965,7 +4983,8 @@ dwarf2_compute_name (char *name, struct die_info *die, struct dwarf2_cu *cu,
|
|||
if (TYPE_NFIELDS (type) > 0
|
||||
&& TYPE_FIELD_ARTIFICIAL (type, 0)
|
||||
&& TYPE_CODE (TYPE_FIELD_TYPE (type, 0)) == TYPE_CODE_PTR
|
||||
&& TYPE_CONST (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type, 0))))
|
||||
&& TYPE_CONST (TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (type,
|
||||
0))))
|
||||
fputs_unfiltered (" const", buf);
|
||||
}
|
||||
}
|
||||
|
@ -5385,8 +5404,9 @@ unsigned_int_compar (const void *ap, const void *bp)
|
|||
}
|
||||
|
||||
/* DW_AT_abstract_origin inherits whole DIEs (not just their attributes).
|
||||
Inherit only the children of the DW_AT_abstract_origin DIE not being already
|
||||
referenced by DW_AT_abstract_origin from the children of the current DIE. */
|
||||
Inherit only the children of the DW_AT_abstract_origin DIE not being
|
||||
already referenced by DW_AT_abstract_origin from the children of the
|
||||
current DIE. */
|
||||
|
||||
static void
|
||||
inherit_abstract_dies (struct die_info *die, struct dwarf2_cu *cu)
|
||||
|
@ -5484,8 +5504,9 @@ inherit_abstract_dies (struct die_info *die, struct dwarf2_cu *cu)
|
|||
unsigned_int_compar);
|
||||
for (offsetp = offsets + 1; offsetp < offsets_end; offsetp++)
|
||||
if (offsetp[-1] == *offsetp)
|
||||
complaint (&symfile_complaints, _("Multiple children of DIE 0x%x refer "
|
||||
"to DIE 0x%x as their abstract origin"),
|
||||
complaint (&symfile_complaints,
|
||||
_("Multiple children of DIE 0x%x refer "
|
||||
"to DIE 0x%x as their abstract origin"),
|
||||
die->offset, *offsetp);
|
||||
|
||||
offsetp = offsets;
|
||||
|
@ -5556,7 +5577,8 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
|
|||
attr = dwarf2_attr (die, DW_AT_external, cu);
|
||||
if (!attr || !DW_UNSND (attr))
|
||||
complaint (&symfile_complaints,
|
||||
_("cannot get low and high bounds for subprogram DIE at %d"),
|
||||
_("cannot get low and high bounds "
|
||||
"for subprogram DIE at %d"),
|
||||
die->offset);
|
||||
return;
|
||||
}
|
||||
|
@ -5845,7 +5867,8 @@ dwarf2_ranges_read (unsigned offset, CORE_ADDR *low_return,
|
|||
|
||||
if (ranges_pst != NULL && range_beginning < range_end)
|
||||
addrmap_set_empty (objfile->psymtabs_addrmap,
|
||||
range_beginning + baseaddr, range_end - 1 + baseaddr,
|
||||
range_beginning + baseaddr,
|
||||
range_end - 1 + baseaddr,
|
||||
ranges_pst);
|
||||
|
||||
/* FIXME: This is recording everything as a low-high
|
||||
|
@ -6120,7 +6143,8 @@ dwarf2_record_block_ranges (struct die_info *die, struct block *block,
|
|||
if (!base_known)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("Invalid .debug_ranges data (no base address)"));
|
||||
_("Invalid .debug_ranges data "
|
||||
"(no base address)"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -6424,9 +6448,9 @@ dwarf2_attach_fields_to_type (struct field_info *fip, struct type *type,
|
|||
TYPE_N_BASECLASSES (type) = fip->nbaseclasses;
|
||||
}
|
||||
|
||||
/* Copy the saved-up fields into the field vector. Start from the head
|
||||
of the list, adding to the tail of the field array, so that they end
|
||||
up in the same order in the array in which they were added to the list. */
|
||||
/* Copy the saved-up fields into the field vector. Start from the head of
|
||||
the list, adding to the tail of the field array, so that they end up in
|
||||
the same order in the array in which they were added to the list. */
|
||||
while (nfields-- > 0)
|
||||
{
|
||||
struct nextfield *fieldp;
|
||||
|
@ -6587,8 +6611,8 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
|
|||
if (dwarf2_attr (die, DW_AT_containing_type, cu) != NULL)
|
||||
fnp->fcontext = die_containing_type (die, cu);
|
||||
|
||||
/* dwarf2 doesn't have stubbed physical names, so the setting of is_const
|
||||
and is_volatile is irrelevant, as it is needed by gdb_mangle_name only. */
|
||||
/* dwarf2 doesn't have stubbed physical names, so the setting of is_const and
|
||||
is_volatile is irrelevant, as it is needed by gdb_mangle_name only. */
|
||||
|
||||
/* Get accessibility. */
|
||||
attr = dwarf2_attr (die, DW_AT_accessibility, cu);
|
||||
|
@ -6668,7 +6692,8 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die,
|
|||
{
|
||||
/* GCC does this, as of 2008-08-25; PR debug/37237. */
|
||||
complaint (&symfile_complaints,
|
||||
_("Member function \"%s\" (offset %d) is virtual but the vtable offset is not specified"),
|
||||
_("Member function \"%s\" (offset %d) is virtual "
|
||||
"but the vtable offset is not specified"),
|
||||
fieldname, die->offset);
|
||||
ALLOCATE_CPLUS_STRUCT_TYPE (type);
|
||||
TYPE_CPLUS_DYNAMIC (type) = 1;
|
||||
|
@ -7014,7 +7039,8 @@ process_structure_scope (struct die_info *die, struct dwarf2_cu *cu)
|
|||
/* Complain if virtual function table field not found. */
|
||||
if (i < TYPE_N_BASECLASSES (t))
|
||||
complaint (&symfile_complaints,
|
||||
_("virtual function table pointer not found when defining class '%s'"),
|
||||
_("virtual function table pointer "
|
||||
"not found when defining class '%s'"),
|
||||
TYPE_TAG_NAME (type) ? TYPE_TAG_NAME (type) :
|
||||
"");
|
||||
}
|
||||
|
@ -7334,8 +7360,9 @@ read_array_type (struct die_info *die, struct dwarf2_cu *cu)
|
|||
if (DW_UNSND (attr) >= TYPE_LENGTH (type))
|
||||
TYPE_LENGTH (type) = DW_UNSND (attr);
|
||||
else
|
||||
complaint (&symfile_complaints, _("\
|
||||
DW_AT_byte_size for array type smaller than the total size of elements"));
|
||||
complaint (&symfile_complaints,
|
||||
_("DW_AT_byte_size for array type smaller "
|
||||
"than the total size of elements"));
|
||||
}
|
||||
|
||||
name = dwarf2_name (die, cu);
|
||||
|
@ -7565,7 +7592,8 @@ read_module_type (struct die_info *die, struct dwarf2_cu *cu)
|
|||
|
||||
module_name = dwarf2_name (die, cu);
|
||||
if (!module_name)
|
||||
complaint (&symfile_complaints, _("DW_TAG_module has no name, offset 0x%x"),
|
||||
complaint (&symfile_complaints,
|
||||
_("DW_TAG_module has no name, offset 0x%x"),
|
||||
die->offset);
|
||||
type = init_type (TYPE_CODE_MODULE, 0, 0, module_name, objfile);
|
||||
|
||||
|
@ -7671,7 +7699,8 @@ read_tag_pointer_type (struct die_info *die, struct dwarf2_cu *cu)
|
|||
}
|
||||
else if (TYPE_LENGTH (type) != byte_size)
|
||||
{
|
||||
complaint (&symfile_complaints, _("invalid pointer size %d"), byte_size);
|
||||
complaint (&symfile_complaints,
|
||||
_("invalid pointer size %d"), byte_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -8785,7 +8814,8 @@ load_partial_dies (bfd *abfd, gdb_byte *buffer, gdb_byte *info_ptr,
|
|||
&& parent_die->has_specification == 0)
|
||||
{
|
||||
if (part_die->name == NULL)
|
||||
complaint (&symfile_complaints, _("malformed enumerator DIE ignored"));
|
||||
complaint (&symfile_complaints,
|
||||
_("malformed enumerator DIE ignored"));
|
||||
else if (building_psymtab)
|
||||
add_psymbol_to_list (part_die->name, strlen (part_die->name), 0,
|
||||
VAR_DOMAIN, LOC_CONST,
|
||||
|
@ -9000,7 +9030,8 @@ read_partial_die (struct partial_die_info *part_die,
|
|||
/* Ignore absolute siblings, they might point outside of
|
||||
the current compile unit. */
|
||||
if (attr.form == DW_FORM_ref_addr)
|
||||
complaint (&symfile_complaints, _("ignoring absolute DW_AT_sibling"));
|
||||
complaint (&symfile_complaints,
|
||||
_("ignoring absolute DW_AT_sibling"));
|
||||
else
|
||||
part_die->sibling = buffer + dwarf2_get_ref_die_offset (&attr);
|
||||
break;
|
||||
|
@ -9140,7 +9171,8 @@ find_partial_die (unsigned int offset, struct dwarf2_cu *cu)
|
|||
|
||||
if (pd == NULL)
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("could not find partial DIE 0x%x in cache [from module %s]\n"),
|
||||
_("could not find partial DIE 0x%x "
|
||||
"in cache [from module %s]\n"),
|
||||
offset, bfd_get_filename (cu->objfile->obfd));
|
||||
return pd;
|
||||
}
|
||||
|
@ -9270,7 +9302,8 @@ read_attribute_value (struct attribute *attr, unsigned form,
|
|||
if (cu->header.version == 2)
|
||||
DW_ADDR (attr) = read_address (abfd, info_ptr, cu, &bytes_read);
|
||||
else
|
||||
DW_ADDR (attr) = read_offset (abfd, info_ptr, &cu->header, &bytes_read);
|
||||
DW_ADDR (attr) = read_offset (abfd, info_ptr,
|
||||
&cu->header, &bytes_read);
|
||||
info_ptr += bytes_read;
|
||||
break;
|
||||
case DW_FORM_addr:
|
||||
|
@ -9689,8 +9722,9 @@ read_indirect_string (bfd *abfd, gdb_byte *buf,
|
|||
}
|
||||
if (str_offset >= dwarf2_per_objfile->str.size)
|
||||
{
|
||||
error (_("DW_FORM_strp pointing outside of .debug_str section [in module %s]"),
|
||||
bfd_get_filename (abfd));
|
||||
error (_("DW_FORM_strp pointing outside of "
|
||||
".debug_str section [in module %s]"),
|
||||
bfd_get_filename (abfd));
|
||||
return NULL;
|
||||
}
|
||||
gdb_assert (HOST_CHAR_BIT == 8);
|
||||
|
@ -10064,7 +10098,8 @@ dwarf_decode_line_header (unsigned int offset, bfd *abfd,
|
|||
{
|
||||
lh->maximum_ops_per_instruction = 1;
|
||||
complaint (&symfile_complaints,
|
||||
_("invalid maximum_ops_per_instruction in `.debug_line' section"));
|
||||
_("invalid maximum_ops_per_instruction "
|
||||
"in `.debug_line' section"));
|
||||
}
|
||||
|
||||
lh->default_is_stmt = read_1_byte (abfd, line_ptr);
|
||||
|
@ -10114,7 +10149,8 @@ dwarf_decode_line_header (unsigned int offset, bfd *abfd,
|
|||
if (line_ptr > (dwarf2_per_objfile->line.buffer
|
||||
+ dwarf2_per_objfile->line.size))
|
||||
complaint (&symfile_complaints,
|
||||
_("line number info header doesn't fit in `.debug_line' section"));
|
||||
_("line number info header doesn't "
|
||||
"fit in `.debug_line' section"));
|
||||
|
||||
discard_cleanups (back_to);
|
||||
return lh;
|
||||
|
@ -10363,7 +10399,8 @@ dwarf_decode_lines (struct line_header *lh, const char *comp_dir, bfd *abfd,
|
|||
else switch (op_code)
|
||||
{
|
||||
case DW_LNS_extended_op:
|
||||
extended_len = read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
|
||||
extended_len = read_unsigned_leb128 (abfd, line_ptr,
|
||||
&bytes_read);
|
||||
line_ptr += bytes_read;
|
||||
extended_end = line_ptr + extended_len;
|
||||
extended_op = read_1_byte (abfd, line_ptr);
|
||||
|
@ -10384,7 +10421,8 @@ dwarf_decode_lines (struct line_header *lh, const char *comp_dir, bfd *abfd,
|
|||
char *cur_file;
|
||||
unsigned int dir_index, mod_time, length;
|
||||
|
||||
cur_file = read_direct_string (abfd, line_ptr, &bytes_read);
|
||||
cur_file = read_direct_string (abfd, line_ptr,
|
||||
&bytes_read);
|
||||
line_ptr += bytes_read;
|
||||
dir_index =
|
||||
read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
|
||||
|
@ -10611,7 +10649,8 @@ dwarf_decode_lines (struct line_header *lh, const char *comp_dir, bfd *abfd,
|
|||
subfile's name. */
|
||||
|
||||
static void
|
||||
dwarf2_start_subfile (char *filename, const char *dirname, const char *comp_dir)
|
||||
dwarf2_start_subfile (char *filename, const char *dirname,
|
||||
const char *comp_dir)
|
||||
{
|
||||
char *fullname;
|
||||
|
||||
|
@ -11179,16 +11218,20 @@ dwarf2_const_value_attr (struct attribute *attr, struct type *type,
|
|||
converted to host endianness, so we just need to sign- or
|
||||
zero-extend it as appropriate. */
|
||||
case DW_FORM_data1:
|
||||
*bytes = dwarf2_const_value_data (attr, type, name, obstack, cu, value, 8);
|
||||
*bytes = dwarf2_const_value_data (attr, type, name,
|
||||
obstack, cu, value, 8);
|
||||
break;
|
||||
case DW_FORM_data2:
|
||||
*bytes = dwarf2_const_value_data (attr, type, name, obstack, cu, value, 16);
|
||||
*bytes = dwarf2_const_value_data (attr, type, name,
|
||||
obstack, cu, value, 16);
|
||||
break;
|
||||
case DW_FORM_data4:
|
||||
*bytes = dwarf2_const_value_data (attr, type, name, obstack, cu, value, 32);
|
||||
*bytes = dwarf2_const_value_data (attr, type, name,
|
||||
obstack, cu, value, 32);
|
||||
break;
|
||||
case DW_FORM_data8:
|
||||
*bytes = dwarf2_const_value_data (attr, type, name, obstack, cu, value, 64);
|
||||
*bytes = dwarf2_const_value_data (attr, type, name,
|
||||
obstack, cu, value, 64);
|
||||
break;
|
||||
|
||||
case DW_FORM_sdata:
|
||||
|
@ -11489,7 +11532,8 @@ read_type_die_1 (struct die_info *die, struct dwarf2_cu *cu)
|
|||
this_type = read_module_type (die, cu);
|
||||
break;
|
||||
default:
|
||||
complaint (&symfile_complaints, _("unexpected tag in read_type_die: '%s'"),
|
||||
complaint (&symfile_complaints,
|
||||
_("unexpected tag in read_type_die: '%s'"),
|
||||
dwarf_tag_name (die->tag));
|
||||
break;
|
||||
}
|
||||
|
@ -11552,7 +11596,8 @@ guess_full_die_structure_name (struct die_info *die, struct dwarf2_cu *cu)
|
|||
|
||||
/* Test for '::' as a sanity check. */
|
||||
if (actual_name_len > die_name_len + 2
|
||||
&& actual_name[actual_name_len - die_name_len - 1] == ':')
|
||||
&& actual_name[actual_name_len
|
||||
- die_name_len - 1] == ':')
|
||||
name =
|
||||
obsavestring (actual_name,
|
||||
actual_name_len - die_name_len - 2,
|
||||
|
@ -11713,11 +11758,11 @@ determine_prefix (struct die_info *die, struct dwarf2_cu *cu)
|
|||
}
|
||||
}
|
||||
|
||||
/* Return a newly-allocated string formed by concatenating PREFIX and
|
||||
SUFFIX with appropriate separator. If PREFIX or SUFFIX is NULL or empty, then
|
||||
simply copy the SUFFIX or PREFIX, respectively. If OBS is non-null,
|
||||
perform an obconcat, otherwise allocate storage for the result. The CU argument
|
||||
is used to determine the language and hence, the appropriate separator. */
|
||||
/* Return a newly-allocated string formed by concatenating PREFIX and SUFFIX
|
||||
with appropriate separator. If PREFIX or SUFFIX is NULL or empty, then
|
||||
simply copy the SUFFIX or PREFIX, respectively. If OBS is non-null, perform
|
||||
an obconcat, otherwise allocate storage for the result. The CU argument is
|
||||
used to determine the language and hence, the appropriate separator. */
|
||||
|
||||
#define MAX_SEP_LEN 7 /* strlen ("__") + strlen ("_MOD_") */
|
||||
|
||||
|
@ -11728,7 +11773,8 @@ typename_concat (struct obstack *obs, const char *prefix, const char *suffix,
|
|||
const char *lead = "";
|
||||
const char *sep;
|
||||
|
||||
if (suffix == NULL || suffix[0] == '\0' || prefix == NULL || prefix[0] == '\0')
|
||||
if (suffix == NULL || suffix[0] == '\0'
|
||||
|| prefix == NULL || prefix[0] == '\0')
|
||||
sep = "";
|
||||
else if (cu->language == language_java)
|
||||
sep = ".";
|
||||
|
@ -11750,7 +11796,8 @@ typename_concat (struct obstack *obs, const char *prefix, const char *suffix,
|
|||
|
||||
if (obs == NULL)
|
||||
{
|
||||
char *retval = xmalloc (strlen (prefix) + MAX_SEP_LEN + strlen (suffix) + 1);
|
||||
char *retval
|
||||
= xmalloc (strlen (prefix) + MAX_SEP_LEN + strlen (suffix) + 1);
|
||||
|
||||
strcpy (retval, lead);
|
||||
strcat (retval, prefix);
|
||||
|
@ -12906,7 +12953,8 @@ dump_die_shallow (struct ui_file *f, int indent, struct die_info *die)
|
|||
case DW_FORM_block4:
|
||||
case DW_FORM_block:
|
||||
case DW_FORM_block1:
|
||||
fprintf_unfiltered (f, "block: size %d", DW_BLOCK (&die->attrs[i])->size);
|
||||
fprintf_unfiltered (f, "block: size %d",
|
||||
DW_BLOCK (&die->attrs[i])->size);
|
||||
break;
|
||||
case DW_FORM_exprloc:
|
||||
fprintf_unfiltered (f, "expression: size %u",
|
||||
|
@ -12957,7 +13005,8 @@ dump_die_shallow (struct ui_file *f, int indent, struct die_info *die)
|
|||
case DW_FORM_indirect:
|
||||
/* the reader will have reduced the indirect form to
|
||||
the "base form" so this form should not occur */
|
||||
fprintf_unfiltered (f, "unexpected attribute form: DW_FORM_indirect");
|
||||
fprintf_unfiltered (f,
|
||||
"unexpected attribute form: DW_FORM_indirect");
|
||||
break;
|
||||
default:
|
||||
fprintf_unfiltered (f, "unsupported attribute form: %d.",
|
||||
|
@ -12997,7 +13046,8 @@ dump_die_1 (struct ui_file *f, int level, int max_level, struct die_info *die)
|
|||
}
|
||||
else
|
||||
{
|
||||
fprintf_unfiltered (f, " [not printed, max nesting level reached]\n");
|
||||
fprintf_unfiltered (f,
|
||||
" [not printed, max nesting level reached]\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13071,7 +13121,8 @@ dwarf2_get_attr_constant_value (struct attribute *attr, int default_value)
|
|||
return DW_UNSND (attr);
|
||||
else
|
||||
{
|
||||
complaint (&symfile_complaints, _("Attribute value is not a constant (%s)"),
|
||||
complaint (&symfile_complaints,
|
||||
_("Attribute value is not a constant (%s)"),
|
||||
dwarf_form_name (attr->form));
|
||||
return default_value;
|
||||
}
|
||||
|
@ -13302,8 +13353,8 @@ follow_die_sig (struct die_info *src_die, struct attribute *attr,
|
|||
return die;
|
||||
}
|
||||
|
||||
error (_("Dwarf Error: Cannot find signatured DIE at 0x%x referenced from DIE "
|
||||
"at 0x%x [in module %s]"),
|
||||
error (_("Dwarf Error: Cannot find signatured DIE at 0x%x referenced "
|
||||
"from DIE at 0x%x [in module %s]"),
|
||||
sig_type->type_offset, src_die->offset, objfile->name);
|
||||
}
|
||||
|
||||
|
@ -13598,7 +13649,8 @@ decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
|
|||
break;
|
||||
|
||||
case DW_OP_plus_uconst:
|
||||
stack[stacki] += read_unsigned_leb128 (NULL, (data + i), &bytes_read);
|
||||
stack[stacki] += read_unsigned_leb128 (NULL, (data + i),
|
||||
&bytes_read);
|
||||
i += bytes_read;
|
||||
break;
|
||||
|
||||
|
@ -13799,7 +13851,8 @@ consume_improper_spaces (const char *p, const char *body)
|
|||
if (*p == ' ')
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("macro definition contains spaces in formal argument list:\n`%s'"),
|
||||
_("macro definition contains spaces "
|
||||
"in formal argument list:\n`%s'"),
|
||||
body);
|
||||
|
||||
while (*p == ' ')
|
||||
|
@ -13990,7 +14043,8 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
|
|||
if (mac_ptr >= mac_end)
|
||||
{
|
||||
/* Complaint is printed during the second pass as GDB will probably
|
||||
stop the first pass earlier upon finding DW_MACINFO_start_file. */
|
||||
stop the first pass earlier upon finding
|
||||
DW_MACINFO_start_file. */
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -14027,8 +14081,8 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
|
|||
file = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);
|
||||
mac_ptr += bytes_read;
|
||||
|
||||
current_file = macro_start_file (file, line, current_file, comp_dir,
|
||||
lh, cu->objfile);
|
||||
current_file = macro_start_file (file, line, current_file,
|
||||
comp_dir, lh, cu->objfile);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -14114,7 +14168,8 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
|
|||
_("something-or-other"), line, body);
|
||||
break;
|
||||
}
|
||||
if ((line == 0 && !at_commandline) || (line != 0 && at_commandline))
|
||||
if ((line == 0 && !at_commandline)
|
||||
|| (line != 0 && at_commandline))
|
||||
complaint (&symfile_complaints,
|
||||
_("debug info gives %s macro %s with %s line %d: %s"),
|
||||
at_commandline ? _("command-line") : _("in-file"),
|
||||
|
@ -14142,7 +14197,8 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
|
|||
file = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);
|
||||
mac_ptr += bytes_read;
|
||||
|
||||
if ((line == 0 && !at_commandline) || (line != 0 && at_commandline))
|
||||
if ((line == 0 && !at_commandline)
|
||||
|| (line != 0 && at_commandline))
|
||||
complaint (&symfile_complaints,
|
||||
_("debug info gives source %d included "
|
||||
"from %s at %s line %d"),
|
||||
|
@ -14164,7 +14220,8 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
|
|||
case DW_MACINFO_end_file:
|
||||
if (! current_file)
|
||||
complaint (&symfile_complaints,
|
||||
_("macro debug info has an unmatched `close_file' directive"));
|
||||
_("macro debug info has an unmatched "
|
||||
"`close_file' directive"));
|
||||
else
|
||||
{
|
||||
current_file = current_file->included_by;
|
||||
|
@ -14189,7 +14246,8 @@ dwarf_decode_macros (struct line_header *lh, unsigned int offset,
|
|||
next_type = read_1_byte (abfd, mac_ptr);
|
||||
if (next_type != 0)
|
||||
complaint (&symfile_complaints,
|
||||
_("no terminating 0-type entry for macros in `.debug_macinfo' section"));
|
||||
_("no terminating 0-type entry for "
|
||||
"macros in `.debug_macinfo' section"));
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -14311,7 +14369,8 @@ dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym,
|
|||
|
||||
if (cu->base_known == 0)
|
||||
complaint (&symfile_complaints,
|
||||
_("Location list used without specifying the CU base address."));
|
||||
_("Location list used without "
|
||||
"specifying the CU base address."));
|
||||
|
||||
SYMBOL_COMPUTED_OPS (sym) = &dwarf2_loclist_funcs;
|
||||
SYMBOL_LOCATION_BATON (sym) = baton;
|
||||
|
@ -15458,12 +15517,14 @@ write_one_signatured_type (void **slot, void *d)
|
|||
|
||||
write_psymbols (info->symtab,
|
||||
info->psyms_seen,
|
||||
info->objfile->global_psymbols.list + psymtab->globals_offset,
|
||||
info->objfile->global_psymbols.list
|
||||
+ psymtab->globals_offset,
|
||||
psymtab->n_global_syms, info->cu_index,
|
||||
0);
|
||||
write_psymbols (info->symtab,
|
||||
info->psyms_seen,
|
||||
info->objfile->static_psymbols.list + psymtab->statics_offset,
|
||||
info->objfile->static_psymbols.list
|
||||
+ psymtab->statics_offset,
|
||||
psymtab->n_static_syms, info->cu_index,
|
||||
1);
|
||||
|
||||
|
@ -15560,7 +15621,8 @@ write_psymtabs_to_index (struct objfile *objfile, const char *dir)
|
|||
all_comp_units, but only in their own hash table. */
|
||||
for (i = 0; i < dwarf2_per_objfile->n_comp_units; ++i)
|
||||
{
|
||||
struct dwarf2_per_cu_data *per_cu = dwarf2_per_objfile->all_comp_units[i];
|
||||
struct dwarf2_per_cu_data *per_cu
|
||||
= dwarf2_per_objfile->all_comp_units[i];
|
||||
struct partial_symtab *psymtab = per_cu->v.psymtab;
|
||||
gdb_byte val[8];
|
||||
struct psymtab_cu_index_map *map;
|
||||
|
@ -15777,8 +15839,9 @@ static void
|
|||
show_dwarf2_always_disassemble (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
Whether to always disassemble DWARF expressions is %s.\n"),
|
||||
fprintf_filtered (file,
|
||||
_("Whether to always disassemble "
|
||||
"DWARF expressions is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
|
|
@ -469,7 +469,8 @@ elf_symtab_read (struct objfile *objfile, int type,
|
|||
if (filesym == NULL)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("elf/stab section information %s without a preceding file symbol"),
|
||||
_("elf/stab section information %s "
|
||||
"without a preceding file symbol"),
|
||||
sym->name);
|
||||
}
|
||||
else
|
||||
|
@ -480,7 +481,8 @@ elf_symtab_read (struct objfile *objfile, int type,
|
|||
}
|
||||
if (sectinfo->sections[special_local_sect] != 0)
|
||||
complaint (&symfile_complaints,
|
||||
_("duplicated elf/stab section information for %s"),
|
||||
_("duplicated elf/stab section "
|
||||
"information for %s"),
|
||||
sectinfo->filename);
|
||||
/* BFD symbols are section relative. */
|
||||
symaddr = sym->value + sym->section->vma;
|
||||
|
@ -617,7 +619,8 @@ build_id_verify (const char *filename, struct build_id *check)
|
|||
warning (_("File \"%s\" has no build-id, file skipped"), filename);
|
||||
else if (found->size != check->size
|
||||
|| memcmp (found->data, check->data, found->size) != 0)
|
||||
warning (_("File \"%s\" has a different build-id, file skipped"), filename);
|
||||
warning (_("File \"%s\" has a different build-id, file skipped"),
|
||||
filename);
|
||||
else
|
||||
retval = 1;
|
||||
|
||||
|
@ -759,16 +762,19 @@ elf_symfile_read (struct objfile *objfile, int symfile_flags)
|
|||
/* Allocate struct to keep track of the symfile */
|
||||
objfile->deprecated_sym_stab_info = (struct dbx_symfile_info *)
|
||||
xmalloc (sizeof (struct dbx_symfile_info));
|
||||
memset ((char *) objfile->deprecated_sym_stab_info, 0, sizeof (struct dbx_symfile_info));
|
||||
memset ((char *) objfile->deprecated_sym_stab_info,
|
||||
0, sizeof (struct dbx_symfile_info));
|
||||
make_cleanup (free_elfinfo, (void *) objfile);
|
||||
|
||||
/* Process the normal ELF symbol table first. This may write some
|
||||
chain of info into the dbx_symfile_info in objfile->deprecated_sym_stab_info,
|
||||
which can later be used by elfstab_offset_sections. */
|
||||
/* Process the normal ELF symbol table first. This may write some
|
||||
chain of info into the dbx_symfile_info in
|
||||
objfile->deprecated_sym_stab_info, which can later be used by
|
||||
elfstab_offset_sections. */
|
||||
|
||||
storage_needed = bfd_get_symtab_upper_bound (objfile->obfd);
|
||||
if (storage_needed < 0)
|
||||
error (_("Can't read symbols from %s: %s"), bfd_get_filename (objfile->obfd),
|
||||
error (_("Can't read symbols from %s: %s"),
|
||||
bfd_get_filename (objfile->obfd),
|
||||
bfd_errmsg (bfd_get_error ()));
|
||||
|
||||
if (storage_needed > 0)
|
||||
|
@ -778,7 +784,8 @@ elf_symfile_read (struct objfile *objfile, int symfile_flags)
|
|||
symcount = bfd_canonicalize_symtab (objfile->obfd, symbol_table);
|
||||
|
||||
if (symcount < 0)
|
||||
error (_("Can't read symbols from %s: %s"), bfd_get_filename (objfile->obfd),
|
||||
error (_("Can't read symbols from %s: %s"),
|
||||
bfd_get_filename (objfile->obfd),
|
||||
bfd_errmsg (bfd_get_error ()));
|
||||
|
||||
elf_symtab_read (objfile, ST_REGULAR, symcount, symbol_table, 0);
|
||||
|
@ -802,7 +809,8 @@ elf_symfile_read (struct objfile *objfile, int symfile_flags)
|
|||
dyn_symbol_table);
|
||||
|
||||
if (dynsymcount < 0)
|
||||
error (_("Can't read symbols from %s: %s"), bfd_get_filename (objfile->obfd),
|
||||
error (_("Can't read symbols from %s: %s"),
|
||||
bfd_get_filename (objfile->obfd),
|
||||
bfd_errmsg (bfd_get_error ()));
|
||||
|
||||
elf_symtab_read (objfile, ST_DYNAMIC, dynsymcount, dyn_symbol_table, 0);
|
||||
|
@ -823,7 +831,8 @@ elf_symfile_read (struct objfile *objfile, int symfile_flags)
|
|||
for (i = 0; i < synthcount; i++)
|
||||
synth_symbol_table[i] = synthsyms + i;
|
||||
make_cleanup (xfree, synth_symbol_table);
|
||||
elf_symtab_read (objfile, ST_SYNTHETIC, synthcount, synth_symbol_table, 1);
|
||||
elf_symtab_read (objfile, ST_SYNTHETIC, synthcount,
|
||||
synth_symbol_table, 1);
|
||||
}
|
||||
|
||||
/* Install any minimal symbols that have been collected as the current
|
||||
|
@ -882,9 +891,10 @@ elf_symfile_read (struct objfile *objfile, int symfile_flags)
|
|||
if (dwarf2_has_info (objfile) && dwarf2_initialize_objfile (objfile))
|
||||
objfile->sf = &elf_sym_fns_gdb_index;
|
||||
|
||||
/* If the file has its own symbol tables it has no separate debug info.
|
||||
`.dynsym'/`.symtab' go to MSYMBOLS, `.debug_info' goes to SYMTABS/PSYMTABS.
|
||||
`.gnu_debuglink' may no longer be present with `.note.gnu.build-id'. */
|
||||
/* If the file has its own symbol tables it has no separate debug
|
||||
info. `.dynsym'/`.symtab' go to MSYMBOLS, `.debug_info' goes to
|
||||
SYMTABS/PSYMTABS. `.gnu_debuglink' may no longer be present with
|
||||
`.note.gnu.build-id'. */
|
||||
if (!objfile_has_partial_symbols (objfile))
|
||||
{
|
||||
char *debugfile;
|
||||
|
@ -931,7 +941,8 @@ free_elfinfo (void *objp)
|
|||
file is specified (not just adding some symbols from another file, e.g. a
|
||||
shared library).
|
||||
|
||||
We reinitialize buildsym, since we may be reading stabs from an ELF file. */
|
||||
We reinitialize buildsym, since we may be reading stabs from an ELF
|
||||
file. */
|
||||
|
||||
static void
|
||||
elf_new_init (struct objfile *ignore)
|
||||
|
@ -1016,7 +1027,8 @@ elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst)
|
|||
if (maybe == 0 && questionable != 0)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("elf/stab section information questionable for %s"), filename);
|
||||
_("elf/stab section information questionable for %s"),
|
||||
filename);
|
||||
maybe = questionable;
|
||||
}
|
||||
|
||||
|
@ -1043,15 +1055,14 @@ elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst)
|
|||
static const struct sym_fns elf_sym_fns =
|
||||
{
|
||||
bfd_target_elf_flavour,
|
||||
elf_new_init, /* sym_new_init: init anything gbl to entire symtab */
|
||||
elf_symfile_init, /* sym_init: read initial info, setup for sym_read() */
|
||||
elf_symfile_read, /* sym_read: read a symbol file into symtab */
|
||||
elf_symfile_finish, /* sym_finish: finished with file, cleanup */
|
||||
default_symfile_offsets, /* sym_offsets: Translate ext. to int. relocation */
|
||||
elf_symfile_segments, /* sym_segments: Get segment information from
|
||||
a file. */
|
||||
NULL, /* sym_read_linetable */
|
||||
default_symfile_relocate, /* sym_relocate: Relocate a debug section. */
|
||||
elf_new_init, /* init anything gbl to entire symtab */
|
||||
elf_symfile_init, /* read initial info, setup for sym_read() */
|
||||
elf_symfile_read, /* read a symbol file into symtab */
|
||||
elf_symfile_finish, /* finished with file, cleanup */
|
||||
default_symfile_offsets, /* Translate ext. to int. relocation */
|
||||
elf_symfile_segments, /* Get segment information from a file. */
|
||||
NULL,
|
||||
default_symfile_relocate, /* Relocate a debug section. */
|
||||
&psym_functions
|
||||
};
|
||||
|
||||
|
@ -1060,15 +1071,14 @@ static const struct sym_fns elf_sym_fns =
|
|||
static const struct sym_fns elf_sym_fns_gdb_index =
|
||||
{
|
||||
bfd_target_elf_flavour,
|
||||
elf_new_init, /* sym_new_init: init anything gbl to entire symab */
|
||||
elf_symfile_init, /* sym_init: read initial info, setup for sym_red() */
|
||||
elf_symfile_read, /* sym_read: read a symbol file into symtab */
|
||||
elf_symfile_finish, /* sym_finish: finished with file, cleanup */
|
||||
default_symfile_offsets, /* sym_offsets: Translate ext. to int. relocatin */
|
||||
elf_symfile_segments, /* sym_segments: Get segment information from
|
||||
a file. */
|
||||
NULL, /* sym_read_linetable */
|
||||
default_symfile_relocate, /* sym_relocate: Relocate a debug section. */
|
||||
elf_new_init, /* init anything gbl to entire symab */
|
||||
elf_symfile_init, /* read initial info, setup for sym_red() */
|
||||
elf_symfile_read, /* read a symbol file into symtab */
|
||||
elf_symfile_finish, /* finished with file, cleanup */
|
||||
default_symfile_offsets, /* Translate ext. to int. relocatin */
|
||||
elf_symfile_segments, /* Get segment information from a file. */
|
||||
NULL,
|
||||
default_symfile_relocate, /* Relocate a debug section. */
|
||||
&dwarf2_gdb_index_functions
|
||||
};
|
||||
|
||||
|
|
116
gdb/eval.c
116
gdb/eval.c
|
@ -867,7 +867,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
if (except.reason < 0)
|
||||
{
|
||||
if (noside == EVAL_AVOID_SIDE_EFFECTS)
|
||||
ret = value_zero (SYMBOL_TYPE (exp->elts[pc + 2].symbol), not_lval);
|
||||
ret = value_zero (SYMBOL_TYPE (exp->elts[pc + 2].symbol),
|
||||
not_lval);
|
||||
else
|
||||
throw_exception (except);
|
||||
}
|
||||
|
@ -926,7 +927,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
type = language_string_char_type (exp->language_defn, exp->gdbarch);
|
||||
return value_string (&exp->elts[pc + 2].string, tem, type);
|
||||
|
||||
case OP_OBJC_NSSTRING: /* Objective C Foundation Class NSString constant. */
|
||||
case OP_OBJC_NSSTRING: /* Objective C Foundation Class
|
||||
NSString constant. */
|
||||
tem = longest_to_int (exp->elts[pc + 1].longconst);
|
||||
(*pos) += 3 + BYTES_TO_EXP_ELEM (tem + 1);
|
||||
if (noside == EVAL_SKIP)
|
||||
|
@ -1341,7 +1343,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
}
|
||||
|
||||
struct_return = using_struct_return (exp->gdbarch,
|
||||
value_type (method), val_type);
|
||||
value_type (method),
|
||||
val_type);
|
||||
}
|
||||
else if (expect_type != NULL)
|
||||
{
|
||||
|
@ -1365,12 +1368,14 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
if (method)
|
||||
{
|
||||
if (TYPE_CODE (value_type (method)) != TYPE_CODE_FUNC)
|
||||
error (_("method address has symbol information with non-function type; skipping"));
|
||||
error (_("method address has symbol information "
|
||||
"with non-function type; skipping"));
|
||||
|
||||
/* Create a function pointer of the appropriate type, and replace
|
||||
its value with the value of msg_send or msg_send_stret. We must
|
||||
use a pointer here, as msg_send and msg_send_stret are of pointer
|
||||
type, and the representation may be different on systems that use
|
||||
/* Create a function pointer of the appropriate type, and
|
||||
replace its value with the value of msg_send or
|
||||
msg_send_stret. We must use a pointer here, as
|
||||
msg_send and msg_send_stret are of pointer type, and
|
||||
the representation may be different on systems that use
|
||||
function descriptors. */
|
||||
if (struct_return)
|
||||
called_method
|
||||
|
@ -1416,7 +1421,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
return allocate_value (type);
|
||||
}
|
||||
else
|
||||
error (_("Expression of type other than \"method returning ...\" used as a method"));
|
||||
error (_("Expression of type other than "
|
||||
"\"method returning ...\" used as a method"));
|
||||
}
|
||||
|
||||
/* Now depending on whether we found a symbol for the method,
|
||||
|
@ -1436,7 +1442,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
/* Function objc_msg_lookup returns a pointer. */
|
||||
deprecated_set_value_type (argvec[0],
|
||||
lookup_pointer_type (lookup_function_type (value_type (argvec[0]))));
|
||||
argvec[0] = call_function_by_hand (argvec[0], nargs + 2, argvec + 1);
|
||||
argvec[0]
|
||||
= call_function_by_hand (argvec[0], nargs + 2, argvec + 1);
|
||||
}
|
||||
|
||||
ret = call_function_by_hand (argvec[0], nargs + 2, argvec + 1);
|
||||
|
@ -1450,7 +1457,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
nargs = longest_to_int (exp->elts[pc + 1].longconst);
|
||||
/* Allocate arg vector, including space for the function to be
|
||||
called in argvec[0] and a terminating NULL */
|
||||
argvec = (struct value **) alloca (sizeof (struct value *) * (nargs + 3));
|
||||
argvec = (struct value **)
|
||||
alloca (sizeof (struct value *) * (nargs + 3));
|
||||
if (op == STRUCTOP_MEMBER || op == STRUCTOP_MPTR)
|
||||
{
|
||||
nargs++;
|
||||
|
@ -1529,8 +1537,9 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
{
|
||||
arg2 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
|
||||
|
||||
/* Check to see if the operator '->' has been overloaded. If the operator
|
||||
has been overloaded replace arg2 with the value returned by the custom
|
||||
/* Check to see if the operator '->' has been
|
||||
overloaded. If the operator has been overloaded
|
||||
replace arg2 with the value returned by the custom
|
||||
operator and continue evaluation. */
|
||||
while (unop_user_defined_p (op, arg2))
|
||||
{
|
||||
|
@ -1630,7 +1639,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
{
|
||||
for (; tem <= nargs && tem <= TYPE_NFIELDS (type); tem++)
|
||||
{
|
||||
argvec[tem] = evaluate_subexp (TYPE_FIELD_TYPE (type, tem - 1),
|
||||
argvec[tem] = evaluate_subexp (TYPE_FIELD_TYPE (type,
|
||||
tem - 1),
|
||||
exp, pos, noside);
|
||||
}
|
||||
}
|
||||
|
@ -1659,13 +1669,16 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
strcpy (func_name, &exp->elts[string_pc + 1].string);
|
||||
|
||||
/* Prepare list of argument types for overload resolution */
|
||||
arg_types = (struct type **) alloca (nargs * (sizeof (struct type *)));
|
||||
arg_types = (struct type **)
|
||||
alloca (nargs * (sizeof (struct type *)));
|
||||
for (ix = 1; ix <= nargs; ix++)
|
||||
arg_types[ix - 1] = value_type (argvec[ix]);
|
||||
|
||||
find_overload_match (arg_types, nargs, func_name,
|
||||
NON_METHOD /* not method */ , 0 /* strict match */ ,
|
||||
NULL, NULL /* pass NULL symbol since symbol is unknown */ ,
|
||||
NON_METHOD, /* not method */
|
||||
0, /* strict match */
|
||||
NULL, NULL, /* pass NULL symbol since
|
||||
symbol is unknown */
|
||||
NULL, &symp, NULL, 0);
|
||||
|
||||
/* Now fix the expression being evaluated. */
|
||||
|
@ -1690,20 +1703,25 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
else
|
||||
tstr = function_name;
|
||||
|
||||
if (overload_resolution && (exp->language_defn->la_language == language_cplus))
|
||||
if (overload_resolution && (exp->language_defn->la_language
|
||||
== language_cplus))
|
||||
{
|
||||
/* Language is C++, do some overload resolution before evaluation */
|
||||
/* Language is C++, do some overload resolution before
|
||||
evaluation */
|
||||
struct value *valp = NULL;
|
||||
|
||||
/* Prepare list of argument types for overload resolution */
|
||||
arg_types = (struct type **) alloca (nargs * (sizeof (struct type *)));
|
||||
arg_types = (struct type **)
|
||||
alloca (nargs * (sizeof (struct type *)));
|
||||
for (ix = 1; ix <= nargs; ix++)
|
||||
arg_types[ix - 1] = value_type (argvec[ix]);
|
||||
|
||||
(void) find_overload_match (arg_types, nargs, tstr,
|
||||
METHOD /* method */ , 0 /* strict match */ ,
|
||||
&arg2 /* the object */ , NULL,
|
||||
&valp, NULL, &static_memfuncp, 0);
|
||||
METHOD, /* method */
|
||||
0, /* strict match */
|
||||
&arg2, /* the object */
|
||||
NULL, &valp, NULL,
|
||||
&static_memfuncp, 0);
|
||||
|
||||
if (op == OP_SCOPE && !static_memfuncp)
|
||||
{
|
||||
|
@ -1713,7 +1731,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
function_name);
|
||||
}
|
||||
argvec[1] = arg2; /* the ``this'' pointer */
|
||||
argvec[0] = valp; /* use the method found after overload resolution */
|
||||
argvec[0] = valp; /* use the method found after overload
|
||||
resolution */
|
||||
}
|
||||
else
|
||||
/* Non-C++ case -- or no overload resolution */
|
||||
|
@ -1727,9 +1746,10 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
/* value_struct_elt updates temp with the correct value
|
||||
of the ``this'' pointer if necessary, so modify argvec[1] to
|
||||
reflect any ``this'' changes. */
|
||||
arg2 = value_from_longest (lookup_pointer_type(value_type (temp)),
|
||||
value_address (temp)
|
||||
+ value_embedded_offset (temp));
|
||||
arg2
|
||||
= value_from_longest (lookup_pointer_type(value_type (temp)),
|
||||
value_address (temp)
|
||||
+ value_embedded_offset (temp));
|
||||
argvec[1] = arg2; /* the ``this'' pointer */
|
||||
}
|
||||
|
||||
|
@ -1752,9 +1772,11 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
in a C++ program, for instance, does not have the fields that
|
||||
are expected here */
|
||||
|
||||
if (overload_resolution && (exp->language_defn->la_language == language_cplus))
|
||||
if (overload_resolution && (exp->language_defn->la_language
|
||||
== language_cplus))
|
||||
{
|
||||
/* Language is C++, do some overload resolution before evaluation */
|
||||
/* Language is C++, do some overload resolution before
|
||||
evaluation */
|
||||
struct symbol *symp;
|
||||
int no_adl = 0;
|
||||
|
||||
|
@ -1766,13 +1788,16 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
function = exp->elts[save_pos1+2].symbol;
|
||||
|
||||
/* Prepare list of argument types for overload resolution */
|
||||
arg_types = (struct type **) alloca (nargs * (sizeof (struct type *)));
|
||||
arg_types = (struct type **)
|
||||
alloca (nargs * (sizeof (struct type *)));
|
||||
for (ix = 1; ix <= nargs; ix++)
|
||||
arg_types[ix - 1] = value_type (argvec[ix]);
|
||||
|
||||
(void) find_overload_match (arg_types, nargs, NULL /* no need for name */ ,
|
||||
NON_METHOD /* not method */ , 0 /* strict match */ ,
|
||||
NULL, function /* the function */ ,
|
||||
(void) find_overload_match (arg_types, nargs,
|
||||
NULL, /* no need for name */
|
||||
NON_METHOD, /* not method */
|
||||
0, /* strict match */
|
||||
NULL, function, /* the function */
|
||||
NULL, &symp, NULL, no_adl);
|
||||
|
||||
if (op == OP_VAR_VALUE)
|
||||
|
@ -1825,14 +1850,16 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
else if (TYPE_TARGET_TYPE (ftype))
|
||||
return allocate_value (TYPE_TARGET_TYPE (ftype));
|
||||
else
|
||||
error (_("Expression of type other than \"Function returning ...\" used as function"));
|
||||
error (_("Expression of type other than "
|
||||
"\"Function returning ...\" used as function"));
|
||||
}
|
||||
if (TYPE_CODE (value_type (argvec[0])) == TYPE_CODE_INTERNAL_FUNCTION)
|
||||
return call_internal_function (exp->gdbarch, exp->language_defn,
|
||||
argvec[0], nargs, argvec + 1);
|
||||
|
||||
return call_function_by_hand (argvec[0], nargs, argvec + 1);
|
||||
/* pai: FIXME save value from call_function_by_hand, then adjust pc by adjust_fn_pc if +ve */
|
||||
/* pai: FIXME save value from call_function_by_hand, then adjust
|
||||
pc by adjust_fn_pc if +ve. */
|
||||
|
||||
case OP_F77_UNDETERMINED_ARGLIST:
|
||||
|
||||
|
@ -1891,7 +1918,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
/* It's a function call. */
|
||||
/* Allocate arg vector, including space for the function to be
|
||||
called in argvec[0] and a terminating NULL */
|
||||
argvec = (struct value **) alloca (sizeof (struct value *) * (nargs + 2));
|
||||
argvec = (struct value **)
|
||||
alloca (sizeof (struct value *) * (nargs + 2));
|
||||
argvec[0] = arg1;
|
||||
tem = 1;
|
||||
for (; tem <= nargs; tem++)
|
||||
|
@ -2035,7 +2063,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
return value_ind (arg3);
|
||||
|
||||
default:
|
||||
error (_("non-pointer-to-member value used in pointer-to-member construct"));
|
||||
error (_("non-pointer-to-member value used "
|
||||
"in pointer-to-member construct"));
|
||||
}
|
||||
|
||||
case TYPE_INSTANCE:
|
||||
|
@ -2632,7 +2661,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
type = check_typedef (value_type (arg1));
|
||||
if (TYPE_CODE (type) == TYPE_CODE_METHODPTR
|
||||
|| TYPE_CODE (type) == TYPE_CODE_MEMBERPTR)
|
||||
error (_("Attempt to dereference pointer to member without an object"));
|
||||
error (_("Attempt to dereference pointer "
|
||||
"to member without an object"));
|
||||
if (noside == EVAL_SKIP)
|
||||
goto nosideret;
|
||||
if (unop_user_defined_p (op, arg1))
|
||||
|
@ -2676,7 +2706,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
}
|
||||
else
|
||||
{
|
||||
struct value *retvalp = evaluate_subexp_for_address (exp, pos, noside);
|
||||
struct value *retvalp = evaluate_subexp_for_address (exp, pos,
|
||||
noside);
|
||||
|
||||
return retvalp;
|
||||
}
|
||||
|
@ -2884,8 +2915,8 @@ evaluate_subexp_standard (struct type *expect_type,
|
|||
then they should be separate cases, with more descriptive
|
||||
error messages. */
|
||||
|
||||
error (_("\
|
||||
GDB does not (yet) know how to evaluate that kind of expression"));
|
||||
error (_("GDB does not (yet) know how to "
|
||||
"evaluate that kind of expression"));
|
||||
}
|
||||
|
||||
nosideret:
|
||||
|
@ -2983,7 +3014,8 @@ evaluate_subexp_for_address (struct expression *exp, int *pos,
|
|||
return value_zero (lookup_pointer_type (TYPE_TARGET_TYPE (type)),
|
||||
not_lval);
|
||||
else
|
||||
error (_("Attempt to take address of value not located in memory."));
|
||||
error (_("Attempt to take address of "
|
||||
"value not located in memory."));
|
||||
}
|
||||
return value_addr (x);
|
||||
}
|
||||
|
|
|
@ -691,7 +691,8 @@ delete_file_handler (int fd)
|
|||
{
|
||||
(new_poll_fds + j)->fd = (gdb_notifier.poll_fds + i)->fd;
|
||||
(new_poll_fds + j)->events = (gdb_notifier.poll_fds + i)->events;
|
||||
(new_poll_fds + j)->revents = (gdb_notifier.poll_fds + i)->revents;
|
||||
(new_poll_fds + j)->revents
|
||||
= (gdb_notifier.poll_fds + i)->revents;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
@ -792,11 +793,14 @@ handle_file_event (event_data data)
|
|||
/* Work in progress. We may need to tell somebody
|
||||
what kind of error we had. */
|
||||
if (error_mask_returned & POLLHUP)
|
||||
printf_unfiltered (_("Hangup detected on fd %d\n"), file_ptr->fd);
|
||||
printf_unfiltered (_("Hangup detected on fd %d\n"),
|
||||
file_ptr->fd);
|
||||
if (error_mask_returned & POLLERR)
|
||||
printf_unfiltered (_("Error detected on fd %d\n"), file_ptr->fd);
|
||||
printf_unfiltered (_("Error detected on fd %d\n"),
|
||||
file_ptr->fd);
|
||||
if (error_mask_returned & POLLNVAL)
|
||||
printf_unfiltered (_("Invalid or non-`poll'able fd %d\n"), file_ptr->fd);
|
||||
printf_unfiltered (_("Invalid or non-`poll'able fd %d\n"),
|
||||
file_ptr->fd);
|
||||
file_ptr->error = 1;
|
||||
}
|
||||
else
|
||||
|
@ -810,7 +814,8 @@ handle_file_event (event_data data)
|
|||
{
|
||||
if (file_ptr->ready_mask & GDB_EXCEPTION)
|
||||
{
|
||||
printf_unfiltered (_("Exception condition detected on fd %d\n"), file_ptr->fd);
|
||||
printf_unfiltered (_("Exception condition detected "
|
||||
"on fd %d\n"), file_ptr->fd);
|
||||
file_ptr->error = 1;
|
||||
}
|
||||
else
|
||||
|
@ -987,7 +992,8 @@ gdb_wait_for_event (int block)
|
|||
PROC is the function to call with CLIENT_DATA argument
|
||||
whenever the handler is invoked. */
|
||||
async_signal_handler *
|
||||
create_async_signal_handler (sig_handler_func * proc, gdb_client_data client_data)
|
||||
create_async_signal_handler (sig_handler_func * proc,
|
||||
gdb_client_data client_data)
|
||||
{
|
||||
async_signal_handler *async_handler_ptr;
|
||||
|
||||
|
@ -1169,7 +1175,8 @@ delete_async_event_handler (async_event_handler **async_handler_ptr)
|
|||
|
||||
if (async_event_handler_list.first_handler == *async_handler_ptr)
|
||||
{
|
||||
async_event_handler_list.first_handler = (*async_handler_ptr)->next_handler;
|
||||
async_event_handler_list.first_handler
|
||||
= (*async_handler_ptr)->next_handler;
|
||||
if (async_event_handler_list.first_handler == NULL)
|
||||
async_event_handler_list.last_handler = NULL;
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ extern void add_file_handler (int fd, handler_func *proc,
|
|||
extern struct async_signal_handler *
|
||||
create_async_signal_handler (sig_handler_func *proc,
|
||||
gdb_client_data client_data);
|
||||
extern void delete_async_signal_handler (struct async_signal_handler **async_handler_ptr);
|
||||
extern void delete_async_signal_handler (struct async_signal_handler **);
|
||||
extern int create_timer (int milliseconds,
|
||||
timer_handler_func *proc,
|
||||
gdb_client_data client_data);
|
||||
|
|
|
@ -108,8 +108,8 @@ extern const struct gdb_exception exception_none;
|
|||
/* Functions to drive the exceptions state m/c (internal to
|
||||
exceptions). */
|
||||
EXCEPTIONS_SIGJMP_BUF *exceptions_state_mc_init (struct ui_out *func_uiout,
|
||||
volatile struct gdb_exception *
|
||||
exception,
|
||||
volatile struct
|
||||
gdb_exception *exception,
|
||||
return_mask mask);
|
||||
int exceptions_state_mc_action_iter (void);
|
||||
int exceptions_state_mc_action_iter_1 (void);
|
||||
|
@ -166,7 +166,8 @@ extern void exception_fprintf (struct ui_file *file, struct gdb_exception e,
|
|||
be a good thing or a dangerous thing.'' -- the Existential
|
||||
Wombat. */
|
||||
|
||||
extern void throw_exception (struct gdb_exception exception) ATTRIBUTE_NORETURN;
|
||||
extern void throw_exception (struct gdb_exception exception)
|
||||
ATTRIBUTE_NORETURN;
|
||||
extern void throw_verror (enum errors, const char *fmt, va_list ap)
|
||||
ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (2, 0);
|
||||
extern void throw_vfatal (const char *fmt, va_list ap)
|
||||
|
@ -250,6 +251,7 @@ extern int catch_errors (catch_errors_ftype *, void *, char *, return_mask);
|
|||
functions. */
|
||||
|
||||
typedef void (catch_command_errors_ftype) (char *, int);
|
||||
extern int catch_command_errors (catch_command_errors_ftype *func, char *command, int from_tty, return_mask);
|
||||
extern int catch_command_errors (catch_command_errors_ftype *func,
|
||||
char *command, int from_tty, return_mask);
|
||||
|
||||
#endif
|
||||
|
|
15
gdb/exec.c
15
gdb/exec.c
|
@ -439,7 +439,8 @@ build_section_table (struct bfd *some_bfd, struct target_section **start,
|
|||
*end = *start;
|
||||
bfd_map_over_sections (some_bfd, add_to_section_table, (char *) end);
|
||||
if (*end > *start + count)
|
||||
internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("failed internal consistency check"));
|
||||
/* We could realloc the table, but it probably loses for most files. */
|
||||
return 0;
|
||||
}
|
||||
|
@ -584,7 +585,8 @@ section_table_xfer_memory_partial (gdb_byte *readbuf, const gdb_byte *writebuf,
|
|||
ULONGEST memend = memaddr + len;
|
||||
|
||||
if (len <= 0)
|
||||
internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("failed internal consistency check"));
|
||||
|
||||
for (p = sections; p < sections_end; p++)
|
||||
{
|
||||
|
@ -668,7 +670,8 @@ print_section_info (struct target_section_table *t, bfd *abfd)
|
|||
printf_filtered (_("file type %s.\n"), bfd_get_target (abfd));
|
||||
if (abfd == exec_bfd)
|
||||
{
|
||||
/* gcc-3.4 does not like the initialization in <p == t->sections_end>. */
|
||||
/* gcc-3.4 does not like the initialization in
|
||||
<p == t->sections_end>. */
|
||||
bfd_vma displacement = 0;
|
||||
bfd_vma entry_point;
|
||||
|
||||
|
@ -712,7 +715,8 @@ print_section_info (struct target_section_table *t, bfd *abfd)
|
|||
if (info_verbose)
|
||||
printf_filtered (" @ %s",
|
||||
hex_string_custom (p->the_bfd_section->filepos, 8));
|
||||
printf_filtered (" is %s", bfd_section_name (p->bfd, p->the_bfd_section));
|
||||
printf_filtered (" is %s", bfd_section_name (p->bfd,
|
||||
p->the_bfd_section));
|
||||
if (p->bfd != abfd)
|
||||
printf_filtered (" in %s", bfd_get_filename (p->bfd));
|
||||
printf_filtered ("\n");
|
||||
|
@ -774,7 +778,8 @@ set_section_command (char *args, int from_tty)
|
|||
table = current_target_sections;
|
||||
for (p = table->sections; p < table->sections_end; p++)
|
||||
{
|
||||
if (!strncmp (secname, bfd_section_name (exec_bfd, p->the_bfd_section), seclen)
|
||||
if (!strncmp (secname, bfd_section_name (exec_bfd,
|
||||
p->the_bfd_section), seclen)
|
||||
&& bfd_section_name (exec_bfd, p->the_bfd_section)[seclen] == '\0')
|
||||
{
|
||||
offset = secaddr - p->addr;
|
||||
|
|
|
@ -205,7 +205,8 @@ print_subexp_standard (struct expression *exp, int *pos,
|
|||
fprintf_unfiltered (stream, "B'<unimplemented>'");
|
||||
return;
|
||||
|
||||
case OP_OBJC_NSSTRING: /* Objective-C Foundation Class NSString constant. */
|
||||
case OP_OBJC_NSSTRING: /* Objective-C Foundation Class
|
||||
NSString constant. */
|
||||
{
|
||||
struct value_print_options opts;
|
||||
|
||||
|
|
|
@ -153,14 +153,16 @@ enum exp_opcode
|
|||
Thus, the operation occupies four exp_elements. */
|
||||
OP_LONG,
|
||||
|
||||
/* OP_DOUBLE is similar but takes a DOUBLEST constant instead of a long. */
|
||||
/* OP_DOUBLE is similar but takes a DOUBLEST constant instead of a
|
||||
long. */
|
||||
OP_DOUBLE,
|
||||
|
||||
/* OP_VAR_VALUE takes one struct block * in the following element,
|
||||
and one struct symbol * in the following exp_element, followed by
|
||||
another OP_VAR_VALUE, making four exp_elements. If the block is
|
||||
non-NULL, evaluate the symbol relative to the innermost frame
|
||||
executing in that block; if the block is NULL use the selected frame. */
|
||||
and one struct symbol * in the following exp_element, followed
|
||||
by another OP_VAR_VALUE, making four exp_elements. If the
|
||||
block is non-NULL, evaluate the symbol relative to the
|
||||
innermost frame executing in that block; if the block is NULL
|
||||
use the selected frame. */
|
||||
OP_VAR_VALUE,
|
||||
|
||||
/* OP_LAST is followed by an integer in the next exp_element.
|
||||
|
@ -173,8 +175,9 @@ enum exp_opcode
|
|||
This is the name of a register to fetch. */
|
||||
OP_REGISTER,
|
||||
|
||||
/* OP_INTERNALVAR is followed by an internalvar ptr in the next exp_element.
|
||||
With another OP_INTERNALVAR at the end, this makes three exp_elements. */
|
||||
/* OP_INTERNALVAR is followed by an internalvar ptr in the next
|
||||
exp_element. With another OP_INTERNALVAR at the end, this
|
||||
makes three exp_elements. */
|
||||
OP_INTERNALVAR,
|
||||
|
||||
/* OP_FUNCALL is followed by an integer in the next exp_element.
|
||||
|
@ -185,10 +188,11 @@ enum exp_opcode
|
|||
making three exp_elements. */
|
||||
OP_FUNCALL,
|
||||
|
||||
/* OP_OBJC_MSGCALL is followed by a string in the next exp_element and then an
|
||||
integer. The string is the selector string. The integer is the number
|
||||
of arguments to the message call. That many plus one values are used,
|
||||
the first one being the object pointer. This is an Objective C message */
|
||||
/* OP_OBJC_MSGCALL is followed by a string in the next exp_element
|
||||
and then an integer. The string is the selector string. The
|
||||
integer is the number of arguments to the message call. That
|
||||
many plus one values are used, the first one being the object
|
||||
pointer. This is an Objective C message */
|
||||
OP_OBJC_MSGCALL,
|
||||
|
||||
/* This is EXACTLY like OP_FUNCALL but is semantically different.
|
||||
|
@ -298,8 +302,9 @@ enum exp_opcode
|
|||
It just comes in a tight (OP_THIS, OP_THIS) pair. */
|
||||
OP_THIS,
|
||||
|
||||
/* Objective-C: OP_OBJC_SELF is just a placeholder for the class instance
|
||||
variable. It just comes in a tight (OP_OBJC_SELF, OP_OBJC_SELF) pair. */
|
||||
/* Objective-C: OP_OBJC_SELF is just a placeholder for the class
|
||||
instance variable. It just comes in a tight (OP_OBJC_SELF,
|
||||
OP_OBJC_SELF) pair. */
|
||||
OP_OBJC_SELF,
|
||||
|
||||
/* Objective C: "@selector" pseudo-operator */
|
||||
|
@ -388,7 +393,8 @@ union exp_element
|
|||
|
||||
struct expression
|
||||
{
|
||||
const struct language_defn *language_defn; /* language it was entered in */
|
||||
const struct language_defn *language_defn; /* language it was
|
||||
entered in */
|
||||
struct gdbarch *gdbarch; /* architecture it was parsed in */
|
||||
int nelts;
|
||||
union exp_element elts[1];
|
||||
|
@ -447,7 +453,8 @@ extern void print_expression (struct expression *, struct ui_file *);
|
|||
|
||||
extern char *op_string (enum exp_opcode);
|
||||
|
||||
extern void dump_raw_expression (struct expression *, struct ui_file *, char *);
|
||||
extern void dump_raw_expression (struct expression *,
|
||||
struct ui_file *, char *);
|
||||
extern void dump_prefix_expression (struct expression *, struct ui_file *);
|
||||
|
||||
#endif /* !defined (EXPRESSION_H) */
|
||||
|
|
15
gdb/f-lang.c
15
gdb/f-lang.c
|
@ -45,8 +45,9 @@ struct saved_fcn
|
|||
|
||||
struct saved_bf_symnum
|
||||
{
|
||||
long symnum_fcn; /* Symnum of function (i.e. .function directive) */
|
||||
long symnum_bf; /* Symnum of .bf for this function */
|
||||
long symnum_fcn; /* Symnum of function (i.e. .function
|
||||
directive). */
|
||||
long symnum_bf; /* Symnum of .bf for this function. */
|
||||
struct saved_bf_symnum *next;
|
||||
};
|
||||
|
||||
|
@ -333,7 +334,8 @@ f_word_break_characters (void)
|
|||
return retval;
|
||||
}
|
||||
|
||||
/* Consider the modules separator :: as a valid symbol name character class. */
|
||||
/* Consider the modules separator :: as a valid symbol name character
|
||||
class. */
|
||||
|
||||
static char **
|
||||
f_make_symbol_completion_list (char *text, char *word)
|
||||
|
@ -371,7 +373,8 @@ const struct language_defn f_language_defn =
|
|||
cp_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
|
||||
basic_lookup_transparent_type,/* lookup_transparent_type */
|
||||
NULL, /* Language specific symbol demangler */
|
||||
NULL, /* Language specific class_name_from_physname */
|
||||
NULL, /* Language specific
|
||||
class_name_from_physname */
|
||||
f_op_print_tab, /* expression operators for printing */
|
||||
0, /* arrays are first-class (not c-style) */
|
||||
1, /* String lower bound */
|
||||
|
@ -504,8 +507,8 @@ SAVED_F77_COMMON_PTR current_common = NULL; /* Ptr to current COMMON */
|
|||
static SAVED_BF_PTR saved_bf_list = NULL; /* Ptr to (.bf,function)
|
||||
list */
|
||||
static SAVED_BF_PTR saved_bf_list_end = NULL; /* Ptr to above list's end */
|
||||
static SAVED_BF_PTR current_head_bf_list = NULL; /* Current head of above list
|
||||
*/
|
||||
static SAVED_BF_PTR current_head_bf_list = NULL; /* Current head of
|
||||
above list. */
|
||||
|
||||
static SAVED_BF_PTR tmp_bf_ptr; /* Generic temporary for use
|
||||
in macros */
|
||||
|
|
|
@ -113,7 +113,8 @@ f77_get_dynamic_length_of_aggregate (struct type *type)
|
|||
/* Patch in a valid length value. */
|
||||
|
||||
TYPE_LENGTH (type) =
|
||||
(upper_bound - lower_bound + 1) * TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type)));
|
||||
(upper_bound - lower_bound + 1)
|
||||
* TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type)));
|
||||
}
|
||||
|
||||
/* Function that sets up the array offset,size table for the array
|
||||
|
@ -172,7 +173,9 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type,
|
|||
|
||||
if (nss != ndimensions)
|
||||
{
|
||||
for (i = 0; (i < F77_DIM_SIZE (nss) && (*elts) < options->print_max); i++)
|
||||
for (i = 0;
|
||||
(i < F77_DIM_SIZE (nss) && (*elts) < options->print_max);
|
||||
i++)
|
||||
{
|
||||
fprintf_filtered (stream, "( ");
|
||||
f77_print_array_1 (nss + 1, ndimensions, TYPE_TARGET_TYPE (type),
|
||||
|
@ -221,7 +224,8 @@ f77_print_array (struct type *type, const gdb_byte *valaddr,
|
|||
ndimensions = calc_f77_array_dims (type);
|
||||
|
||||
if (ndimensions > MAX_FORTRAN_DIMS || ndimensions < 0)
|
||||
error (_("Type node corrupt! F77 arrays cannot have %d subscripts (%d Max)"),
|
||||
error (_("\
|
||||
Type node corrupt! F77 arrays cannot have %d subscripts (%d Max)"),
|
||||
ndimensions, MAX_FORTRAN_DIMS);
|
||||
|
||||
/* Since F77 arrays are stored column-major, we set up an
|
||||
|
@ -267,7 +271,8 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
|
|||
|
||||
case TYPE_CODE_ARRAY:
|
||||
fprintf_filtered (stream, "(");
|
||||
f77_print_array (type, valaddr, address, stream, recurse, original_value, options);
|
||||
f77_print_array (type, valaddr, address, stream,
|
||||
recurse, original_value, options);
|
||||
fprintf_filtered (stream, ")");
|
||||
break;
|
||||
|
||||
|
|
|
@ -156,7 +156,8 @@ parse_find_args (char *args, ULONGEST *max_countp,
|
|||
(i.e. start=0, end = 0xff..ff).
|
||||
Bail to avoid overflows later on. */
|
||||
if (search_space_len == 0)
|
||||
error (_("Overflow in address range computation, choose smaller range."));
|
||||
error (_("Overflow in address range "
|
||||
"computation, choose smaller range."));
|
||||
}
|
||||
|
||||
if (*s == ',')
|
||||
|
@ -323,8 +324,8 @@ _initialize_mem_search (void)
|
|||
{
|
||||
add_cmd ("find", class_vars, find_command, _("\
|
||||
Search memory for a sequence of bytes.\n\
|
||||
Usage:\n\
|
||||
find [/size-char] [/max-count] start-address, end-address, expr1 [, expr2 ...]\n\
|
||||
Usage:\nfind \
|
||||
[/size-char] [/max-count] start-address, end-address, expr1 [, expr2 ...]\n\
|
||||
find [/size-char] [/max-count] start-address, +length, expr1 [, expr2 ...]\n\
|
||||
size-char is one of b,h,w,g for 8,16,32,64 bit values respectively,\n\
|
||||
and if not specified the size is taken from the type of the expression\n\
|
||||
|
|
|
@ -85,7 +85,8 @@ frame_base_append_sniffer (struct gdbarch *gdbarch,
|
|||
{
|
||||
struct frame_base_table *table = gdbarch_data (gdbarch, frame_base_data);
|
||||
|
||||
(*table->tail) = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_base_table_entry);
|
||||
(*table->tail)
|
||||
= GDBARCH_OBSTACK_ZALLOC (gdbarch, struct frame_base_table_entry);
|
||||
(*table->tail)->sniffer = sniffer;
|
||||
table->tail = &(*table->tail)->next;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,8 @@ frame_unwind_init (struct obstack *obstack)
|
|||
can't override this. */
|
||||
table->list = OBSTACK_ZALLOC (obstack, struct frame_unwind_table_entry);
|
||||
table->list->unwinder = &dummy_frame_unwind;
|
||||
table->list->next = OBSTACK_ZALLOC (obstack, struct frame_unwind_table_entry);
|
||||
table->list->next = OBSTACK_ZALLOC (obstack,
|
||||
struct frame_unwind_table_entry);
|
||||
table->list->next->unwinder = &inline_frame_unwind;
|
||||
/* The insertion point for OSABI sniffers. */
|
||||
table->osabi_head = &table->list->next->next;
|
||||
|
@ -146,7 +147,8 @@ frame_unwind_got_optimized (struct frame_info *frame, int regnum)
|
|||
register NEW_REGNUM. */
|
||||
|
||||
struct value *
|
||||
frame_unwind_got_register (struct frame_info *frame, int regnum, int new_regnum)
|
||||
frame_unwind_got_register (struct frame_info *frame,
|
||||
int regnum, int new_regnum)
|
||||
{
|
||||
return value_of_register_lazy (frame, new_regnum);
|
||||
}
|
||||
|
@ -209,7 +211,8 @@ frame_unwind_got_address (struct frame_info *frame, int regnum,
|
|||
return reg_val;
|
||||
}
|
||||
|
||||
extern initialize_file_ftype _initialize_frame_unwind; /* -Wmissing-prototypes */
|
||||
/* -Wmissing-prototypes */
|
||||
extern initialize_file_ftype _initialize_frame_unwind;
|
||||
|
||||
void
|
||||
_initialize_frame_unwind (void)
|
||||
|
|
|
@ -150,8 +150,8 @@ struct frame_unwind
|
|||
that override earlier calls. This allows, for instance, an OSABI
|
||||
to install a a more specific sigtramp unwinder that overrides the
|
||||
traditional brute-force unwinder. */
|
||||
extern void frame_unwind_prepend_unwinder (struct gdbarch *gdbarch,
|
||||
const struct frame_unwind *unwinder);
|
||||
extern void frame_unwind_prepend_unwinder (struct gdbarch *,
|
||||
const struct frame_unwind *);
|
||||
|
||||
/* Add a frame sniffer to the list. The predicates are polled in the
|
||||
order that they are appended. The initial list contains the dummy
|
||||
|
|
31
gdb/frame.c
31
gdb/frame.c
|
@ -181,8 +181,9 @@ static void
|
|||
show_backtrace_past_main (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
Whether backtraces should continue past \"main\" is %s.\n"),
|
||||
fprintf_filtered (file,
|
||||
_("Whether backtraces should "
|
||||
"continue past \"main\" is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -191,8 +192,8 @@ static void
|
|||
show_backtrace_past_entry (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
Whether backtraces should continue past the entry point of a program is %s.\n"),
|
||||
fprintf_filtered (file, _("Whether backtraces should continue past the "
|
||||
"entry point of a program is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -201,8 +202,9 @@ static void
|
|||
show_backtrace_limit (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
An upper bound on the number of backtrace levels is %s.\n"),
|
||||
fprintf_filtered (file,
|
||||
_("An upper bound on the number "
|
||||
"of backtrace levels is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -447,7 +449,8 @@ frame_id_eq (struct frame_id l, struct frame_id r)
|
|||
{
|
||||
int eq;
|
||||
|
||||
if (!l.stack_addr_p && l.special_addr_p && !r.stack_addr_p && r.special_addr_p)
|
||||
if (!l.stack_addr_p && l.special_addr_p
|
||||
&& !r.stack_addr_p && r.special_addr_p)
|
||||
/* The outermost frame marker is equal to itself. This is the
|
||||
dodgy thing about outer_frame_id, since between execution steps
|
||||
we might step into another function - from which we can't
|
||||
|
@ -649,7 +652,8 @@ frame_unwind_pc (struct frame_info *this_frame)
|
|||
this_frame->prev_pc.p = 1;
|
||||
if (frame_debug)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"{ frame_unwind_caller_pc (this_frame=%d) -> %s }\n",
|
||||
"{ frame_unwind_caller_pc "
|
||||
"(this_frame=%d) -> %s }\n",
|
||||
this_frame->level,
|
||||
hex_string (this_frame->prev_pc.value));
|
||||
}
|
||||
|
@ -832,8 +836,9 @@ frame_unwind_register_value (struct frame_info *frame, int regnum)
|
|||
|
||||
if (frame_debug)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
{ frame_unwind_register_value (frame=%d,regnum=%d(%s),...) ",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"{ frame_unwind_register_value "
|
||||
"(frame=%d,regnum=%d(%s),...) ",
|
||||
frame->level, regnum,
|
||||
user_reg_map_regnum_to_name (gdbarch, regnum));
|
||||
}
|
||||
|
@ -1314,7 +1319,8 @@ create_new_frame (CORE_ADDR addr, CORE_ADDR pc)
|
|||
|
||||
fi = FRAME_OBSTACK_ZALLOC (struct frame_info);
|
||||
|
||||
fi->next = create_sentinel_frame (current_program_space, get_current_regcache ());
|
||||
fi->next = create_sentinel_frame (current_program_space,
|
||||
get_current_regcache ());
|
||||
|
||||
/* Set/update this frame's cached PC value, found in the next frame.
|
||||
Do this before looking for this frame's unwinder. A sniffer is
|
||||
|
@ -1517,7 +1523,8 @@ get_prev_frame_1 (struct frame_info *this_frame)
|
|||
{
|
||||
fprintf_unfiltered (gdb_stdlog, "-> ");
|
||||
fprint_frame (gdb_stdlog, NULL);
|
||||
fprintf_unfiltered (gdb_stdlog, " // this frame ID is inner }\n");
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
" // this frame ID is inner }\n");
|
||||
}
|
||||
this_frame->stop_reason = UNWIND_INNER_ID;
|
||||
return NULL;
|
||||
|
|
|
@ -590,8 +590,10 @@ enum print_what
|
|||
allocate memory using this method. */
|
||||
|
||||
extern void *frame_obstack_zalloc (unsigned long size);
|
||||
#define FRAME_OBSTACK_ZALLOC(TYPE) ((TYPE *) frame_obstack_zalloc (sizeof (TYPE)))
|
||||
#define FRAME_OBSTACK_CALLOC(NUMBER,TYPE) ((TYPE *) frame_obstack_zalloc ((NUMBER) * sizeof (TYPE)))
|
||||
#define FRAME_OBSTACK_ZALLOC(TYPE) \
|
||||
((TYPE *) frame_obstack_zalloc (sizeof (TYPE)))
|
||||
#define FRAME_OBSTACK_CALLOC(NUMBER,TYPE) \
|
||||
((TYPE *) frame_obstack_zalloc ((NUMBER) * sizeof (TYPE)))
|
||||
|
||||
/* Create a regcache, and copy the frame's registers into it. */
|
||||
struct regcache *frame_save_as_regcache (struct frame_info *this_frame);
|
||||
|
|
|
@ -537,7 +537,8 @@ gcore_copy_callback (bfd *obfd, asection *osec, void *ignored)
|
|||
if (target_read_memory (bfd_section_vma (obfd, osec) + offset,
|
||||
memhunk, size) != 0)
|
||||
{
|
||||
warning (_("Memory read failed for corefile section, %s bytes at %s."),
|
||||
warning (_("Memory read failed for corefile "
|
||||
"section, %s bytes at %s."),
|
||||
plongest (size),
|
||||
paddress (target_gdbarch, bfd_section_vma (obfd, osec)));
|
||||
break;
|
||||
|
|
|
@ -54,8 +54,9 @@ struct dbx_symfile_info
|
|||
int stringtab_size; /* Its size */
|
||||
file_ptr symtab_offset; /* Offset in file to symbol table */
|
||||
int symbol_size; /* Bytes in a single symbol */
|
||||
struct stab_section_info *stab_section_info; /* section starting points
|
||||
of the original .o files before linking. */
|
||||
struct stab_section_info *stab_section_info; /* Section starting points
|
||||
of the original .o files
|
||||
before linking. */
|
||||
|
||||
/* See stabsread.h for the use of the following. */
|
||||
struct header_file *header_files;
|
||||
|
|
|
@ -46,11 +46,11 @@
|
|||
want to continue, dump core, or just exit. */
|
||||
#if defined (ASSERT_FUNCTION)
|
||||
#define gdb_assert_fail(assertion, file, line, function) \
|
||||
internal_error (file, line, _("%s: Assertion `%s' failed."), \
|
||||
internal_error (file, line, _("%s: Assertion `%s' failed."), \
|
||||
function, assertion)
|
||||
#else
|
||||
#define gdb_assert_fail(assertion, file, line, function) \
|
||||
internal_error (file, line, _("Assertion `%s' failed."), \
|
||||
internal_error (file, line, _("Assertion `%s' failed."), \
|
||||
assertion)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
/* See description of `AC_HEADER_DIRENT' in the Autoconf manual. */
|
||||
#ifdef HAVE_DIRENT_H
|
||||
# include <dirent.h> /* ARI: dirent.h */
|
||||
# define NAMELEN(dirent) strlen ((dirent)->d_name) /* ARI: strlen d_name */
|
||||
# define NAMELEN(dirent) strlen ((dirent)->d_name) /* ARI: strlen d_name */
|
||||
#else
|
||||
# define dirent direct
|
||||
# define NAMELEN(dirent) (dirent)->d_namelen /* ARI: d_namelen */
|
||||
|
|
|
@ -25,9 +25,12 @@
|
|||
|
||||
/* Utility macros - wrap obstack alloc into something more robust. */
|
||||
|
||||
#define OBSTACK_ZALLOC(OBSTACK,TYPE) (memset (obstack_alloc ((OBSTACK), sizeof (TYPE)), 0, sizeof (TYPE)))
|
||||
#define OBSTACK_ZALLOC(OBSTACK,TYPE) \
|
||||
(memset (obstack_alloc ((OBSTACK), sizeof (TYPE)), 0, sizeof (TYPE)))
|
||||
|
||||
#define OBSTACK_CALLOC(OBSTACK,NUMBER,TYPE) (memset (obstack_alloc ((OBSTACK), (NUMBER) * sizeof (TYPE)), 0, (NUMBER) * sizeof (TYPE)))
|
||||
#define OBSTACK_CALLOC(OBSTACK,NUMBER,TYPE) \
|
||||
(memset (obstack_alloc ((OBSTACK), (NUMBER) * sizeof (TYPE)), \
|
||||
0, (NUMBER) * sizeof (TYPE)))
|
||||
|
||||
/* Unless explicitly specified, GDB obstacks always use xmalloc() and
|
||||
xfree(). */
|
||||
|
|
|
@ -58,13 +58,15 @@ extern void read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, int len);
|
|||
extern LONGEST read_memory_integer (CORE_ADDR memaddr,
|
||||
int len, enum bfd_endian byte_order);
|
||||
extern int safe_read_memory_integer (CORE_ADDR memaddr, int len,
|
||||
enum bfd_endian byte_order, LONGEST *return_value);
|
||||
enum bfd_endian byte_order,
|
||||
LONGEST *return_value);
|
||||
|
||||
/* Read an unsigned integer from debugged memory, given address and
|
||||
number of bytes. */
|
||||
|
||||
extern ULONGEST read_memory_unsigned_integer (CORE_ADDR memaddr,
|
||||
int len, enum bfd_endian byte_order);
|
||||
int len,
|
||||
enum bfd_endian byte_order);
|
||||
|
||||
/* Read a null-terminated string from the debuggee's memory, given address,
|
||||
* a buffer into which to place the string, and the maximum available space */
|
||||
|
|
|
@ -120,8 +120,8 @@ show_opaque_type_resolution (struct ui_file *file, int from_tty,
|
|||
struct cmd_list_element *c,
|
||||
const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
Resolution of opaque struct/class/union types (if set before loading symbols) is %s.\n"),
|
||||
fprintf_filtered (file, _("Resolution of opaque struct/class/union types "
|
||||
"(if set before loading symbols) is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -2430,9 +2430,11 @@ rank_one_type (struct type *parm, struct type *arg)
|
|||
"int")
|
||||
&& integer_types_same_name_p (TYPE_NAME (parm),
|
||||
"long"))
|
||||
return INTEGER_PROMOTION_BADNESS; /* unsigned int -> unsigned long */
|
||||
/* unsigned int -> unsigned long */
|
||||
return INTEGER_PROMOTION_BADNESS;
|
||||
else
|
||||
return INTEGER_CONVERSION_BADNESS; /* unsigned long -> unsigned int */
|
||||
/* unsigned long -> unsigned int */
|
||||
return INTEGER_CONVERSION_BADNESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2440,9 +2442,11 @@ rank_one_type (struct type *parm, struct type *arg)
|
|||
"long")
|
||||
&& integer_types_same_name_p (TYPE_NAME (parm),
|
||||
"int"))
|
||||
return INTEGER_CONVERSION_BADNESS; /* signed long -> unsigned int */
|
||||
/* signed long -> unsigned int */
|
||||
return INTEGER_CONVERSION_BADNESS;
|
||||
else
|
||||
return INTEGER_CONVERSION_BADNESS; /* signed int/long -> unsigned int/long */
|
||||
/* signed int/long -> unsigned int/long */
|
||||
return INTEGER_CONVERSION_BADNESS;
|
||||
}
|
||||
}
|
||||
else if (!TYPE_NOSIGN (arg) && !TYPE_UNSIGNED (arg))
|
||||
|
@ -3105,7 +3109,8 @@ recursive_dump_type (struct type *type, int spaces)
|
|||
plongest (TYPE_LOW_BOUND (type)),
|
||||
TYPE_LOW_BOUND_UNDEFINED (type) ? " (undefined)" : "",
|
||||
plongest (TYPE_HIGH_BOUND (type)),
|
||||
TYPE_HIGH_BOUND_UNDEFINED (type) ? " (undefined)" : "");
|
||||
TYPE_HIGH_BOUND_UNDEFINED (type)
|
||||
? " (undefined)" : "");
|
||||
}
|
||||
printfi_filtered (spaces, "vptr_basetype ");
|
||||
gdb_print_host_address (TYPE_VPTR_BASETYPE (type), gdb_stdout);
|
||||
|
@ -3236,7 +3241,8 @@ copy_type_recursive (struct objfile *objfile,
|
|||
|
||||
/* We must add the new type to the hash table immediately, in case
|
||||
we encounter this type again during a recursive call below. */
|
||||
stored = obstack_alloc (&objfile->objfile_obstack, sizeof (struct type_pair));
|
||||
stored
|
||||
= obstack_alloc (&objfile->objfile_obstack, sizeof (struct type_pair));
|
||||
stored->old = type;
|
||||
stored->new = new_type;
|
||||
*slot = stored;
|
||||
|
@ -3870,20 +3876,23 @@ _initialize_gdbtypes (void)
|
|||
gdbtypes_data = gdbarch_data_register_post_init (gdbtypes_post_init);
|
||||
objfile_type_data = register_objfile_data ();
|
||||
|
||||
add_setshow_zinteger_cmd ("overload", no_class, &overload_debug, _("\
|
||||
Set debugging of C++ overloading."), _("\
|
||||
Show debugging of C++ overloading."), _("\
|
||||
When enabled, ranking of the functions is displayed."),
|
||||
add_setshow_zinteger_cmd ("overload", no_class, &overload_debug,
|
||||
_("Set debugging of C++ overloading."),
|
||||
_("Show debugging of C++ overloading."),
|
||||
_("When enabled, ranking of the "
|
||||
"functions is displayed."),
|
||||
NULL,
|
||||
show_overload_debug,
|
||||
&setdebuglist, &showdebuglist);
|
||||
|
||||
/* Add user knob for controlling resolution of opaque types. */
|
||||
add_setshow_boolean_cmd ("opaque-type-resolution", class_support,
|
||||
&opaque_type_resolution, _("\
|
||||
Set resolution of opaque struct/class/union types (if set before loading symbols)."), _("\
|
||||
Show resolution of opaque struct/class/union types (if set before loading symbols)."), NULL,
|
||||
NULL,
|
||||
&opaque_type_resolution,
|
||||
_("Set resolution of opaque struct/class/union"
|
||||
" types (if set before loading symbols)."),
|
||||
_("Show resolution of opaque struct/class/union"
|
||||
" types (if set before loading symbols)."),
|
||||
NULL, NULL,
|
||||
show_opaque_type_resolution,
|
||||
&setlist, &showlist);
|
||||
}
|
||||
|
|
|
@ -295,7 +295,8 @@ enum type_instance_flag_value
|
|||
* volatile modifier.
|
||||
*/
|
||||
|
||||
#define TYPE_VOLATILE(t) (TYPE_INSTANCE_FLAGS (t) & TYPE_INSTANCE_FLAG_VOLATILE)
|
||||
#define TYPE_VOLATILE(t) \
|
||||
(TYPE_INSTANCE_FLAGS (t) & TYPE_INSTANCE_FLAG_VOLATILE)
|
||||
|
||||
/* Instruction-space delimited type. This is for Harvard architectures
|
||||
which have separate instruction and data address spaces (and perhaps
|
||||
|
@ -489,10 +490,11 @@ struct main_type
|
|||
union field_location
|
||||
{
|
||||
/* Position of this field, counting in bits from start of
|
||||
containing structure.
|
||||
For gdbarch_bits_big_endian=1 targets, it is the bit offset to the MSB.
|
||||
For gdbarch_bits_big_endian=0 targets, it is the bit offset to the LSB.
|
||||
For a range bound or enum value, this is the value itself. */
|
||||
containing structure. For gdbarch_bits_big_endian=1
|
||||
targets, it is the bit offset to the MSB. For
|
||||
gdbarch_bits_big_endian=0 targets, it is the bit offset to
|
||||
the LSB. For a range bound or enum value, this is the
|
||||
value itself. */
|
||||
|
||||
int bitpos;
|
||||
|
||||
|
@ -697,9 +699,10 @@ struct cplus_struct_type
|
|||
dynamic. Zero if not yet computed. */
|
||||
int is_dynamic : 2;
|
||||
|
||||
/* For derived classes, the number of base classes is given by n_baseclasses
|
||||
and virtual_field_bits is a bit vector containing one bit per base class.
|
||||
If the base class is virtual, the corresponding bit will be set.
|
||||
/* For derived classes, the number of base classes is given by
|
||||
n_baseclasses and virtual_field_bits is a bit vector containing
|
||||
one bit per base class. If the base class is virtual, the
|
||||
corresponding bit will be set.
|
||||
I.E, given:
|
||||
|
||||
class A{};
|
||||
|
@ -888,7 +891,8 @@ extern void allocate_cplus_struct_type (struct type *);
|
|||
|
||||
#define INIT_CPLUS_SPECIFIC(type) \
|
||||
(TYPE_SPECIFIC_FIELD (type) = TYPE_SPECIFIC_CPLUS_STUFF, \
|
||||
TYPE_RAW_CPLUS_SPECIFIC (type) = (struct cplus_struct_type*) &cplus_struct_default)
|
||||
TYPE_RAW_CPLUS_SPECIFIC (type) = (struct cplus_struct_type*) \
|
||||
&cplus_struct_default)
|
||||
|
||||
#define ALLOCATE_CPLUS_STRUCT_TYPE(type) allocate_cplus_struct_type (type)
|
||||
|
||||
|
|
|
@ -461,8 +461,9 @@ inf_ttrace_follow_fork (struct target_ops *ops, int follow_child)
|
|||
detach_breakpoints (pid);
|
||||
|
||||
target_terminal_ours ();
|
||||
fprintf_unfiltered (gdb_stdlog, _("\
|
||||
Attaching after fork to child process %ld.\n"), (long)fpid);
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
_("Attaching after fork to child process %ld.\n"),
|
||||
(long)fpid);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -470,8 +471,9 @@ Attaching after fork to child process %ld.\n"), (long)fpid);
|
|||
detach_breakpoints (fpid);
|
||||
|
||||
target_terminal_ours ();
|
||||
fprintf_unfiltered (gdb_stdlog, _("\
|
||||
Detaching after fork from child process %ld.\n"), (long)fpid);
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
_("Detaching after fork from child process %ld.\n"),
|
||||
(long)fpid);
|
||||
}
|
||||
|
||||
if (tts.tts_event == TTEVT_VFORK)
|
||||
|
@ -1168,7 +1170,8 @@ inf_ttrace_xfer_memory (CORE_ADDR addr, ULONGEST len,
|
|||
static LONGEST
|
||||
inf_ttrace_xfer_partial (struct target_ops *ops, enum target_object object,
|
||||
const char *annex, gdb_byte *readbuf,
|
||||
const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
|
||||
const gdb_byte *writebuf,
|
||||
ULONGEST offset, LONGEST len)
|
||||
{
|
||||
switch (object)
|
||||
{
|
||||
|
|
118
gdb/infcall.c
118
gdb/infcall.c
|
@ -77,8 +77,9 @@ static void
|
|||
show_coerce_float_to_double_p (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
Coercion of floats to doubles when calling functions is %s.\n"),
|
||||
fprintf_filtered (file,
|
||||
_("Coercion of floats to doubles "
|
||||
"when calling functions is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -94,8 +95,9 @@ static void
|
|||
show_unwind_on_signal_p (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
Unwinding of stack if a signal is received while in a call dummy is %s.\n"),
|
||||
fprintf_filtered (file,
|
||||
_("Unwinding of stack if a signal is "
|
||||
"received while in a call dummy is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -119,8 +121,9 @@ show_unwind_on_terminating_exception_p (struct ui_file *file, int from_tty,
|
|||
const char *value)
|
||||
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
Unwind stack if a C++ exception is unhandled while in a call dummy is %s.\n"),
|
||||
fprintf_filtered (file,
|
||||
_("Unwind stack if a C++ exception is "
|
||||
"unhandled while in a call dummy is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -822,12 +825,12 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
|
|||
switch (e.reason)
|
||||
{
|
||||
case RETURN_ERROR:
|
||||
throw_error (e.error, _("\
|
||||
%s\n\
|
||||
An error occurred while in a function called from GDB.\n\
|
||||
Evaluation of the expression containing the function\n\
|
||||
(%s) will be abandoned.\n\
|
||||
When the function is done executing, GDB will silently stop."),
|
||||
throw_error (e.error,
|
||||
_("%s\nAn error occurred while in a "
|
||||
"function called from GDB.\n Evaluation "
|
||||
"of the expression containing the function\n "
|
||||
"(%s) will be abandoned.\nWhen the function "
|
||||
"is done executing, GDB will silently stop."),
|
||||
e.message, name);
|
||||
case RETURN_QUIT:
|
||||
default:
|
||||
|
@ -851,10 +854,10 @@ When the function is done executing, GDB will silently stop."),
|
|||
but it will get garbage collected the next time the program is
|
||||
run anyway. */
|
||||
|
||||
error (_("\
|
||||
The program being debugged exited while in a function called from GDB.\n\
|
||||
Evaluation of the expression containing the function\n\
|
||||
(%s) will be abandoned."),
|
||||
error (_("The program being debugged exited while in a function "
|
||||
"called from GDB.\n"
|
||||
"Evaluation of the expression containing the function\n"
|
||||
"(%s) will be abandoned."),
|
||||
name);
|
||||
}
|
||||
|
||||
|
@ -871,19 +874,18 @@ Evaluation of the expression containing the function\n\
|
|||
/* Keep the dummy frame record, if the user switches back to the
|
||||
thread with the hand-call, we'll need it. */
|
||||
if (stopped_by_random_signal)
|
||||
error (_("\
|
||||
The program received a signal in another thread while\n\
|
||||
making a function call from GDB.\n\
|
||||
Evaluation of the expression containing the function\n\
|
||||
(%s) will be abandoned.\n\
|
||||
When the function is done executing, GDB will silently stop."),
|
||||
error (_("The program received a signal in another thread while\n"
|
||||
"making a function call from GDB.\nEvaluation "
|
||||
"of the expression containing the function\n"
|
||||
"(%s) will be abandoned.\nWhen the function "
|
||||
"is done executing, GDB will silently stop."),
|
||||
name);
|
||||
else
|
||||
error (_("\
|
||||
The program stopped in another thread while making a function call from GDB.\n\
|
||||
Evaluation of the expression containing the function\n\
|
||||
(%s) will be abandoned.\n\
|
||||
When the function is done executing, GDB will silently stop."),
|
||||
error (_("The program stopped in another thread while making "
|
||||
"a function call from GDB.\nEvaluation "
|
||||
"of the expression containing the function\n"
|
||||
"(%s) will be abandoned.\nWhen the function "
|
||||
"is done executing, GDB will silently stop."),
|
||||
name);
|
||||
}
|
||||
|
||||
|
@ -912,12 +914,12 @@ When the function is done executing, GDB will silently stop."),
|
|||
|
||||
/* FIXME: Insert a bunch of wrap_here; name can be very
|
||||
long if it's a C++ name with arguments and stuff. */
|
||||
error (_("\
|
||||
The program being debugged was signaled while in a function called from GDB.\n\
|
||||
GDB has restored the context to what it was before the call.\n\
|
||||
To change this behavior use \"set unwindonsignal off\".\n\
|
||||
Evaluation of the expression containing the function\n\
|
||||
(%s) will be abandoned."),
|
||||
error (_("The program being debugged was signaled while "
|
||||
"in a function called from GDB.\nGDB has restored "
|
||||
"the context to what it was before the call.\n "
|
||||
"To change this behavior use \"set unwindonsignal "
|
||||
"off\".\nEvaluation of the expression containing "
|
||||
"the function\n(%s) will be abandoned."),
|
||||
name);
|
||||
}
|
||||
else
|
||||
|
@ -930,13 +932,14 @@ Evaluation of the expression containing the function\n\
|
|||
|
||||
/* FIXME: Insert a bunch of wrap_here; name can be very
|
||||
long if it's a C++ name with arguments and stuff. */
|
||||
error (_("\
|
||||
The program being debugged was signaled while in a function called from GDB.\n\
|
||||
GDB remains in the frame where the signal was received.\n\
|
||||
To change this behavior use \"set unwindonsignal on\".\n\
|
||||
Evaluation of the expression containing the function\n\
|
||||
(%s) will be abandoned.\n\
|
||||
When the function is done executing, GDB will silently stop."),
|
||||
error (_("The program being debugged was signaled while "
|
||||
"in a function called from GDB.\nGDB remains in "
|
||||
"the frame where the signal was received.\nTo change "
|
||||
"this behavior use \"set unwindonsignal on\".\n"
|
||||
"Evaluation of the expression containing the "
|
||||
"function\n(%s) will be abandoned.\n"
|
||||
"When the function is done executing, GDB will "
|
||||
"silently stop."),
|
||||
name);
|
||||
}
|
||||
}
|
||||
|
@ -951,14 +954,18 @@ When the function is done executing, GDB will silently stop."),
|
|||
the dummy call. */
|
||||
restore_infcall_control_state (inf_status);
|
||||
|
||||
error (_("\
|
||||
The program being debugged entered a std::terminate call, most likely\n\
|
||||
caused by an unhandled C++ exception. GDB blocked this call in order\n\
|
||||
to prevent the program from being terminated, and has restored the\n\
|
||||
context to its original state before the call.\n\
|
||||
To change this behaviour use \"set unwind-on-terminating-exception off\".\n\
|
||||
Evaluation of the expression containing the function (%s)\n\
|
||||
will be abandoned."),
|
||||
error (_("The program being debugged entered a "
|
||||
"std::terminate call, most likely\n"
|
||||
"caused by an unhandled C++ exception. "
|
||||
"GDB blocked this call in order\n"
|
||||
"to prevent the program from being "
|
||||
"terminated, and has restored the\n"
|
||||
"context to its original state before the call.\n"
|
||||
"To change this behaviour use \"set "
|
||||
"unwind-on-terminating-exception off\".\n"
|
||||
"Evaluation of the expression "
|
||||
"containing the function (%s)\n"
|
||||
"will be abandoned."),
|
||||
name);
|
||||
}
|
||||
else if (stop_stack_dummy == STOP_NONE)
|
||||
|
@ -978,11 +985,13 @@ will be abandoned."),
|
|||
someday this will be implemented (it would not be easy). */
|
||||
/* FIXME: Insert a bunch of wrap_here; name can be very long if it's
|
||||
a C++ name with arguments and stuff. */
|
||||
error (_("\
|
||||
The program being debugged stopped while in a function called from GDB.\n\
|
||||
Evaluation of the expression containing the function\n\
|
||||
(%s) will be abandoned.\n\
|
||||
When the function is done executing, GDB will silently stop."),
|
||||
error (_("The program being debugged stopped "
|
||||
"while in a function called from GDB.\n"
|
||||
"Evaluation of the expression "
|
||||
"containing the function\n"
|
||||
"(%s) will be abandoned.\n"
|
||||
"When the function is done executing, "
|
||||
"GDB will silently stop."),
|
||||
name);
|
||||
}
|
||||
|
||||
|
@ -1079,7 +1088,8 @@ The default is to stop in the frame where the signal was received."),
|
|||
add_setshow_boolean_cmd ("unwind-on-terminating-exception", no_class,
|
||||
&unwind_on_terminating_exception_p, _("\
|
||||
Set unwinding of stack if std::terminate is called while in call dummy."), _("\
|
||||
Show unwinding of stack if std::terminate() is called while in a call dummy."), _("\
|
||||
Show unwinding of stack if std::terminate() is called while in a call dummy."),
|
||||
_("\
|
||||
The unwind on terminating exception flag lets the user determine\n\
|
||||
what gdb should do if a std::terminate() call is made from the\n\
|
||||
default exception handler. If set, gdb unwinds the stack and restores\n\
|
||||
|
|
90
gdb/infcmd.c
90
gdb/infcmd.c
|
@ -106,7 +106,8 @@ static void signal_command (char *, int);
|
|||
static void jump_command (char *, int);
|
||||
|
||||
static void step_1 (int, int, char *);
|
||||
static void step_once (int skip_subroutines, int single_inst, int count, int thread);
|
||||
static void step_once (int skip_subroutines, int single_inst,
|
||||
int count, int thread);
|
||||
|
||||
static void next_command (char *, int);
|
||||
|
||||
|
@ -125,10 +126,11 @@ void _initialize_infcmd (void);
|
|||
#define ERROR_NO_INFERIOR \
|
||||
if (!target_has_execution) error (_("The program is not being run."));
|
||||
|
||||
/* Scratch area where string containing arguments to give to the program will be
|
||||
stored by 'set args'. As soon as anything is stored, notice_args_set will
|
||||
move it into per-inferior storage. Arguments are separated by spaces. Empty
|
||||
string (pointer to '\0') means no args. */
|
||||
/* Scratch area where string containing arguments to give to the
|
||||
program will be stored by 'set args'. As soon as anything is
|
||||
stored, notice_args_set will move it into per-inferior storage.
|
||||
Arguments are separated by spaces. Empty string (pointer to '\0')
|
||||
means no args. */
|
||||
|
||||
static char *inferior_args_scratch;
|
||||
|
||||
|
@ -337,7 +339,8 @@ construct_inferior_arguments (int argc, char **argv)
|
|||
if (cp == NULL)
|
||||
cp = strchr (argv[i], '\n');
|
||||
if (cp != NULL)
|
||||
error (_("can't handle command-line argument containing whitespace"));
|
||||
error (_("can't handle command-line "
|
||||
"argument containing whitespace"));
|
||||
length += strlen (argv[i]) + 1;
|
||||
}
|
||||
|
||||
|
@ -563,7 +566,8 @@ run_command_1 (char *args, int from_tty, int tbreak_at_main)
|
|||
/* We call get_inferior_args() because we might need to compute
|
||||
the value now. */
|
||||
target_create_inferior (exec_file, get_inferior_args (),
|
||||
environ_vector (current_inferior ()->environment), from_tty);
|
||||
environ_vector (current_inferior ()->environment),
|
||||
from_tty);
|
||||
|
||||
/* We're starting off a new process. When we get out of here, in
|
||||
non-stop mode, finish the state of all threads of that process,
|
||||
|
@ -645,8 +649,7 @@ ensure_valid_thread (void)
|
|||
{
|
||||
if (ptid_equal (inferior_ptid, null_ptid)
|
||||
|| is_exited (inferior_ptid))
|
||||
error (_("\
|
||||
Cannot execute this command without a live selected thread."));
|
||||
error (_("Cannot execute this command without a live selected thread."));
|
||||
}
|
||||
|
||||
/* If the user is looking at trace frames, any resumption of execution
|
||||
|
@ -657,8 +660,7 @@ void
|
|||
ensure_not_tfind_mode (void)
|
||||
{
|
||||
if (get_traceframe_number () >= 0)
|
||||
error (_("\
|
||||
Cannot execute this command while looking at trace frames."));
|
||||
error (_("Cannot execute this command while looking at trace frames."));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -730,8 +732,8 @@ continue_command (char *args, int from_tty)
|
|||
error (_("`-a' is meaningless in all-stop mode."));
|
||||
|
||||
if (args != NULL && all_threads)
|
||||
error (_("\
|
||||
Can't resume all threads and specify proceed count simultaneously."));
|
||||
error (_("Can't resume all threads and specify "
|
||||
"proceed count simultaneously."));
|
||||
|
||||
/* If we have an argument left, set proceed count of breakpoint we
|
||||
stopped at. */
|
||||
|
@ -1011,9 +1013,9 @@ step_once (int skip_subroutines, int single_inst, int count, int thread)
|
|||
error (_("Cannot find bounds of current function"));
|
||||
|
||||
target_terminal_ours ();
|
||||
printf_filtered (_("\
|
||||
Single stepping until exit from function %s,\n\
|
||||
which has no line number information.\n"), name);
|
||||
printf_filtered (_("Single stepping until exit from function %s,"
|
||||
"\nwhich has no line number information.\n"),
|
||||
name);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1115,7 +1117,8 @@ jump_command (char *arg, int from_tty)
|
|||
if (section_is_overlay (SYMBOL_OBJ_SECTION (sfn)) &&
|
||||
!section_is_mapped (SYMBOL_OBJ_SECTION (sfn)))
|
||||
{
|
||||
if (!query (_("WARNING!!! Destination is in unmapped overlay! Jump anyway? ")))
|
||||
if (!query (_("WARNING!!! Destination is in "
|
||||
"unmapped overlay! Jump anyway? ")))
|
||||
{
|
||||
error (_("Not confirmed."));
|
||||
/* NOTREACHED */
|
||||
|
@ -1749,8 +1752,8 @@ program_info (char *args, int from_tty)
|
|||
{
|
||||
if (stat < 0)
|
||||
{
|
||||
printf_filtered (_("\
|
||||
It stopped at a breakpoint that has since been deleted.\n"));
|
||||
printf_filtered (_("It stopped at a breakpoint "
|
||||
"that has since been deleted.\n"));
|
||||
}
|
||||
else
|
||||
printf_filtered (_("It stopped at breakpoint %d.\n"), num);
|
||||
|
@ -1766,8 +1769,8 @@ It stopped at a breakpoint that has since been deleted.\n"));
|
|||
|
||||
if (!from_tty)
|
||||
{
|
||||
printf_filtered (_("\
|
||||
Type \"info stack\" or \"info registers\" for more information.\n"));
|
||||
printf_filtered (_("Type \"info stack\" or \"info "
|
||||
"registers\" for more information.\n"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1857,8 +1860,8 @@ set_environment_command (char *arg, int from_tty)
|
|||
var = savestring (arg, p - arg);
|
||||
if (nullset)
|
||||
{
|
||||
printf_filtered (_("\
|
||||
Setting environment variable \"%s\" to null value.\n"),
|
||||
printf_filtered (_("Setting environment variable "
|
||||
"\"%s\" to null value.\n"),
|
||||
var);
|
||||
set_in_environ (current_inferior ()->environment, var, "");
|
||||
}
|
||||
|
@ -1892,7 +1895,8 @@ static void
|
|||
path_info (char *args, int from_tty)
|
||||
{
|
||||
puts_filtered ("Executable and object file path: ");
|
||||
puts_filtered (get_in_environ (current_inferior ()->environment, path_var_name));
|
||||
puts_filtered (get_in_environ (current_inferior ()->environment,
|
||||
path_var_name));
|
||||
puts_filtered ("\n");
|
||||
}
|
||||
|
||||
|
@ -2699,8 +2703,8 @@ print_float_info (struct ui_file *file,
|
|||
}
|
||||
}
|
||||
if (!printed_something)
|
||||
fprintf_filtered (file, "\
|
||||
No floating-point info available for this processor.\n");
|
||||
fprintf_filtered (file, "No floating-point info "
|
||||
"available for this processor.\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2716,8 +2720,8 @@ float_info (char *args, int from_tty)
|
|||
static void
|
||||
unset_command (char *args, int from_tty)
|
||||
{
|
||||
printf_filtered (_("\
|
||||
\"unset\" must be followed by the name of an unset subcommand.\n"));
|
||||
printf_filtered (_("\"unset\" must be followed by the "
|
||||
"name of an unset subcommand.\n"));
|
||||
help_list (unsetlist, "unset ", -1, gdb_stdout);
|
||||
}
|
||||
|
||||
|
@ -2776,7 +2780,8 @@ Add directory DIR(s) to beginning of search path for object files.\n\
|
|||
$cwd in the path means the current working directory.\n\
|
||||
This path is equivalent to the $PATH shell variable. It is a list of\n\
|
||||
directories, separated by colons. These directories are searched to find\n\
|
||||
fully linked executable files and separately compiled object files as needed."));
|
||||
fully linked executable files and separately compiled object files as \
|
||||
needed."));
|
||||
set_cmd_completer (c, filename_completer);
|
||||
|
||||
c = add_cmd ("paths", no_class, path_info, _("\
|
||||
|
@ -2784,7 +2789,8 @@ Current search path for finding object files.\n\
|
|||
$cwd in the path means the current working directory.\n\
|
||||
This path is equivalent to the $PATH shell variable. It is a list of\n\
|
||||
directories, separated by colons. These directories are searched to find\n\
|
||||
fully linked executable files and separately compiled object files as needed."),
|
||||
fully linked executable files and separately compiled object files as \
|
||||
needed."),
|
||||
&showlist);
|
||||
set_cmd_completer (c, noop_completer);
|
||||
|
||||
|
@ -2822,12 +2828,14 @@ An argument of \"0\" means continue program without giving it a signal."));
|
|||
|
||||
add_com ("stepi", class_run, stepi_command, _("\
|
||||
Step one instruction exactly.\n\
|
||||
Argument N means do this N times (or till program stops for another reason)."));
|
||||
Argument N means do this N times (or till program stops for another \
|
||||
reason)."));
|
||||
add_com_alias ("si", "stepi", class_alias, 0);
|
||||
|
||||
add_com ("nexti", class_run, nexti_command, _("\
|
||||
Step one instruction, but proceed through subroutine calls.\n\
|
||||
Argument N means do this N times (or till program stops for another reason)."));
|
||||
Argument N means do this N times (or till program stops for another \
|
||||
reason)."));
|
||||
add_com_alias ("ni", "nexti", class_alias, 0);
|
||||
|
||||
add_com ("finish", class_run, finish_command, _("\
|
||||
|
@ -2839,24 +2847,28 @@ Upon return, the value returned is printed and put in the value history."));
|
|||
Step program, proceeding through subroutine calls.\n\
|
||||
Like the \"step\" command as long as subroutine calls do not happen;\n\
|
||||
when they do, the call is treated as one instruction.\n\
|
||||
Argument N means do this N times (or till program stops for another reason)."));
|
||||
Argument N means do this N times (or till program stops for another \
|
||||
reason)."));
|
||||
add_com_alias ("n", "next", class_run, 1);
|
||||
if (xdb_commands)
|
||||
add_com_alias ("S", "next", class_run, 1);
|
||||
|
||||
add_com ("step", class_run, step_command, _("\
|
||||
Step program until it reaches a different source line.\n\
|
||||
Argument N means do this N times (or till program stops for another reason)."));
|
||||
Argument N means do this N times (or till program stops for another \
|
||||
reason)."));
|
||||
add_com_alias ("s", "step", class_run, 1);
|
||||
|
||||
c = add_com ("until", class_run, until_command, _("\
|
||||
Execute until the program reaches a source line greater than the current\n\
|
||||
or a specified location (same args as break command) within the current frame."));
|
||||
or a specified location (same args as break command) within the current \
|
||||
frame."));
|
||||
set_cmd_completer (c, location_completer);
|
||||
add_com_alias ("u", "until", class_run, 1);
|
||||
|
||||
c = add_com ("advance", class_run, advance_command, _("\
|
||||
Continue the program up to the given location (same form as args for break command).\n\
|
||||
Continue the program up to the given location (same form as args for break \
|
||||
command).\n\
|
||||
Execution will also stop upon exit from the current stack frame."));
|
||||
set_cmd_completer (c, location_completer);
|
||||
|
||||
|
@ -2897,8 +2909,10 @@ Specifying -a and an ignore count simultaneously is an error."));
|
|||
c = add_com ("run", class_run, run_command, _("\
|
||||
Start debugged program. You may specify arguments to give it.\n\
|
||||
Args may include \"*\", or \"[...]\"; they are expanded using \"sh\".\n\
|
||||
Input and output redirection with \">\", \"<\", or \">>\" are also allowed.\n\n\
|
||||
With no arguments, uses arguments last specified (with \"run\" or \"set args\").\n\
|
||||
Input and output redirection with \">\", \"<\", or \">>\" are also \
|
||||
allowed.\n\n\
|
||||
With no arguments, uses arguments last specified (with \"run\" \
|
||||
or \"set args\").\n\
|
||||
To cancel previous arguments and run with no arguments,\n\
|
||||
use \"set args\" without arguments."));
|
||||
set_cmd_completer (c, filename_completer);
|
||||
|
|
|
@ -425,7 +425,8 @@ terminal_ours_1 (int output_only)
|
|||
used to check for an error here, so perhaps there are other
|
||||
such situations as well. */
|
||||
if (result == -1)
|
||||
fprintf_unfiltered (gdb_stderr, "[tcsetpgrp failed in terminal_ours: %s]\n",
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"[tcsetpgrp failed in terminal_ours: %s]\n",
|
||||
safe_strerror (errno));
|
||||
#endif
|
||||
#endif /* termios */
|
||||
|
@ -551,7 +552,8 @@ child_terminal_info (char *args, int from_tty)
|
|||
inf = current_inferior ();
|
||||
tinfo = get_inflow_inferior_data (inf);
|
||||
|
||||
printf_filtered (_("Inferior's terminal status (currently saved by GDB):\n"));
|
||||
printf_filtered (_("Inferior's terminal status "
|
||||
"(currently saved by GDB):\n"));
|
||||
|
||||
/* First the fcntl flags. */
|
||||
{
|
||||
|
|
172
gdb/infrun.c
172
gdb/infrun.c
|
@ -357,8 +357,9 @@ static void
|
|||
show_follow_fork_mode_string (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
Debugger response to a program call of fork or vfork is \"%s\".\n"),
|
||||
fprintf_filtered (file,
|
||||
_("Debugger response to a program "
|
||||
"call of fork or vfork is \"%s\".\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -498,8 +499,8 @@ follow_fork (void)
|
|||
forked. In that case, the resume command
|
||||
issued is most likely not applicable to the
|
||||
child, so just warn, and refuse to resume. */
|
||||
warning (_("\
|
||||
Not resuming: switched threads before following fork child.\n"));
|
||||
warning (_("Not resuming: switched threads "
|
||||
"before following fork child.\n"));
|
||||
}
|
||||
|
||||
/* Reset breakpoints in the child as appropriate. */
|
||||
|
@ -636,11 +637,13 @@ handle_vfork_child_exec_or_exit (int exec)
|
|||
|
||||
if (exec)
|
||||
fprintf_filtered (gdb_stdlog,
|
||||
"Detaching vfork parent process %d after child exec.\n",
|
||||
"Detaching vfork parent process "
|
||||
"%d after child exec.\n",
|
||||
inf->vfork_parent->pid);
|
||||
else
|
||||
fprintf_filtered (gdb_stdlog,
|
||||
"Detaching vfork parent process %d after child exit.\n",
|
||||
"Detaching vfork parent process "
|
||||
"%d after child exit.\n",
|
||||
inf->vfork_parent->pid);
|
||||
}
|
||||
|
||||
|
@ -717,7 +720,8 @@ handle_vfork_child_exec_or_exit (int exec)
|
|||
struct cleanup *old_chain = make_cleanup_restore_current_thread ();
|
||||
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog, "infrun: resuming vfork parent process %d\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: resuming vfork parent process %d\n",
|
||||
resume_parent);
|
||||
|
||||
iterate_over_threads (proceed_after_vfork_done, &resume_parent);
|
||||
|
@ -1135,14 +1139,14 @@ show_can_use_displaced_stepping (struct ui_file *file, int from_tty,
|
|||
const char *value)
|
||||
{
|
||||
if (can_use_displaced_stepping == can_use_displaced_stepping_auto)
|
||||
fprintf_filtered (file, _("\
|
||||
Debugger's willingness to use displaced stepping to step over \
|
||||
breakpoints is %s (currently %s).\n"),
|
||||
fprintf_filtered (file,
|
||||
_("Debugger's willingness to use displaced stepping "
|
||||
"to step over breakpoints is %s (currently %s).\n"),
|
||||
value, non_stop ? "on" : "off");
|
||||
else
|
||||
fprintf_filtered (file, _("\
|
||||
Debugger's willingness to use displaced stepping to step over \
|
||||
breakpoints is %s.\n"), value);
|
||||
fprintf_filtered (file,
|
||||
_("Debugger's willingness to use displaced stepping "
|
||||
"to step over breakpoints is %s.\n"), value);
|
||||
}
|
||||
|
||||
/* Return non-zero if displaced stepping can/should be used to step
|
||||
|
@ -1319,7 +1323,8 @@ displaced_step_prepare (ptid_t ptid)
|
|||
}
|
||||
|
||||
static void
|
||||
write_memory_ptid (ptid_t ptid, CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
|
||||
write_memory_ptid (ptid_t ptid, CORE_ADDR memaddr,
|
||||
const gdb_byte *myaddr, int len)
|
||||
{
|
||||
struct cleanup *ptid_cleanup = save_inferior_ptid ();
|
||||
|
||||
|
@ -1450,7 +1455,8 @@ displaced_step_fixup (ptid_t event_ptid, enum target_signal signal)
|
|||
step = currently_stepping (tp);
|
||||
|
||||
if (debug_displaced)
|
||||
fprintf_unfiltered (gdb_stdlog, "breakpoint is gone %s: step(%d)\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"breakpoint is gone %s: step(%d)\n",
|
||||
target_pid_to_str (tp->ptid), step);
|
||||
|
||||
target_resume (ptid, step, TARGET_SIGNAL_0);
|
||||
|
@ -1516,8 +1522,9 @@ static void
|
|||
show_scheduler_mode (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
Mode for locking scheduler during execution is \"%s\".\n"),
|
||||
fprintf_filtered (file,
|
||||
_("Mode for locking scheduler "
|
||||
"during execution is \"%s\".\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -1616,10 +1623,11 @@ resume (int step, enum target_signal sig)
|
|||
if (gdbarch_skip_permanent_breakpoint_p (gdbarch))
|
||||
gdbarch_skip_permanent_breakpoint (gdbarch, regcache);
|
||||
else
|
||||
error (_("\
|
||||
The program is stopped at a permanent breakpoint, but GDB does not know\n\
|
||||
how to step past a permanent breakpoint on this architecture. Try using\n\
|
||||
a command like `return' or `jump' to continue execution."));
|
||||
error (_("The program is stopped at a permanent "
|
||||
"breakpoint, but GDB does not know\n"
|
||||
"how to step past a permanent breakpoint "
|
||||
"on this architecture. Try using\na command "
|
||||
"like `return' or `jump' to continue execution."));
|
||||
}
|
||||
|
||||
/* If enabled, step over breakpoints by executing a copy of the
|
||||
|
@ -2225,11 +2233,11 @@ static void handle_step_into_function (struct gdbarch *gdbarch,
|
|||
struct execution_control_state *ecs);
|
||||
static void handle_step_into_function_backward (struct gdbarch *gdbarch,
|
||||
struct execution_control_state *ecs);
|
||||
static void insert_step_resume_breakpoint_at_frame (struct frame_info *step_frame);
|
||||
static void insert_step_resume_breakpoint_at_frame (struct frame_info *);
|
||||
static void insert_step_resume_breakpoint_at_caller (struct frame_info *);
|
||||
static void insert_step_resume_breakpoint_at_sal (struct gdbarch *gdbarch,
|
||||
struct symtab_and_line sr_sal,
|
||||
struct frame_id sr_id);
|
||||
static void insert_step_resume_breakpoint_at_sal (struct gdbarch *,
|
||||
struct symtab_and_line ,
|
||||
struct frame_id);
|
||||
static void insert_longjmp_resume_breakpoint (struct gdbarch *, CORE_ADDR);
|
||||
static void check_exception_resume (struct execution_control_state *,
|
||||
struct frame_info *, struct symbol *);
|
||||
|
@ -2491,7 +2499,8 @@ prepare_for_detach (void)
|
|||
/* If an error happens while handling the event, propagate GDB's
|
||||
knowledge of the executing state to the frontend/user running
|
||||
state. */
|
||||
old_chain_2 = make_cleanup (finish_thread_state_cleanup, &minus_one_ptid);
|
||||
old_chain_2 = make_cleanup (finish_thread_state_cleanup,
|
||||
&minus_one_ptid);
|
||||
|
||||
/* In non-stop mode, each thread is handled individually.
|
||||
Switch early, so the global state is set correctly for this
|
||||
|
@ -2894,8 +2903,8 @@ init_infwait_state (void)
|
|||
void
|
||||
error_is_running (void)
|
||||
{
|
||||
error (_("\
|
||||
Cannot execute this command while the selected thread is running."));
|
||||
error (_("Cannot execute this command while "
|
||||
"the selected thread is running."));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3302,7 +3311,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
ptid_t parent;
|
||||
ptid_t child;
|
||||
int should_resume;
|
||||
int follow_child = (follow_fork_mode_string == follow_fork_mode_child);
|
||||
int follow_child
|
||||
= (follow_fork_mode_string == follow_fork_mode_child);
|
||||
|
||||
ecs->event_thread->suspend.stop_signal = TARGET_SIGNAL_0;
|
||||
|
||||
|
@ -3346,7 +3356,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
the parent, and keep going. */
|
||||
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_VFORK_DONE\n");
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: TARGET_WAITKIND_VFORK_DONE\n");
|
||||
|
||||
if (!ptid_equal (ecs->ptid, inferior_ptid))
|
||||
context_switch (ecs->ptid);
|
||||
|
@ -3406,7 +3417,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
that's in a syscall. It's frequently a losing proposition. */
|
||||
case TARGET_WAITKIND_SYSCALL_ENTRY:
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_SYSCALL_ENTRY\n");
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: TARGET_WAITKIND_SYSCALL_ENTRY\n");
|
||||
/* Getting the current syscall number */
|
||||
if (handle_syscall_event (ecs) != 0)
|
||||
return;
|
||||
|
@ -3419,7 +3431,8 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
into user code.) */
|
||||
case TARGET_WAITKIND_SYSCALL_RETURN:
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_SYSCALL_RETURN\n");
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: TARGET_WAITKIND_SYSCALL_RETURN\n");
|
||||
if (handle_syscall_event (ecs) != 0)
|
||||
return;
|
||||
goto process_event_stop_test;
|
||||
|
@ -3443,8 +3456,9 @@ handle_inferior_event (struct execution_control_state *ecs)
|
|||
if (non_stop)
|
||||
/* Non-stop assumes that the target handles adding new threads
|
||||
to the thread list. */
|
||||
internal_error (__FILE__, __LINE__, "\
|
||||
targets should add new threads to the thread list themselves in non-stop mode.");
|
||||
internal_error (__FILE__, __LINE__,
|
||||
"targets should add new threads to the thread "
|
||||
"list themselves in non-stop mode.");
|
||||
|
||||
/* We may want to consider not doing a resume here in order to
|
||||
give the user a chance to play with the new thread. It might
|
||||
|
@ -3522,7 +3536,9 @@ targets should add new threads to the thread list themselves in non-stop mode.")
|
|||
if (ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP)
|
||||
{
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog, "infrun: stepping_past_singlestep_breakpoint\n");
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: stepping_past_"
|
||||
"singlestep_breakpoint\n");
|
||||
/* Pull the single step breakpoints out of the target. */
|
||||
remove_single_step_breakpoints ();
|
||||
singlestep_breakpoints_inserted_p = 0;
|
||||
|
@ -3939,8 +3955,9 @@ targets should add new threads to the thread list themselves in non-stop mode.")
|
|||
&& ecs->event_thread->suspend.stop_signal == TARGET_SIGNAL_TRAP
|
||||
&& !bpstat_explains_signal (ecs->event_thread->control.stop_bpstat)
|
||||
&& stopped_by_watchpoint)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
infrun: no user watchpoint explains watchpoint SIGTRAP, ignoring\n");
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: no user watchpoint explains "
|
||||
"watchpoint SIGTRAP, ignoring\n");
|
||||
|
||||
/* NOTE: cagney/2003-03-29: These two checks for a random signal
|
||||
at one stage in the past included checks for an inferior
|
||||
|
@ -4135,8 +4152,9 @@ process_event_stop_test:
|
|||
frame, &jmp_buf_pc))
|
||||
{
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME "
|
||||
"(!gdbarch_get_longjmp_target)\n");
|
||||
keep_going (ecs);
|
||||
return;
|
||||
}
|
||||
|
@ -4330,8 +4348,9 @@ infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME (!gdbarch_get_longjmp_target)\n");
|
|||
|| !target_thread_alive (tp->ptid))
|
||||
{
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
infrun: not switching back to stepped thread, it has vanished\n");
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: not switching back to "
|
||||
"stepped thread, it has vanished\n");
|
||||
|
||||
delete_thread (tp->ptid);
|
||||
keep_going (ecs);
|
||||
|
@ -4365,7 +4384,8 @@ infrun: not switching back to stepped thread, it has vanished\n");
|
|||
if (SOLIB_IN_DYNAMIC_LINKER (PIDGET (ecs->ptid), stop_pc))
|
||||
{
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog, "infrun: stepping in dynamic linker\n");
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: stepping in dynamic linker\n");
|
||||
ecs->event_thread->stepping_over_breakpoint = 1;
|
||||
keep_going (ecs);
|
||||
return;
|
||||
|
@ -4474,7 +4494,8 @@ infrun: not switching back to stepped thread, it has vanished\n");
|
|||
gdbarch_skip_solib_resolver (gdbarch, stop_pc);
|
||||
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog, "infrun: stepped into dynsym resolve code\n");
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: stepped into dynsym resolve code\n");
|
||||
|
||||
if (pc_after_resolver)
|
||||
{
|
||||
|
@ -4500,7 +4521,8 @@ infrun: not switching back to stepped thread, it has vanished\n");
|
|||
&& get_frame_type (frame) == SIGTRAMP_FRAME)
|
||||
{
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog, "infrun: stepped into signal trampoline\n");
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: stepped into signal trampoline\n");
|
||||
/* The inferior, while doing a "step" or "next", has ended up in
|
||||
a signal trampoline (either by a signal being delivered or by
|
||||
the signal handler returning). Just single-step until the
|
||||
|
@ -4730,7 +4752,8 @@ infrun: not switching back to stepped thread, it has vanished\n");
|
|||
real_stop_pc = gdbarch_skip_trampoline_code (gdbarch, frame, stop_pc);
|
||||
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog, "infrun: stepped into solib return tramp\n");
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: stepped into solib return tramp\n");
|
||||
|
||||
/* Only proceed through if we know where it's going. */
|
||||
if (real_stop_pc)
|
||||
|
@ -4766,7 +4789,8 @@ infrun: not switching back to stepped thread, it has vanished\n");
|
|||
&& stop_pc_sal.line == 0)
|
||||
{
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog, "infrun: stepped into undebuggable function\n");
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: stepped into undebuggable function\n");
|
||||
|
||||
/* The inferior just stepped into, or returned to, an
|
||||
undebuggable function (where there is no debugging information
|
||||
|
@ -4908,7 +4932,8 @@ infrun: not switching back to stepped thread, it has vanished\n");
|
|||
That is said to make things like for (;;) statements work
|
||||
better. */
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog, "infrun: stepped to a different line\n");
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: stepped to a different line\n");
|
||||
ecs->event_thread->control.stop_step = 1;
|
||||
print_end_stepping_range_reason ();
|
||||
stop_stepping (ecs);
|
||||
|
@ -5570,9 +5595,9 @@ normal_stop (void)
|
|||
if (remove_breakpoints ())
|
||||
{
|
||||
target_terminal_ours_for_output ();
|
||||
printf_filtered (_("\
|
||||
Cannot remove breakpoints because program is no longer writable.\n\
|
||||
Further execution is probably impossible.\n"));
|
||||
printf_filtered (_("Cannot remove breakpoints because "
|
||||
"program is no longer writable.\nFurther "
|
||||
"execution is probably impossible.\n"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5663,12 +5688,15 @@ Further execution is probably impossible.\n"));
|
|||
&& frame_id_eq (tp->control.step_frame_id,
|
||||
get_frame_id (get_current_frame ()))
|
||||
&& step_start_function == find_pc_function (stop_pc))
|
||||
source_flag = SRC_LINE; /* finished step, just print source line */
|
||||
source_flag = SRC_LINE; /* finished step, just
|
||||
print source line */
|
||||
else
|
||||
source_flag = SRC_AND_LOC; /* print location and source line */
|
||||
source_flag = SRC_AND_LOC; /* print location and
|
||||
source line */
|
||||
break;
|
||||
case PRINT_SRC_AND_LOC:
|
||||
source_flag = SRC_AND_LOC; /* print location and source line */
|
||||
source_flag = SRC_AND_LOC; /* print location and
|
||||
source line */
|
||||
break;
|
||||
case PRINT_SRC_ONLY:
|
||||
source_flag = SRC_LINE;
|
||||
|
@ -5716,14 +5744,15 @@ Further execution is probably impossible.\n"));
|
|||
|
||||
gdb_assert (get_frame_type (frame) == DUMMY_FRAME);
|
||||
frame_pop (frame);
|
||||
/* frame_pop() calls reinit_frame_cache as the last thing it does
|
||||
which means there's currently no selected frame. We don't need
|
||||
to re-establish a selected frame if the dummy call returns normally,
|
||||
that will be done by restore_infcall_control_state. However, we do have
|
||||
to handle the case where the dummy call is returning after being
|
||||
stopped (e.g. the dummy call previously hit a breakpoint). We
|
||||
can't know which case we have so just always re-establish a
|
||||
selected frame here. */
|
||||
/* frame_pop() calls reinit_frame_cache as the last thing it
|
||||
does which means there's currently no selected frame. We
|
||||
don't need to re-establish a selected frame if the dummy call
|
||||
returns normally, that will be done by
|
||||
restore_infcall_control_state. However, we do have to handle
|
||||
the case where the dummy call is returning after being
|
||||
stopped (e.g. the dummy call previously hit a breakpoint).
|
||||
We can't know which case we have so just always re-establish
|
||||
a selected frame here. */
|
||||
select_frame (get_current_frame ());
|
||||
}
|
||||
|
||||
|
@ -5827,8 +5856,8 @@ signal_pass_update (int signo, int state)
|
|||
static void
|
||||
sig_print_header (void)
|
||||
{
|
||||
printf_filtered (_("\
|
||||
Signal Stop\tPrint\tPass to program\tDescription\n"));
|
||||
printf_filtered (_("Signal Stop\tPrint\tPass "
|
||||
"to program\tDescription\n"));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -5983,7 +6012,8 @@ handle_command (char *args, int from_tty)
|
|||
if (!allsigs && !sigs[signum])
|
||||
{
|
||||
if (query (_("%s is used by the debugger.\n\
|
||||
Are you sure you want to change it? "), target_signal_to_name ((enum target_signal) signum)))
|
||||
Are you sure you want to change it? "),
|
||||
target_signal_to_name ((enum target_signal) signum)))
|
||||
{
|
||||
sigs[signum] = 1;
|
||||
}
|
||||
|
@ -6133,7 +6163,8 @@ signals_info (char *signum_exp, int from_tty)
|
|||
sig_print_info (oursig);
|
||||
}
|
||||
|
||||
printf_filtered (_("\nUse the \"handle\" command to change these tables.\n"));
|
||||
printf_filtered (_("\nUse the \"handle\" command "
|
||||
"to change these tables.\n"));
|
||||
}
|
||||
|
||||
/* The $_siginfo convenience variable is a bit special. We don't know
|
||||
|
@ -6727,8 +6758,8 @@ show_exec_direction_func (struct ui_file *out, int from_tty,
|
|||
break;
|
||||
case EXEC_ERROR:
|
||||
default:
|
||||
fprintf_filtered (out,
|
||||
_("Forward (target `%s' does not support exec-direction).\n"),
|
||||
fprintf_filtered (out, _("Forward (target `%s' does not "
|
||||
"support exec-direction).\n"),
|
||||
target_shortname);
|
||||
break;
|
||||
}
|
||||
|
@ -6764,8 +6795,8 @@ static void
|
|||
show_schedule_multiple (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
Resuming the execution of threads of all processes is %s.\n"), value);
|
||||
fprintf_filtered (file, _("Resuming the execution of threads "
|
||||
"of all processes is %s.\n"), value);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -6832,7 +6863,8 @@ When non-zero, inferior specific debugging is enabled."),
|
|||
show_debug_infrun,
|
||||
&setdebuglist, &showdebuglist);
|
||||
|
||||
add_setshow_boolean_cmd ("displaced", class_maintenance, &debug_displaced, _("\
|
||||
add_setshow_boolean_cmd ("displaced", class_maintenance,
|
||||
&debug_displaced, _("\
|
||||
Set displaced stepping debugging."), _("\
|
||||
Show displaced stepping debugging."), _("\
|
||||
When non-zero, displaced stepping specific debugging is enabled."),
|
||||
|
|
|
@ -126,7 +126,9 @@ clear_inline_frame_state (ptid_t ptid)
|
|||
VEC (inline_state_s) *new_states = NULL;
|
||||
int pid = ptid_get_pid (ptid);
|
||||
|
||||
for (ix = 0; VEC_iterate (inline_state_s, inline_states, ix, state); ix++)
|
||||
for (ix = 0;
|
||||
VEC_iterate (inline_state_s, inline_states, ix, state);
|
||||
ix++)
|
||||
if (pid != ptid_get_pid (state->ptid))
|
||||
VEC_safe_push (inline_state_s, new_states, state);
|
||||
VEC_free (inline_state_s, inline_states);
|
||||
|
|
|
@ -133,7 +133,8 @@ show_language_command (struct ui_file *file, int from_tty,
|
|||
"\"auto; currently %s\".\n"),
|
||||
current_language->la_name);
|
||||
else
|
||||
fprintf_filtered (gdb_stdout, _("The current source language is \"%s\".\n"),
|
||||
fprintf_filtered (gdb_stdout,
|
||||
_("The current source language is \"%s\".\n"),
|
||||
current_language->la_name);
|
||||
|
||||
flang = get_frame_language ();
|
||||
|
@ -362,7 +363,8 @@ show_case_command (struct ui_file *file, int from_tty,
|
|||
tmp);
|
||||
}
|
||||
else
|
||||
fprintf_filtered (gdb_stdout, _("Case sensitivity in name search is \"%s\".\n"),
|
||||
fprintf_filtered (gdb_stdout,
|
||||
_("Case sensitivity in name search is \"%s\".\n"),
|
||||
value);
|
||||
|
||||
if (case_sensitivity != current_language->la_case_sensitivity)
|
||||
|
@ -498,7 +500,8 @@ binop_result_type (struct value *v1, struct value *v2)
|
|||
return VALUE_TYPE (v1);
|
||||
else if (TYPE_UNSIGNED (t2) && l2 > l1)
|
||||
return VALUE_TYPE (v2);
|
||||
else /* Both are signed. Result is the longer type */
|
||||
else /* Both are signed. Result is the
|
||||
longer type. */
|
||||
return l1 > l2 ? VALUE_TYPE (v1) : VALUE_TYPE (v2);
|
||||
break;
|
||||
case language_m2:
|
||||
|
@ -576,7 +579,8 @@ int
|
|||
same_type (struct type *arg1, struct type *arg2)
|
||||
{
|
||||
CHECK_TYPEDEF (type);
|
||||
if (structured_type (arg1) ? !structured_type (arg2) : structured_type (arg2))
|
||||
if (structured_type (arg1)
|
||||
? !structured_type (arg2) : structured_type (arg2))
|
||||
/* One is structured and one isn't */
|
||||
return 0;
|
||||
else if (structured_type (arg1) && structured_type (arg2))
|
||||
|
@ -900,9 +904,11 @@ add_language (const struct language_defn *lang)
|
|||
|
||||
if (lang->la_magic != LANG_MAGIC)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stderr, "Magic number of %s language struct wrong\n",
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"Magic number of %s language struct wrong\n",
|
||||
lang->la_name);
|
||||
internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("failed internal consistency check"));
|
||||
}
|
||||
|
||||
if (!languages)
|
||||
|
@ -930,10 +936,10 @@ add_language (const struct language_defn *lang)
|
|||
/* Build the "help set language" docs. */
|
||||
tmp_stream = mem_fileopen ();
|
||||
|
||||
fprintf_unfiltered (tmp_stream, _("\
|
||||
Set the current source language.\n\
|
||||
The currently understood settings are:\n\n\
|
||||
local or auto Automatic setting based on source file\n"));
|
||||
fprintf_unfiltered (tmp_stream,
|
||||
_("Set the current source language.\n"
|
||||
"The currently understood settings are:\n\nlocal or "
|
||||
"auto Automatic setting based on source file\n"));
|
||||
|
||||
for (i = 0; i < languages_size; ++i)
|
||||
{
|
||||
|
@ -958,9 +964,9 @@ local or auto Automatic setting based on source file\n"));
|
|||
add_setshow_enum_cmd ("language", class_support,
|
||||
(const char **) language_names,
|
||||
&language,
|
||||
language_set_doc, _("\
|
||||
Show the current source language."), NULL,
|
||||
set_language_command,
|
||||
language_set_doc,
|
||||
_("Show the current source language."),
|
||||
NULL, set_language_command,
|
||||
show_language_command,
|
||||
&setlist, &showlist);
|
||||
|
||||
|
@ -1010,7 +1016,8 @@ char *
|
|||
language_class_name_from_physname (const struct language_defn *current_language,
|
||||
const char *physname)
|
||||
{
|
||||
if (current_language != NULL && current_language->la_class_name_from_physname)
|
||||
if (current_language != NULL
|
||||
&& current_language->la_class_name_from_physname)
|
||||
return current_language->la_class_name_from_physname (physname);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1078,13 +1085,15 @@ static void
|
|||
unk_lang_emit_char (int c, struct type *type, struct ui_file *stream,
|
||||
int quoter)
|
||||
{
|
||||
error (_("internal error - unimplemented function unk_lang_emit_char called."));
|
||||
error (_("internal error - unimplemented "
|
||||
"function unk_lang_emit_char called."));
|
||||
}
|
||||
|
||||
static void
|
||||
unk_lang_printchar (int c, struct type *type, struct ui_file *stream)
|
||||
{
|
||||
error (_("internal error - unimplemented function unk_lang_printchar called."));
|
||||
error (_("internal error - unimplemented "
|
||||
"function unk_lang_printchar called."));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1093,14 +1102,16 @@ unk_lang_printstr (struct ui_file *stream, struct type *type,
|
|||
const char *encoding, int force_ellipses,
|
||||
const struct value_print_options *options)
|
||||
{
|
||||
error (_("internal error - unimplemented function unk_lang_printstr called."));
|
||||
error (_("internal error - unimplemented "
|
||||
"function unk_lang_printstr called."));
|
||||
}
|
||||
|
||||
static void
|
||||
unk_lang_print_type (struct type *type, const char *varstring,
|
||||
struct ui_file *stream, int show, int level)
|
||||
{
|
||||
error (_("internal error - unimplemented function unk_lang_print_type called."));
|
||||
error (_("internal error - unimplemented "
|
||||
"function unk_lang_print_type called."));
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1110,14 +1121,16 @@ unk_lang_val_print (struct type *type, const gdb_byte *valaddr,
|
|||
const struct value *val,
|
||||
const struct value_print_options *options)
|
||||
{
|
||||
error (_("internal error - unimplemented function unk_lang_val_print called."));
|
||||
error (_("internal error - unimplemented "
|
||||
"function unk_lang_val_print called."));
|
||||
}
|
||||
|
||||
static int
|
||||
unk_lang_value_print (struct value *val, struct ui_file *stream,
|
||||
const struct value_print_options *options)
|
||||
{
|
||||
error (_("internal error - unimplemented function unk_lang_value_print called."));
|
||||
error (_("internal error - unimplemented "
|
||||
"function unk_lang_value_print called."));
|
||||
}
|
||||
|
||||
static CORE_ADDR unk_lang_trampoline (struct frame_info *frame, CORE_ADDR pc)
|
||||
|
@ -1176,7 +1189,8 @@ const struct language_defn unknown_language_defn =
|
|||
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
|
||||
basic_lookup_transparent_type,/* lookup_transparent_type */
|
||||
unk_lang_demangle, /* Language specific symbol demangler */
|
||||
unk_lang_class_name, /* Language specific class_name_from_physname */
|
||||
unk_lang_class_name, /* Language specific
|
||||
class_name_from_physname */
|
||||
unk_op_print_tab, /* expression operators for printing */
|
||||
1, /* c-style arrays */
|
||||
0, /* String lower bound */
|
||||
|
@ -1215,7 +1229,8 @@ const struct language_defn auto_language_defn =
|
|||
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
|
||||
basic_lookup_transparent_type,/* lookup_transparent_type */
|
||||
unk_lang_demangle, /* Language specific symbol demangler */
|
||||
unk_lang_class_name, /* Language specific class_name_from_physname */
|
||||
unk_lang_class_name, /* Language specific
|
||||
class_name_from_physname */
|
||||
unk_op_print_tab, /* expression operators for printing */
|
||||
1, /* c-style arrays */
|
||||
0, /* String lower bound */
|
||||
|
@ -1253,7 +1268,8 @@ const struct language_defn local_language_defn =
|
|||
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
|
||||
basic_lookup_transparent_type,/* lookup_transparent_type */
|
||||
unk_lang_demangle, /* Language specific symbol demangler */
|
||||
unk_lang_class_name, /* Language specific class_name_from_physname */
|
||||
unk_lang_class_name, /* Language specific
|
||||
class_name_from_physname */
|
||||
unk_op_print_tab, /* expression operators for printing */
|
||||
1, /* c-style arrays */
|
||||
0, /* String lower bound */
|
||||
|
@ -1376,18 +1392,18 @@ _initialize_language (void)
|
|||
add_alias_cmd ("c", "check", no_class, 1, &showlist);
|
||||
add_alias_cmd ("ch", "check", no_class, 1, &showlist);
|
||||
|
||||
add_setshow_enum_cmd ("type", class_support, type_or_range_names, &type, _("\
|
||||
Set type checking. (on/warn/off/auto)"), _("\
|
||||
Show type checking. (on/warn/off/auto)"), NULL,
|
||||
set_type_command,
|
||||
add_setshow_enum_cmd ("type", class_support, type_or_range_names, &type,
|
||||
_("Set type checking. (on/warn/off/auto)"),
|
||||
_("Show type checking. (on/warn/off/auto)"),
|
||||
NULL, set_type_command,
|
||||
show_type_command,
|
||||
&setchecklist, &showchecklist);
|
||||
|
||||
add_setshow_enum_cmd ("range", class_support, type_or_range_names,
|
||||
&range, _("\
|
||||
Set range checking. (on/warn/off/auto)"), _("\
|
||||
Show range checking. (on/warn/off/auto)"), NULL,
|
||||
set_range_command,
|
||||
&range,
|
||||
_("Set range checking. (on/warn/off/auto)"),
|
||||
_("Show range checking. (on/warn/off/auto)"),
|
||||
NULL, set_range_command,
|
||||
show_range_command,
|
||||
&setchecklist, &showchecklist);
|
||||
|
||||
|
|
|
@ -186,7 +186,8 @@ struct language_defn
|
|||
|
||||
void (*la_post_parser) (struct expression ** expp, int void_context_p);
|
||||
|
||||
void (*la_printchar) (int ch, struct type *chtype, struct ui_file * stream);
|
||||
void (*la_printchar) (int ch, struct type *chtype,
|
||||
struct ui_file * stream);
|
||||
|
||||
void (*la_printstr) (struct ui_file * stream, struct type *elttype,
|
||||
const gdb_byte *string, unsigned int length,
|
||||
|
@ -410,7 +411,7 @@ extern enum language set_language (enum language);
|
|||
|
||||
#define LA_PRINT_CHAR(ch, type, stream) \
|
||||
(current_language->la_printchar(ch, type, stream))
|
||||
#define LA_PRINT_STRING(stream, elttype, string, length, encoding, force_ellipses,options) \
|
||||
#define LA_PRINT_STRING(stream, elttype, string, length, encoding, force_ellipses, options) \
|
||||
(current_language->la_printstr(stream, elttype, string, length, \
|
||||
encoding, force_ellipses,options))
|
||||
#define LA_EMIT_CHAR(ch, type, stream, quoter) \
|
||||
|
|
|
@ -47,13 +47,15 @@ static struct gdbarch_data *libunwind_descr_handle;
|
|||
/* Required function pointers from libunwind. */
|
||||
static int (*unw_get_reg_p) (unw_cursor_t *, unw_regnum_t, unw_word_t *);
|
||||
static int (*unw_get_fpreg_p) (unw_cursor_t *, unw_regnum_t, unw_fpreg_t *);
|
||||
static int (*unw_get_saveloc_p) (unw_cursor_t *, unw_regnum_t, unw_save_loc_t *);
|
||||
static int (*unw_get_saveloc_p) (unw_cursor_t *, unw_regnum_t,
|
||||
unw_save_loc_t *);
|
||||
static int (*unw_is_signal_frame_p) (unw_cursor_t *);
|
||||
static int (*unw_step_p) (unw_cursor_t *);
|
||||
static int (*unw_init_remote_p) (unw_cursor_t *, unw_addr_space_t, void *);
|
||||
static unw_addr_space_t (*unw_create_addr_space_p) (unw_accessors_t *, int);
|
||||
static void (*unw_destroy_addr_space_p) (unw_addr_space_t);
|
||||
static int (*unw_search_unwind_table_p) (unw_addr_space_t, unw_word_t, unw_dyn_info_t *,
|
||||
static int (*unw_search_unwind_table_p) (unw_addr_space_t, unw_word_t,
|
||||
unw_dyn_info_t *,
|
||||
unw_proc_info_t *, int, void *);
|
||||
static unw_word_t (*unw_find_dyn_list_p) (unw_addr_space_t, unw_dyn_info_t *,
|
||||
void *);
|
||||
|
@ -87,7 +89,8 @@ static char *step_name = STRINGIFY(UNW_OBJ(step));
|
|||
static char *init_remote_name = STRINGIFY(UNW_OBJ(init_remote));
|
||||
static char *create_addr_space_name = STRINGIFY(UNW_OBJ(create_addr_space));
|
||||
static char *destroy_addr_space_name = STRINGIFY(UNW_OBJ(destroy_addr_space));
|
||||
static char *search_unwind_table_name = STRINGIFY(UNW_OBJ(search_unwind_table));
|
||||
static char *search_unwind_table_name
|
||||
= STRINGIFY(UNW_OBJ(search_unwind_table));
|
||||
static char *find_dyn_list_name = STRINGIFY(UNW_OBJ(find_dyn_list));
|
||||
|
||||
static struct libunwind_descr *
|
||||
|
@ -99,14 +102,15 @@ libunwind_descr (struct gdbarch *gdbarch)
|
|||
static void *
|
||||
libunwind_descr_init (struct gdbarch *gdbarch)
|
||||
{
|
||||
struct libunwind_descr *descr = GDBARCH_OBSTACK_ZALLOC (gdbarch,
|
||||
struct libunwind_descr);
|
||||
struct libunwind_descr *descr
|
||||
= GDBARCH_OBSTACK_ZALLOC (gdbarch, struct libunwind_descr);
|
||||
|
||||
return descr;
|
||||
}
|
||||
|
||||
void
|
||||
libunwind_frame_set_descr (struct gdbarch *gdbarch, struct libunwind_descr *descr)
|
||||
libunwind_frame_set_descr (struct gdbarch *gdbarch,
|
||||
struct libunwind_descr *descr)
|
||||
{
|
||||
struct libunwind_descr *arch_descr;
|
||||
|
||||
|
@ -118,7 +122,8 @@ libunwind_frame_set_descr (struct gdbarch *gdbarch, struct libunwind_descr *desc
|
|||
{
|
||||
/* First time here. Must initialize data area. */
|
||||
arch_descr = libunwind_descr_init (gdbarch);
|
||||
deprecated_set_gdbarch_data (gdbarch, libunwind_descr_handle, arch_descr);
|
||||
deprecated_set_gdbarch_data (gdbarch,
|
||||
libunwind_descr_handle, arch_descr);
|
||||
}
|
||||
|
||||
/* Copy new descriptor info into arch descriptor. */
|
||||
|
@ -546,7 +551,8 @@ void _initialize_libunwind_frame (void);
|
|||
void
|
||||
_initialize_libunwind_frame (void)
|
||||
{
|
||||
libunwind_descr_handle = gdbarch_data_register_post_init (libunwind_descr_init);
|
||||
libunwind_descr_handle
|
||||
= gdbarch_data_register_post_init (libunwind_descr_init);
|
||||
|
||||
libunwind_initialized = libunwind_load ();
|
||||
}
|
||||
|
|
|
@ -49,7 +49,8 @@ int libunwind_sigtramp_frame_sniffer (const struct frame_unwind *self,
|
|||
struct frame_info *this_frame,
|
||||
void **this_cache);
|
||||
|
||||
void libunwind_frame_set_descr (struct gdbarch *arch, struct libunwind_descr *descr);
|
||||
void libunwind_frame_set_descr (struct gdbarch *arch,
|
||||
struct libunwind_descr *descr);
|
||||
|
||||
void libunwind_frame_this_id (struct frame_info *this_frame, void **this_cache,
|
||||
struct frame_id *this_id);
|
||||
|
|
|
@ -494,9 +494,8 @@ decode_line_2 (struct symbol *sym_arr[], int nelts, int funfirstline,
|
|||
const char *select_mode = multiple_symbols_select_mode ();
|
||||
|
||||
if (select_mode == multiple_symbols_cancel)
|
||||
error (_("\
|
||||
canceled because the command is ambiguous\n\
|
||||
See set/show multiple-symbol."));
|
||||
error (_("canceled because the command is ambiguous\n"
|
||||
"See set/show multiple-symbol."));
|
||||
|
||||
values.sals = (struct symtab_and_line *)
|
||||
alloca (nelts * sizeof (struct symtab_and_line));
|
||||
|
@ -542,7 +541,8 @@ See set/show multiple-symbol."));
|
|||
values.sals[i].symtab->filename,
|
||||
values.sals[i].line);
|
||||
else
|
||||
printf_unfiltered (_("[%d] %s at ?FILE:%d [No symtab? Probably broken debug info...]\n"),
|
||||
printf_unfiltered (_("[%d] %s at ?FILE:%d [No symtab? "
|
||||
"Probably broken debug info...]\n"),
|
||||
(i + 2),
|
||||
SYMBOL_PRINT_NAME (sym_arr[i]),
|
||||
values.sals[i].line);
|
||||
|
@ -619,7 +619,8 @@ See set/show multiple-symbol."));
|
|||
}
|
||||
else
|
||||
{
|
||||
printf_unfiltered (_("duplicate request for %d ignored.\n"), num);
|
||||
printf_unfiltered (_("duplicate request for %d ignored.\n"),
|
||||
num);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -703,10 +704,10 @@ find_method_overload_end (char *p)
|
|||
if no file is validly specified. Callers must check that.
|
||||
Also, the line number returned may be invalid.
|
||||
|
||||
If NOT_FOUND_PTR is not null, store a boolean true/false value at the location, based
|
||||
on whether or not failure occurs due to an unknown function or file. In the case
|
||||
where failure does occur due to an unknown function or file, do not issue an error
|
||||
message. */
|
||||
If NOT_FOUND_PTR is not null, store a boolean true/false value at
|
||||
the location, based on whether or not failure occurs due to an
|
||||
unknown function or file. In the case where failure does occur due
|
||||
to an unknown function or file, do not issue an error message. */
|
||||
|
||||
/* We allow single quotes in various places. This is a hideous
|
||||
kludge, which exists because the completer can't yet deal with the
|
||||
|
@ -1168,21 +1169,26 @@ decode_objc (char **argptr, int funfirstline, struct symtab *file_symtab,
|
|||
else
|
||||
{
|
||||
sym = find_pc_function (SYMBOL_VALUE_ADDRESS (sym_arr[0]));
|
||||
if ((sym != NULL) && strcmp (SYMBOL_LINKAGE_NAME (sym_arr[0]), SYMBOL_LINKAGE_NAME (sym)) != 0)
|
||||
if ((sym != NULL) && strcmp (SYMBOL_LINKAGE_NAME (sym_arr[0]),
|
||||
SYMBOL_LINKAGE_NAME (sym)) != 0)
|
||||
{
|
||||
warning (_("debugging symbol \"%s\" does not match selector; ignoring"), SYMBOL_LINKAGE_NAME (sym));
|
||||
warning (_("debugging symbol \"%s\" does "
|
||||
"not match selector; ignoring"),
|
||||
SYMBOL_LINKAGE_NAME (sym));
|
||||
sym = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
values.sals = (struct symtab_and_line *) xmalloc (sizeof (struct symtab_and_line));
|
||||
values.sals = (struct symtab_and_line *)
|
||||
xmalloc (sizeof (struct symtab_and_line));
|
||||
values.nelts = 1;
|
||||
|
||||
if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
|
||||
{
|
||||
/* Canonicalize this, so it remains resolved for dylib loads. */
|
||||
values.sals[0] = find_function_start_sal (sym, funfirstline);
|
||||
build_canonical_line_spec (values.sals, SYMBOL_NATURAL_NAME (sym), canonical);
|
||||
build_canonical_line_spec (values.sals,
|
||||
SYMBOL_NATURAL_NAME (sym), canonical);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1453,7 +1459,8 @@ decode_compound (char **argptr, int funfirstline, char ***canonical,
|
|||
if (strcmp_iw (SYMBOL_LINKAGE_NAME (sym), saved_arg) != 0)
|
||||
{
|
||||
xfree (values.sals);
|
||||
error (_("the class `%s' does not have any method instance named %s\n"),
|
||||
error (_("the class `%s' does not have "
|
||||
"any method instance named %s\n"),
|
||||
SYMBOL_PRINT_NAME (sym_class), copy);
|
||||
}
|
||||
}
|
||||
|
@ -1482,7 +1489,8 @@ decode_compound (char **argptr, int funfirstline, char ***canonical,
|
|||
if (not_found_ptr)
|
||||
*not_found_ptr = 1;
|
||||
cplusplus_error (saved_arg,
|
||||
"Can't find member of namespace, class, struct, or union named \"%s\"\n",
|
||||
"Can't find member of namespace, "
|
||||
"class, struct, or union named \"%s\"\n",
|
||||
copy);
|
||||
}
|
||||
|
||||
|
@ -1548,7 +1556,8 @@ lookup_prefix_sym (char **argptr, char *p)
|
|||
|
||||
static struct symtabs_and_lines
|
||||
find_method (int funfirstline, char ***canonical, char *saved_arg,
|
||||
char *copy, struct type *t, struct symbol *sym_class, int *not_found_ptr)
|
||||
char *copy, struct type *t, struct symbol *sym_class,
|
||||
int *not_found_ptr)
|
||||
{
|
||||
struct symtabs_and_lines values;
|
||||
struct symbol *sym = NULL;
|
||||
|
@ -1615,7 +1624,8 @@ find_method (int funfirstline, char ***canonical, char *saved_arg,
|
|||
}
|
||||
}
|
||||
|
||||
error (_("the class `%s' does not have any method instance named %s\n"),
|
||||
error (_("the class `%s' does not have "
|
||||
"any method instance named %s\n"),
|
||||
SYMBOL_PRINT_NAME (sym_class), copy);
|
||||
}
|
||||
|
||||
|
@ -1674,7 +1684,8 @@ symtab_from_filename (char **argptr, char *p, int is_quote_enclosed,
|
|||
*not_found_ptr = 1;
|
||||
if (!have_full_symbols () && !have_partial_symbols ())
|
||||
throw_error (NOT_FOUND_ERROR,
|
||||
_("No symbol table is loaded. Use the \"file\" command."));
|
||||
_("No symbol table is loaded. "
|
||||
"Use the \"file\" command."));
|
||||
throw_error (NOT_FOUND_ERROR, _("No source file named %s."), copy);
|
||||
}
|
||||
|
||||
|
@ -1806,7 +1817,8 @@ decode_dollar (char *copy, int funfirstline, struct symtab *default_symtab,
|
|||
sscanf ((copy[1] == '$') ? copy + 2 : copy + 1, "%d", &index);
|
||||
val_history = access_value_history ((copy[1] == '$') ? -index : index);
|
||||
if (TYPE_CODE (value_type (val_history)) != TYPE_CODE_INT)
|
||||
error (_("History values used in line specs must have integer values."));
|
||||
error (_("History values used in line "
|
||||
"specs must have integer values."));
|
||||
valx = value_as_long (val_history);
|
||||
}
|
||||
else
|
||||
|
@ -1830,7 +1842,8 @@ decode_dollar (char *copy, int funfirstline, struct symtab *default_symtab,
|
|||
|
||||
/* Not a user variable or function -- must be convenience variable. */
|
||||
if (!get_internalvar_integer (lookup_internalvar (copy + 1), &valx))
|
||||
error (_("Convenience variables used in line specs must have integer values."));
|
||||
error (_("Convenience variables used in line "
|
||||
"specs must have integer values."));
|
||||
}
|
||||
|
||||
init_sal (&val);
|
||||
|
@ -1875,9 +1888,9 @@ decode_label (char *copy, char ***canonical, struct symtabs_and_lines *result)
|
|||
}
|
||||
|
||||
/* Decode a linespec that's a variable. If FILE_SYMTAB is non-NULL,
|
||||
look in that symtab's static variables first. If NOT_FOUND_PTR is not NULL and
|
||||
the function cannot be found, store boolean true in the location pointed to
|
||||
and do not issue an error message. */
|
||||
look in that symtab's static variables first. If NOT_FOUND_PTR is
|
||||
not NULL and the function cannot be found, store boolean true in
|
||||
the location pointed to and do not issue an error message. */
|
||||
|
||||
static struct symtabs_and_lines
|
||||
decode_variable (char *copy, int funfirstline, char ***canonical,
|
||||
|
|
160
gdb/linux-nat.c
160
gdb/linux-nat.c
|
@ -86,7 +86,8 @@ flag to check for events in cloned processes. If nothing is found, we use
|
|||
sigsuspend to wait for SIGCHLD. When SIGCHLD arrives, it means something
|
||||
happened to a child process -- and SIGCHLD will be delivered both for events
|
||||
in main debugged process and in cloned processes. As soon as we know there's
|
||||
an event, we get back to calling nonblocking waitpid with and without __WCLONED.
|
||||
an event, we get back to calling nonblocking waitpid with and without
|
||||
__WCLONED.
|
||||
|
||||
Note that SIGCHLD should be blocked between waitpid and sigsuspend calls,
|
||||
so that we don't miss a signal. If SIGCHLD arrives in between, when it's
|
||||
|
@ -239,7 +240,8 @@ static void
|
|||
show_debug_linux_nat_async (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("Debugging of GNU/Linux async lwp module is %s.\n"),
|
||||
fprintf_filtered (file,
|
||||
_("Debugging of GNU/Linux async lwp module is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -250,23 +252,25 @@ show_disable_randomization (struct ui_file *file, int from_tty,
|
|||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
#ifdef HAVE_PERSONALITY
|
||||
fprintf_filtered (file, _("\
|
||||
Disabling randomization of debuggee's virtual address space is %s.\n"),
|
||||
fprintf_filtered (file,
|
||||
_("Disabling randomization of debuggee's "
|
||||
"virtual address space is %s.\n"),
|
||||
value);
|
||||
#else /* !HAVE_PERSONALITY */
|
||||
fputs_filtered (_("\
|
||||
Disabling randomization of debuggee's virtual address space is unsupported on\n\
|
||||
this platform.\n"), file);
|
||||
fputs_filtered (_("Disabling randomization of debuggee's "
|
||||
"virtual address space is unsupported on\n"
|
||||
"this platform.\n"), file);
|
||||
#endif /* !HAVE_PERSONALITY */
|
||||
}
|
||||
|
||||
static void
|
||||
set_disable_randomization (char *args, int from_tty, struct cmd_list_element *c)
|
||||
set_disable_randomization (char *args, int from_tty,
|
||||
struct cmd_list_element *c)
|
||||
{
|
||||
#ifndef HAVE_PERSONALITY
|
||||
error (_("\
|
||||
Disabling randomization of debuggee's virtual address space is unsupported on\n\
|
||||
this platform."));
|
||||
error (_("Disabling randomization of debuggee's "
|
||||
"virtual address space is unsupported on\n"
|
||||
"this platform."));
|
||||
#endif /* !HAVE_PERSONALITY */
|
||||
}
|
||||
|
||||
|
@ -283,8 +287,8 @@ struct simple_pid_list *stopped_pids;
|
|||
|
||||
static int linux_supports_tracefork_flag = -1;
|
||||
|
||||
/* This variable is a tri-state flag: -1 for unknown, 0 if PTRACE_O_TRACESYSGOOD
|
||||
can not be used, 1 if it can. */
|
||||
/* This variable is a tri-state flag: -1 for unknown, 0 if
|
||||
PTRACE_O_TRACESYSGOOD can not be used, 1 if it can. */
|
||||
|
||||
static int linux_supports_tracesysgood_flag = -1;
|
||||
|
||||
|
@ -346,7 +350,8 @@ async_file_mark (void)
|
|||
}
|
||||
|
||||
static void linux_nat_async (void (*callback)
|
||||
(enum inferior_event_type event_type, void *context),
|
||||
(enum inferior_event_type event_type,
|
||||
void *context),
|
||||
void *context);
|
||||
static int linux_nat_async_mask (int mask);
|
||||
static int kill_lwp (int lwpid, int signo);
|
||||
|
@ -473,7 +478,8 @@ linux_test_for_tracefork (int original_pid)
|
|||
else if (ret != child_pid)
|
||||
error (_("linux_test_for_tracefork: waitpid: unexpected result %d."), ret);
|
||||
if (! WIFSTOPPED (status))
|
||||
error (_("linux_test_for_tracefork: waitpid: unexpected status %d."), status);
|
||||
error (_("linux_test_for_tracefork: waitpid: unexpected status %d."),
|
||||
status);
|
||||
|
||||
ret = ptrace (PTRACE_SETOPTIONS, child_pid, 0, PTRACE_O_TRACEFORK);
|
||||
if (ret != 0)
|
||||
|
@ -488,10 +494,11 @@ linux_test_for_tracefork (int original_pid)
|
|||
|
||||
ret = my_waitpid (child_pid, &status, 0);
|
||||
if (ret != child_pid)
|
||||
warning (_("linux_test_for_tracefork: failed to wait for killed child"));
|
||||
warning (_("linux_test_for_tracefork: failed "
|
||||
"to wait for killed child"));
|
||||
else if (!WIFSIGNALED (status))
|
||||
warning (_("linux_test_for_tracefork: unexpected wait status 0x%x from "
|
||||
"killed child"), status);
|
||||
warning (_("linux_test_for_tracefork: unexpected "
|
||||
"wait status 0x%x from killed child"), status);
|
||||
|
||||
restore_child_signals_mask (&prev_mask);
|
||||
return;
|
||||
|
@ -521,7 +528,8 @@ linux_test_for_tracefork (int original_pid)
|
|||
my_waitpid (second_pid, &second_status, 0);
|
||||
ret = ptrace (PTRACE_KILL, second_pid, 0, 0);
|
||||
if (ret != 0)
|
||||
warning (_("linux_test_for_tracefork: failed to kill second child"));
|
||||
warning (_("linux_test_for_tracefork: "
|
||||
"failed to kill second child"));
|
||||
my_waitpid (second_pid, &status, 0);
|
||||
}
|
||||
}
|
||||
|
@ -678,10 +686,12 @@ linux_child_follow_fork (struct target_ops *ops, int follow_child)
|
|||
the parent stays blocked. If we're telling the parent to run
|
||||
in the foreground, the user will not be able to ctrl-c to get
|
||||
back the terminal, effectively hanging the debug session. */
|
||||
fprintf_filtered (gdb_stderr, _("\
|
||||
Can not resume the parent process over vfork in the foreground while\n\
|
||||
holding the child stopped. Try \"set detach-on-fork\" or \
|
||||
\"set schedule-multiple\".\n"));
|
||||
fprintf_filtered (gdb_stderr,
|
||||
_("Can not resume the parent process "
|
||||
"over vfork in the foreground while\n"
|
||||
"holding the child stopped. "
|
||||
"Try \"set detach-on-fork\" or "
|
||||
"\"set schedule-multiple\".\n"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -711,7 +721,8 @@ holding the child stopped. Try \"set detach-on-fork\" or \
|
|||
{
|
||||
target_terminal_ours ();
|
||||
fprintf_filtered (gdb_stdlog,
|
||||
"Detaching after fork from child process %d.\n",
|
||||
"Detaching after fork from "
|
||||
"child process %d.\n",
|
||||
child_pid);
|
||||
}
|
||||
|
||||
|
@ -843,7 +854,8 @@ holding the child stopped. Try \"set detach-on-fork\" or \
|
|||
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LCFF: no VFORK_DONE support, sleeping a bit\n");
|
||||
"LCFF: no VFORK_DONE "
|
||||
"support, sleeping a bit\n");
|
||||
|
||||
usleep (10000);
|
||||
|
||||
|
@ -873,12 +885,14 @@ holding the child stopped. Try \"set detach-on-fork\" or \
|
|||
{
|
||||
target_terminal_ours ();
|
||||
if (has_vforked)
|
||||
fprintf_filtered (gdb_stdlog, _("\
|
||||
Attaching after process %d vfork to child process %d.\n"),
|
||||
fprintf_filtered (gdb_stdlog,
|
||||
_("Attaching after process %d "
|
||||
"vfork to child process %d.\n"),
|
||||
parent_pid, child_pid);
|
||||
else
|
||||
fprintf_filtered (gdb_stdlog, _("\
|
||||
Attaching after process %d fork to child process %d.\n"),
|
||||
fprintf_filtered (gdb_stdlog,
|
||||
_("Attaching after process %d "
|
||||
"fork to child process %d.\n"),
|
||||
parent_pid, child_pid);
|
||||
}
|
||||
|
||||
|
@ -1677,8 +1691,9 @@ get_pending_status (struct lwp_info *lp, int *status)
|
|||
else if (!signal_pass_state (signo))
|
||||
{
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
GPT: lwp %s had signal %s, but it is in no pass state\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"GPT: lwp %s had signal %s, "
|
||||
"but it is in no pass state\n",
|
||||
target_pid_to_str (lp->ptid),
|
||||
target_signal_to_string (signo));
|
||||
}
|
||||
|
@ -1838,10 +1853,12 @@ resume_callback (struct lwp_info *lp, void *data)
|
|||
lp->stopped_by_watchpoint = 0;
|
||||
}
|
||||
else if (lp->stopped && debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog, "RC: Not resuming sibling %s (has pending)\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"RC: Not resuming sibling %s (has pending)\n",
|
||||
target_pid_to_str (lp->ptid));
|
||||
else if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog, "RC: Not resuming sibling %s (not stopped)\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"RC: Not resuming sibling %s (not stopped)\n",
|
||||
target_pid_to_str (lp->ptid));
|
||||
|
||||
return 0;
|
||||
|
@ -2080,7 +2097,8 @@ linux_handle_syscall_trap (struct lwp_info *lp, int stopping)
|
|||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LHST: stopping for %s of syscall %d"
|
||||
" for LWP %ld\n",
|
||||
lp->syscall_state == TARGET_WAITKIND_SYSCALL_ENTRY
|
||||
lp->syscall_state
|
||||
== TARGET_WAITKIND_SYSCALL_ENTRY
|
||||
? "entry" : "return",
|
||||
syscall_number,
|
||||
GET_LWP (lp->ptid));
|
||||
|
@ -2116,7 +2134,8 @@ linux_handle_syscall_trap (struct lwp_info *lp, int stopping)
|
|||
PT_CONTINUE, can not trigger a syscall trace event. */
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LHST: caught syscall event with no syscall catchpoints."
|
||||
"LHST: caught syscall event "
|
||||
"with no syscall catchpoints."
|
||||
" %d for LWP %ld, ignoring\n",
|
||||
syscall_number,
|
||||
GET_LWP (lp->ptid));
|
||||
|
@ -2300,7 +2319,8 @@ linux_handle_extended_wait (struct lwp_info *lp, int status,
|
|||
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LHEW: Got clone event from LWP %ld, resuming\n",
|
||||
"LHEW: Got clone event "
|
||||
"from LWP %ld, resuming\n",
|
||||
GET_LWP (lp->ptid));
|
||||
linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)),
|
||||
0, TARGET_SIGNAL_0);
|
||||
|
@ -2330,8 +2350,9 @@ linux_handle_extended_wait (struct lwp_info *lp, int status,
|
|||
if (current_inferior ()->waiting_for_vfork_done)
|
||||
{
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
LHEW: Got expected PTRACE_EVENT_VFORK_DONE from LWP %ld: stopping\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LHEW: Got expected PTRACE_EVENT_"
|
||||
"VFORK_DONE from LWP %ld: stopping\n",
|
||||
GET_LWP (lp->ptid));
|
||||
|
||||
ourstatus->kind = TARGET_WAITKIND_VFORK_DONE;
|
||||
|
@ -2339,8 +2360,9 @@ LHEW: Got expected PTRACE_EVENT_VFORK_DONE from LWP %ld: stopping\n",
|
|||
}
|
||||
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
LHEW: Got PTRACE_EVENT_VFORK_DONE from LWP %ld: resuming\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LHEW: Got PTRACE_EVENT_VFORK_DONE "
|
||||
"from LWP %ld: resuming\n",
|
||||
GET_LWP (lp->ptid));
|
||||
ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0);
|
||||
return 1;
|
||||
|
@ -2673,7 +2695,8 @@ stop_wait_callback (struct lwp_info *lp, void *data)
|
|||
ptrace (PTRACE_CONT, GET_LWP (lp->ptid), 0, 0);
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"PTRACE_CONT %s, 0, 0 (%s) (discarding SIGINT)\n",
|
||||
"PTRACE_CONT %s, 0, 0 (%s) "
|
||||
"(discarding SIGINT)\n",
|
||||
target_pid_to_str (lp->ptid),
|
||||
errno ? safe_strerror (errno) : "OK");
|
||||
|
||||
|
@ -3428,7 +3451,8 @@ retry:
|
|||
gdb_assert (lp->resumed);
|
||||
|
||||
if (debug_linux_nat)
|
||||
fprintf (stderr, "LWP %ld got an event %06x, leaving pending.\n",
|
||||
fprintf (stderr,
|
||||
"LWP %ld got an event %06x, leaving pending.\n",
|
||||
ptid_get_lwp (lp->ptid), lp->status);
|
||||
|
||||
if (WIFSTOPPED (lp->status))
|
||||
|
@ -3453,8 +3477,9 @@ retry:
|
|||
|
||||
if (debug_linux_nat)
|
||||
fprintf (stderr,
|
||||
"LLW: LWP %ld hit a breakpoint while waiting "
|
||||
"for another process; cancelled it\n",
|
||||
"LLW: LWP %ld hit a breakpoint while"
|
||||
" waiting for another process;"
|
||||
" cancelled it\n",
|
||||
ptid_get_lwp (lp->ptid));
|
||||
}
|
||||
lp->stopped = 1;
|
||||
|
@ -3468,7 +3493,8 @@ retry:
|
|||
else if (WIFEXITED (lp->status) || WIFSIGNALED (lp->status))
|
||||
{
|
||||
if (debug_linux_nat)
|
||||
fprintf (stderr, "Process %ld exited while stopping LWPs\n",
|
||||
fprintf (stderr,
|
||||
"Process %ld exited while stopping LWPs\n",
|
||||
ptid_get_lwp (lp->ptid));
|
||||
|
||||
/* This was the last lwp in the process. Since
|
||||
|
@ -3742,7 +3768,8 @@ linux_nat_wait (struct target_ops *ops,
|
|||
ptid_t event_ptid;
|
||||
|
||||
if (debug_linux_nat)
|
||||
fprintf_unfiltered (gdb_stdlog, "linux_nat_wait: [%s]\n", target_pid_to_str (ptid));
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"linux_nat_wait: [%s]\n", target_pid_to_str (ptid));
|
||||
|
||||
/* Flush the async file first. */
|
||||
if (target_can_async_p ())
|
||||
|
@ -4245,8 +4272,8 @@ linux_nat_do_thread_registers (bfd *obfd, ptid_t ptid,
|
|||
|
||||
if (core_regset_p
|
||||
&& (regset = gdbarch_regset_from_core_section (gdbarch, ".reg",
|
||||
sizeof (gregs))) != NULL
|
||||
&& regset->collect_regset != NULL)
|
||||
sizeof (gregs)))
|
||||
!= NULL && regset->collect_regset != NULL)
|
||||
regset->collect_regset (regset, regcache, -1,
|
||||
&gregs, sizeof (gregs));
|
||||
else
|
||||
|
@ -4258,8 +4285,8 @@ linux_nat_do_thread_registers (bfd *obfd, ptid_t ptid,
|
|||
|
||||
if (core_regset_p
|
||||
&& (regset = gdbarch_regset_from_core_section (gdbarch, ".reg2",
|
||||
sizeof (fpregs))) != NULL
|
||||
&& regset->collect_regset != NULL)
|
||||
sizeof (fpregs)))
|
||||
!= NULL && regset->collect_regset != NULL)
|
||||
regset->collect_regset (regset, regcache, -1,
|
||||
&fpregs, sizeof (fpregs));
|
||||
else
|
||||
|
@ -4714,8 +4741,8 @@ linux_nat_info_proc_cmd (char *args, int from_tty)
|
|||
if (fscanf (procfile, "%ld ", <mp) > 0)
|
||||
printf_filtered (_("stime, children: %ld\n"), ltmp);
|
||||
if (fscanf (procfile, "%ld ", <mp) > 0)
|
||||
printf_filtered (_("jiffies remaining in current time slice: %ld\n"),
|
||||
ltmp);
|
||||
printf_filtered (_("jiffies remaining in current "
|
||||
"time slice: %ld\n"), ltmp);
|
||||
if (fscanf (procfile, "%ld ", <mp) > 0)
|
||||
printf_filtered (_("'nice' value: %ld\n"), ltmp);
|
||||
if (fscanf (procfile, "%lu ", <mp) > 0)
|
||||
|
@ -4725,13 +4752,14 @@ linux_nat_info_proc_cmd (char *args, int from_tty)
|
|||
printf_filtered (_("jiffies until next SIGALRM: %lu\n"),
|
||||
(unsigned long) ltmp);
|
||||
if (fscanf (procfile, "%ld ", <mp) > 0)
|
||||
printf_filtered (_("start time (jiffies since system boot): %ld\n"),
|
||||
ltmp);
|
||||
printf_filtered (_("start time (jiffies since "
|
||||
"system boot): %ld\n"), ltmp);
|
||||
if (fscanf (procfile, "%lu ", <mp) > 0)
|
||||
printf_filtered (_("Virtual memory size: %lu\n"),
|
||||
(unsigned long) ltmp);
|
||||
if (fscanf (procfile, "%lu ", <mp) > 0)
|
||||
printf_filtered (_("Resident set size: %lu\n"), (unsigned long) ltmp);
|
||||
printf_filtered (_("Resident set size: %lu\n"),
|
||||
(unsigned long) ltmp);
|
||||
if (fscanf (procfile, "%lu ", <mp) > 0)
|
||||
printf_filtered (_("rlim: %lu\n"), (unsigned long) ltmp);
|
||||
if (fscanf (procfile, "%lu ", <mp) > 0)
|
||||
|
@ -4740,8 +4768,8 @@ linux_nat_info_proc_cmd (char *args, int from_tty)
|
|||
printf_filtered (_("End of text: 0x%lx\n"), ltmp);
|
||||
if (fscanf (procfile, "%lu ", <mp) > 0)
|
||||
printf_filtered (_("Start of stack: 0x%lx\n"), ltmp);
|
||||
#if 0 /* Don't know how architecture-dependent the rest is...
|
||||
Anyway the signal bitmap info is available from "status". */
|
||||
#if 0 /* Don't know how architecture-dependent the rest is...
|
||||
Anyway the signal bitmap info is available from "status". */
|
||||
if (fscanf (procfile, "%lu ", <mp) > 0) /* FIXME arch? */
|
||||
printf_filtered (_("Kernel stack pointer: 0x%lx\n"), ltmp);
|
||||
if (fscanf (procfile, "%lu ", <mp) > 0) /* FIXME arch? */
|
||||
|
@ -4948,7 +4976,8 @@ add_line_to_sigset (const char *line, sigset_t *sigs)
|
|||
SIGS to match. */
|
||||
|
||||
void
|
||||
linux_proc_pending_signals (int pid, sigset_t *pending, sigset_t *blocked, sigset_t *ignored)
|
||||
linux_proc_pending_signals (int pid, sigset_t *pending,
|
||||
sigset_t *blocked, sigset_t *ignored)
|
||||
{
|
||||
FILE *procfile;
|
||||
char buffer[MAXPATHLEN], fname[MAXPATHLEN];
|
||||
|
@ -5012,11 +5041,11 @@ linux_nat_xfer_osdata (struct target_ops *ops, enum target_object object,
|
|||
obstack_init (&obstack);
|
||||
obstack_grow_str (&obstack, "<osdata type=\"types\">\n");
|
||||
|
||||
obstack_xml_printf (
|
||||
&obstack,
|
||||
obstack_xml_printf (&obstack,
|
||||
"<item>"
|
||||
"<column name=\"Type\">processes</column>"
|
||||
"<column name=\"Description\">Listing of all processes</column>"
|
||||
"<column name=\"Description\">"
|
||||
"Listing of all processes</column>"
|
||||
"</item>");
|
||||
|
||||
obstack_grow_str0 (&obstack, "</osdata>\n");
|
||||
|
@ -5490,12 +5519,13 @@ linux_nat_stop_lwp (struct lwp_info *lwp, void *data)
|
|||
if (debug_linux_nat)
|
||||
{
|
||||
if (find_thread_ptid (lwp->ptid)->stop_requested)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
LNSL: already stopped/stop_requested %s\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LNSL: already stopped/stop_requested %s\n",
|
||||
target_pid_to_str (lwp->ptid));
|
||||
else
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
LNSL: already stopped/no stop_requested yet %s\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"LNSL: already stopped/no "
|
||||
"stop_requested yet %s\n",
|
||||
target_pid_to_str (lwp->ptid));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,7 +122,8 @@ int thread_db_attach_lwp (ptid_t ptid);
|
|||
extern void lin_thread_get_thread_signals (sigset_t *mask);
|
||||
|
||||
/* Find process PID's pending signal set from /proc/pid/status. */
|
||||
void linux_proc_pending_signals (int pid, sigset_t *pending, sigset_t *blocked, sigset_t *ignored);
|
||||
void linux_proc_pending_signals (int pid, sigset_t *pending,
|
||||
sigset_t *blocked, sigset_t *ignored);
|
||||
|
||||
/* Return the TGID of LWPID from /proc/pid/status. Returns -1 if not
|
||||
found. */
|
||||
|
|
|
@ -503,7 +503,8 @@ verbose_dlsym (void *handle, const char *name)
|
|||
{
|
||||
void *sym = dlsym (handle, name);
|
||||
if (sym == NULL)
|
||||
warning (_("Symbol \"%s\" not found in libthread_db: %s"), name, dlerror ());
|
||||
warning (_("Symbol \"%s\" not found in libthread_db: %s"),
|
||||
name, dlerror ());
|
||||
return sym;
|
||||
}
|
||||
|
||||
|
@ -659,7 +660,8 @@ try_thread_db_load_1 (struct thread_db_info *info)
|
|||
err = info->td_init_p ();
|
||||
if (err != TD_OK)
|
||||
{
|
||||
warning (_("Cannot initialize libthread_db: %s"), thread_db_err_str (err));
|
||||
warning (_("Cannot initialize libthread_db: %s"),
|
||||
thread_db_err_str (err));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -698,7 +700,8 @@ try_thread_db_load_1 (struct thread_db_info *info)
|
|||
if (info->td_ta_map_id2thr_p == NULL)
|
||||
return 0;
|
||||
|
||||
info->td_ta_map_lwp2thr_p = verbose_dlsym (info->handle, "td_ta_map_lwp2thr");
|
||||
info->td_ta_map_lwp2thr_p = verbose_dlsym (info->handle,
|
||||
"td_ta_map_lwp2thr");
|
||||
if (info->td_ta_map_lwp2thr_p == NULL)
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -840,15 +840,14 @@ macho_symfile_offsets (struct objfile *objfile,
|
|||
static const struct sym_fns macho_sym_fns = {
|
||||
bfd_target_mach_o_flavour,
|
||||
|
||||
macho_new_init, /* sym_new_init: init anything gbl to entire symtab */
|
||||
macho_symfile_init, /* sym_init: read initial info, setup for sym_read() */
|
||||
macho_symfile_read, /* sym_read: read a symbol file into symtab */
|
||||
macho_symfile_finish, /* sym_finish: finished with file, cleanup */
|
||||
macho_symfile_offsets, /* sym_offsets: xlate external to internal form */
|
||||
default_symfile_segments, /* sym_segments: Get segment information from
|
||||
a file. */
|
||||
NULL, /* sym_read_linetable */
|
||||
macho_symfile_relocate, /* sym_relocate: Relocate a debug section. */
|
||||
macho_new_init, /* init anything gbl to entire symtab */
|
||||
macho_symfile_init, /* read initial info, setup for sym_read() */
|
||||
macho_symfile_read, /* read a symbol file into symtab */
|
||||
macho_symfile_finish, /* finished with file, cleanup */
|
||||
macho_symfile_offsets, /* xlate external to internal form */
|
||||
default_symfile_segments, /* Get segment information from a file. */
|
||||
NULL,
|
||||
macho_symfile_relocate, /* Relocate a debug section. */
|
||||
&psym_functions
|
||||
};
|
||||
|
||||
|
@ -858,9 +857,9 @@ _initialize_machoread ()
|
|||
add_symtab_fns (&macho_sym_fns);
|
||||
|
||||
add_setshow_zinteger_cmd ("mach-o", class_obscure,
|
||||
&mach_o_debug_level, _("\
|
||||
Set if printing Mach-O symbols processing."), _("\
|
||||
Show if printing Mach-O symbols processing."), NULL,
|
||||
NULL, NULL,
|
||||
&mach_o_debug_level,
|
||||
_("Set if printing Mach-O symbols processing."),
|
||||
_("Show if printing Mach-O symbols processing."),
|
||||
NULL, NULL, NULL,
|
||||
&setdebuglist, &showdebuglist);
|
||||
}
|
||||
|
|
|
@ -902,7 +902,8 @@ find_parameter (const struct macro_buffer *tok,
|
|||
return -1;
|
||||
|
||||
for (i = 0; i < argc; ++i)
|
||||
if (tok->len == strlen (argv[i]) && ! memcmp (tok->text, argv[i], tok->len))
|
||||
if (tok->len == strlen (argv[i])
|
||||
&& !memcmp (tok->text, argv[i], tok->len))
|
||||
return i;
|
||||
|
||||
if (is_varargs && tok->len == va_arg_name->len
|
||||
|
|
|
@ -470,8 +470,8 @@ macro_include (struct macro_source_file *source,
|
|||
|
||||
First, squawk. */
|
||||
complaint (&symfile_complaints,
|
||||
_("both `%s' and `%s' allegedly #included at %s:%d"), included,
|
||||
(*link)->filename, source->filename, line);
|
||||
_("both `%s' and `%s' allegedly #included at %s:%d"),
|
||||
included, (*link)->filename, source->filename, line);
|
||||
|
||||
/* Now, choose a new, unoccupied line number for this
|
||||
#inclusion, after the alleged #inclusion line. */
|
||||
|
@ -729,7 +729,8 @@ check_for_redefinition (struct macro_source_file *source, int line,
|
|||
if (! same)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("macro `%s' redefined at %s:%d; original definition at %s:%d"),
|
||||
_("macro `%s' redefined at %s:%d; "
|
||||
"original definition at %s:%d"),
|
||||
name, source->filename, line,
|
||||
found_key->start_file->filename, found_key->start_line);
|
||||
}
|
||||
|
|
41
gdb/main.c
41
gdb/main.c
|
@ -335,7 +335,8 @@ captured_main (void *data)
|
|||
/* Don't use *_filtered or warning() (which relies on
|
||||
current_target) until after initialize_all_files(). */
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
_("%s: warning: error finding working directory: %s\n"),
|
||||
_("%s: warning: error finding "
|
||||
"working directory: %s\n"),
|
||||
argv[0], safe_strerror (errno));
|
||||
|
||||
current_directory = gdb_dirbuf;
|
||||
|
@ -564,8 +565,9 @@ captured_main (void *data)
|
|||
|
||||
if (!gdbtk_test (optarg))
|
||||
{
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
_("%s: unable to load tclcommand file \"%s\""),
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
_("%s: unable to load "
|
||||
"tclcommand file \"%s\""),
|
||||
argv[0], optarg);
|
||||
exit (1);
|
||||
}
|
||||
|
@ -628,9 +630,9 @@ captured_main (void *data)
|
|||
/* Don't use *_filtered or warning() (which relies on
|
||||
current_target) until after initialize_all_files(). */
|
||||
|
||||
fprintf_unfiltered
|
||||
(gdb_stderr,
|
||||
_("warning: could not set timeout limit to `%s'.\n"), optarg);
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
_("warning: could not set "
|
||||
"timeout limit to `%s'.\n"), optarg);
|
||||
else
|
||||
remote_timeout = i;
|
||||
}
|
||||
|
@ -638,7 +640,8 @@ captured_main (void *data)
|
|||
|
||||
case '?':
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
_("Use `%s --help' for a complete list of options.\n"),
|
||||
_("Use `%s --help' for a "
|
||||
"complete list of options.\n"),
|
||||
argv[0]);
|
||||
exit (1);
|
||||
}
|
||||
|
@ -668,7 +671,8 @@ captured_main (void *data)
|
|||
if (optind >= argc)
|
||||
{
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
_("%s: `--args' specified but no program specified\n"),
|
||||
_("%s: `--args' specified but "
|
||||
"no program specified\n"),
|
||||
argv[0]);
|
||||
exit (1);
|
||||
}
|
||||
|
@ -703,8 +707,9 @@ captured_main (void *data)
|
|||
/* Any argument left on the command line is unexpected and
|
||||
will be ignored. Inform the user. */
|
||||
if (optind < argc)
|
||||
fprintf_unfiltered (gdb_stderr, _("\
|
||||
Excess command line arguments ignored. (%s%s)\n"),
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
_("Excess command line "
|
||||
"arguments ignored. (%s%s)\n"),
|
||||
argv[optind],
|
||||
(optind == argc - 1) ? "" : " ...");
|
||||
}
|
||||
|
@ -830,20 +835,24 @@ Excess command line arguments ignored. (%s%s)\n"),
|
|||
/* The exec file and the symbol-file are the same. If we can't
|
||||
open it, better only print one error message.
|
||||
catch_command_errors returns non-zero on success! */
|
||||
if (catch_command_errors (exec_file_attach, execarg, !batch_flag, RETURN_MASK_ALL))
|
||||
catch_command_errors (symbol_file_add_main, symarg, !batch_flag, RETURN_MASK_ALL);
|
||||
if (catch_command_errors (exec_file_attach, execarg,
|
||||
!batch_flag, RETURN_MASK_ALL))
|
||||
catch_command_errors (symbol_file_add_main, symarg,
|
||||
!batch_flag, RETURN_MASK_ALL);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (execarg != NULL)
|
||||
catch_command_errors (exec_file_attach, execarg, !batch_flag, RETURN_MASK_ALL);
|
||||
catch_command_errors (exec_file_attach, execarg,
|
||||
!batch_flag, RETURN_MASK_ALL);
|
||||
if (symarg != NULL)
|
||||
catch_command_errors (symbol_file_add_main, symarg, !batch_flag, RETURN_MASK_ALL);
|
||||
catch_command_errors (symbol_file_add_main, symarg,
|
||||
!batch_flag, RETURN_MASK_ALL);
|
||||
}
|
||||
|
||||
if (corearg && pidarg)
|
||||
error (_("\
|
||||
Can't attach to process and specify a core file at the same time."));
|
||||
error (_("Can't attach to process and specify "
|
||||
"a core file at the same time."));
|
||||
|
||||
if (corearg != NULL)
|
||||
catch_command_errors (core_file_command, corearg,
|
||||
|
|
30
gdb/maint.c
30
gdb/maint.c
|
@ -91,7 +91,8 @@ show_watchdog (struct ui_file *file, int from_tty,
|
|||
static void
|
||||
maintenance_command (char *args, int from_tty)
|
||||
{
|
||||
printf_unfiltered (_("\"maintenance\" must be followed by the name of a maintenance command.\n"));
|
||||
printf_unfiltered (_("\"maintenance\" must be followed by "
|
||||
"the name of a maintenance command.\n"));
|
||||
help_list (maintenancelist, "maintenance ", -1, gdb_stdout);
|
||||
}
|
||||
|
||||
|
@ -150,7 +151,8 @@ maintenance_demangle (char *args, int from_tty)
|
|||
|
||||
if (args == NULL || *args == '\0')
|
||||
{
|
||||
printf_unfiltered (_("\"maintenance demangle\" takes an argument to demangle.\n"));
|
||||
printf_unfiltered (_("\"maintenance demangle\" takes "
|
||||
"an argument to demangle.\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -193,7 +195,8 @@ maintenance_space_display (char *args, int from_tty)
|
|||
static void
|
||||
maintenance_info_command (char *arg, int from_tty)
|
||||
{
|
||||
printf_unfiltered (_("\"maintenance info\" must be followed by the name of an info command.\n"));
|
||||
printf_unfiltered (_("\"maintenance info\" must be followed "
|
||||
"by the name of an info command.\n"));
|
||||
help_list (maintenanceinfolist, "maintenance info ", -1, gdb_stdout);
|
||||
}
|
||||
|
||||
|
@ -438,7 +441,8 @@ maintenance_print_architecture (char *args, int from_tty)
|
|||
static void
|
||||
maintenance_print_command (char *arg, int from_tty)
|
||||
{
|
||||
printf_unfiltered (_("\"maintenance print\" must be followed by the name of a print command.\n"));
|
||||
printf_unfiltered (_("\"maintenance print\" must be followed "
|
||||
"by the name of a print command.\n"));
|
||||
help_list (maintenanceprintlist, "maintenance print ", -1, gdb_stdout);
|
||||
}
|
||||
|
||||
|
@ -493,7 +497,8 @@ maintenance_translate_address (char *arg, int from_tty)
|
|||
if (sym)
|
||||
{
|
||||
const char *symbol_name = SYMBOL_PRINT_NAME (sym);
|
||||
const char *symbol_offset = pulongest (address - SYMBOL_VALUE_ADDRESS (sym));
|
||||
const char *symbol_offset
|
||||
= pulongest (address - SYMBOL_VALUE_ADDRESS (sym));
|
||||
|
||||
sect = SYMBOL_OBJ_SECTION(sym);
|
||||
if (sect != NULL)
|
||||
|
@ -509,7 +514,8 @@ maintenance_translate_address (char *arg, int from_tty)
|
|||
|
||||
if (MULTI_OBJFILE_P ())
|
||||
printf_filtered (_("%s + %s in section %s of %s\n"),
|
||||
symbol_name, symbol_offset, section_name, obj_name);
|
||||
symbol_name, symbol_offset,
|
||||
section_name, obj_name);
|
||||
else
|
||||
printf_filtered (_("%s + %s in section %s\n"),
|
||||
symbol_name, symbol_offset, section_name);
|
||||
|
@ -649,7 +655,8 @@ struct cmd_list_element *maintenance_show_cmdlist;
|
|||
static void
|
||||
maintenance_set_cmd (char *args, int from_tty)
|
||||
{
|
||||
printf_unfiltered (_("\"maintenance set\" must be followed by the name of a set command.\n"));
|
||||
printf_unfiltered (_("\"maintenance set\" must be followed "
|
||||
"by the name of a set command.\n"));
|
||||
help_list (maintenance_set_cmdlist, "maintenance set ", -1, gdb_stdout);
|
||||
}
|
||||
|
||||
|
@ -691,7 +698,8 @@ mcleanup_wrapper (void)
|
|||
}
|
||||
|
||||
static void
|
||||
maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *c)
|
||||
maintenance_set_profile_cmd (char *args, int from_tty,
|
||||
struct cmd_list_element *c)
|
||||
{
|
||||
if (maintenance_profile_p == profiling_state)
|
||||
return;
|
||||
|
@ -724,7 +732,8 @@ maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *
|
|||
}
|
||||
#else
|
||||
static void
|
||||
maintenance_set_profile_cmd (char *args, int from_tty, struct cmd_list_element *c)
|
||||
maintenance_set_profile_cmd (char *args, int from_tty,
|
||||
struct cmd_list_element *c)
|
||||
{
|
||||
error (_("Profiling support is not available on this system."));
|
||||
}
|
||||
|
@ -873,7 +882,8 @@ Takes an optional file parameter."),
|
|||
_("Check consistency of psymtabs and symtabs."),
|
||||
&maintenancelist);
|
||||
|
||||
add_cmd ("translate-address", class_maintenance, maintenance_translate_address,
|
||||
add_cmd ("translate-address", class_maintenance,
|
||||
maintenance_translate_address,
|
||||
_("Translate a section name and address to a symbol."),
|
||||
&maintenancelist);
|
||||
|
||||
|
|
396
gdb/mdebugread.c
396
gdb/mdebugread.c
|
@ -142,7 +142,8 @@ basic_type_complaint (int arg1, const char *arg2)
|
|||
static void
|
||||
bad_tag_guess_complaint (const char *arg1)
|
||||
{
|
||||
complaint (&symfile_complaints, _("guessed tag type of %s incorrectly"), arg1);
|
||||
complaint (&symfile_complaints,
|
||||
_("guessed tag type of %s incorrectly"), arg1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -372,9 +373,11 @@ mdebug_build_psymtabs (struct objfile *objfile,
|
|||
if (compare_glevel (max_glevel, GLEVEL_2) < 0)
|
||||
{
|
||||
if (max_gdbinfo == 0)
|
||||
printf_unfiltered (_("\n%s not compiled with -g, debugging support is limited.\n"),
|
||||
printf_unfiltered (_("\n%s not compiled with -g, "
|
||||
"debugging support is limited.\n"),
|
||||
objfile->name);
|
||||
printf_unfiltered (_("You should compile with -g2 or -g3 for best debugging support.\n"));
|
||||
printf_unfiltered (_("You should compile with -g2 or "
|
||||
"-g3 for best debugging support.\n"));
|
||||
gdb_flush (gdb_stdout);
|
||||
}
|
||||
#endif
|
||||
|
@ -935,7 +938,8 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
|
|||
|
||||
default:
|
||||
complaint (&symfile_complaints,
|
||||
_("declaration block contains unhandled symbol type %d"),
|
||||
_("declaration block contains "
|
||||
"unhandled symbol type %d"),
|
||||
tsym.st);
|
||||
}
|
||||
}
|
||||
|
@ -998,8 +1002,8 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
|
|||
if (sh->iss == 0 || name[0] == '.' || name[0] == '\0')
|
||||
TYPE_TAG_NAME (t) = NULL;
|
||||
else
|
||||
TYPE_TAG_NAME (t) = obconcat (¤t_objfile->objfile_obstack, name,
|
||||
(char *) NULL);
|
||||
TYPE_TAG_NAME (t) = obconcat (¤t_objfile->objfile_obstack,
|
||||
name, (char *) NULL);
|
||||
|
||||
TYPE_CODE (t) = type_code;
|
||||
TYPE_LENGTH (t) = sh->value;
|
||||
|
@ -1227,7 +1231,8 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
|
|||
FIELD_NAME (*f) = name;
|
||||
SET_FIELD_BITPOS (*f, sh->value);
|
||||
bitsize = 0;
|
||||
FIELD_TYPE (*f) = parse_type (cur_fd, ax, sh->index, &bitsize, bigend, name);
|
||||
FIELD_TYPE (*f) = parse_type (cur_fd, ax, sh->index,
|
||||
&bitsize, bigend, name);
|
||||
FIELD_BITSIZE (*f) = bitsize;
|
||||
break;
|
||||
|
||||
|
@ -1592,7 +1597,8 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
|
|||
else if (t->bt == btEnum)
|
||||
;
|
||||
else
|
||||
complaint (&symfile_complaints, _("can't handle TIR fBitfield for %s"),
|
||||
complaint (&symfile_complaints,
|
||||
_("can't handle TIR fBitfield for %s"),
|
||||
sym_name);
|
||||
}
|
||||
else
|
||||
|
@ -1689,8 +1695,9 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
|
|||
TYPE_TAG_NAME (tp) = NULL;
|
||||
else if (TYPE_TAG_NAME (tp) == NULL
|
||||
|| strcmp (TYPE_TAG_NAME (tp), name) != 0)
|
||||
TYPE_TAG_NAME (tp) = obsavestring (name, strlen (name),
|
||||
¤t_objfile->objfile_obstack);
|
||||
TYPE_TAG_NAME (tp)
|
||||
= obsavestring (name, strlen (name),
|
||||
¤t_objfile->objfile_obstack);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1784,7 +1791,8 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
|
|||
|
||||
/* Complain for illegal continuations due to corrupt aux entries. */
|
||||
if (t->continued)
|
||||
complaint (&symfile_complaints, _("illegal TIR continued for %s"), sym_name);
|
||||
complaint (&symfile_complaints,
|
||||
_("illegal TIR continued for %s"), sym_name);
|
||||
|
||||
return tp;
|
||||
}
|
||||
|
@ -1847,7 +1855,8 @@ upgrade_type (int fd, struct type **tpp, int tq, union aux_ext *ax, int bigend,
|
|||
if (TYPE_CODE (indx) != TYPE_CODE_INT)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("illegal array index type for %s, assuming int"), sym_name);
|
||||
_("illegal array index type for %s, assuming int"),
|
||||
sym_name);
|
||||
indx = objfile_type (current_objfile)->builtin_int;
|
||||
}
|
||||
|
||||
|
@ -2145,7 +2154,8 @@ parse_external (EXTR *es, int bigend, struct section_offsets *section_offsets,
|
|||
|
||||
/* Note that the case of a symbol with indexNil must be handled
|
||||
anyways by parse_symbol(). */
|
||||
parse_symbol (&es->asym, ax, (char *) NULL, bigend, section_offsets, objfile);
|
||||
parse_symbol (&es->asym, ax, (char *) NULL,
|
||||
bigend, section_offsets, objfile);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -2231,7 +2241,8 @@ static void
|
|||
function_outside_compilation_unit_complaint (const char *arg1)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("function `%s' appears to be defined outside of all compilation units"),
|
||||
_("function `%s' appears to be defined "
|
||||
"outside of all compilation units"),
|
||||
arg1);
|
||||
}
|
||||
|
||||
|
@ -2399,7 +2410,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
/* Allocate the map FDR -> PST.
|
||||
Minor hack: -O3 images might claim some global data belongs
|
||||
to FDR -1. We`ll go along with that */
|
||||
fdr_to_pst = (struct pst_map *) xzalloc ((hdr->ifdMax + 1) * sizeof *fdr_to_pst);
|
||||
fdr_to_pst = (struct pst_map *)
|
||||
xzalloc ((hdr->ifdMax + 1) * sizeof *fdr_to_pst);
|
||||
old_chain = make_cleanup (xfree, fdr_to_pst);
|
||||
fdr_to_pst++;
|
||||
{
|
||||
|
@ -2493,8 +2505,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
if (ext_in->ifd < -1 || ext_in->ifd >= hdr->ifdMax)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("bad ifd for external symbol: %d (max %ld)"), ext_in->ifd,
|
||||
hdr->ifdMax);
|
||||
_("bad ifd for external symbol: %d (max %ld)"),
|
||||
ext_in->ifd, hdr->ifdMax);
|
||||
continue;
|
||||
}
|
||||
if (ext_in->asym.iss < 0 || ext_in->asym.iss >= hdr->issExtMax)
|
||||
|
@ -2521,12 +2533,14 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
{
|
||||
case stProc:
|
||||
/* Beginnning of Procedure */
|
||||
svalue += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
||||
svalue += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_TEXT (objfile));
|
||||
break;
|
||||
case stStaticProc:
|
||||
/* Load time only static procs */
|
||||
ms_type = mst_file_text;
|
||||
svalue += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
||||
svalue += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_TEXT (objfile));
|
||||
break;
|
||||
case stGlobal:
|
||||
/* External symbol */
|
||||
|
@ -2539,12 +2553,14 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
else if (SC_IS_DATA (ext_in->asym.sc))
|
||||
{
|
||||
ms_type = mst_data;
|
||||
svalue += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
|
||||
svalue += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_DATA (objfile));
|
||||
}
|
||||
else if (SC_IS_BSS (ext_in->asym.sc))
|
||||
{
|
||||
ms_type = mst_bss;
|
||||
svalue += ANOFFSET (objfile->section_offsets, SECT_OFF_BSS (objfile));
|
||||
svalue += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_BSS (objfile));
|
||||
}
|
||||
else if (SC_IS_SBSS (ext_in->asym.sc))
|
||||
{
|
||||
|
@ -2584,7 +2600,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
continue;
|
||||
|
||||
ms_type = mst_file_text;
|
||||
svalue += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
||||
svalue += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_TEXT (objfile));
|
||||
}
|
||||
else if (SC_IS_DATA (ext_in->asym.sc))
|
||||
{
|
||||
|
@ -2592,7 +2609,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
continue;
|
||||
|
||||
ms_type = mst_file_data;
|
||||
svalue += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
|
||||
svalue += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_DATA (objfile));
|
||||
}
|
||||
else if (SC_IS_BSS (ext_in->asym.sc))
|
||||
{
|
||||
|
@ -2600,7 +2618,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
continue;
|
||||
|
||||
ms_type = mst_file_bss;
|
||||
svalue += ANOFFSET (objfile->section_offsets, SECT_OFF_BSS (objfile));
|
||||
svalue += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_BSS (objfile));
|
||||
}
|
||||
else if (SC_IS_SBSS (ext_in->asym.sc))
|
||||
{
|
||||
|
@ -2655,7 +2674,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
{
|
||||
textlow = fh->adr;
|
||||
if (relocatable || textlow != 0)
|
||||
textlow += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
||||
textlow += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_TEXT (objfile));
|
||||
}
|
||||
else
|
||||
textlow = 0;
|
||||
|
@ -2743,7 +2763,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
CORE_ADDR procaddr;
|
||||
long isym;
|
||||
|
||||
sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
||||
sh.value += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_TEXT (objfile));
|
||||
if (sh.st == stStaticProc)
|
||||
{
|
||||
namestring = debug_info->ss + fh->issBase + sh.iss;
|
||||
|
@ -2790,7 +2811,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
case scPData:
|
||||
case scXData:
|
||||
namestring = debug_info->ss + fh->issBase + sh.iss;
|
||||
sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
|
||||
sh.value += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_DATA (objfile));
|
||||
record_minimal_symbol (namestring, sh.value,
|
||||
mst_file_data, sh.sc,
|
||||
objfile);
|
||||
|
@ -2800,7 +2822,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
/* FIXME! Shouldn't this use cases for bss,
|
||||
then have the default be abs? */
|
||||
namestring = debug_info->ss + fh->issBase + sh.iss;
|
||||
sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_BSS (objfile));
|
||||
sh.value += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_BSS (objfile));
|
||||
record_minimal_symbol (namestring, sh.value,
|
||||
mst_file_bss, sh.sc,
|
||||
objfile);
|
||||
|
@ -2851,25 +2874,26 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
{
|
||||
char *p;
|
||||
|
||||
/*
|
||||
* Standard, external, non-debugger, symbols
|
||||
*/
|
||||
/* Standard, external, non-debugger, symbols. */
|
||||
|
||||
case N_TEXT | N_EXT:
|
||||
case N_NBTEXT | N_EXT:
|
||||
sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
||||
sh.value += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_TEXT (objfile));
|
||||
goto record_it;
|
||||
|
||||
case N_DATA | N_EXT:
|
||||
case N_NBDATA | N_EXT:
|
||||
sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
|
||||
sh.value += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_DATA (objfile));
|
||||
goto record_it;
|
||||
|
||||
case N_BSS:
|
||||
case N_BSS | N_EXT:
|
||||
case N_NBBSS | N_EXT:
|
||||
case N_SETV | N_EXT: /* FIXME, is this in BSS? */
|
||||
sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_BSS (objfile));
|
||||
sh.value += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_BSS (objfile));
|
||||
goto record_it;
|
||||
|
||||
case N_ABS | N_EXT:
|
||||
|
@ -2880,10 +2904,11 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
|
||||
case N_NBTEXT:
|
||||
|
||||
/* We need to be able to deal with both N_FN or N_TEXT,
|
||||
because we have no way of knowing whether the sys-supplied ld
|
||||
or GNU ld was used to make the executable. Sequents throw
|
||||
in another wrinkle -- they renumbered N_FN. */
|
||||
/* We need to be able to deal with both N_FN or
|
||||
N_TEXT, because we have no way of knowing
|
||||
whether the sys-supplied ld or GNU ld was used
|
||||
to make the executable. Sequents throw in
|
||||
another wrinkle -- they renumbered N_FN. */
|
||||
|
||||
case N_FN:
|
||||
case N_FN_SEQ:
|
||||
|
@ -2891,11 +2916,12 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
continue;
|
||||
|
||||
case N_DATA:
|
||||
sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
|
||||
sh.value += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_DATA (objfile));
|
||||
goto record_it;
|
||||
|
||||
case N_UNDF | N_EXT:
|
||||
continue; /* Just undefined, not COMMON */
|
||||
continue; /* Just undefined, not COMMON */
|
||||
|
||||
case N_UNDF:
|
||||
continue;
|
||||
|
@ -2937,13 +2963,14 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
char *p;
|
||||
int prev_textlow_not_set;
|
||||
|
||||
valu = sh.value + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
||||
valu = sh.value + ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_TEXT (objfile));
|
||||
|
||||
prev_textlow_not_set = textlow_not_set;
|
||||
|
||||
/* A zero value is probably an indication for the SunPRO 3.0
|
||||
compiler. end_psymtab explicitly tests for zero, so
|
||||
don't relocate it. */
|
||||
/* A zero value is probably an indication for the
|
||||
SunPRO 3.0 compiler. end_psymtab explicitly tests
|
||||
for zero, so don't relocate it. */
|
||||
|
||||
if (sh.value == 0
|
||||
&& gdbarch_sofun_address_maybe_missing (gdbarch))
|
||||
|
@ -2975,22 +3002,26 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
/* SET_NAMESTRING ();*/
|
||||
namestring = stabstring;
|
||||
|
||||
/* Null name means end of .o file. Don't start a new one. */
|
||||
/* Null name means end of .o file. Don't start a new
|
||||
one. */
|
||||
if (*namestring == '\000')
|
||||
continue;
|
||||
|
||||
/* Some compilers (including gcc) emit a pair of initial N_SOs.
|
||||
The first one is a directory name; the second the file name.
|
||||
If pst exists, is empty, and has a filename ending in '/',
|
||||
we assume the previous N_SO was a directory name. */
|
||||
/* Some compilers (including gcc) emit a pair of
|
||||
initial N_SOs. The first one is a directory name;
|
||||
the second the file name. If pst exists, is
|
||||
empty, and has a filename ending in '/', we assume
|
||||
the previous N_SO was a directory name. */
|
||||
|
||||
p = strrchr (namestring, '/');
|
||||
if (p && *(p + 1) == '\000')
|
||||
continue; /* Simply ignore directory name SOs */
|
||||
continue; /* Simply ignore directory
|
||||
name SOs */
|
||||
|
||||
/* Some other compilers (C++ ones in particular) emit useless
|
||||
SOs for non-existant .c files. We ignore all subsequent SOs that
|
||||
immediately follow the first. */
|
||||
/* Some other compilers (C++ ones in particular) emit
|
||||
useless SOs for non-existant .c files. We ignore
|
||||
all subsequent SOs that immediately follow the
|
||||
first. */
|
||||
|
||||
if (!pst)
|
||||
pst = save_pst;
|
||||
|
@ -3009,27 +3040,31 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
/* SET_NAMESTRING ();*/
|
||||
namestring = stabstring;
|
||||
|
||||
tmp_language = deduce_language_from_filename (namestring);
|
||||
tmp_language
|
||||
= deduce_language_from_filename (namestring);
|
||||
|
||||
/* Only change the psymtab's language if we've learned
|
||||
something useful (eg. tmp_language is not language_unknown).
|
||||
In addition, to match what start_subfile does, never change
|
||||
from C++ to C. */
|
||||
/* Only change the psymtab's language if we've
|
||||
learned something useful (eg. tmp_language is not
|
||||
language_unknown). In addition, to match what
|
||||
start_subfile does, never change from C++ to
|
||||
C. */
|
||||
if (tmp_language != language_unknown
|
||||
&& (tmp_language != language_c
|
||||
|| psymtab_language != language_cplus))
|
||||
psymtab_language = tmp_language;
|
||||
|
||||
/* In C++, one may expect the same filename to come round many
|
||||
times, when code is coming alternately from the main file
|
||||
and from inline functions in other files. So I check to see
|
||||
if this is a file we've seen before -- either the main
|
||||
source file, or a previously included file.
|
||||
/* In C++, one may expect the same filename to come
|
||||
round many times, when code is coming alternately
|
||||
from the main file and from inline functions in
|
||||
other files. So I check to see if this is a file
|
||||
we've seen before -- either the main source file,
|
||||
or a previously included file.
|
||||
|
||||
This seems to be a lot of time to be spending on N_SOL, but
|
||||
things like "break c-exp.y:435" need to work (I
|
||||
suppose the psymtab_include_list could be hashed or put
|
||||
in a binary tree, if profiling shows this is a major hog). */
|
||||
This seems to be a lot of time to be spending on
|
||||
N_SOL, but things like "break c-exp.y:435" need to
|
||||
work (I suppose the psymtab_include_list could be
|
||||
hashed or put in a binary tree, if profiling shows
|
||||
this is a major hog). */
|
||||
if (pst && strcmp (namestring, pst->filename) == 0)
|
||||
continue;
|
||||
|
||||
|
@ -3060,43 +3095,46 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
}
|
||||
continue;
|
||||
}
|
||||
case N_LSYM: /* Typedef or automatic variable. */
|
||||
case N_STSYM: /* Data seg var -- static */
|
||||
case N_LCSYM: /* BSS " */
|
||||
case N_ROSYM: /* Read-only data seg var -- static. */
|
||||
case N_NBSTS: /* Gould nobase. */
|
||||
case N_NBLCS: /* symbols. */
|
||||
case N_LSYM: /* Typedef or automatic variable. */
|
||||
case N_STSYM: /* Data seg var -- static */
|
||||
case N_LCSYM: /* BSS " */
|
||||
case N_ROSYM: /* Read-only data seg var -- static. */
|
||||
case N_NBSTS: /* Gould nobase. */
|
||||
case N_NBLCS: /* symbols. */
|
||||
case N_FUN:
|
||||
case N_GSYM: /* Global (extern) variable; can be
|
||||
data or bss (sigh FIXME). */
|
||||
case N_GSYM: /* Global (extern) variable; can be
|
||||
data or bss (sigh FIXME). */
|
||||
|
||||
/* Following may probably be ignored; I'll leave them here
|
||||
for now (until I do Pascal and Modula 2 extensions). */
|
||||
|
||||
case N_PC: /* I may or may not need this; I
|
||||
suspect not. */
|
||||
case N_M2C: /* I suspect that I can ignore this here. */
|
||||
case N_SCOPE: /* Same. */
|
||||
case N_PC: /* I may or may not need this; I
|
||||
suspect not. */
|
||||
case N_M2C: /* I suspect that I can ignore this
|
||||
here. */
|
||||
case N_SCOPE: /* Same. */
|
||||
|
||||
/* SET_NAMESTRING ();*/
|
||||
namestring = stabstring;
|
||||
p = (char *) strchr (namestring, ':');
|
||||
if (!p)
|
||||
continue; /* Not a debugging symbol. */
|
||||
continue; /* Not a debugging symbol. */
|
||||
|
||||
|
||||
|
||||
/* Main processing section for debugging symbols which
|
||||
the initial read through the symbol tables needs to worry
|
||||
about. If we reach this point, the symbol which we are
|
||||
considering is definitely one we are interested in.
|
||||
p must also contain the (valid) index into the namestring
|
||||
which indicates the debugging type symbol. */
|
||||
the initial read through the symbol tables needs to
|
||||
worry about. If we reach this point, the symbol
|
||||
which we are considering is definitely one we are
|
||||
interested in. p must also contain the (valid)
|
||||
index into the namestring which indicates the
|
||||
debugging type symbol. */
|
||||
|
||||
switch (p[1])
|
||||
{
|
||||
case 'S':
|
||||
sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
|
||||
sh.value += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_DATA (objfile));
|
||||
|
||||
if (gdbarch_static_transform_name_p (gdbarch))
|
||||
namestring = gdbarch_static_transform_name
|
||||
|
@ -3109,7 +3147,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
psymtab_language, objfile);
|
||||
continue;
|
||||
case 'G':
|
||||
sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
|
||||
sh.value += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_DATA (objfile));
|
||||
/* The addresses in these entries are reported to be
|
||||
wrong. See the code that reads 'G's for symtabs. */
|
||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||
|
@ -3138,18 +3177,20 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
if (p[2] == 't')
|
||||
{
|
||||
/* Also a typedef with the same name. */
|
||||
add_psymbol_to_list (namestring, p - namestring,
|
||||
1,
|
||||
add_psymbol_to_list (namestring,
|
||||
p - namestring, 1,
|
||||
VAR_DOMAIN, LOC_TYPEDEF,
|
||||
&objfile->static_psymbols,
|
||||
sh.value, 0,
|
||||
psymtab_language, objfile);
|
||||
psymtab_language,
|
||||
objfile);
|
||||
p += 1;
|
||||
}
|
||||
}
|
||||
goto check_enum;
|
||||
case 't':
|
||||
if (p != namestring) /* a name is there, not just :T... */
|
||||
if (p != namestring) /* a name is there, not
|
||||
just :T... */
|
||||
{
|
||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||
VAR_DOMAIN, LOC_TYPEDEF,
|
||||
|
@ -3158,14 +3199,15 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
psymtab_language, objfile);
|
||||
}
|
||||
check_enum:
|
||||
/* If this is an enumerated type, we need to
|
||||
add all the enum constants to the partial symbol
|
||||
table. This does not cover enums without names, e.g.
|
||||
"enum {a, b} c;" in C, but fortunately those are
|
||||
rare. There is no way for GDB to find those from the
|
||||
enum type without spending too much time on it. Thus
|
||||
to solve this problem, the compiler needs to put out the
|
||||
enum in a nameless type. GCC2 does this. */
|
||||
/* If this is an enumerated type, we need to add
|
||||
all the enum constants to the partial symbol
|
||||
table. This does not cover enums without names,
|
||||
e.g. "enum {a, b} c;" in C, but fortunately
|
||||
those are rare. There is no way for GDB to find
|
||||
those from the enum type without spending too
|
||||
much time on it. Thus to solve this problem,
|
||||
the compiler needs to put out the enum in a
|
||||
nameless type. GCC2 does this. */
|
||||
|
||||
/* We are looking for something of the form
|
||||
<name> ":" ("t" | "T") [<number> "="] "e"
|
||||
|
@ -3173,8 +3215,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
|
||||
/* Skip over the colon and the 't' or 'T'. */
|
||||
p += 2;
|
||||
/* This type may be given a number. Also, numbers can come
|
||||
in pairs like (0,26). Skip over it. */
|
||||
/* This type may be given a number. Also, numbers
|
||||
can come in pairs like (0,26). Skip over it. */
|
||||
while ((*p >= '0' && *p <= '9')
|
||||
|| *p == '(' || *p == ',' || *p == ')'
|
||||
|| *p == '=')
|
||||
|
@ -3182,7 +3224,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
|
||||
if (*p++ == 'e')
|
||||
{
|
||||
/* The aix4 compiler emits extra crud before the members. */
|
||||
/* The aix4 compiler emits extra crud before
|
||||
the members. */
|
||||
if (*p == '-')
|
||||
{
|
||||
/* Skip over the type (?). */
|
||||
|
@ -3202,8 +3245,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
{
|
||||
char *q;
|
||||
|
||||
/* Check for and handle cretinous dbx symbol name
|
||||
continuation! */
|
||||
/* Check for and handle cretinous dbx
|
||||
symbol name continuation! */
|
||||
if (*p == '\\' || (*p == '?' && p[1] == '\0'))
|
||||
p = next_symbol_text (objfile);
|
||||
|
||||
|
@ -3212,11 +3255,13 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
for (q = p; *q && *q != ':'; q++)
|
||||
;
|
||||
/* Note that the value doesn't matter for
|
||||
enum constants in psymtabs, just in symtabs. */
|
||||
enum constants in psymtabs, just in
|
||||
symtabs. */
|
||||
add_psymbol_to_list (p, q - p, 1,
|
||||
VAR_DOMAIN, LOC_CONST,
|
||||
&objfile->static_psymbols, 0,
|
||||
0, psymtab_language, objfile);
|
||||
&objfile->static_psymbols,
|
||||
0, 0, psymtab_language,
|
||||
objfile);
|
||||
/* Point past the name. */
|
||||
p = q;
|
||||
/* Skip over the value. */
|
||||
|
@ -3232,8 +3277,9 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
/* Constant, e.g. from "const" in Pascal. */
|
||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||
VAR_DOMAIN, LOC_CONST,
|
||||
&objfile->static_psymbols, sh.value,
|
||||
0, psymtab_language, objfile);
|
||||
&objfile->static_psymbols,
|
||||
sh.value, 0, psymtab_language,
|
||||
objfile);
|
||||
continue;
|
||||
|
||||
case 'f':
|
||||
|
@ -3247,7 +3293,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
function_outside_compilation_unit_complaint (name);
|
||||
xfree (name);
|
||||
}
|
||||
sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
||||
sh.value += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_TEXT (objfile));
|
||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||
VAR_DOMAIN, LOC_BLOCK,
|
||||
&objfile->static_psymbols,
|
||||
|
@ -3256,8 +3303,9 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
continue;
|
||||
|
||||
/* Global functions were ignored here, but now they
|
||||
are put into the global psymtab like one would expect.
|
||||
They're also in the minimal symbol table. */
|
||||
are put into the global psymtab like one would
|
||||
expect. They're also in the minimal symbol
|
||||
table. */
|
||||
case 'F':
|
||||
if (! pst)
|
||||
{
|
||||
|
@ -3269,7 +3317,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
function_outside_compilation_unit_complaint (name);
|
||||
xfree (name);
|
||||
}
|
||||
sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
||||
sh.value += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_TEXT (objfile));
|
||||
add_psymbol_to_list (namestring, p - namestring, 1,
|
||||
VAR_DOMAIN, LOC_BLOCK,
|
||||
&objfile->global_psymbols,
|
||||
|
@ -3277,9 +3326,10 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
psymtab_language, objfile);
|
||||
continue;
|
||||
|
||||
/* Two things show up here (hopefully); static symbols of
|
||||
local scope (static used inside braces) or extensions
|
||||
of structure symbols. We can ignore both. */
|
||||
/* Two things show up here (hopefully); static
|
||||
symbols of local scope (static used inside
|
||||
braces) or extensions of structure symbols. We
|
||||
can ignore both. */
|
||||
case 'V':
|
||||
case '(':
|
||||
case '0':
|
||||
|
@ -3293,25 +3343,27 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
case '8':
|
||||
case '9':
|
||||
case '-':
|
||||
case '#': /* for symbol identification (used in live ranges) */
|
||||
case '#': /* For symbol identification (used
|
||||
in live ranges). */
|
||||
continue;
|
||||
|
||||
case ':':
|
||||
/* It is a C++ nested symbol. We don't need to record it
|
||||
(I don't think); if we try to look up foo::bar::baz,
|
||||
then symbols for the symtab containing foo should get
|
||||
read in, I think. */
|
||||
/* It is a C++ nested symbol. We don't need to
|
||||
record it (I don't think); if we try to look up
|
||||
foo::bar::baz, then symbols for the symtab
|
||||
containing foo should get read in, I think. */
|
||||
/* Someone says sun cc puts out symbols like
|
||||
/foo/baz/maclib::/usr/local/bin/maclib,
|
||||
which would get here with a symbol type of ':'. */
|
||||
continue;
|
||||
|
||||
default:
|
||||
/* Unexpected symbol descriptor. The second and subsequent stabs
|
||||
of a continued stab can show up here. The question is
|
||||
whether they ever can mimic a normal stab--it would be
|
||||
nice if not, since we certainly don't want to spend the
|
||||
time searching to the end of every string looking for
|
||||
/* Unexpected symbol descriptor. The second and
|
||||
subsequent stabs of a continued stab can show up
|
||||
here. The question is whether they ever can
|
||||
mimic a normal stab--it would be nice if not,
|
||||
since we certainly don't want to spend the time
|
||||
searching to the end of every string looking for
|
||||
a backslash. */
|
||||
|
||||
complaint (&symfile_complaints,
|
||||
|
@ -3347,12 +3399,14 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
case N_EINCL:
|
||||
case N_DSLINE:
|
||||
case N_BSLINE:
|
||||
case N_SSYM: /* Claim: Structure or union element.
|
||||
Hopefully, I can ignore this. */
|
||||
case N_ENTRY: /* Alternate entry point; can ignore. */
|
||||
case N_MAIN: /* Can definitely ignore this. */
|
||||
case N_SSYM: /* Claim: Structure or union
|
||||
element. Hopefully, I can
|
||||
ignore this. */
|
||||
case N_ENTRY: /* Alternate entry point; can
|
||||
ignore. */
|
||||
case N_MAIN: /* Can definitely ignore this. */
|
||||
case N_CATCH: /* These are GNU C++ extensions */
|
||||
case N_EHDECL: /* that can safely be ignored here. */
|
||||
case N_EHDECL: /* that can safely be ignored here. */
|
||||
case N_LENG:
|
||||
case N_BCOMM:
|
||||
case N_ECOMM:
|
||||
|
@ -3364,18 +3418,21 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
case N_LBRAC:
|
||||
case N_NSYMS: /* Ultrix 4.0: symbol count */
|
||||
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:
|
||||
/* These symbols aren't interesting; don't worry about them */
|
||||
/* These symbols aren't interesting; don't worry about
|
||||
them */
|
||||
|
||||
continue;
|
||||
|
||||
default:
|
||||
/* If we haven't found it yet, ignore it. It's probably some
|
||||
new type we don't know about yet. */
|
||||
complaint (&symfile_complaints, _("unknown symbol type %s"),
|
||||
/* If we haven't found it yet, ignore it. It's
|
||||
probably some new type we don't know about yet. */
|
||||
complaint (&symfile_complaints,
|
||||
_("unknown symbol type %s"),
|
||||
hex_string (type_code)); /*CUR_SYMBOL_TYPE*/
|
||||
continue;
|
||||
}
|
||||
|
@ -3424,18 +3481,21 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
/* The value of a stEnd symbol is the displacement from the
|
||||
corresponding start symbol value, do not relocate it. */
|
||||
if (sh.st != stEnd)
|
||||
sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
||||
sh.value += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_TEXT (objfile));
|
||||
break;
|
||||
case scData:
|
||||
case scSData:
|
||||
case scRData:
|
||||
case scPData:
|
||||
case scXData:
|
||||
sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
|
||||
sh.value += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_DATA (objfile));
|
||||
break;
|
||||
case scBss:
|
||||
case scSBss:
|
||||
sh.value += ANOFFSET (objfile->section_offsets, SECT_OFF_BSS (objfile));
|
||||
sh.value += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_BSS (objfile));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3448,8 +3508,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
case stStaticProc:
|
||||
prim_record_minimal_symbol_and_info (name, sh.value,
|
||||
mst_file_text,
|
||||
SECT_OFF_TEXT (objfile), NULL,
|
||||
objfile);
|
||||
SECT_OFF_TEXT (objfile),
|
||||
NULL, objfile);
|
||||
|
||||
/* FALLTHROUGH */
|
||||
|
||||
|
@ -3635,7 +3695,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
CORE_ADDR svalue;
|
||||
|
||||
if (ext_ptr->ifd != f_idx)
|
||||
internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("failed internal consistency check"));
|
||||
psh = &ext_ptr->asym;
|
||||
|
||||
/* Do not add undefined symbols to the partial symbol table. */
|
||||
|
@ -3647,18 +3708,21 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
{
|
||||
case scText:
|
||||
case scRConst:
|
||||
svalue += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
|
||||
svalue += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_TEXT (objfile));
|
||||
break;
|
||||
case scData:
|
||||
case scSData:
|
||||
case scRData:
|
||||
case scPData:
|
||||
case scXData:
|
||||
svalue += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
|
||||
svalue += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_DATA (objfile));
|
||||
break;
|
||||
case scBss:
|
||||
case scSBss:
|
||||
svalue += ANOFFSET (objfile->section_offsets, SECT_OFF_BSS (objfile));
|
||||
svalue += ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_BSS (objfile));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3750,8 +3814,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
if (fh->crfd <= 1)
|
||||
continue;
|
||||
|
||||
/* Skip the first file indirect entry as it is a self dependency
|
||||
for source files or a reverse .h -> .c dependency for header files. */
|
||||
/* Skip the first file indirect entry as it is a self dependency for
|
||||
source files or a reverse .h -> .c dependency for header files. */
|
||||
pst->number_of_dependencies = 0;
|
||||
pst->dependencies =
|
||||
((struct partial_symtab **)
|
||||
|
@ -3779,7 +3843,8 @@ parse_partial_symbols (struct objfile *objfile)
|
|||
/* Do not add to dependeny list if psymtab was empty. */
|
||||
if (fdr_to_pst[rh].pst == (struct partial_symtab *) NULL)
|
||||
continue;
|
||||
pst->dependencies[pst->number_of_dependencies++] = fdr_to_pst[rh].pst;
|
||||
pst->dependencies[pst->number_of_dependencies++]
|
||||
= fdr_to_pst[rh].pst;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4067,7 +4132,8 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, const char *filename)
|
|||
else
|
||||
{
|
||||
/* Handle encoded stab line number. */
|
||||
valu += ANOFFSET (pst->section_offsets, SECT_OFF_TEXT (pst->objfile));
|
||||
valu += ANOFFSET (pst->section_offsets,
|
||||
SECT_OFF_TEXT (pst->objfile));
|
||||
record_line (current_subfile, sh.index,
|
||||
gdbarch_addr_bits_remove (gdbarch, valu));
|
||||
}
|
||||
|
@ -4077,12 +4143,14 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, const char *filename)
|
|||
/* These are generated by gcc-2.x, do not complain */
|
||||
;
|
||||
else
|
||||
complaint (&symfile_complaints, _("unknown stabs symbol %s"), name);
|
||||
complaint (&symfile_complaints,
|
||||
_("unknown stabs symbol %s"), name);
|
||||
}
|
||||
|
||||
if (! last_symtab_ended)
|
||||
{
|
||||
st = end_symtab (pst->texthigh, pst->objfile, SECT_OFF_TEXT (pst->objfile));
|
||||
st = end_symtab (pst->texthigh, pst->objfile,
|
||||
SECT_OFF_TEXT (pst->objfile));
|
||||
end_stabs ();
|
||||
}
|
||||
|
||||
|
@ -4188,7 +4256,8 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, const char *filename)
|
|||
(*swap_sym_in) (cur_bfd, sym_ptr, &sh);
|
||||
c = parse_symbol (&sh,
|
||||
debug_info->external_aux + fh->iauxBase,
|
||||
sym_ptr, fh->fBigendian, pst->section_offsets, pst->objfile);
|
||||
sym_ptr, fh->fBigendian,
|
||||
pst->section_offsets, pst->objfile);
|
||||
sym_ptr += c * external_sym_size;
|
||||
}
|
||||
|
||||
|
@ -4226,7 +4295,8 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, const char *filename)
|
|||
lowest_pdr_addr = pdr_in->adr;
|
||||
}
|
||||
|
||||
parse_lines (fh, pr_block, lines, maxlines, pst, lowest_pdr_addr);
|
||||
parse_lines (fh, pr_block, lines, maxlines,
|
||||
pst, lowest_pdr_addr);
|
||||
if (lines->nitems < fh->cline)
|
||||
lines = shrink_linetable (lines);
|
||||
|
||||
|
@ -4246,13 +4316,15 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, const char *filename)
|
|||
XXX use the global list to speed up things here. how?
|
||||
FIXME, Maybe quit once we have found the right number of ext's? */
|
||||
top_stack->cur_st = st;
|
||||
top_stack->cur_block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (top_stack->cur_st),
|
||||
GLOBAL_BLOCK);
|
||||
top_stack->cur_block
|
||||
= BLOCKVECTOR_BLOCK (BLOCKVECTOR (top_stack->cur_st),
|
||||
GLOBAL_BLOCK);
|
||||
top_stack->blocktype = stFile;
|
||||
|
||||
ext_ptr = PST_PRIVATE (pst)->extern_tab;
|
||||
for (i = PST_PRIVATE (pst)->extern_count; --i >= 0; ext_ptr++)
|
||||
parse_external (ext_ptr, fh->fBigendian, pst->section_offsets, pst->objfile);
|
||||
parse_external (ext_ptr, fh->fBigendian,
|
||||
pst->section_offsets, pst->objfile);
|
||||
|
||||
/* If there are undefined symbols, tell the user.
|
||||
The alpha has an undefined symbol for every symbol that is
|
||||
|
@ -4261,7 +4333,8 @@ psymtab_to_symtab_1 (struct partial_symtab *pst, const char *filename)
|
|||
{
|
||||
printf_filtered (_("File %s contains %d unresolved references:"),
|
||||
st->filename, n_undef_symbols);
|
||||
printf_filtered ("\n\t%4d variables\n\t%4d procedures\n\t%4d labels\n",
|
||||
printf_filtered ("\n\t%4d variables\n\t%4d "
|
||||
"procedures\n\t%4d labels\n",
|
||||
n_undef_vars, n_undef_procs, n_undef_labels);
|
||||
n_undef_symbols = n_undef_labels = n_undef_vars = n_undef_procs = 0;
|
||||
|
||||
|
@ -4317,7 +4390,9 @@ has_opaque_xref (FDR *fh, SYMR *sh)
|
|||
Return value says how many aux symbols we ate. */
|
||||
|
||||
static int
|
||||
cross_ref (int fd, union aux_ext *ax, struct type **tpp, enum type_code type_code, /* Use to alloc new type if none is found. */
|
||||
cross_ref (int fd, union aux_ext *ax, struct type **tpp,
|
||||
enum type_code type_code,
|
||||
/* Use to alloc new type if none is found. */
|
||||
char **pname, int bigend, char *sym_name)
|
||||
{
|
||||
RNDXR rn[1];
|
||||
|
@ -4350,7 +4425,8 @@ cross_ref (int fd, union aux_ext *ax, struct type **tpp, enum type_code type_cod
|
|||
if (rf == -1)
|
||||
{
|
||||
*pname = "<undefined>";
|
||||
*tpp = init_type (type_code, 0, TYPE_FLAG_STUB, (char *) NULL, current_objfile);
|
||||
*tpp = init_type (type_code, 0, TYPE_FLAG_STUB,
|
||||
(char *) NULL, current_objfile);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,11 +73,11 @@ show_inaccessible_by_default (struct ui_file *file, int from_tty,
|
|||
const char *value)
|
||||
{
|
||||
if (inaccessible_by_default)
|
||||
fprintf_filtered (file, _("\
|
||||
Unknown memory addresses will be treated as inaccessible.\n"));
|
||||
fprintf_filtered (file, _("Unknown memory addresses will "
|
||||
"be treated as inaccessible.\n"));
|
||||
else
|
||||
fprintf_filtered (file, _("\
|
||||
Unknown memory addresses will be treated as RAM.\n"));
|
||||
fprintf_filtered (file, _("Unknown memory addresses "
|
||||
"will be treated as RAM.\n"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -253,7 +253,8 @@ lookup_mem_region (CORE_ADDR addr)
|
|||
{
|
||||
if (m->enabled_p == 1)
|
||||
{
|
||||
/* If the address is in the memory region, return that memory range. */
|
||||
/* If the address is in the memory region, return that
|
||||
memory range. */
|
||||
if (addr >= m->lo && (addr < m->hi || m->hi == 0))
|
||||
return m;
|
||||
|
||||
|
|
|
@ -132,8 +132,8 @@ add_minsym_to_demangled_hash_table (struct minimal_symbol *sym,
|
|||
{
|
||||
if (sym->demangled_hash_next == NULL)
|
||||
{
|
||||
unsigned int hash
|
||||
= msymbol_hash_iw (SYMBOL_SEARCH_NAME (sym)) % MINIMAL_SYMBOL_HASH_SIZE;
|
||||
unsigned int hash = msymbol_hash_iw (SYMBOL_SEARCH_NAME (sym))
|
||||
% MINIMAL_SYMBOL_HASH_SIZE;
|
||||
|
||||
sym->demangled_hash_next = table[hash];
|
||||
table[hash] = sym;
|
||||
|
|
|
@ -104,8 +104,9 @@ static char setreg_resp_delim_fastmap[256];
|
|||
static int dump_reg_flag; /* Non-zero means do a dump_registers cmd when
|
||||
monitor_wait wakes up. */
|
||||
|
||||
static int first_time = 0; /* is this the first time we're executing after
|
||||
gaving created the child proccess? */
|
||||
static int first_time = 0; /* Is this the first time we're
|
||||
executing after gaving created the
|
||||
child proccess? */
|
||||
|
||||
|
||||
/* This is the ptid we use while we're connected to a monitor. Its
|
||||
|
@ -323,7 +324,8 @@ monitor_printf_noecho (char *pattern,...)
|
|||
|
||||
len = strlen (sndbuf);
|
||||
if (len + 1 > sizeof sndbuf)
|
||||
internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("failed internal consistency check"));
|
||||
|
||||
if (monitor_debug_p)
|
||||
{
|
||||
|
@ -352,7 +354,8 @@ monitor_printf (char *pattern,...)
|
|||
|
||||
len = strlen (sndbuf);
|
||||
if (len + 1 > sizeof sndbuf)
|
||||
internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("failed internal consistency check"));
|
||||
|
||||
if (monitor_debug_p)
|
||||
{
|
||||
|
@ -364,10 +367,11 @@ monitor_printf (char *pattern,...)
|
|||
|
||||
monitor_write (sndbuf, len);
|
||||
|
||||
/* We used to expect that the next immediate output was the characters we
|
||||
just output, but sometimes some extra junk appeared before the characters
|
||||
we expected, like an extra prompt, or a portmaster sending telnet negotiations.
|
||||
So, just start searching for what we sent, and skip anything unknown. */
|
||||
/* We used to expect that the next immediate output was the
|
||||
characters we just output, but sometimes some extra junk appeared
|
||||
before the characters we expected, like an extra prompt, or a
|
||||
portmaster sending telnet negotiations. So, just start searching
|
||||
for what we sent, and skip anything unknown. */
|
||||
monitor_debug ("ExpectEcho\n");
|
||||
monitor_expect (sndbuf, (char *) 0, 0);
|
||||
}
|
||||
|
@ -698,7 +702,8 @@ compile_pattern (char *pattern, struct re_pattern_buffer *compiled_pattern,
|
|||
re_set_syntax (tmp);
|
||||
|
||||
if (val)
|
||||
error (_("compile_pattern: Can't compile pattern string `%s': %s!"), pattern, val);
|
||||
error (_("compile_pattern: Can't compile pattern string `%s': %s!"),
|
||||
pattern, val);
|
||||
|
||||
if (fastmap)
|
||||
re_compile_fastmap (compiled_pattern);
|
||||
|
@ -808,7 +813,8 @@ monitor_open (char *args, struct monitor_ops *mon_ops, int from_tty)
|
|||
if (mon_ops->num_breakpoints == 0)
|
||||
mon_ops->num_breakpoints = 8;
|
||||
|
||||
breakaddr = (CORE_ADDR *) xmalloc (mon_ops->num_breakpoints * sizeof (CORE_ADDR));
|
||||
breakaddr = (CORE_ADDR *)
|
||||
xmalloc (mon_ops->num_breakpoints * sizeof (CORE_ADDR));
|
||||
memset (breakaddr, 0, mon_ops->num_breakpoints * sizeof (CORE_ADDR));
|
||||
}
|
||||
|
||||
|
@ -821,7 +827,8 @@ monitor_open (char *args, struct monitor_ops *mon_ops, int from_tty)
|
|||
}
|
||||
|
||||
if (from_tty)
|
||||
printf_unfiltered (_("Remote target %s connected to %s\n"), name, dev_name);
|
||||
printf_unfiltered (_("Remote target %s connected to %s\n"),
|
||||
name, dev_name);
|
||||
|
||||
push_target (targ_ops);
|
||||
|
||||
|
@ -1058,7 +1065,9 @@ monitor_wait_filter (char *buf,
|
|||
*ext_resp_len = resp_len;
|
||||
|
||||
if (resp_len <= 0)
|
||||
fprintf_unfiltered (gdb_stderr, "monitor_wait: excessive response from monitor: %s.", buf);
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"monitor_wait: excessive "
|
||||
"response from monitor: %s.", buf);
|
||||
}
|
||||
while (resp_len < 0);
|
||||
|
||||
|
@ -1116,7 +1125,9 @@ monitor_wait (struct target_ops *ops,
|
|||
resp_len = monitor_expect_prompt (buf, sizeof (buf));
|
||||
|
||||
if (resp_len <= 0)
|
||||
fprintf_unfiltered (gdb_stderr, "monitor_wait: excessive response from monitor: %s.", buf);
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
"monitor_wait: excessive "
|
||||
"response from monitor: %s.", buf);
|
||||
}
|
||||
while (resp_len < 0);
|
||||
|
||||
|
@ -1221,7 +1232,8 @@ monitor_fetch_register (struct regcache *regcache, int regno)
|
|||
if ((c == '0') && ((c = readchar (timeout)) == 'x'))
|
||||
;
|
||||
else
|
||||
error (_("Bad value returned from monitor while fetching register %x."),
|
||||
error (_("Bad value returned from monitor "
|
||||
"while fetching register %x."),
|
||||
regno);
|
||||
}
|
||||
|
||||
|
@ -1254,7 +1266,8 @@ monitor_fetch_register (struct regcache *regcache, int regno)
|
|||
if (current_monitor->getreg.term)
|
||||
{
|
||||
monitor_debug ("EXP getreg.term\n");
|
||||
monitor_expect (current_monitor->getreg.term, NULL, 0); /* get response */
|
||||
monitor_expect (current_monitor->getreg.term, NULL, 0); /* get
|
||||
response */
|
||||
}
|
||||
|
||||
if (current_monitor->getreg.term_cmd)
|
||||
|
@ -1304,7 +1317,9 @@ monitor_dump_regs (struct regcache *regcache)
|
|||
parse_register_dump (regcache, buf, resp_len);
|
||||
}
|
||||
else
|
||||
internal_error (__FILE__, __LINE__, _("failed internal consistency check")); /* Need some way to read registers */
|
||||
/* Need some way to read registers */
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("failed internal consistency check"));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1447,7 +1462,8 @@ monitor_write_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
|||
{
|
||||
monitor_debug ("MON FILL %d\n", i);
|
||||
if (current_monitor->flags & MO_FILL_USES_ADDR)
|
||||
monitor_printf (current_monitor->fill, memaddr, (memaddr + i) - 1, 0);
|
||||
monitor_printf (current_monitor->fill, memaddr,
|
||||
(memaddr + i) - 1, 0);
|
||||
else
|
||||
monitor_printf (current_monitor->fill, memaddr, i, 0);
|
||||
|
||||
|
@ -1789,7 +1805,8 @@ monitor_read_memory_single (CORE_ADDR memaddr, char *myaddr, int len)
|
|||
|
||||
if (current_monitor->getmem.term)
|
||||
{
|
||||
monitor_expect (current_monitor->getmem.term, NULL, 0); /* get response */
|
||||
monitor_expect (current_monitor->getmem.term, NULL, 0); /* get
|
||||
response */
|
||||
|
||||
if (current_monitor->getmem.term_cmd)
|
||||
{
|
||||
|
@ -1875,7 +1892,8 @@ monitor_read_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
|||
|
||||
if (current_monitor->getmem.term)
|
||||
{
|
||||
resp_len = monitor_expect (current_monitor->getmem.term, buf, sizeof buf); /* get response */
|
||||
resp_len = monitor_expect (current_monitor->getmem.term,
|
||||
buf, sizeof buf); /* get response */
|
||||
|
||||
if (resp_len <= 0)
|
||||
monitor_error ("monitor_read_memory",
|
||||
|
@ -1890,7 +1908,7 @@ monitor_read_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
|||
}
|
||||
}
|
||||
else
|
||||
resp_len = monitor_expect_prompt (buf, sizeof buf); /* get response */
|
||||
resp_len = monitor_expect_prompt (buf, sizeof buf); /* get response */
|
||||
|
||||
p = buf;
|
||||
|
||||
|
@ -1903,7 +1921,8 @@ monitor_read_memory (CORE_ADDR memaddr, char *myaddr, int len)
|
|||
int retval, tmp;
|
||||
struct re_registers resp_strings;
|
||||
|
||||
monitor_debug ("MON getmem.resp_delim %s\n", current_monitor->getmem.resp_delim);
|
||||
monitor_debug ("MON getmem.resp_delim %s\n",
|
||||
current_monitor->getmem.resp_delim);
|
||||
|
||||
memset (&resp_strings, 0, sizeof (struct re_registers));
|
||||
tmp = strlen (p);
|
||||
|
@ -2088,7 +2107,8 @@ monitor_insert_breakpoint (struct gdbarch *gdbarch,
|
|||
}
|
||||
}
|
||||
|
||||
error (_("Too many breakpoints (> %d) for monitor."), current_monitor->num_breakpoints);
|
||||
error (_("Too many breakpoints (> %d) for monitor."),
|
||||
current_monitor->num_breakpoints);
|
||||
}
|
||||
|
||||
/* Tell the monitor to remove a breakpoint. */
|
||||
|
@ -2343,7 +2363,8 @@ init_monitor_ops (struct target_ops *ops)
|
|||
|
||||
/* Define additional commands that are usually only used by monitors. */
|
||||
|
||||
extern initialize_file_ftype _initialize_remote_monitors; /* -Wmissing-prototypes */
|
||||
/* -Wmissing-prototypes */
|
||||
extern initialize_file_ftype _initialize_remote_monitors;
|
||||
|
||||
void
|
||||
_initialize_remote_monitors (void)
|
||||
|
|
|
@ -63,7 +63,8 @@ struct memrw_cmd
|
|||
char *cmdll; /* Command for long long (64 bit) read/write */
|
||||
char *resp_delim; /* String just prior to the desired value */
|
||||
char *term; /* Terminating string to search for */
|
||||
char *term_cmd; /* String to get out of sub-mode (if necessary) */
|
||||
char *term_cmd; /* String to get out of sub-mode (if
|
||||
necessary) */
|
||||
};
|
||||
|
||||
struct regrw_cmd
|
||||
|
@ -72,7 +73,8 @@ struct regrw_cmd
|
|||
char *resp_delim; /* String (actually a regexp if getmem) just
|
||||
prior to the desired value */
|
||||
char *term; /* Terminating string to search for */
|
||||
char *term_cmd; /* String to get out of sub-mode (if necessary) */
|
||||
char *term_cmd; /* String to get out of sub-mode (if
|
||||
necessary) */
|
||||
};
|
||||
|
||||
struct monitor_ops
|
||||
|
@ -82,8 +84,9 @@ struct monitor_ops
|
|||
char *cont; /* continue command */
|
||||
char *step; /* single step */
|
||||
char *stop; /* Interrupt program string */
|
||||
char *set_break; /* set a breakpoint. If NULL, monitor implementation
|
||||
sets its own to_insert_breakpoint method. */
|
||||
char *set_break; /* set a breakpoint. If NULL, monitor
|
||||
implementation sets its own
|
||||
to_insert_breakpoint method. */
|
||||
char *clr_break; /* clear a breakpoint */
|
||||
char *clr_all_break; /* Clear all breakpoints */
|
||||
char *fill; /* Memory fill cmd (addr len val) */
|
||||
|
@ -97,7 +100,8 @@ struct monitor_ops
|
|||
of registers that we can parse to supply
|
||||
GDB with the value of a register. */
|
||||
char *dump_registers; /* Command to dump all regs at once */
|
||||
char *register_pattern; /* Pattern that picks out register from reg dump */
|
||||
char *register_pattern; /* Pattern that picks out register
|
||||
from reg dump */
|
||||
void (*supply_register) (struct regcache *regcache, char *name,
|
||||
int namelen, char *val, int vallen);
|
||||
void (*load_routine) (struct serial *desc, char *file,
|
||||
|
|
|
@ -138,7 +138,8 @@ add_to_objfile_sections (struct bfd *abfd, struct bfd_section *asect,
|
|||
section.objfile = objfile;
|
||||
section.the_bfd_section = asect;
|
||||
section.ovly_mapped = 0;
|
||||
obstack_grow (&objfile->objfile_obstack, (char *) §ion, sizeof (section));
|
||||
obstack_grow (&objfile->objfile_obstack,
|
||||
(char *) §ion, sizeof (section));
|
||||
objfile->sections_end
|
||||
= (struct obj_section *) (((size_t) objfile->sections_end) + 1);
|
||||
}
|
||||
|
|
|
@ -268,13 +268,14 @@ struct objfile
|
|||
struct psymbol_allocation_list static_psymbols;
|
||||
|
||||
/* Each file contains a pointer to an array of minimal symbols for all
|
||||
global symbols that are defined within the file. The array is terminated
|
||||
by a "null symbol", one that has a NULL pointer for the name and a zero
|
||||
value for the address. This makes it easy to walk through the array
|
||||
when passed a pointer to somewhere in the middle of it. There is also
|
||||
a count of the number of symbols, which does not include the terminating
|
||||
null symbol. The array itself, as well as all the data that it points
|
||||
to, should be allocated on the objfile_obstack for this file. */
|
||||
global symbols that are defined within the file. The array is
|
||||
terminated by a "null symbol", one that has a NULL pointer for the
|
||||
name and a zero value for the address. This makes it easy to walk
|
||||
through the array when passed a pointer to somewhere in the middle
|
||||
of it. There is also a count of the number of symbols, which does
|
||||
not include the terminating null symbol. The array itself, as well
|
||||
as all the data that it points to, should be allocated on the
|
||||
objfile_obstack for this file. */
|
||||
|
||||
struct minimal_symbol *msymbols;
|
||||
int minimal_symbol_count;
|
||||
|
@ -653,17 +654,20 @@ extern int gdb_bfd_close_or_warn (struct bfd *abfd);
|
|||
|
||||
#define SECT_OFF_DATA(objfile) \
|
||||
((objfile->sect_index_data == -1) \
|
||||
? (internal_error (__FILE__, __LINE__, _("sect_index_data not initialized")), -1) \
|
||||
? (internal_error (__FILE__, __LINE__, \
|
||||
_("sect_index_data not initialized")), -1) \
|
||||
: objfile->sect_index_data)
|
||||
|
||||
#define SECT_OFF_RODATA(objfile) \
|
||||
((objfile->sect_index_rodata == -1) \
|
||||
? (internal_error (__FILE__, __LINE__, _("sect_index_rodata not initialized")), -1) \
|
||||
? (internal_error (__FILE__, __LINE__, \
|
||||
_("sect_index_rodata not initialized")), -1) \
|
||||
: objfile->sect_index_rodata)
|
||||
|
||||
#define SECT_OFF_TEXT(objfile) \
|
||||
((objfile->sect_index_text == -1) \
|
||||
? (internal_error (__FILE__, __LINE__, _("sect_index_text not initialized")), -1) \
|
||||
? (internal_error (__FILE__, __LINE__, \
|
||||
_("sect_index_text not initialized")), -1) \
|
||||
: objfile->sect_index_text)
|
||||
|
||||
/* Sometimes the .bss section is missing from the objfile, so we don't
|
||||
|
|
17
gdb/osabi.c
17
gdb/osabi.c
|
@ -458,8 +458,9 @@ generic_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect, void *obj)
|
|||
break;
|
||||
|
||||
default:
|
||||
internal_error (__FILE__, __LINE__, _("\
|
||||
generic_elf_osabi_sniff_abi_tag_sections: unknown OS number %d"),
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("generic_elf_osabi_sniff_abi_tag_sections: "
|
||||
"unknown OS number %d"),
|
||||
abi_tag);
|
||||
}
|
||||
return;
|
||||
|
@ -615,7 +616,8 @@ show_osabi (struct ui_file *file, int from_tty, struct cmd_list_element *c,
|
|||
{
|
||||
if (user_osabi_state == osabi_auto)
|
||||
fprintf_filtered (file,
|
||||
_("The current OS ABI is \"auto\" (currently \"%s\").\n"),
|
||||
_("The current OS ABI is \"auto\" "
|
||||
"(currently \"%s\").\n"),
|
||||
gdbarch_osabi_name (gdbarch_osabi (get_current_arch ())));
|
||||
else
|
||||
fprintf_filtered (file, _("The current OS ABI is \"%s\".\n"),
|
||||
|
@ -643,11 +645,10 @@ _initialize_gdb_osabi (void)
|
|||
|
||||
/* Register the "set osabi" command. */
|
||||
add_setshow_enum_cmd ("osabi", class_support, gdb_osabi_available_names,
|
||||
&set_osabi_string, _("\
|
||||
Set OS ABI of target."), _("\
|
||||
Show OS ABI of target."), NULL,
|
||||
set_osabi,
|
||||
show_osabi,
|
||||
&set_osabi_string,
|
||||
_("Set OS ABI of target."),
|
||||
_("Show OS ABI of target."),
|
||||
NULL, set_osabi, show_osabi,
|
||||
&setlist, &showlist);
|
||||
user_osabi_state = osabi_auto;
|
||||
}
|
||||
|
|
|
@ -36,11 +36,14 @@
|
|||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
|
||||
static void pascal_type_print_varspec_suffix (struct type *, struct ui_file *, int, int, int);
|
||||
static void pascal_type_print_varspec_suffix (struct type *, struct ui_file *,
|
||||
int, int, int);
|
||||
|
||||
static void pascal_type_print_derivation_info (struct ui_file *, struct type *);
|
||||
static void pascal_type_print_derivation_info (struct ui_file *,
|
||||
struct type *);
|
||||
|
||||
void pascal_type_print_varspec_prefix (struct type *, struct ui_file *, int, int);
|
||||
void pascal_type_print_varspec_prefix (struct type *, struct ui_file *,
|
||||
int, int);
|
||||
|
||||
|
||||
/* LEVEL is the depth to indent lines by. */
|
||||
|
@ -219,7 +222,8 @@ pascal_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
|
|||
case TYPE_CODE_PTR:
|
||||
fprintf_filtered (stream, "^");
|
||||
pascal_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1);
|
||||
break; /* pointer should be handled normally in pascal */
|
||||
break; /* pointer should be handled normally
|
||||
in pascal */
|
||||
|
||||
case TYPE_CODE_METHOD:
|
||||
if (passed_a_ptr)
|
||||
|
@ -236,7 +240,8 @@ pascal_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
|
|||
if (passed_a_ptr)
|
||||
{
|
||||
fprintf_filtered (stream, " ");
|
||||
pascal_type_print_base (TYPE_DOMAIN_TYPE (type), stream, 0, passed_a_ptr);
|
||||
pascal_type_print_base (TYPE_DOMAIN_TYPE (type),
|
||||
stream, 0, passed_a_ptr);
|
||||
fprintf_filtered (stream, "::");
|
||||
}
|
||||
break;
|
||||
|
@ -319,7 +324,8 @@ pascal_print_func_args (struct type *type, struct ui_file *stream)
|
|||
{
|
||||
fprintf_filtered (stream, "var ");
|
||||
} */
|
||||
pascal_print_type (TYPE_FIELD_TYPE (type, i), "" /* TYPE_FIELD_NAME seems invalid ! */
|
||||
pascal_print_type (TYPE_FIELD_TYPE (type, i), "" /* TYPE_FIELD_NAME
|
||||
seems invalid! */
|
||||
,stream, -1, 0);
|
||||
}
|
||||
if (len)
|
||||
|
@ -361,7 +367,8 @@ pascal_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
|||
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
|
||||
{
|
||||
fprintf_filtered (stream, " : ");
|
||||
pascal_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0);
|
||||
pascal_type_print_varspec_prefix (TYPE_TARGET_TYPE (type),
|
||||
stream, 0, 0);
|
||||
pascal_type_print_base (TYPE_TARGET_TYPE (type), stream, show, 0);
|
||||
pascal_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
|
||||
passed_a_ptr, 0);
|
||||
|
@ -370,7 +377,8 @@ pascal_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
|||
|
||||
case TYPE_CODE_PTR:
|
||||
case TYPE_CODE_REF:
|
||||
pascal_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 1, 0);
|
||||
pascal_type_print_varspec_suffix (TYPE_TARGET_TYPE (type),
|
||||
stream, 0, 1, 0);
|
||||
break;
|
||||
|
||||
case TYPE_CODE_FUNC:
|
||||
|
@ -381,7 +389,8 @@ pascal_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
|
|||
if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
|
||||
{
|
||||
fprintf_filtered (stream, " : ");
|
||||
pascal_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0);
|
||||
pascal_type_print_varspec_prefix (TYPE_TARGET_TYPE (type),
|
||||
stream, 0, 0);
|
||||
pascal_type_print_base (TYPE_TARGET_TYPE (type), stream, show, 0);
|
||||
pascal_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0,
|
||||
passed_a_ptr, 0);
|
||||
|
@ -451,7 +460,8 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
|
|||
}
|
||||
|
||||
/* void pointer */
|
||||
if ((TYPE_CODE (type) == TYPE_CODE_PTR) && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID))
|
||||
if ((TYPE_CODE (type) == TYPE_CODE_PTR)
|
||||
&& (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_VOID))
|
||||
{
|
||||
fputs_filtered (TYPE_NAME (type) ? TYPE_NAME (type) : "pointer",
|
||||
stream);
|
||||
|
@ -480,9 +490,12 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
|
|||
break;
|
||||
|
||||
case TYPE_CODE_ARRAY:
|
||||
/* pascal_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0);
|
||||
pascal_type_print_base (TYPE_TARGET_TYPE (type), stream, show, level);
|
||||
pascal_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0); */
|
||||
/* pascal_type_print_varspec_prefix (TYPE_TARGET_TYPE (type),
|
||||
stream, 0, 0);
|
||||
pascal_type_print_base (TYPE_TARGET_TYPE (type),
|
||||
stream, show, level);
|
||||
pascal_type_print_varspec_suffix (TYPE_TARGET_TYPE (type),
|
||||
stream, 0, 0, 0); */
|
||||
pascal_print_type (TYPE_TARGET_TYPE (type), NULL, stream, 0, 0);
|
||||
break;
|
||||
|
||||
|
@ -741,7 +754,8 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
|
|||
fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
|
||||
if (lastval != TYPE_FIELD_BITPOS (type, i))
|
||||
{
|
||||
fprintf_filtered (stream, " := %d", TYPE_FIELD_BITPOS (type, i));
|
||||
fprintf_filtered (stream,
|
||||
" := %d", TYPE_FIELD_BITPOS (type, i));
|
||||
lastval = TYPE_FIELD_BITPOS (type, i);
|
||||
}
|
||||
lastval++;
|
||||
|
|
|
@ -125,8 +125,9 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
|||
{
|
||||
i = 0;
|
||||
}
|
||||
val_print_array_elements (type, valaddr + embedded_offset, address, stream,
|
||||
recurse, original_value, options, i);
|
||||
val_print_array_elements (type, valaddr + embedded_offset,
|
||||
address, stream, recurse,
|
||||
original_value, options, i);
|
||||
fprintf_filtered (stream, "}");
|
||||
}
|
||||
break;
|
||||
|
@ -209,7 +210,8 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
|||
else if (pascal_object_is_vtbl_member (type))
|
||||
{
|
||||
/* print vtbl's nicely */
|
||||
CORE_ADDR vt_address = unpack_pointer (type, valaddr + embedded_offset);
|
||||
CORE_ADDR vt_address = unpack_pointer (type,
|
||||
valaddr + embedded_offset);
|
||||
struct minimal_symbol *msymbol =
|
||||
lookup_minimal_symbol_by_pc (vt_address);
|
||||
|
||||
|
@ -304,8 +306,12 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
|||
/* Extract the address, assume that it is unsigned. */
|
||||
print_address_demangle
|
||||
(gdbarch,
|
||||
extract_unsigned_integer (valaddr + embedded_offset + TYPE_FIELD_BITPOS (type, VTBL_FNADDR_OFFSET) / 8,
|
||||
TYPE_LENGTH (TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET)), byte_order),
|
||||
extract_unsigned_integer (valaddr + embedded_offset
|
||||
+ TYPE_FIELD_BITPOS (type,
|
||||
VTBL_FNADDR_OFFSET) / 8,
|
||||
TYPE_LENGTH (TYPE_FIELD_TYPE (type,
|
||||
VTBL_FNADDR_OFFSET)),
|
||||
byte_order),
|
||||
stream, demangle);
|
||||
}
|
||||
else
|
||||
|
@ -313,14 +319,18 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
|||
if (is_pascal_string_type (type, &length_pos, &length_size,
|
||||
&string_pos, &char_type, NULL))
|
||||
{
|
||||
len = extract_unsigned_integer (valaddr + embedded_offset + length_pos, length_size, byte_order);
|
||||
len = extract_unsigned_integer (valaddr + embedded_offset
|
||||
+ length_pos, length_size,
|
||||
byte_order);
|
||||
LA_PRINT_STRING (stream, char_type,
|
||||
valaddr + embedded_offset + string_pos,
|
||||
len, NULL, 0, options);
|
||||
}
|
||||
else
|
||||
pascal_object_print_value_fields (type, valaddr + embedded_offset, address, stream,
|
||||
recurse, original_value, options, NULL, 0);
|
||||
pascal_object_print_value_fields (type, valaddr + embedded_offset,
|
||||
address, stream, recurse,
|
||||
original_value, options,
|
||||
NULL, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -501,7 +511,8 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
|||
|
||||
for (i = low_bound; i <= high_bound; i++)
|
||||
{
|
||||
int element = value_bit_index (type, valaddr + embedded_offset, i);
|
||||
int element = value_bit_index (type,
|
||||
valaddr + embedded_offset, i);
|
||||
|
||||
if (element < 0)
|
||||
{
|
||||
|
@ -517,13 +528,17 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
|||
print_type_scalar (range, i, stream);
|
||||
need_comma = 1;
|
||||
|
||||
if (i + 1 <= high_bound && value_bit_index (type, valaddr + embedded_offset, ++i))
|
||||
if (i + 1 <= high_bound
|
||||
&& value_bit_index (type,
|
||||
valaddr + embedded_offset, ++i))
|
||||
{
|
||||
int j = i;
|
||||
|
||||
fputs_filtered ("..", stream);
|
||||
while (i + 1 <= high_bound
|
||||
&& value_bit_index (type, valaddr + embedded_offset, ++i))
|
||||
&& value_bit_index (type,
|
||||
valaddr + embedded_offset,
|
||||
++i))
|
||||
j = i;
|
||||
print_type_scalar (range, j, stream);
|
||||
}
|
||||
|
@ -553,7 +568,8 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
|
|||
break;
|
||||
|
||||
default:
|
||||
error (_("Invalid pascal type code %d in symbol table."), TYPE_CODE (type));
|
||||
error (_("Invalid pascal type code %d in symbol table."),
|
||||
TYPE_CODE (type));
|
||||
}
|
||||
gdb_flush (stream);
|
||||
return (0);
|
||||
|
@ -646,7 +662,8 @@ pascal_object_is_vtbl_member (struct type *type)
|
|||
if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
|
||||
{
|
||||
type = TYPE_TARGET_TYPE (type);
|
||||
if (TYPE_CODE (type) == TYPE_CODE_STRUCT /* if not using thunks */
|
||||
if (TYPE_CODE (type) == TYPE_CODE_STRUCT /* if not using
|
||||
thunks */
|
||||
|| TYPE_CODE (type) == TYPE_CODE_PTR) /* if using thunks */
|
||||
{
|
||||
/* Virtual functions tables are full of pointers
|
||||
|
@ -812,7 +829,8 @@ pascal_object_print_value_fields (struct type *type, const gdb_byte *valaddr,
|
|||
}
|
||||
else if (field_is_static (&TYPE_FIELD (type, i)))
|
||||
{
|
||||
/* struct value *v = value_static_field (type, i); v4.17 specific */
|
||||
/* struct value *v = value_static_field (type, i);
|
||||
v4.17 specific */
|
||||
struct value *v;
|
||||
|
||||
v = value_from_longest (TYPE_FIELD_TYPE (type, i),
|
||||
|
@ -941,8 +959,9 @@ pascal_object_print_value (struct type *type, const gdb_byte *valaddr,
|
|||
if (boffset == -1)
|
||||
fprintf_filtered (stream, "<invalid address>");
|
||||
else
|
||||
pascal_object_print_value_fields (baseclass, base_valaddr, address + boffset,
|
||||
stream, recurse, val, options,
|
||||
pascal_object_print_value_fields (baseclass, base_valaddr,
|
||||
address + boffset, stream,
|
||||
recurse, val, options,
|
||||
(struct type **) obstack_base (&dont_print_vb_obstack),
|
||||
0);
|
||||
fputs_filtered (", ", stream);
|
||||
|
@ -994,7 +1013,8 @@ pascal_object_print_static_field (struct value *val,
|
|||
{
|
||||
if (value_address (val) == first_dont_print[i])
|
||||
{
|
||||
fputs_filtered ("<same as static member of an already seen type>",
|
||||
fputs_filtered ("\
|
||||
<same as static member of an already seen type>",
|
||||
stream);
|
||||
return;
|
||||
}
|
||||
|
@ -1016,7 +1036,8 @@ pascal_object_print_static_field (struct value *val,
|
|||
common_val_print (val, stream, recurse, &opts, current_language);
|
||||
}
|
||||
|
||||
extern initialize_file_ftype _initialize_pascal_valprint; /* -Wmissing-prototypes */
|
||||
/* -Wmissing-prototypes */
|
||||
extern initialize_file_ftype _initialize_pascal_valprint;
|
||||
|
||||
void
|
||||
_initialize_pascal_valprint (void)
|
||||
|
|
21
gdb/parse.c
21
gdb/parse.c
|
@ -903,7 +903,8 @@ operator_length_standard (const struct expression *expr, int endpos,
|
|||
case OP_REGISTER:
|
||||
case OP_M2_STRING:
|
||||
case OP_STRING:
|
||||
case OP_OBJC_NSSTRING: /* Objective C Foundation Class NSString constant */
|
||||
case OP_OBJC_NSSTRING: /* Objective C Foundation Class
|
||||
NSString constant */
|
||||
case OP_OBJC_SELECTOR: /* Objective C "@selector" pseudo-op */
|
||||
case OP_NAME:
|
||||
oplen = longest_to_int (expr->elts[endpos - 2].longconst);
|
||||
|
@ -1628,18 +1629,20 @@ _initialize_parse (void)
|
|||
xmalloc (type_stack_size * sizeof (*type_stack));
|
||||
|
||||
add_setshow_zinteger_cmd ("expression", class_maintenance,
|
||||
&expressiondebug, _("\
|
||||
Set expression debugging."), _("\
|
||||
Show expression debugging."), _("\
|
||||
When non-zero, the internal representation of expressions will be printed."),
|
||||
&expressiondebug,
|
||||
_("Set expression debugging."),
|
||||
_("Show expression debugging."),
|
||||
_("When non-zero, the internal representation "
|
||||
"of expressions will be printed."),
|
||||
NULL,
|
||||
show_expressiondebug,
|
||||
&setdebuglist, &showdebuglist);
|
||||
add_setshow_boolean_cmd ("parser", class_maintenance,
|
||||
&parser_debug, _("\
|
||||
Set parser debugging."), _("\
|
||||
Show parser debugging."), _("\
|
||||
When non-zero, expression parser tracing will be enabled."),
|
||||
&parser_debug,
|
||||
_("Set parser debugging."),
|
||||
_("Show parser debugging."),
|
||||
_("When non-zero, expression parser "
|
||||
"tracing will be enabled."),
|
||||
NULL,
|
||||
show_parserdebug,
|
||||
&setdebuglist, &showdebuglist);
|
||||
|
|
|
@ -108,8 +108,9 @@ static void
|
|||
show_max_symbolic_offset (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
The largest offset that will be printed in <symbol+1234> form is %s.\n"),
|
||||
fprintf_filtered (file,
|
||||
_("The largest offset that will be "
|
||||
"printed in <symbol+1234> form is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -120,8 +121,8 @@ static void
|
|||
show_print_symbol_filename (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("\
|
||||
Printing of source filename and line number with <symbol> is %s.\n"),
|
||||
fprintf_filtered (file, _("Printing of source filename and "
|
||||
"line number with <symbol> is %s.\n"),
|
||||
value);
|
||||
}
|
||||
|
||||
|
@ -260,7 +261,8 @@ decode_format (char **string_ptr, int oformat, int osize)
|
|||
val.size = osize ? 'b' : osize;
|
||||
break;
|
||||
case 's':
|
||||
/* Display strings with byte size chars unless explicitly specified. */
|
||||
/* Display strings with byte size chars unless explicitly
|
||||
specified. */
|
||||
val.size = '\0';
|
||||
break;
|
||||
|
||||
|
@ -1273,7 +1275,8 @@ address_info (char *exp, int from_tty)
|
|||
Unfortunately DWARF 2 stores the frame-base (instead of the
|
||||
function) location in a function's symbol. Oops! For the
|
||||
moment enable this when/where applicable. */
|
||||
SYMBOL_COMPUTED_OPS (sym)->describe_location (sym, context_pc, gdb_stdout);
|
||||
SYMBOL_COMPUTED_OPS (sym)->describe_location (sym, context_pc,
|
||||
gdb_stdout);
|
||||
break;
|
||||
|
||||
case LOC_REGISTER:
|
||||
|
@ -1793,8 +1796,9 @@ disable_current_display (void)
|
|||
if (current_display_number >= 0)
|
||||
{
|
||||
disable_display (current_display_number);
|
||||
fprintf_unfiltered (gdb_stderr, _("\
|
||||
Disabling display %d to avoid infinite recursion.\n"),
|
||||
fprintf_unfiltered (gdb_stderr,
|
||||
_("Disabling display %d to "
|
||||
"avoid infinite recursion.\n"),
|
||||
current_display_number);
|
||||
}
|
||||
current_display_number = -1;
|
||||
|
@ -2258,7 +2262,8 @@ ui_printf (char *arg, struct ui_file *stream)
|
|||
}
|
||||
|
||||
if (bad)
|
||||
error (_("Inappropriate modifiers to format specifier '%c' in printf"),
|
||||
error (_("Inappropriate modifiers to "
|
||||
"format specifier '%c' in printf"),
|
||||
*f);
|
||||
|
||||
f++;
|
||||
|
|
|
@ -1515,7 +1515,8 @@ static struct trans signal_table[] =
|
|||
{ SIGIO, "SIGIO", "Socket I/O possible" }, /* alias for SIGPOLL */
|
||||
#endif
|
||||
#ifdef SIGSTOP
|
||||
{ SIGSTOP, "SIGSTOP", "Stop, not from tty" }, /* cannot be caught or ignored */
|
||||
{ SIGSTOP, "SIGSTOP", "Stop, not from tty" }, /* cannot be caught or
|
||||
ignored */
|
||||
#endif
|
||||
#ifdef SIGTSTP
|
||||
{ SIGTSTP, "SIGTSTP", "User stop from tty" },
|
||||
|
|
27
gdb/procfs.c
27
gdb/procfs.c
|
@ -133,7 +133,8 @@ static int procfs_xfer_memory (CORE_ADDR, gdb_byte *, int, int,
|
|||
static LONGEST procfs_xfer_partial (struct target_ops *ops,
|
||||
enum target_object object,
|
||||
const char *annex,
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf,
|
||||
gdb_byte *readbuf,
|
||||
const gdb_byte *writebuf,
|
||||
ULONGEST offset, LONGEST len);
|
||||
|
||||
static int procfs_thread_alive (struct target_ops *ops, ptid_t);
|
||||
|
@ -486,8 +487,8 @@ find_procinfo_or_die (int pid, int tid)
|
|||
if (pi == NULL)
|
||||
{
|
||||
if (tid)
|
||||
error (_("\
|
||||
procfs: couldn't find pid %d (kernel thread %d) in procinfo list."),
|
||||
error (_("procfs: couldn't find pid %d "
|
||||
"(kernel thread %d) in procinfo list."),
|
||||
pid, tid);
|
||||
else
|
||||
error (_("procfs: couldn't find pid %d in procinfo list."), pid);
|
||||
|
@ -898,8 +899,8 @@ load_syscalls (procinfo *pi)
|
|||
|
||||
if (header.pr_nsyscalls == 0)
|
||||
{
|
||||
error (_("\
|
||||
load_syscalls: /proc/%d/sysent contains no syscalls!"), pi->pid);
|
||||
error (_("load_syscalls: /proc/%d/sysent contains no syscalls!"),
|
||||
pi->pid);
|
||||
}
|
||||
|
||||
size = header.pr_nsyscalls * sizeof (prsyscall_t);
|
||||
|
@ -1060,7 +1061,8 @@ fltset_t *proc_get_traced_faults (procinfo * pi, fltset_t * save);
|
|||
gdb_sigset_t *proc_get_traced_signals (procinfo * pi, gdb_sigset_t * save);
|
||||
gdb_sigset_t *proc_get_held_signals (procinfo * pi, gdb_sigset_t * save);
|
||||
gdb_sigset_t *proc_get_pending_signals (procinfo * pi, gdb_sigset_t * save);
|
||||
gdb_sigaction_t *proc_get_signal_actions (procinfo * pi, gdb_sigaction_t *save);
|
||||
gdb_sigaction_t *proc_get_signal_actions (procinfo * pi,
|
||||
gdb_sigaction_t *save);
|
||||
|
||||
void proc_warn (procinfo * pi, char *func, int line);
|
||||
void proc_error (procinfo * pi, char *func, int line);
|
||||
|
@ -3852,7 +3854,8 @@ wait_again:
|
|||
wait_retval = wait (&wstat); /* "wait" for the child's exit */
|
||||
|
||||
if (wait_retval != PIDGET (inferior_ptid)) /* wrong child? */
|
||||
error (_("procfs: couldn't stop process %d: wait returned %d."),
|
||||
error (_("procfs: couldn't stop "
|
||||
"process %d: wait returned %d."),
|
||||
PIDGET (inferior_ptid), wait_retval);
|
||||
/* FIXME: might I not just use waitpid?
|
||||
Or try find_procinfo to see if I know about this child? */
|
||||
|
@ -3968,7 +3971,8 @@ wait_again:
|
|||
if ((nsysargs = proc_nsysarg (pi)) > 0 &&
|
||||
(sysargs = proc_sysargs (pi)) != NULL)
|
||||
{
|
||||
printf_filtered (_("%ld syscall arguments:\n"), nsysargs);
|
||||
printf_filtered (_("%ld syscall arguments:\n"),
|
||||
nsysargs);
|
||||
for (i = 0; i < nsysargs; i++)
|
||||
printf_filtered ("#%ld: 0x%08lx\n",
|
||||
i, sysargs[i]);
|
||||
|
@ -4159,8 +4163,8 @@ wait_again:
|
|||
#endif
|
||||
wstat = (SIGFPE << 8) | 0177;
|
||||
break;
|
||||
case FLTPAGE: /* Recoverable page fault */
|
||||
default: /* FIXME: use si_signo if possible for fault */
|
||||
case FLTPAGE: /* Recoverable page fault */
|
||||
default: /* FIXME: use si_signo if possible for fault */
|
||||
retval = pid_to_ptid (-1);
|
||||
printf_filtered ("procfs:%d -- ", __LINE__);
|
||||
printf_filtered (_("child stopped for unknown reason:\n"));
|
||||
|
@ -5761,7 +5765,8 @@ procfs_make_note_section (bfd *obfd, int *note_size)
|
|||
thread_args.note_data = note_data;
|
||||
thread_args.note_size = note_size;
|
||||
thread_args.stop_signal = stop_signal;
|
||||
proc_iterate_over_threads (pi, procfs_corefile_thread_callback, &thread_args);
|
||||
proc_iterate_over_threads (pi, procfs_corefile_thread_callback,
|
||||
&thread_args);
|
||||
|
||||
/* There should be always at least one thread. */
|
||||
gdb_assert (thread_args.note_data != note_data);
|
||||
|
|
|
@ -596,7 +596,8 @@ set_program_space_data (struct program_space *pspace,
|
|||
}
|
||||
|
||||
void *
|
||||
program_space_data (struct program_space *pspace, const struct program_space_data *data)
|
||||
program_space_data (struct program_space *pspace,
|
||||
const struct program_space_data *data)
|
||||
{
|
||||
gdb_assert (data->index < pspace->num_data);
|
||||
return pspace->data[data->index];
|
||||
|
@ -608,8 +609,8 @@ void
|
|||
initialize_progspace (void)
|
||||
{
|
||||
add_cmd ("program-spaces", class_maintenance,
|
||||
maintenance_info_program_spaces_command, _("\
|
||||
Info about currently known program spaces."),
|
||||
maintenance_info_program_spaces_command,
|
||||
_("Info about currently known program spaces."),
|
||||
&maintenanceinfolist);
|
||||
|
||||
/* There's always one program space. Note that this function isn't
|
||||
|
|
|
@ -283,7 +283,8 @@ extern const struct program_space_data *register_program_space_data_with_cleanup
|
|||
(void (*cleanup) (struct program_space *, void *));
|
||||
extern void clear_program_space_data (struct program_space *pspace);
|
||||
extern void set_program_space_data (struct program_space *pspace,
|
||||
const struct program_space_data *data, void *value);
|
||||
const struct program_space_data *data,
|
||||
void *value);
|
||||
extern void *program_space_data (struct program_space *pspace,
|
||||
const struct program_space_data *data);
|
||||
|
||||
|
|
|
@ -158,7 +158,8 @@ extern void sort_pst_symbols (struct partial_symtab *);
|
|||
/* Add any kind of symbol to a psymbol_allocation_list. */
|
||||
|
||||
extern const
|
||||
struct partial_symbol *add_psymbol_to_list (const char *, int, int, domain_enum,
|
||||
struct partial_symbol *add_psymbol_to_list (const char *, int,
|
||||
int, domain_enum,
|
||||
enum address_class,
|
||||
struct psymbol_allocation_list *,
|
||||
long, CORE_ADDR,
|
||||
|
|
|
@ -556,7 +556,8 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name,
|
|||
{
|
||||
center = bottom + (top - bottom) / 2;
|
||||
if (!(center < top))
|
||||
internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("failed internal consistency check"));
|
||||
if (!do_linear_search
|
||||
&& SYMBOL_LANGUAGE (*center) == language_java)
|
||||
{
|
||||
|
@ -572,7 +573,8 @@ lookup_partial_symbol (struct partial_symtab *pst, const char *name,
|
|||
}
|
||||
}
|
||||
if (!(top == bottom))
|
||||
internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("failed internal consistency check"));
|
||||
|
||||
while (top <= real_top
|
||||
&& SYMBOL_MATCHES_SEARCH_NAME (*top, name))
|
||||
|
@ -1119,8 +1121,10 @@ map_matching_symbols_psymtab (const char *name, domain_enum namespace,
|
|||
|
||||
static void
|
||||
expand_symtabs_matching_via_partial (struct objfile *objfile,
|
||||
int (*file_matcher) (const char *, void *),
|
||||
int (*name_matcher) (const char *, void *),
|
||||
int (*file_matcher) (const char *,
|
||||
void *),
|
||||
int (*name_matcher) (const char *,
|
||||
void *),
|
||||
domain_enum kind,
|
||||
void *data)
|
||||
{
|
||||
|
@ -1138,8 +1142,10 @@ expand_symtabs_matching_via_partial (struct objfile *objfile,
|
|||
if (! (*file_matcher) (ps->filename, data))
|
||||
continue;
|
||||
|
||||
gbound = objfile->global_psymbols.list + ps->globals_offset + ps->n_global_syms;
|
||||
sbound = objfile->static_psymbols.list + ps->statics_offset + ps->n_static_syms;
|
||||
gbound = objfile->global_psymbols.list
|
||||
+ ps->globals_offset + ps->n_global_syms;
|
||||
sbound = objfile->static_psymbols.list
|
||||
+ ps->statics_offset + ps->n_static_syms;
|
||||
bound = gbound;
|
||||
|
||||
/* Go through all of the symbols stored in a partial
|
||||
|
@ -1584,7 +1590,8 @@ maintenance_print_psymbols (char *args, int from_tty)
|
|||
|
||||
if (args == NULL)
|
||||
{
|
||||
error (_("print-psymbols takes an output file name and optional symbol file name"));
|
||||
error (_("\
|
||||
print-psymbols takes an output file name and optional symbol file name"));
|
||||
}
|
||||
argv = gdb_buildargv (args);
|
||||
cleanups = make_cleanup_freeargv (argv);
|
||||
|
@ -1659,7 +1666,8 @@ maintenance_info_psymtabs (char *regexp, int from_tty)
|
|||
printf_filtered (" readin %s\n",
|
||||
psymtab->readin ? "yes" : "no");
|
||||
printf_filtered (" fullname %s\n",
|
||||
psymtab->fullname ? psymtab->fullname : "(null)");
|
||||
psymtab->fullname
|
||||
? psymtab->fullname : "(null)");
|
||||
printf_filtered (" text addresses ");
|
||||
fputs_filtered (paddress (gdbarch, psymtab->textlow),
|
||||
gdb_stdout);
|
||||
|
|
71
gdb/record.c
71
gdb/record.c
|
@ -865,15 +865,20 @@ record_open_1 (char *name, int from_tty)
|
|||
if (!tmp_to_wait)
|
||||
error (_("Could not find 'to_wait' method on the target stack."));
|
||||
if (!tmp_to_store_registers)
|
||||
error (_("Could not find 'to_store_registers' method on the target stack."));
|
||||
error (_("Could not find 'to_store_registers' "
|
||||
"method on the target stack."));
|
||||
if (!tmp_to_insert_breakpoint)
|
||||
error (_("Could not find 'to_insert_breakpoint' method on the target stack."));
|
||||
error (_("Could not find 'to_insert_breakpoint' "
|
||||
"method on the target stack."));
|
||||
if (!tmp_to_remove_breakpoint)
|
||||
error (_("Could not find 'to_remove_breakpoint' method on the target stack."));
|
||||
error (_("Could not find 'to_remove_breakpoint' "
|
||||
"method on the target stack."));
|
||||
if (!tmp_to_stopped_by_watchpoint)
|
||||
error (_("Could not find 'to_stopped_by_watchpoint' method on the target stack."));
|
||||
error (_("Could not find 'to_stopped_by_watchpoint' "
|
||||
"method on the target stack."));
|
||||
if (!tmp_to_stopped_data_address)
|
||||
error (_("Could not find 'to_stopped_data_address' method on the target stack."));
|
||||
error (_("Could not find 'to_stopped_data_address' "
|
||||
"method on the target stack."));
|
||||
|
||||
push_target (&record_ops);
|
||||
}
|
||||
|
@ -1162,7 +1167,8 @@ record_wait (struct target_ops *ops,
|
|||
handle it. */
|
||||
if (software_breakpoint_inserted_here_p (aspace, tmp_pc))
|
||||
{
|
||||
struct gdbarch *gdbarch = get_regcache_arch (regcache);
|
||||
struct gdbarch *gdbarch
|
||||
= get_regcache_arch (regcache);
|
||||
CORE_ADDR decr_pc_after_break
|
||||
= gdbarch_decr_pc_after_break (gdbarch);
|
||||
if (decr_pc_after_break)
|
||||
|
@ -1333,8 +1339,9 @@ record_wait (struct target_ops *ops,
|
|||
if (record_hw_watchpoint)
|
||||
{
|
||||
if (record_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
Process record: hit hw watchpoint.\n");
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"Process record: hit hw "
|
||||
"watchpoint.\n");
|
||||
continue_flag = 0;
|
||||
}
|
||||
/* Check target signal */
|
||||
|
@ -2029,8 +2036,8 @@ static struct cmd_list_element *record_cmdlist, *set_record_cmdlist,
|
|||
static void
|
||||
set_record_command (char *args, int from_tty)
|
||||
{
|
||||
printf_unfiltered (_("\
|
||||
\"set record\" must be followed by an apporpriate subcommand.\n"));
|
||||
printf_unfiltered (_("\"set record\" must be followed "
|
||||
"by an apporpriate subcommand.\n"));
|
||||
help_list (set_record_cmdlist, "set record ", all_commands, gdb_stdout);
|
||||
}
|
||||
|
||||
|
@ -2222,8 +2229,9 @@ record_restore (void)
|
|||
error (_("Version mis-match or file format error in core file %s."),
|
||||
bfd_get_filename (core_bfd));
|
||||
if (record_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
Reading 4-byte magic cookie RECORD_FILE_MAGIC (0x%s)\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
" Reading 4-byte magic cookie "
|
||||
"RECORD_FILE_MAGIC (0x%s)\n",
|
||||
phex_nz (netorder32 (magic), 4));
|
||||
|
||||
/* Restore the entries in recfd into record_arch_list_head and
|
||||
|
@ -2260,8 +2268,9 @@ record_restore (void)
|
|||
rec->u.reg.len, &bfd_offset);
|
||||
|
||||
if (record_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
Reading register %d (1 plus %lu plus %d bytes)\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
" Reading register %d (1 "
|
||||
"plus %lu plus %d bytes)\n",
|
||||
rec->u.reg.num,
|
||||
(unsigned long) sizeof (regnum),
|
||||
rec->u.reg.len);
|
||||
|
@ -2285,8 +2294,9 @@ record_restore (void)
|
|||
rec->u.mem.len, &bfd_offset);
|
||||
|
||||
if (record_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
Reading memory %s (1 plus %lu plus %lu plus %d bytes)\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
" Reading memory %s (1 plus "
|
||||
"%lu plus %lu plus %d bytes)\n",
|
||||
paddress (get_current_arch (),
|
||||
rec->u.mem.addr),
|
||||
(unsigned long) sizeof (addr),
|
||||
|
@ -2311,8 +2321,9 @@ record_restore (void)
|
|||
rec->u.end.insn_num = count;
|
||||
record_insn_count = count + 1;
|
||||
if (record_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
Reading record_end (1 + %lu + %lu bytes), offset == %s\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
" Reading record_end (1 + "
|
||||
"%lu + %lu bytes), offset == %s\n",
|
||||
(unsigned long) sizeof (signal),
|
||||
(unsigned long) sizeof (count),
|
||||
paddress (get_current_arch (),
|
||||
|
@ -2489,8 +2500,9 @@ cmd_record_save (char *args, int from_tty)
|
|||
/* Write the magic code. */
|
||||
magic = RECORD_FILE_MAGIC;
|
||||
if (record_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
Writing 4-byte magic cookie RECORD_FILE_MAGIC (0x%s)\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
" Writing 4-byte magic cookie "
|
||||
"RECORD_FILE_MAGIC (0x%s)\n",
|
||||
phex_nz (magic, 4));
|
||||
bfdcore_write (obfd, osec, &magic, sizeof (magic), &bfd_offset);
|
||||
|
||||
|
@ -2513,8 +2525,9 @@ cmd_record_save (char *args, int from_tty)
|
|||
{
|
||||
case record_reg: /* reg */
|
||||
if (record_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
Writing register %d (1 plus %lu plus %d bytes)\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
" Writing register %d (1 "
|
||||
"plus %lu plus %d bytes)\n",
|
||||
record_list->u.reg.num,
|
||||
(unsigned long) sizeof (regnum),
|
||||
record_list->u.reg.len);
|
||||
|
@ -2531,8 +2544,9 @@ cmd_record_save (char *args, int from_tty)
|
|||
|
||||
case record_mem: /* mem */
|
||||
if (record_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
Writing memory %s (1 plus %lu plus %lu plus %d bytes)\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
" Writing memory %s (1 plus "
|
||||
"%lu plus %lu plus %d bytes)\n",
|
||||
paddress (gdbarch,
|
||||
record_list->u.mem.addr),
|
||||
(unsigned long) sizeof (addr),
|
||||
|
@ -2555,8 +2569,9 @@ cmd_record_save (char *args, int from_tty)
|
|||
|
||||
case record_end:
|
||||
if (record_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "\
|
||||
Writing record_end (1 + %lu + %lu bytes)\n",
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
" Writing record_end (1 + "
|
||||
"%lu + %lu bytes)\n",
|
||||
(unsigned long) sizeof (signal),
|
||||
(unsigned long) sizeof (count));
|
||||
/* Write signal value. */
|
||||
|
@ -2768,8 +2783,8 @@ Argument is filename. File must be created with 'record save'."),
|
|||
add_setshow_boolean_cmd ("stop-at-limit", no_class,
|
||||
&record_stop_at_limit, _("\
|
||||
Set whether record/replay stops when record/replay buffer becomes full."), _("\
|
||||
Show whether record/replay stops when record/replay buffer becomes full."), _("\
|
||||
Default is ON.\n\
|
||||
Show whether record/replay stops when record/replay buffer becomes full."),
|
||||
_("Default is ON.\n\
|
||||
When ON, if the record/replay buffer becomes full, ask user what to do.\n\
|
||||
When OFF, if the record/replay buffer becomes full,\n\
|
||||
delete the oldest recorded instruction to make room for each new one."),
|
||||
|
|
|
@ -100,7 +100,8 @@ init_regcache_descr (struct gdbarch *gdbarch)
|
|||
|
||||
/* Fill in a table of register types. */
|
||||
descr->register_type
|
||||
= GDBARCH_OBSTACK_CALLOC (gdbarch, descr->nr_cooked_registers, struct type *);
|
||||
= GDBARCH_OBSTACK_CALLOC (gdbarch, descr->nr_cooked_registers,
|
||||
struct type *);
|
||||
for (i = 0; i < descr->nr_cooked_registers; i++)
|
||||
descr->register_type[i] = gdbarch_register_type (gdbarch, i);
|
||||
|
||||
|
@ -292,7 +293,8 @@ regcache_save (struct regcache *dst, regcache_cooked_read_ftype *cooked_read,
|
|||
gdb_assert (dst->readonly_p);
|
||||
/* Clear the dest. */
|
||||
memset (dst->registers, 0, dst->descr->sizeof_cooked_registers);
|
||||
memset (dst->register_valid_p, 0, dst->descr->sizeof_cooked_register_valid_p);
|
||||
memset (dst->register_valid_p, 0,
|
||||
dst->descr->sizeof_cooked_register_valid_p);
|
||||
/* Copy over any registers (identified by their membership in the
|
||||
save_reggroup) and mark them as valid. The full [0 .. gdbarch_num_regs +
|
||||
gdbarch_num_pseudo_regs) range is checked since some architectures need
|
||||
|
@ -992,7 +994,8 @@ dump_endian_bytes (struct ui_file *file, enum bfd_endian endian,
|
|||
|
||||
enum regcache_dump_what
|
||||
{
|
||||
regcache_dump_none, regcache_dump_raw, regcache_dump_cooked, regcache_dump_groups
|
||||
regcache_dump_none, regcache_dump_raw,
|
||||
regcache_dump_cooked, regcache_dump_groups
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -1171,7 +1174,8 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
|
|||
{
|
||||
if (gdbarch_register_reggroup_p (gdbarch, regnum, group))
|
||||
{
|
||||
fprintf_unfiltered (file, "%s%s", sep, reggroup_name (group));
|
||||
fprintf_unfiltered (file,
|
||||
"%s%s", sep, reggroup_name (group));
|
||||
sep = ",";
|
||||
}
|
||||
}
|
||||
|
@ -1241,7 +1245,8 @@ extern initialize_file_ftype _initialize_regcache; /* -Wmissing-prototype */
|
|||
void
|
||||
_initialize_regcache (void)
|
||||
{
|
||||
regcache_descr_handle = gdbarch_data_register_post_init (init_regcache_descr);
|
||||
regcache_descr_handle
|
||||
= gdbarch_data_register_post_init (init_regcache_descr);
|
||||
|
||||
observer_attach_target_changed (regcache_observer_target_changed);
|
||||
observer_attach_thread_ptid_changed (regcache_thread_ptid_changed);
|
||||
|
@ -1249,21 +1254,24 @@ _initialize_regcache (void)
|
|||
add_com ("flushregs", class_maintenance, reg_flush_command,
|
||||
_("Force gdb to flush its register cache (maintainer command)"));
|
||||
|
||||
add_cmd ("registers", class_maintenance, maintenance_print_registers, _("\
|
||||
Print the internal register configuration.\n\
|
||||
Takes an optional file parameter."), &maintenanceprintlist);
|
||||
add_cmd ("registers", class_maintenance, maintenance_print_registers,
|
||||
_("Print the internal register configuration.\n"
|
||||
"Takes an optional file parameter."), &maintenanceprintlist);
|
||||
add_cmd ("raw-registers", class_maintenance,
|
||||
maintenance_print_raw_registers, _("\
|
||||
Print the internal register configuration including raw values.\n\
|
||||
Takes an optional file parameter."), &maintenanceprintlist);
|
||||
maintenance_print_raw_registers,
|
||||
_("Print the internal register configuration "
|
||||
"including raw values.\n"
|
||||
"Takes an optional file parameter."), &maintenanceprintlist);
|
||||
add_cmd ("cooked-registers", class_maintenance,
|
||||
maintenance_print_cooked_registers, _("\
|
||||
Print the internal register configuration including cooked values.\n\
|
||||
Takes an optional file parameter."), &maintenanceprintlist);
|
||||
maintenance_print_cooked_registers,
|
||||
_("Print the internal register configuration "
|
||||
"including cooked values.\n"
|
||||
"Takes an optional file parameter."), &maintenanceprintlist);
|
||||
add_cmd ("register-groups", class_maintenance,
|
||||
maintenance_print_register_groups, _("\
|
||||
Print the internal register configuration including each register's group.\n\
|
||||
Takes an optional file parameter."),
|
||||
maintenance_print_register_groups,
|
||||
_("Print the internal register configuration "
|
||||
"including each register's group.\n"
|
||||
"Takes an optional file parameter."),
|
||||
&maintenanceprintlist);
|
||||
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ extern struct gdbarch *get_regcache_arch (const struct regcache *regcache);
|
|||
|
||||
/* Return REGCACHE's address space. */
|
||||
|
||||
extern struct address_space *get_regcache_aspace (const struct regcache *regcache);
|
||||
extern struct address_space *get_regcache_aspace (const struct regcache *);
|
||||
|
||||
/* Transfer a raw register [0..NUM_REGS) between core-gdb and the
|
||||
regcache. */
|
||||
|
@ -154,9 +154,10 @@ extern void regcache_restore (struct regcache *dst,
|
|||
only transfer values already in the cache. */
|
||||
|
||||
extern struct regcache *regcache_dup (struct regcache *regcache);
|
||||
extern struct regcache *regcache_dup_no_passthrough (struct regcache *regcache);
|
||||
extern struct regcache *regcache_dup_no_passthrough (struct regcache *);
|
||||
extern void regcache_cpy (struct regcache *dest, struct regcache *src);
|
||||
extern void regcache_cpy_no_passthrough (struct regcache *dest, struct regcache *src);
|
||||
extern void regcache_cpy_no_passthrough (struct regcache *dest,
|
||||
struct regcache *src);
|
||||
|
||||
extern void registers_changed (void);
|
||||
extern void registers_changed_ptid (ptid_t);
|
||||
|
|
|
@ -578,8 +578,8 @@ remote_fileio_badfd (void)
|
|||
static void
|
||||
remote_fileio_return_errno (int retcode)
|
||||
{
|
||||
remote_fileio_reply (retcode,
|
||||
retcode < 0 ? remote_fileio_errno_to_target (errno) : 0);
|
||||
remote_fileio_reply (retcode, retcode < 0
|
||||
? remote_fileio_errno_to_target (errno) : 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -821,7 +821,8 @@ remote_fileio_func_read (char *buf)
|
|||
{
|
||||
retlength = remote_fileio_write_bytes (ptrval, buffer, ret);
|
||||
if (retlength != ret)
|
||||
ret = -1; /* errno has been set to EIO in remote_fileio_write_bytes() */
|
||||
ret = -1; /* errno has been set to EIO in
|
||||
remote_fileio_write_bytes() */
|
||||
}
|
||||
|
||||
if (ret < 0)
|
||||
|
@ -894,7 +895,8 @@ remote_fileio_func_write (char *buf)
|
|||
default:
|
||||
ret = write (fd, buffer, length);
|
||||
if (ret < 0 && errno == EACCES)
|
||||
errno = EBADF; /* Cygwin returns EACCESS when writing to a R/O file.*/
|
||||
errno = EBADF; /* Cygwin returns EACCESS when writing to a
|
||||
R/O file.*/
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1234,7 +1236,8 @@ remote_fileio_func_fstat (char *buf)
|
|||
{
|
||||
remote_fileio_to_fio_stat (&st, &fst);
|
||||
|
||||
retlength = remote_fileio_write_bytes (ptrval, (gdb_byte *) &fst, sizeof fst);
|
||||
retlength = remote_fileio_write_bytes (ptrval, (gdb_byte *) &fst,
|
||||
sizeof fst);
|
||||
if (retlength != sizeof fst)
|
||||
{
|
||||
remote_fileio_return_errno (-1);
|
||||
|
@ -1286,7 +1289,8 @@ remote_fileio_func_gettimeofday (char *buf)
|
|||
{
|
||||
remote_fileio_to_fio_timeval (&tv, &ftv);
|
||||
|
||||
retlength = remote_fileio_write_bytes (ptrval, (gdb_byte *) &ftv, sizeof ftv);
|
||||
retlength = remote_fileio_write_bytes (ptrval, (gdb_byte *) &ftv,
|
||||
sizeof ftv);
|
||||
if (retlength != sizeof ftv)
|
||||
{
|
||||
remote_fileio_return_errno (-1);
|
||||
|
@ -1492,7 +1496,8 @@ static void
|
|||
show_system_call_allowed (char *args, int from_tty)
|
||||
{
|
||||
if (args)
|
||||
error (_("Garbage after \"show remote system-call-allowed\" command: `%s'"), args);
|
||||
error (_("Garbage after \"show remote "
|
||||
"system-call-allowed\" command: `%s'"), args);
|
||||
printf_unfiltered ("Calling host system(3) call from target is %sallowed\n",
|
||||
remote_fio_system_call_allowed ? "" : "not ");
|
||||
}
|
||||
|
|
128
gdb/remote.c
128
gdb/remote.c
|
@ -1042,7 +1042,8 @@ show_packet_config_cmd (struct packet_config *config)
|
|||
switch (config->detect)
|
||||
{
|
||||
case AUTO_BOOLEAN_AUTO:
|
||||
printf_filtered (_("Support for the `%s' packet is auto-detected, currently %s.\n"),
|
||||
printf_filtered (_("Support for the `%s' packet "
|
||||
"is auto-detected, currently %s.\n"),
|
||||
config->name, support);
|
||||
break;
|
||||
case AUTO_BOOLEAN_TRUE:
|
||||
|
@ -1067,12 +1068,14 @@ add_packet_config_cmd (struct packet_config *config, const char *name,
|
|||
config->support = PACKET_SUPPORT_UNKNOWN;
|
||||
set_doc = xstrprintf ("Set use of remote protocol `%s' (%s) packet",
|
||||
name, title);
|
||||
show_doc = xstrprintf ("Show current use of remote protocol `%s' (%s) packet",
|
||||
show_doc = xstrprintf ("Show current use of remote "
|
||||
"protocol `%s' (%s) packet",
|
||||
name, title);
|
||||
/* set/show TITLE-packet {auto,on,off} */
|
||||
cmd_name = xstrprintf ("%s-packet", title);
|
||||
add_setshow_auto_boolean_cmd (cmd_name, class_obscure,
|
||||
&config->detect, set_doc, show_doc, NULL, /* help_doc */
|
||||
&config->detect, set_doc,
|
||||
show_doc, NULL, /* help_doc */
|
||||
set_remote_protocol_packet_cmd,
|
||||
show_remote_protocol_packet_cmd,
|
||||
&remote_set_cmdlist, &remote_show_cmdlist);
|
||||
|
@ -2345,7 +2348,8 @@ remote_get_threadlist (int startflag, threadref *nextthread, int result_limit,
|
|||
int result = 1;
|
||||
|
||||
/* Trancate result limit to be smaller than the packet size. */
|
||||
if ((((result_limit + 1) * BUF_THREAD_ID_SIZE) + 10) >= get_remote_packet_size ())
|
||||
if ((((result_limit + 1) * BUF_THREAD_ID_SIZE) + 10)
|
||||
>= get_remote_packet_size ())
|
||||
result_limit = (get_remote_packet_size () / BUF_THREAD_ID_SIZE) - 2;
|
||||
|
||||
pack_threadlist_request (rs->buf, startflag, result_limit, nextthread);
|
||||
|
@ -2509,7 +2513,8 @@ start_thread (struct gdb_xml_parser *parser,
|
|||
item.ptid = read_ptid (id, NULL);
|
||||
|
||||
if (VEC_length (gdb_xml_value_s, attributes) > 1)
|
||||
item.core = *(ULONGEST *) VEC_index (gdb_xml_value_s, attributes, 1)->value;
|
||||
item.core = *(ULONGEST *) VEC_index (gdb_xml_value_s,
|
||||
attributes, 1)->value;
|
||||
else
|
||||
item.core = -1;
|
||||
|
||||
|
@ -2616,7 +2621,9 @@ remote_threads_info (struct target_ops *ops)
|
|||
int i;
|
||||
struct thread_item *item;
|
||||
|
||||
for (i = 0; VEC_iterate (thread_item_t, context.items, i, item); ++i)
|
||||
for (i = 0;
|
||||
VEC_iterate (thread_item_t, context.items, i, item);
|
||||
++i)
|
||||
{
|
||||
if (!ptid_equal (item->ptid, null_ptid))
|
||||
{
|
||||
|
@ -3055,7 +3062,8 @@ get_offsets (void)
|
|||
offs, num_segments, segments);
|
||||
|
||||
if (ret == 0 && !do_sections)
|
||||
error (_("Can not handle qOffsets TextSeg response with this symbol file"));
|
||||
error (_("Can not handle qOffsets TextSeg "
|
||||
"response with this symbol file"));
|
||||
|
||||
if (ret > 0)
|
||||
do_sections = 0;
|
||||
|
@ -3068,9 +3076,10 @@ get_offsets (void)
|
|||
{
|
||||
offs->offsets[SECT_OFF_TEXT (symfile_objfile)] = text_addr;
|
||||
|
||||
/* This is a temporary kludge to force data and bss to use the same offsets
|
||||
because that's what nlmconv does now. The real solution requires changes
|
||||
to the stub and remote.c that I don't have time to do right now. */
|
||||
/* This is a temporary kludge to force data and bss to use the
|
||||
same offsets because that's what nlmconv does now. The real
|
||||
solution requires changes to the stub and remote.c that I
|
||||
don't have time to do right now. */
|
||||
|
||||
offs->offsets[SECT_OFF_DATA (symfile_objfile)] = data_addr;
|
||||
offs->offsets[SECT_OFF_BSS (symfile_objfile)] = data_addr;
|
||||
|
@ -3199,7 +3208,8 @@ remote_start_remote (struct ui_out *uiout, void *opaque)
|
|||
if (non_stop)
|
||||
{
|
||||
if (!rs->non_stop_aware)
|
||||
error (_("Non-stop mode requested, but remote does not support non-stop"));
|
||||
error (_("Non-stop mode requested, but remote "
|
||||
"does not support non-stop"));
|
||||
|
||||
putpkt ("QNonStop:1");
|
||||
getpkt (&rs->buf, &rs->buf_size, 0);
|
||||
|
@ -3488,9 +3498,9 @@ remote_serial_open (char *name)
|
|||
to be. */
|
||||
if (!udp_warning && strncmp (name, "udp:", 4) == 0)
|
||||
{
|
||||
warning (_("\
|
||||
The remote protocol may be unreliable over UDP.\n\
|
||||
Some events may be lost, rendering further debugging impossible."));
|
||||
warning (_("The remote protocol may be unreliable over UDP.\n"
|
||||
"Some events may be lost, rendering further debugging "
|
||||
"impossible."));
|
||||
udp_warning = 1;
|
||||
}
|
||||
|
||||
|
@ -3859,7 +3869,8 @@ remote_query_supported (void)
|
|||
break;
|
||||
|
||||
default:
|
||||
warning (_("unrecognized item \"%s\" in \"qSupported\" response"), p);
|
||||
warning (_("unrecognized item \"%s\" "
|
||||
"in \"qSupported\" response"), p);
|
||||
continue;
|
||||
}
|
||||
end[-1] = '\0';
|
||||
|
@ -3900,7 +3911,8 @@ remote_query_supported (void)
|
|||
|
||||
|
||||
static void
|
||||
remote_open_1 (char *name, int from_tty, struct target_ops *target, int extended_p)
|
||||
remote_open_1 (char *name, int from_tty,
|
||||
struct target_ops *target, int extended_p)
|
||||
{
|
||||
struct remote_state *rs = get_remote_state ();
|
||||
|
||||
|
@ -4168,7 +4180,8 @@ extended_remote_attach_1 (struct target_ops *target, char *args, int from_tty)
|
|||
putpkt (rs->buf);
|
||||
getpkt (&rs->buf, &rs->buf_size, 0);
|
||||
|
||||
if (packet_ok (rs->buf, &remote_protocol_packets[PACKET_vAttach]) == PACKET_OK)
|
||||
if (packet_ok (rs->buf,
|
||||
&remote_protocol_packets[PACKET_vAttach]) == PACKET_OK)
|
||||
{
|
||||
if (from_tty)
|
||||
printf_unfiltered (_("Attached to %s\n"),
|
||||
|
@ -6159,7 +6172,8 @@ check_binary_download (CORE_ADDR addr)
|
|||
{
|
||||
if (remote_debug)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"binary downloading NOT suppported by target\n");
|
||||
"binary downloading NOT "
|
||||
"supported by target\n");
|
||||
remote_protocol_packets[PACKET_X].support = PACKET_DISABLE;
|
||||
}
|
||||
else
|
||||
|
@ -6668,7 +6682,8 @@ readchar (int timeout)
|
|||
/* no return */
|
||||
case SERIAL_ERROR:
|
||||
pop_target ();
|
||||
perror_with_name (_("Remote communication error. Target disconnected."));
|
||||
perror_with_name (_("Remote communication error. "
|
||||
"Target disconnected."));
|
||||
/* no return */
|
||||
case SERIAL_TIMEOUT:
|
||||
break;
|
||||
|
@ -7045,8 +7060,8 @@ read_frame (char **buf_p,
|
|||
str = escape_buffer (buf, bc);
|
||||
old_chain = make_cleanup (xfree, str);
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"\
|
||||
Bad checksum, sentsum=0x%x, csum=0x%x, buf=%s\n",
|
||||
"Bad checksum, sentsum=0x%x, "
|
||||
"csum=0x%x, buf=%s\n",
|
||||
pktcsum, csum, str);
|
||||
do_cleanups (old_chain);
|
||||
}
|
||||
|
@ -7411,9 +7426,10 @@ extended_remote_mourn_1 (struct target_ops *target)
|
|||
|
||||
if (rs->buf[0] == 'S' || rs->buf[0] == 'T')
|
||||
{
|
||||
/* Assume that the target has been restarted. Set inferior_ptid
|
||||
so that bits of core GDB realizes there's something here, e.g.,
|
||||
so that the user can say "kill" again. */
|
||||
/* Assume that the target has been restarted. Set
|
||||
inferior_ptid so that bits of core GDB realizes
|
||||
there's something here, e.g., so that the user can
|
||||
say "kill" again. */
|
||||
inferior_ptid = magic_null_ptid;
|
||||
}
|
||||
}
|
||||
|
@ -8153,7 +8169,8 @@ remote_xfer_partial (struct target_ops *ops, enum target_object object,
|
|||
&remote_protocol_packets
|
||||
[PACKET_qXfer_siginfo_read]);
|
||||
else
|
||||
return remote_write_qxfer (ops, "siginfo", annex, writebuf, offset, len,
|
||||
return remote_write_qxfer (ops, "siginfo", annex,
|
||||
writebuf, offset, len,
|
||||
&remote_protocol_packets
|
||||
[PACKET_qXfer_siginfo_write]);
|
||||
}
|
||||
|
@ -8161,7 +8178,8 @@ remote_xfer_partial (struct target_ops *ops, enum target_object object,
|
|||
if (object == TARGET_OBJECT_STATIC_TRACE_DATA)
|
||||
{
|
||||
if (readbuf)
|
||||
return remote_read_qxfer (ops, "statictrace", annex, readbuf, offset, len,
|
||||
return remote_read_qxfer (ops, "statictrace", annex,
|
||||
readbuf, offset, len,
|
||||
&remote_protocol_packets
|
||||
[PACKET_qXfer_statictrace_read]);
|
||||
else
|
||||
|
@ -8387,7 +8405,8 @@ remote_rcmd (char *command,
|
|||
strcpy (rs->buf, "qRcmd,");
|
||||
p = strchr (rs->buf, '\0');
|
||||
|
||||
if ((strlen (rs->buf) + strlen (command) * 2 + 8/*misc*/) > get_remote_packet_size ())
|
||||
if ((strlen (rs->buf) + strlen (command) * 2 + 8/*misc*/)
|
||||
> get_remote_packet_size ())
|
||||
error (_("\"monitor\" command ``%s'' is too long."), command);
|
||||
|
||||
/* Encode the actual command. */
|
||||
|
@ -8602,8 +8621,9 @@ threadlist_update_test_cmd (char *cmd, int tty)
|
|||
static void
|
||||
init_remote_threadtests (void)
|
||||
{
|
||||
add_com ("tlist", class_obscure, threadlist_test_cmd, _("\
|
||||
Fetch and print the remote list of thread identifiers, one pkt only"));
|
||||
add_com ("tlist", class_obscure, threadlist_test_cmd,
|
||||
_("Fetch and print the remote list of "
|
||||
"thread identifiers, one pkt only"));
|
||||
add_com ("tinfo", class_obscure, threadinfo_test_cmd,
|
||||
_("Fetch and display info about one thread"));
|
||||
add_com ("tset", class_obscure, threadset_test_cmd,
|
||||
|
@ -8685,7 +8705,8 @@ remote_get_thread_local_address (struct target_ops *ops,
|
|||
|
||||
putpkt (rs->buf);
|
||||
getpkt (&rs->buf, &rs->buf_size, 0);
|
||||
result = packet_ok (rs->buf, &remote_protocol_packets[PACKET_qGetTLSAddr]);
|
||||
result = packet_ok (rs->buf,
|
||||
&remote_protocol_packets[PACKET_qGetTLSAddr]);
|
||||
if (result == PACKET_OK)
|
||||
{
|
||||
ULONGEST result;
|
||||
|
@ -9378,7 +9399,8 @@ remote_file_put (const char *local_file, const char *remote_file, int from_tty)
|
|||
{
|
||||
if (!saw_eof)
|
||||
{
|
||||
bytes = fread (buffer + bytes_in_buffer, 1, io_size - bytes_in_buffer,
|
||||
bytes = fread (buffer + bytes_in_buffer, 1,
|
||||
io_size - bytes_in_buffer,
|
||||
file);
|
||||
if (bytes == 0)
|
||||
{
|
||||
|
@ -9400,7 +9422,8 @@ remote_file_put (const char *local_file, const char *remote_file, int from_tty)
|
|||
bytes += bytes_in_buffer;
|
||||
bytes_in_buffer = 0;
|
||||
|
||||
retcode = remote_hostio_pwrite (fd, buffer, bytes, offset, &remote_errno);
|
||||
retcode = remote_hostio_pwrite (fd, buffer, bytes,
|
||||
offset, &remote_errno);
|
||||
|
||||
if (retcode < 0)
|
||||
remote_hostio_error (remote_errno);
|
||||
|
@ -9702,7 +9725,8 @@ remote_download_tracepoint (struct breakpoint *t)
|
|||
encode_actions (t, loc, &tdp_actions, &stepping_actions);
|
||||
old_chain = make_cleanup (free_actions_list_cleanup_wrapper,
|
||||
tdp_actions);
|
||||
(void) make_cleanup (free_actions_list_cleanup_wrapper, stepping_actions);
|
||||
(void) make_cleanup (free_actions_list_cleanup_wrapper,
|
||||
stepping_actions);
|
||||
|
||||
tpaddr = loc->address;
|
||||
sprintf_vma (addrbuf, tpaddr);
|
||||
|
@ -9734,7 +9758,8 @@ remote_download_tracepoint (struct breakpoint *t)
|
|||
/* Fast tracepoints are functionally identical to regular
|
||||
tracepoints, so don't take lack of support as a reason to
|
||||
give up on the trace run. */
|
||||
warning (_("Target does not support fast tracepoints, downloading %d as regular tracepoint"), t->number);
|
||||
warning (_("Target does not support fast tracepoints, "
|
||||
"downloading %d as regular tracepoint"), t->number);
|
||||
}
|
||||
else if (t->type == bp_static_tracepoint)
|
||||
{
|
||||
|
@ -9773,7 +9798,8 @@ remote_download_tracepoint (struct breakpoint *t)
|
|||
do_cleanups (aexpr_chain);
|
||||
}
|
||||
else
|
||||
warning (_("Target does not support conditional tracepoints, ignoring tp %d cond"), t->number);
|
||||
warning (_("Target does not support conditional tracepoints, "
|
||||
"ignoring tp %d cond"), t->number);
|
||||
}
|
||||
|
||||
if (t->commands || *default_collect)
|
||||
|
@ -9819,7 +9845,8 @@ remote_download_tracepoint (struct breakpoint *t)
|
|||
}
|
||||
}
|
||||
|
||||
if (remote_protocol_packets[PACKET_TracepointSource].support == PACKET_ENABLE)
|
||||
if (remote_protocol_packets[PACKET_TracepointSource].support
|
||||
== PACKET_ENABLE)
|
||||
{
|
||||
if (t->addr_string)
|
||||
{
|
||||
|
@ -10215,7 +10242,7 @@ Specify the serial device it is connected to\n\
|
|||
remote_ops.to_has_stack = default_child_has_stack;
|
||||
remote_ops.to_has_registers = default_child_has_registers;
|
||||
remote_ops.to_has_execution = default_child_has_execution;
|
||||
remote_ops.to_has_thread_control = tc_schedlock; /* can lock scheduler */
|
||||
remote_ops.to_has_thread_control = tc_schedlock; /* can lock scheduler */
|
||||
remote_ops.to_can_execute_reverse = remote_can_execute_reverse;
|
||||
remote_ops.to_magic = OPS_MAGIC;
|
||||
remote_ops.to_memory_map = remote_memory_map;
|
||||
|
@ -10233,16 +10260,19 @@ Specify the serial device it is connected to\n\
|
|||
remote_ops.to_supports_multi_process = remote_supports_multi_process;
|
||||
remote_ops.to_trace_init = remote_trace_init;
|
||||
remote_ops.to_download_tracepoint = remote_download_tracepoint;
|
||||
remote_ops.to_download_trace_state_variable = remote_download_trace_state_variable;
|
||||
remote_ops.to_download_trace_state_variable
|
||||
= remote_download_trace_state_variable;
|
||||
remote_ops.to_trace_set_readonly_regions = remote_trace_set_readonly_regions;
|
||||
remote_ops.to_trace_start = remote_trace_start;
|
||||
remote_ops.to_get_trace_status = remote_get_trace_status;
|
||||
remote_ops.to_trace_stop = remote_trace_stop;
|
||||
remote_ops.to_trace_find = remote_trace_find;
|
||||
remote_ops.to_get_trace_state_variable_value = remote_get_trace_state_variable_value;
|
||||
remote_ops.to_get_trace_state_variable_value
|
||||
= remote_get_trace_state_variable_value;
|
||||
remote_ops.to_save_trace_data = remote_save_trace_data;
|
||||
remote_ops.to_upload_tracepoints = remote_upload_tracepoints;
|
||||
remote_ops.to_upload_trace_state_variables = remote_upload_trace_state_variables;
|
||||
remote_ops.to_upload_trace_state_variables
|
||||
= remote_upload_trace_state_variables;
|
||||
remote_ops.to_get_raw_trace_data = remote_get_raw_trace_data;
|
||||
remote_ops.to_set_disconnected_tracing = remote_set_disconnected_tracing;
|
||||
remote_ops.to_set_circular_trace_buffer = remote_set_circular_trace_buffer;
|
||||
|
@ -10536,7 +10566,8 @@ If set, a break, instead of a cntrl-c, is sent to the remote target."),
|
|||
deprecate_cmd (cmd, "show remote interrupt-sequence");
|
||||
|
||||
add_setshow_enum_cmd ("interrupt-sequence", class_support,
|
||||
interrupt_sequence_modes, &interrupt_sequence_mode, _("\
|
||||
interrupt_sequence_modes, &interrupt_sequence_mode,
|
||||
_("\
|
||||
Set interrupt sequence to remote target."), _("\
|
||||
Show interrupt sequence to remote target."), _("\
|
||||
Valid value is \"Ctrl-C\", \"BREAK\" or \"BREAK-g\". The default is \"Ctrl-C\"."),
|
||||
|
@ -10590,14 +10621,18 @@ further restriction and ``limit'' to enable that restriction."),
|
|||
Set the maximum number of target hardware watchpoints."), _("\
|
||||
Show the maximum number of target hardware watchpoints."), _("\
|
||||
Specify a negative limit for unlimited."),
|
||||
NULL, NULL, /* FIXME: i18n: The maximum number of target hardware watchpoints is %s. */
|
||||
NULL, NULL, /* FIXME: i18n: The maximum
|
||||
number of target hardware
|
||||
watchpoints is %s. */
|
||||
&remote_set_cmdlist, &remote_show_cmdlist);
|
||||
add_setshow_zinteger_cmd ("hardware-breakpoint-limit", no_class,
|
||||
&remote_hw_breakpoint_limit, _("\
|
||||
Set the maximum number of target hardware breakpoints."), _("\
|
||||
Show the maximum number of target hardware breakpoints."), _("\
|
||||
Specify a negative limit for unlimited."),
|
||||
NULL, NULL, /* FIXME: i18n: The maximum number of target hardware breakpoints is %s. */
|
||||
NULL, NULL, /* FIXME: i18n: The maximum
|
||||
number of target hardware
|
||||
breakpoints is %s. */
|
||||
&remote_set_cmdlist, &remote_show_cmdlist);
|
||||
|
||||
add_setshow_integer_cmd ("remoteaddresssize", class_obscure,
|
||||
|
@ -10722,7 +10757,8 @@ Show the maximum size of the address (in bits) in a memory packet."), NULL,
|
|||
"qAttached", "query-attached", 0);
|
||||
|
||||
add_packet_config_cmd (&remote_protocol_packets[PACKET_ConditionalTracepoints],
|
||||
"ConditionalTracepoints", "conditional-tracepoints", 0);
|
||||
"ConditionalTracepoints",
|
||||
"conditional-tracepoints", 0);
|
||||
add_packet_config_cmd (&remote_protocol_packets[PACKET_FastTracepoints],
|
||||
"FastTracepoints", "fast-tracepoints", 0);
|
||||
|
||||
|
@ -10749,7 +10785,9 @@ Show use of remote protocol `Z' packets "), _("\
|
|||
When set, GDB will attempt to use the remote breakpoint and watchpoint\n\
|
||||
packets."),
|
||||
set_remote_protocol_Z_packet_cmd,
|
||||
show_remote_protocol_Z_packet_cmd, /* FIXME: i18n: Use of remote protocol `Z' packets is %s. */
|
||||
show_remote_protocol_Z_packet_cmd,
|
||||
/* FIXME: i18n: Use of remote protocol
|
||||
`Z' packets is %s. */
|
||||
&remote_set_cmdlist, &remote_show_cmdlist);
|
||||
|
||||
add_prefix_cmd ("remote", class_files, remote_command, _("\
|
||||
|
|
|
@ -517,7 +517,8 @@ console_select_thread (void *arg)
|
|||
wait_events[0] = state->stop_select;
|
||||
wait_events[1] = h;
|
||||
|
||||
event_index = WaitForMultipleObjects (2, wait_events, FALSE, INFINITE);
|
||||
event_index = WaitForMultipleObjects (2, wait_events,
|
||||
FALSE, INFINITE);
|
||||
|
||||
if (event_index == WAIT_OBJECT_0
|
||||
|| WaitForSingleObject (state->stop_select, 0) == WAIT_OBJECT_0)
|
||||
|
@ -653,7 +654,8 @@ file_select_thread (void *arg)
|
|||
{
|
||||
select_thread_wait (state);
|
||||
|
||||
if (SetFilePointer (h, 0, NULL, FILE_CURRENT) == INVALID_SET_FILE_POINTER)
|
||||
if (SetFilePointer (h, 0, NULL, FILE_CURRENT)
|
||||
== INVALID_SET_FILE_POINTER)
|
||||
SetEvent (state->except_event);
|
||||
else
|
||||
SetEvent (state->read_event);
|
||||
|
|
|
@ -178,7 +178,7 @@ net_open (struct serial *scb, const char *name)
|
|||
port_str = strchr (name, ':');
|
||||
|
||||
if (!port_str)
|
||||
error (_("net_open: No colon in host name!")); /* Shouldn't ever happen */
|
||||
error (_("net_open: No colon in host name!")); /* Shouldn't ever happen */
|
||||
|
||||
tmp = min (port_str - name, (int) sizeof hostname - 1);
|
||||
strncpy (hostname, name, tmp); /* Don't want colon */
|
||||
|
@ -216,7 +216,8 @@ net_open (struct serial *scb, const char *name)
|
|||
ioarg = 1;
|
||||
ioctl (scb->fd, FIONBIO, &ioarg);
|
||||
|
||||
/* Use Non-blocking connect. connect() will return 0 if connected already. */
|
||||
/* Use Non-blocking connect. connect() will return 0 if connected
|
||||
already. */
|
||||
n = connect (scb->fd, (struct sockaddr *) &sockaddr, sizeof (sockaddr));
|
||||
|
||||
if (n < 0)
|
||||
|
|
|
@ -388,7 +388,8 @@ hardwire_raw (struct serial *scb)
|
|||
struct hardwire_ttystate state;
|
||||
|
||||
if (get_tty_state (scb, &state))
|
||||
fprintf_unfiltered (gdb_stderr, "get_tty_state failed: %s\n", safe_strerror (errno));
|
||||
fprintf_unfiltered (gdb_stderr, "get_tty_state failed: %s\n",
|
||||
safe_strerror (errno));
|
||||
|
||||
#ifdef HAVE_TERMIOS
|
||||
state.termios.c_iflag = 0;
|
||||
|
@ -431,7 +432,8 @@ hardwire_raw (struct serial *scb)
|
|||
scb->current_timeout = 0;
|
||||
|
||||
if (set_tty_state (scb, &state))
|
||||
fprintf_unfiltered (gdb_stderr, "set_tty_state failed: %s\n", safe_strerror (errno));
|
||||
fprintf_unfiltered (gdb_stderr, "set_tty_state failed: %s\n",
|
||||
safe_strerror (errno));
|
||||
}
|
||||
|
||||
/* Wait for input on scb, with timeout seconds. Returns 0 on success,
|
||||
|
@ -497,7 +499,8 @@ wait_for (struct serial *scb, int timeout)
|
|||
struct hardwire_ttystate state;
|
||||
|
||||
if (get_tty_state (scb, &state))
|
||||
fprintf_unfiltered (gdb_stderr, "get_tty_state failed: %s\n", safe_strerror (errno));
|
||||
fprintf_unfiltered (gdb_stderr, "get_tty_state failed: %s\n",
|
||||
safe_strerror (errno));
|
||||
|
||||
#ifdef HAVE_TERMIOS
|
||||
if (timeout < 0)
|
||||
|
@ -549,17 +552,19 @@ wait_for (struct serial *scb, int timeout)
|
|||
#endif
|
||||
|
||||
if (set_tty_state (scb, &state))
|
||||
fprintf_unfiltered (gdb_stderr, "set_tty_state failed: %s\n", safe_strerror (errno));
|
||||
fprintf_unfiltered (gdb_stderr, "set_tty_state failed: %s\n",
|
||||
safe_strerror (errno));
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* HAVE_TERMIO || HAVE_TERMIOS */
|
||||
}
|
||||
|
||||
/* Read a character with user-specified timeout. TIMEOUT is number of seconds
|
||||
to wait, or -1 to wait forever. Use timeout of 0 to effect a poll. Returns
|
||||
char if successful. Returns SERIAL_TIMEOUT if timeout expired, EOF if line
|
||||
dropped dead, or SERIAL_ERROR for any other error (see errno in that case). */
|
||||
/* Read a character with user-specified timeout. TIMEOUT is number of
|
||||
seconds to wait, or -1 to wait forever. Use timeout of 0 to effect
|
||||
a poll. Returns char if successful. Returns SERIAL_TIMEOUT if
|
||||
timeout expired, EOF if line dropped dead, or SERIAL_ERROR for any
|
||||
other error (see errno in that case). */
|
||||
|
||||
/* FIXME: cagney/1999-09-16: Don't replace this with the equivalent
|
||||
ser_base*() until the old TERMIOS/SGTTY/... timer code has been
|
||||
|
@ -631,7 +636,7 @@ do_hardwire_readchar (struct serial *scb, int timeout)
|
|||
else if (errno == EINTR)
|
||||
continue;
|
||||
else
|
||||
return SERIAL_ERROR; /* Got an error from read */
|
||||
return SERIAL_ERROR; /* Got an error from read. */
|
||||
}
|
||||
|
||||
scb->bufcnt = status;
|
||||
|
@ -773,13 +778,14 @@ rate_to_code (int rate)
|
|||
{
|
||||
if (i)
|
||||
{
|
||||
warning (_("Invalid baud rate %d. Closest values are %d and %d."),
|
||||
rate, baudtab[i - 1].rate, baudtab[i].rate);
|
||||
warning (_("Invalid baud rate %d. "
|
||||
"Closest values are %d and %d."),
|
||||
rate, baudtab[i - 1].rate, baudtab[i].rate);
|
||||
}
|
||||
else
|
||||
{
|
||||
warning (_("Invalid baud rate %d. Minimum value is %d."),
|
||||
rate, baudtab[0].rate);
|
||||
rate, baudtab[0].rate);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue