* 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 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.
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),
"(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,
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);
}
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);
/* */
-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);
}
/* 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,
/* 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. */
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,
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 *);
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:
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);
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)
{
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;
}
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;
{
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;
}
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);
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"));
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"));
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;
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
{
}
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);
_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);
}
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;
{
/* 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;
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"));
}
{
/* 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;
{
/* 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;
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);
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.
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);
}
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);
}
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);
}
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
retval = (int) val;
else
{
- printf_filtered (_("Convenience variable must have integer value.\n"));
+ printf_filtered (_("Convenience variable must "
+ "have integer value.\n"));
retval = 0;
}
}
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]);
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;
}
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);
}
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)
{
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));
}
}
&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);
}
}
"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,
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
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;
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;
(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)
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);
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)
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;
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) +
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
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 ");
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))
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
/* 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
}
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);
}
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;
}
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
/* 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;
&& 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)
{
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;
}
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;
}
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)
{
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 ();
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;
/* 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 (),
}
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;
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. */
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)
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;
}
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);
}
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)));
}
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)),
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;
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);
}
{
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;
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;
/* 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. */
break;
default:
- perror_with_name ("Internal error while converting character sets");
+ perror_with_name ("Internal error while "
+ "converting character sets");
}
}
}
return 0;
default:
- perror_with_name ("Internal error while converting character sets");
+ perror_with_name ("Internal error while "
+ "converting character sets");
}
}
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());
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);
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);
_("\
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\
{
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);
}
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;
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;
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;
}
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;
}
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(). */
}
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)
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."));
}
{
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;
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,
}
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."));
}
}
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);
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 */
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 */
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);
}
>= 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>";
}
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);
}
/* 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;
}
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
* 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);
{
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;
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;
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. */
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);
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);
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);
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);
/* 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);
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);
{
/* 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));
}
}
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);
#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,
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 *
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);
}
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;
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,
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;
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. */
/* 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);
break;
default:
- internal_error (__FILE__, __LINE__, _("Unknown CFI encountered."));
+ internal_error (__FILE__, __LINE__,
+ _("Unknown CFI encountered."));
}
}
}
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);
}
break;
default:
- internal_error (__FILE__, __LINE__, _("Invalid or unsupported encoding"));
+ internal_error (__FILE__, __LINE__,
+ _("Invalid or unsupported encoding"));
}
if ((encoding & 0x07) == 0x00)
*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"));
}
}
\f
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;
\f
/* 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)
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;
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;
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;
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];
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);
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,
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;
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;
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;
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)
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
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)
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));
}
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. */
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);
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);
}
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);
}
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
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
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);
}
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 */
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 *);
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 *);
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));
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;
> 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;
}
{
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,
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;
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)
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;
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);
}
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));
}
{
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);
}
/* 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;
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;
}
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);
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);
}
}
}
/* 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)
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;
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;
}
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
if (!base_known)
{
complaint (&symfile_complaints,
- _("Invalid .debug_ranges data (no base address)"));
+ _("Invalid .debug_ranges data "
+ "(no base address)"));
return;
}
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;
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);
{
/* 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;
/* 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) :
"");
}
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);
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);
}
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
{
&& 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,
/* 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;
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;
}
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:
}
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);
{
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);
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;
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);
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);
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;
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:
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;
}
/* 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,
}
}
-/* 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_") */
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 = ".";
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);
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",
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.",
}
else
{
- fprintf_unfiltered (f, " [not printed, max nesting level reached]\n");
+ fprintf_unfiltered (f,
+ " [not printed, max nesting level reached]\n");
}
}
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;
}
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);
}
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;
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 == ' ')
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;
}
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;
_("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"),
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"),
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;
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;
}
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;
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);
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;
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);
}
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
}
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;
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;
/* 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)
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);
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);
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
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;
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)
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;
}
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
};
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
};
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);
}
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)
}
struct_return = using_struct_return (exp->gdbarch,
- value_type (method), val_type);
+ value_type (method),
+ val_type);
}
else if (expect_type != NULL)
{
if (method)
{
if (TYPE_CODE (value_type (method)) != TYPE_CODE_FUNC)
- 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
+ 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
function descriptors. */
if (struct_return)
called_method
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,
/* 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);
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++;
{
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))
{
{
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);
}
}
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. */
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)
{
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 */
/* 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 */
}
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;
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)
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:
/* 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++)
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:
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))
}
else
{
- struct value *retvalp = evaluate_subexp_for_address (exp, pos, noside);
+ struct value *retvalp = evaluate_subexp_for_address (exp, pos,
+ noside);
return retvalp;
}
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:
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);
}
{
(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++;
}
}
/* 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
{
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
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;
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;
}
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);
/* 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);
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)
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
*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;
}
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++)
{
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;
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");
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;
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;
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.
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.
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.
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 */
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];
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) */
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;
};
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)
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 */
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 */
/* 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
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),
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
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;
(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 == ',')
{
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\
{
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;
}
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;
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);
}
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)
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
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);
}
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);
}
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);
}
{
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
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));
}
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));
}
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
{
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;
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);
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;
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;
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
/* 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 */
/* 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(). */
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 */
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);
}
"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
{
"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))
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);
/* 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;
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);
}
* 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
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;
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{};
#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)
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
{
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)
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)
{
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);
}
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);
}
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);
}
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:
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);
}
/* 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);
}
/* 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
/* 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);
}
}
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)
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);
}
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\
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);
#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;
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;
}
/* 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,
{
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
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
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. */
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
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 */
{
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);
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"));
}
}
\f
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, "");
}
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");
}
}
}
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");
}
}
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);
}
$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, _("\
$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);
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, _("\
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);
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);
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 */
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. */
{
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);
}
\f
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. */
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);
}
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);
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
}
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 ();
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);
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);
}
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
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 *);
/* 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
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
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;
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);
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;
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;
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
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;
&& 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
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;
}
|| !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);
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;
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)
{
&& 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
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)
&& 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
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);
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"));
}
}
&& 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;
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 ());
}
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
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;
}
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
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;
}
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
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."),
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);
"\"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 ();
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)
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:
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))
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)
/* 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)
{
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);
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;
}
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
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
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)
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 */
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 */
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 */
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);
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,
#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) \
/* 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 *);
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 *
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;
{
/* 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. */
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 ();
}
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);
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));
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);
}
else
{
- printf_unfiltered (_("duplicate request for %d ignored.\n"), num);
+ printf_unfiltered (_("duplicate request for %d ignored.\n"),
+ num);
}
}
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
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
{
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);
}
}
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);
}
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;
}
}
- 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);
}
*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);
}
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
/* 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);
}
/* 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,
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
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);
}
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 */
}
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;
}
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);
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)
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;
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);
}
}
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;
}
{
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);
}
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);
{
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);
}
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));
}
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;
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));
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));
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);
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;
}
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;
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");
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))
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;
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
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 ())
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
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
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)
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)
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? */
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];
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");
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));
}
}
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. */
{
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;
}
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;
}
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;
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
};
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);
}
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
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. */
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);
}
/* 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;
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);
}
/* 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;
}
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);
}
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);
}
/* 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) ? "" : " ...");
}
/* 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,
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);
}
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
{
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);
}
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);
}
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)
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);
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);
}
}
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;
}
#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."));
}
_("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);
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
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
default:
complaint (&symfile_complaints,
- _("declaration block contains unhandled symbol type %d"),
+ _("declaration block contains "
+ "unhandled symbol type %d"),
tsym.st);
}
}
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;
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;
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
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);
}
}
/* 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;
}
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;
}
/* 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;
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);
}
/* 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++;
{
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)
{
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 */
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))
{
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))
{
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))
{
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))
{
{
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;
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;
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);
/* 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);
{
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:
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:
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;
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))
/* 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;
/* 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.
-
- 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). */
+ /* 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). */
if (pst && strcmp (namestring, pst->filename) == 0)
continue;
}
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
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,
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,
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"
/* 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 == '=')
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 (?). */
{
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);
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. */
/* 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':
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,
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)
{
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,
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':
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,
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:
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;
}
/* 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;
}
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 */
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. */
{
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;
}
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 **)
/* 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;
}
}
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));
}
/* 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 ();
}
(*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;
}
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);
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
{
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;
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];
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;
}
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"));
}
{
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;
{
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;
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
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)
{
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)
{
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);
}
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);
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));
}
}
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);
*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);
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);
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);
}
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)
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
{
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);
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)
{
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",
}
}
else
- resp_len = monitor_expect_prompt (buf, sizeof buf); /* get response */
+ resp_len = monitor_expect_prompt (buf, sizeof buf); /* get response */
p = buf;
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);
}
}
- 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. */
/* 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)
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
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
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) */
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,
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);
}
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;
#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
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;
{
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"),
/* 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;
}
#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);
\f
/* LEVEL is the depth to indent lines by. */
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)
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;
{
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)
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);
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:
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);
}
/* 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);
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;
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++;
{
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;
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);
/* 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
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;
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)
{
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);
}
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);
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
}
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),
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);
{
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;
}
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)
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);
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);
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);
}
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);
}
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;
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:
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;
}
if (bad)
- error (_("Inappropriate modifiers to format specifier '%c' in printf"),
+ error (_("Inappropriate modifiers to "
+ "format specifier '%c' in printf"),
*f);
f++;
{ 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" },
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);
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);
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);
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);
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? */
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]);
#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"));
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);
}
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];
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
(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);
/* 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,
{
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)
{
}
}
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))
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)
{
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
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);
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);
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);
}
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)
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 */
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);
}
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
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);
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),
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 (),
/* 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);
{
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);
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),
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. */
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."),
/* 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);
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
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
{
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 = ",";
}
}
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);
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);
}
/* 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. */
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);
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
{
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)
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;
}
{
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);
{
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);
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 ");
}
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:
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);
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);
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;
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))
{
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;
{
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;
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);
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;
}
break;
default:
- warning (_("unrecognized item \"%s\" in \"qSupported\" response"), p);
+ warning (_("unrecognized item \"%s\" "
+ "in \"qSupported\" response"), p);
continue;
}
end[-1] = '\0';
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 ();
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"),
{
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
/* 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;
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);
}
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;
}
}
&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]);
}
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
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. */
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,
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;
{
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)
{
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);
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);
/* 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)
{
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)
}
}
- if (remote_protocol_packets[PACKET_TracepointSource].support == PACKET_ENABLE)
+ if (remote_protocol_packets[PACKET_TracepointSource].support
+ == PACKET_ENABLE)
{
if (t->addr_string)
{
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;
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;
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\"."),
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,
"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);
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, _("\
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)
{
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);
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 */
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)
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;
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,
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)
#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
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;
{
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;
}
static struct ui_file *serial_logfp = NULL;
static struct serial_ops *serial_interface_lookup (const char *);
-static void serial_logchar (struct ui_file *stream, int ch_type, int ch, int timeout);
+static void serial_logchar (struct ui_file *stream,
+ int ch_type, int ch, int timeout);
static const char logbase_hex[] = "hex";
static const char logbase_octal[] = "octal";
static const char logbase_ascii[] = "ascii";
fputs_unfiltered ("\\v", stream);
break;
default:
- fprintf_unfiltered (stream, isprint (ch) ? "%c" : "\\x%02x", ch & 0xFF);
+ fprintf_unfiltered (stream,
+ isprint (ch) ? "%c" : "\\x%02x", ch & 0xFF);
break;
}
}
dont_repeat ();
if (args)
- fprintf_unfiltered (gdb_stderr, "This command takes no args. They have been ignored.\n");
+ fprintf_unfiltered (gdb_stderr,
+ "This command takes no args. "
+ "They have been ignored.\n");
printf_unfiltered ("[Entering connect mode. Use ~. or ~^D to escape]\n");
static void
serial_set_cmd (char *args, int from_tty)
{
- printf_unfiltered ("\"set serial\" must be followed by the name of a command.\n");
+ printf_unfiltered ("\"set serial\" must be followed "
+ "by the name of a command.\n");
help_list (serial_set_cmdlist, "set serial ", -1, gdb_stdout);
}
the specified STREAM. FIXME: At present this sends output to the
default stream - GDB_STDOUT. */
-extern void serial_print_tty_state (struct serial *scb, serial_ttystate ttystate, struct ui_file *);
+extern void serial_print_tty_state (struct serial *scb,
+ serial_ttystate ttystate,
+ struct ui_file *);
/* Set the tty state to NEW_TTYSTATE, where OLD_TTYSTATE is the
current state (generally obtained from a recent call to
This means that we never switch in or out of raw mode, even if
NEW_TTYSTATE specifies a switch. */
-extern int serial_noflush_set_tty_state (struct serial *scb, serial_ttystate new_ttystate, serial_ttystate old_ttystate);
+extern int serial_noflush_set_tty_state (struct serial *scb,
+ serial_ttystate new_ttystate,
+ serial_ttystate old_ttystate);
/* Set the baudrate to the decimal value supplied. Returns 0 for
success, -1 for failure. */
callback. */
typedef void (serial_event_ftype) (struct serial *scb, void *context);
-extern void serial_async (struct serial *scb, serial_event_ftype *handler, void *context);
+extern void serial_async (struct serial *scb,
+ serial_event_ftype *handler, void *context);
/* Provide direct access to the underlying FD (if any) used to
implement the serial device. This interface is clearly
"current_sos: reading link_map entry at %s\n",
hex_string_custom (lm_addr, 8));
- if (target_read_memory (lm_addr, (gdb_byte *) &lm_buf, sizeof (lm_buf)) != 0)
+ if (target_read_memory (lm_addr, (gdb_byte *) &lm_buf,
+ sizeof (lm_buf)) != 0)
{
- warning (_("frv_current_sos: Unable to read link map entry. Shared object chain may be incomplete."));
+ warning (_("frv_current_sos: Unable to read link map entry. "
+ "Shared object chain may be incomplete."));
break;
}
loadmap = fetch_loadmap (addr);
if (loadmap == NULL)
{
- warning (_("frv_current_sos: Unable to fetch load map. Shared object chain may be incomplete."));
+ warning (_("frv_current_sos: Unable to fetch load map. "
+ "Shared object chain may be incomplete."));
break;
}
addr = bfd_lookup_symbol (tmp_bfd, "_dl_debug_addr");
if (addr == 0)
{
- warning (_("Could not find symbol _dl_debug_addr in dynamic linker"));
+ warning (_("Could not find symbol _dl_debug_addr "
+ "in dynamic linker"));
enable_break_failure_warning ();
bfd_close (tmp_bfd);
return 0;
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
- "enable_break: _dl_debug_addr (prior to relocation) = %s\n",
+ "enable_break: _dl_debug_addr "
+ "(prior to relocation) = %s\n",
hex_string_custom (addr, 8));
addr += displacement_from_map (ldm, addr);
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
- "enable_break: _dl_debug_addr (after relocation) = %s\n",
+ "enable_break: _dl_debug_addr "
+ "(after relocation) = %s\n",
hex_string_custom (addr, 8));
/* Fetch the address of the r_debug struct. */
if (target_read_memory (addr, addr_buf, sizeof addr_buf) != 0)
{
- warning (_("Unable to fetch contents of _dl_debug_addr (at address %s) from dynamic linker"),
+ warning (_("Unable to fetch contents of _dl_debug_addr "
+ "(at address %s) from dynamic linker"),
hex_string_custom (addr, 8));
}
addr = extract_unsigned_integer (addr_buf, sizeof addr_buf, byte_order);
_dl_debug_addr. */
if (target_read_memory (addr + 8, addr_buf, sizeof addr_buf) != 0)
{
- warning (_("Unable to fetch _dl_debug_addr->r_brk (at address %s) from dynamic linker"),
+ warning (_("Unable to fetch _dl_debug_addr->r_brk "
+ "(at address %s) from dynamic linker"),
hex_string_custom (addr + 8, 8));
enable_break_failure_warning ();
bfd_close (tmp_bfd);
/* Now fetch the function entry point. */
if (target_read_memory (addr, addr_buf, sizeof addr_buf) != 0)
{
- warning (_("Unable to fetch _dl_debug_addr->.r_brk entry point (at address %s) from dynamic linker"),
+ warning (_("Unable to fetch _dl_debug_addr->.r_brk entry point "
+ "(at address %s) from dynamic linker"),
hex_string_custom (addr, 8));
enable_break_failure_warning ();
bfd_close (tmp_bfd);
if (solib_frv_debug)
fprintf_unfiltered (gdb_stdlog,
- "enable_break: solib event breakpoint placed at entry point: %s\n",
- hex_string_custom (symfile_objfile->ei.entry_point, 8));
+ "enable_break: solib event breakpoint "
+ "placed at entry point: %s\n",
+ hex_string_custom (symfile_objfile->ei.entry_point,
+ 8));
return 1;
}
{
struct minimal_symbol *got_sym;
- got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_", NULL, symfile_objfile);
+ got_sym = lookup_minimal_symbol ("_GLOBAL_OFFSET_TABLE_",
+ NULL, symfile_objfile);
if (got_sym == 0)
return 0;
if (name_size >= SO_NAME_MAX_PATH_SIZE)
{
name_size = SO_NAME_MAX_PATH_SIZE - 1;
- warning
- ("current_sos: truncating name of %d characters to only %d characters",
- lm.pathname_len, name_size);
+ warning ("current_sos: truncating name of "
+ "%d characters to only %d characters",
+ lm.pathname_len, name_size);
}
target_read_string (lm.pathname_addr, &name_buf,
target_read_string (lms->nameaddr, &name, PATH_MAX, &errcode);
if (errcode != 0)
{
- warning (_("unable to read shared sec name at 0x%lx"), lms->nameaddr);
+ warning (_("unable to read shared sec name at 0x%lx"),
+ lms->nameaddr);
name = xstrdup ("");
}
lms->name = name;
sizeof (dld_cache_p->dld_flags))
!= 0)
{
- error (_("Error while reading in .dynamic section of the program."));
+ error (_("Error while reading in "
+ ".dynamic section of the program."));
}
}
else if (dyn_tag == DT_HP_LOAD_MAP)
sizeof (dld_cache_p->load_map_addr))
!= 0)
{
- error (_("Error while reading in .dynamic section of the program."));
+ error (_("Error while reading in "
+ ".dynamic section of the program."));
}
}
else
/* Make sure the dynamic linker's really a useful object. */
if (!bfd_check_format (tmp_bfd, bfd_object))
{
- warning (_("Unable to grok dynamic linker %s as an object file"), buf);
+ warning (_("Unable to grok dynamic linker %s as an object file"),
+ buf);
bfd_close (tmp_bfd);
return;
}
struct lm_info
{
- /* Version of this structure (it is expected to change again in hpux10). */
+ /* Version of this structure (it is expected to change again in
+ hpux10). */
unsigned char struct_version;
/* Binding mode for this library. */
status = target_write_memory (anaddr, buf, 4);
if (status != 0)
{
- warning (_("\
-Unable to write __d_pid.\n\
-Suggest linking with /opt/langtools/lib/end.o.\n\
-GDB will be unable to track shl_load/shl_unload calls"));
+ warning (_("Unable to write __d_pid.\n"
+ "Suggest linking with /opt/langtools/lib/end.o.\n"
+ "GDB will be unable to track shl_load/shl_unload calls"));
goto keep_going;
}
msymbol = lookup_minimal_symbol ("__d_trap", NULL, symfile_objfile);
if (msymbol == NULL)
{
- warning (_("\
-Unable to find _DLD_HOOK symbol in object file.\n\
-Suggest linking with /opt/langtools/lib/end.o.\n\
-GDB will be unable to track shl_load/shl_unload calls"));
+ warning (_("Unable to find _DLD_HOOK symbol in object file.\n"
+ "Suggest linking with /opt/langtools/lib/end.o.\n"
+ "GDB will be unable to track shl_load/shl_unload calls"));
goto keep_going;
}
anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
msymbol = lookup_minimal_symbol ("__dld_hook", NULL, symfile_objfile);
if (msymbol == NULL)
{
- warning (_("\
-Unable to find __dld_hook symbol in object file.\n\
-Suggest linking with /opt/langtools/lib/end.o.\n\
-GDB will be unable to track shl_load/shl_unload calls"));
+ warning (_("Unable to find __dld_hook symbol in object file.\n"
+ "Suggest linking with /opt/langtools/lib/end.o.\n"
+ "GDB will be unable to track shl_load/shl_unload calls"));
goto keep_going;
}
anaddr = SYMBOL_VALUE_ADDRESS (msymbol);
msymbol = lookup_minimal_symbol ("__d_trap", NULL, symfile_objfile);
if (msymbol == NULL)
{
- warning (_("\
-Unable to find __dld_d_trap symbol in object file.\n\
-Suggest linking with /opt/langtools/lib/end.o.\n\
-GDB will be unable to track shl_load/shl_unload calls"));
+ warning (_("Unable to find __dld_d_trap symbol in object file.\n"
+ "Suggest linking with /opt/langtools/lib/end.o.\n"
+ "GDB will be unable to track shl_load/shl_unload calls"));
goto keep_going;
}
create_solib_event_breakpoint (target_gdbarch,
return got_value;
}
-/* Return the address of the handle of the shared library in which ADDR belongs.
- If ADDR isn't in any known shared library, return zero. */
+/* Return the address of the handle of the shared library in which
+ ADDR belongs. If ADDR isn't in any known shared library, return
+ zero. */
/* this function is used in initialize_hp_cxx_exception_support in
hppa-hpux-tdep.c */
if (stop_pc != breakpoint_addr)
{
- warning (_("stopped at unknown breakpoint while handling shared libraries"));
+ warning (_("stopped at unknown breakpoint "
+ "while handling shared libraries"));
}
return 1;
sym_addr = gdbarch_addr_bits_remove
(target_gdbarch, gdbarch_convert_from_func_ptr_addr (target_gdbarch,
- sym_addr,
- ¤t_target));
+ sym_addr,
+ ¤t_target));
/* On at least some versions of Solaris there's a dynamic relocation
on _r_debug.r_brk and SYM_ADDR may not be relocated yet, e.g., if
may be different from EXEC_BFD as the file may have been prelinked
to a different address after the executable has been loaded.
Moreover the address of placement in target memory can be
- different from what the program headers in target memory say - this
- is the goal of PIE.
+ different from what the program headers in target memory say -
+ this is the goal of PIE.
Detected DISPLACEMENT covers both the offsets of PIE placement and
possible new prelink performed after start of the program. Here
if (phdrs_size != phdrs2_size
|| bfd_get_arch_size (exec_bfd) != arch_size)
ok = 0;
- else if (arch_size == 32 && phdrs_size >= sizeof (Elf32_External_Phdr)
+ else if (arch_size == 32
+ && phdrs_size >= sizeof (Elf32_External_Phdr)
&& phdrs_size % sizeof (Elf32_External_Phdr) == 0)
{
Elf_Internal_Ehdr *ehdr2 = elf_tdata (exec_bfd)->elf_header;
/* Check also other adjustment combinations - PR 11786. */
- vaddr = extract_unsigned_integer (buf_vaddr_p, 4, byte_order);
+ vaddr = extract_unsigned_integer (buf_vaddr_p, 4,
+ byte_order);
vaddr -= displacement;
store_unsigned_integer (buf_vaddr_p, 4, byte_order, vaddr);
- paddr = extract_unsigned_integer (buf_paddr_p, 4, byte_order);
+ paddr = extract_unsigned_integer (buf_paddr_p, 4,
+ byte_order);
paddr -= displacement;
store_unsigned_integer (buf_paddr_p, 4, byte_order, paddr);
break;
}
}
- else if (arch_size == 64 && phdrs_size >= sizeof (Elf64_External_Phdr)
+ else if (arch_size == 64
+ && phdrs_size >= sizeof (Elf64_External_Phdr)
&& phdrs_size % sizeof (Elf64_External_Phdr) == 0)
{
Elf_Internal_Ehdr *ehdr2 = elf_tdata (exec_bfd)->elf_header;
/* Check also other adjustment combinations - PR 11786. */
- vaddr = extract_unsigned_integer (buf_vaddr_p, 8, byte_order);
+ vaddr = extract_unsigned_integer (buf_vaddr_p, 8,
+ byte_order);
vaddr -= displacement;
store_unsigned_integer (buf_vaddr_p, 8, byte_order, vaddr);
- paddr = extract_unsigned_integer (buf_paddr_p, 8, byte_order);
+ paddr = extract_unsigned_integer (buf_paddr_p, 8,
+ byte_order);
paddr -= displacement;
store_unsigned_integer (buf_paddr_p, 8, byte_order, paddr);
gdb_assert (so->addr_low <= so->addr_high);
found_range = 1;
}
- so->lm_info->offsets->offsets[i] = section_bases[bases_index];
+ so->lm_info->offsets->offsets[i]
+ = section_bases[bases_index];
bases_index++;
}
if (!found_range)
struct target_so_ops solib_target_so_ops;
-extern initialize_file_ftype _initialize_solib_target; /* -Wmissing-prototypes */
+/* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_solib_target;
void
_initialize_solib_target (void)
show_solib_search_path (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-The search path for loading non-absolute shared library symbol files is %s.\n"),
+ fprintf_filtered (file, _("The search path for loading non-absolute "
+ "shared library symbol files is %s.\n"),
value);
}
}
if (e.reason < 0)
- exception_fprintf (gdb_stderr, e, _("\
-Error while mapping shared library sections:\n"));
+ exception_fprintf (gdb_stderr, e,
+ _("Error while mapping shared "
+ "library sections:\n"));
/* Notify any observer that the shared object has been
loaded now that we've added it to GDB's tables. */
stand out well. */
if (not_found == 1)
- warning (_("\
-Could not load shared library symbols for %s.\n\
-Do you need \"set solib-search-path\" or \"set sysroot\"?"),
+ warning (_("Could not load shared library symbols for %s.\n"
+ "Do you need \"set solib-search-path\" "
+ "or \"set sysroot\"?"),
not_found_filename);
else if (not_found > 1)
warning (_("\
FROM_TTY and TARGET are as described for update_solib_list, above. */
void
-solib_add (char *pattern, int from_tty, struct target_ops *target, int readsyms)
+solib_add (char *pattern, int from_tty,
+ struct target_ops *target, int readsyms)
{
struct so_list *gdb;
{
if (so_missing_debug_info)
ui_out_message (uiout, 0,
- _("(*): Shared library is missing debugging information.\n"));
+ _("(*): Shared library is missing "
+ "debugging information.\n"));
}
}
solib_map_sections (so);
if (e.reason < 0)
- exception_fprintf (gdb_stderr, e, _("\
-Error while mapping shared library sections:\n"));
+ exception_fprintf (gdb_stderr, e,
+ _("Error while mapping "
+ "shared library sections:\n"));
else if (auto_solib_add || was_loaded || libpthread_solib_p (so))
solib_read_symbols (so, flags);
}
If \"on\", symbols from all shared object libraries will be loaded\n\
automatically when the inferior begins execution, when the dynamic linker\n\
informs gdb that a new library has been loaded, or when attaching to the\n\
-inferior. Otherwise, symbols must be loaded manually, using `sharedlibrary'."),
+inferior. Otherwise, symbols must be loaded manually, using \
+`sharedlibrary'."),
NULL,
show_auto_solib_add,
&setlist, &showlist);
add_setshow_optional_filename_cmd ("solib-search-path", class_support,
&solib_search_path, _("\
-Set the search path for loading non-absolute shared library symbol files."), _("\
-Show the search path for loading non-absolute shared library symbol files."), _("\
-This takes precedence over the environment variables PATH and LD_LIBRARY_PATH."),
+Set the search path for loading non-absolute shared library symbol files."),
+ _("\
+Show the search path for loading non-absolute shared library symbol files."),
+ _("\
+This takes precedence over the environment variables \
+PATH and LD_LIBRARY_PATH."),
reload_shared_libraries,
show_solib_search_path,
&setlist, &showlist);
static const struct sym_fns som_sym_fns =
{
bfd_target_som_flavour,
- som_new_init, /* sym_new_init: init anything gbl to entire symtab */
- som_symfile_init, /* sym_init: read initial info, setup for sym_read() */
- som_symfile_read, /* sym_read: read a symbol file into symtab */
- som_symfile_finish, /* sym_finish: finished with file, cleanup */
- som_symfile_offsets, /* sym_offsets: Translate ext. to int. relocation */
- default_symfile_segments, /* sym_segments: Get segment information from
- a file. */
- NULL, /* sym_read_linetable */
- default_symfile_relocate, /* sym_relocate: Relocate a debug section. */
+ som_new_init, /* init anything gbl to entire symtab */
+ som_symfile_init, /* read initial info, setup for sym_read() */
+ som_symfile_read, /* read a symbol file into symtab */
+ som_symfile_finish, /* finished with file, cleanup */
+ som_symfile_offsets, /* Translate ext. to int. relocation */
+ default_symfile_segments, /* Get segment information from a file. */
+ NULL,
+ default_symfile_relocate, /* Relocate a debug section. */
&psym_functions
};
show_lines_to_list (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Number of source lines gdb will list by default is %s.\n"),
+ fprintf_filtered (file,
+ _("Number of source lines gdb "
+ "will list by default is %s.\n"),
value);
}
tinybuf[0] = DIRNAME_SEPARATOR;
tinybuf[1] = '\0';
- /* If we have already tacked on a name(s) in this command, be sure they stay
- on the front as we tack on some more. */
+ /* If we have already tacked on a name(s) in this command,
+ be sure they stay on the front as we tack on some
+ more. */
if (prefix)
{
char *temp, c;
old[prefix] = '\0';
temp = concat (old, tinybuf, name, (char *)NULL);
old[prefix] = c;
- *which_path = concat (temp, "", &old[prefix], (char *)NULL);
+ *which_path = concat (temp, "", &old[prefix], (char *) NULL);
prefix = strlen (temp);
xfree (temp);
}
alloca (strlen (source_path) + 1 + strlen (dirname) + 1);
len = p - source_path;
strncpy (path, source_path, len); /* Before $cdir */
- strcpy (path + len, dirname); /* new stuff */
- strcat (path + len, source_path + len + cdir_len); /* After $cdir */
+ strcpy (path + len, dirname); /* new stuff */
+ strcat (path + len, source_path + len + cdir_len); /* After
+ $cdir */
}
}
current_source_line = line;
first_line_listed = line;
- /* If printing of source lines is disabled, just print file and line number */
+ /* If printing of source lines is disabled, just print file and line
+ number */
if (ui_out_test_flags (uiout, ui_source_list))
{
/* Only prints "No such file or directory" once */
#include "expression.h"
#include "symfile.h"
#include "objfiles.h"
-#include "aout/stab_gnu.h" /* We always use GNU stabs, not native */
+#include "aout/stab_gnu.h" /* We always use GNU stabs, not native. */
#include "libaout.h"
#include "aout/aout64.h"
#include "gdb-stabs.h"
if (filenum < 0 || filenum >= n_this_object_header_files)
{
complaint (&symfile_complaints,
- _("Invalid symbol data: type number (%d,%d) out of range at symtab pos %d."),
+ _("Invalid symbol data: type number "
+ "(%d,%d) out of range at symtab pos %d."),
filenum, index, symnum);
goto error_return;
}
/* NULL terminate the string. */
string_local[ind] = 0;
- range_type = create_range_type (NULL,
- objfile_type (objfile)->builtin_int,
- 0, ind);
+ range_type
+ = create_range_type (NULL,
+ objfile_type (objfile)->builtin_int,
+ 0, ind);
SYMBOL_TYPE (sym) = create_array_type (NULL,
objfile_type (objfile)->builtin_char,
range_type);
{
struct minimal_symbol *msym;
- msym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (sym), NULL, objfile);
+ msym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (sym),
+ NULL, objfile);
if (msym != NULL)
{
char *new_name = gdbarch_static_transform_name
SYMBOL_VALUE (struct_sym) = valu;
SYMBOL_DOMAIN (struct_sym) = STRUCT_DOMAIN;
if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
- TYPE_NAME (SYMBOL_TYPE (sym)) = obconcat (&objfile->objfile_obstack,
- SYMBOL_LINKAGE_NAME (sym),
- (char *) NULL);
+ TYPE_NAME (SYMBOL_TYPE (sym))
+ = obconcat (&objfile->objfile_obstack,
+ SYMBOL_LINKAGE_NAME (sym),
+ (char *) NULL);
add_symbol_to_list (struct_sym, &file_symbols);
}
SYMBOL_VALUE (sym) = valu;
SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN;
if (TYPE_TAG_NAME (SYMBOL_TYPE (sym)) == 0)
- TYPE_TAG_NAME (SYMBOL_TYPE (sym)) = obconcat (&objfile->objfile_obstack,
- SYMBOL_LINKAGE_NAME (sym),
- (char *) NULL);
+ TYPE_TAG_NAME (SYMBOL_TYPE (sym))
+ = obconcat (&objfile->objfile_obstack,
+ SYMBOL_LINKAGE_NAME (sym),
+ (char *) NULL);
add_symbol_to_list (sym, &file_symbols);
if (synonym)
SYMBOL_VALUE (typedef_sym) = valu;
SYMBOL_DOMAIN (typedef_sym) = VAR_DOMAIN;
if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
- TYPE_NAME (SYMBOL_TYPE (sym)) = obconcat (&objfile->objfile_obstack,
- SYMBOL_LINKAGE_NAME (sym),
- (char *) NULL);
+ TYPE_NAME (SYMBOL_TYPE (sym))
+ = obconcat (&objfile->objfile_obstack,
+ SYMBOL_LINKAGE_NAME (sym),
+ (char *) NULL);
add_symbol_to_list (typedef_sym, &file_symbols);
}
break;
static struct type *
error_type (char **pp, struct objfile *objfile)
{
- complaint (&symfile_complaints, _("couldn't parse type; debugger out of date?"));
+ complaint (&symfile_complaints,
+ _("couldn't parse type; debugger out of date?"));
while (1)
{
/* Skip to end of symbol. */
/* Complain and keep going, so compilers can invent new
cross-reference types. */
complaint (&symfile_complaints,
- _("Unrecognized cross-reference type `%c'"), (*pp)[0]);
+ _("Unrecognized cross-reference type `%c'"),
+ (*pp)[0]);
code = TYPE_CODE_STRUCT;
break;
}
}
if (type_name == NULL)
{
- to = type_name =
- (char *) obstack_alloc (&objfile->objfile_obstack, p - *pp + 1);
+ to = type_name = (char *)
+ obstack_alloc (&objfile->objfile_obstack, p - *pp + 1);
/* Copy the name. */
from = *pp + 1;
else
{
complaint (&symfile_complaints,
- _("Prototyped function type didn't end arguments with `#':\n%s"),
+ _("Prototyped function type didn't "
+ "end arguments with `#':\n%s"),
type_start);
}
return_type = read_type (pp, objfile);
if (*(*pp)++ != ';')
complaint (&symfile_complaints,
- _("invalid (minimal) member type data format at symtab pos %d."),
+ _("invalid (minimal) member type "
+ "data format at symtab pos %d."),
symnum);
type = allocate_stub_method (return_type);
if (typenums[0] != -1)
static struct type *
rs6000_builtin_type (int typenum, struct objfile *objfile)
{
- struct type **negative_types = objfile_data (objfile, rs6000_builtin_type_data);
+ struct type **negative_types = objfile_data (objfile,
+ rs6000_builtin_type_data);
/* We recognize types numbered from -NUMBER_RECOGNIZED to -1. */
#define NUMBER_RECOGNIZED 34
new_sublist->fn_field.is_volatile = 1;
(*pp)++;
break;
- case '*': /* File compiled with g++ version 1 -- no info */
+ case '*': /* File compiled with g++ version 1 --
+ no info */
case '?':
case '.':
break;
default:
complaint (&symfile_complaints,
- _("const/volatile indicator missing, got '%c'"), **pp);
+ _("const/volatile indicator missing, got '%c'"),
+ **pp);
break;
}
default:
/* error */
complaint (&symfile_complaints,
- _("member function type missing, got '%c'"), (*pp)[-1]);
+ _("member function type missing, got '%c'"),
+ (*pp)[-1]);
/* Fall through into normal member function. */
case '.':
method name physname physname method name
__opi [none] __opi__3Foo operator int opname
- [now or later]
- Foo _._3Foo _._3Foo ~Foo separate and
+ [now or later]
+ Foo _._3Foo _._3Foo ~Foo separate and
rename
operator i _ZN3FoocviEv _ZN3FoocviEv operator int demangle
__comp_ctor _ZN3FooC1ERKS_ _ZN3FooC1ERKS_ Foo demangle
if (name == NULL)
{
complaint (&symfile_complaints,
- _("C++ abbreviated type name unknown at symtab pos %d"),
+ _("C++ abbreviated type name "
+ "unknown at symtab pos %d"),
symnum);
name = "FOO";
}
/* Unknown character. Complain and treat it as non-virtual. */
{
complaint (&symfile_complaints,
- _("Unknown virtual character `%c' for baseclass"), **pp);
+ _("Unknown virtual character `%c' for baseclass"),
+ **pp);
}
}
++(*pp);
}
/* Virtual function table field not found. */
complaint (&symfile_complaints,
- _("virtual function table pointer not found when defining class `%s'"),
+ _("virtual function table pointer "
+ "not found when defining class `%s'"),
TYPE_NAME (type));
return 0;
}
default:
/* Unknown visibility. Complain and treat it as public. */
{
- complaint (&symfile_complaints, _("Unknown visibility `%c' for field"),
+ complaint (&symfile_complaints,
+ _("Unknown visibility `%c' for field"),
fip->list->visibility);
}
break;
/* Now read the baseclasses, if any, read the regular C struct or C++
class member fields, attach the fields to the type, read the C++
member functions, attach them to the type, and then read any tilde
- field (baseclass specifier for the class holding the main vtable). */
+ field (baseclass specifier for the class holding the main vtable). */
if (!read_baseclasses (&fi, pp, type, objfile)
|| !read_struct_fields (&fi, pp, type, objfile)
len = p1 - p;
if (len > twos_complement_bits / 3
- || (twos_complement_bits % 3 == 0 && len == twos_complement_bits / 3))
+ || (twos_complement_bits % 3 == 0
+ && len == twos_complement_bits / 3))
{
/* Ok, we have enough characters for a signed value, check
for signness by testing if the sign bit is set. */
SYMBOL_CLASS (prev) = LOC_UNRESOLVED;
else
complaint (&symfile_complaints,
- _("%s: common block `%s' from global_sym_chain unresolved"),
+ _("%s: common block `%s' from "
+ "global_sym_chain unresolved"),
objfile->name, SYMBOL_PRINT_NAME (prev));
}
}
char *name;
- /* Numeric code distinguishing instances of one header file that produced
- different results when included. It comes from the N_BINCL or N_EXCL. */
+ /* Numeric code distinguishing instances of one header file that
+ produced different results when included. It comes from the
+ N_BINCL or N_EXCL. */
int instance;
struct cmd_list_element *c,
const char *value)
{
- fprintf_filtered (file, _("\
-Debugger's willingness to use disassemble-next-line is %s.\n"),
+ fprintf_filtered (file,
+ _("Debugger's willingness to use "
+ "disassemble-next-line is %s.\n"),
value);
}
&& using_struct_return (gdbarch,
SYMBOL_TYPE (thisfun), return_type))
{
- query_prefix = "\
-The location at which to store the function's return value is unknown.\n\
-If you continue, the return value that you specified will be ignored.\n";
+ query_prefix = "The location at which to store the "
+ "function's return value is unknown.\n"
+ "If you continue, the return value "
+ "that you specified will be ignored.\n";
return_value = NULL;
}
}
This is useful in command scripts."));
add_com ("frame", class_stack, frame_command, _("\
-Select and print a stack frame.\n\
-With no argument, print the selected stack frame. (See also \"info frame\").\n\
+Select and print a stack frame.\nWith no argument, \
+print the selected stack frame. (See also \"info frame\").\n\
An argument specifies the frame to select.\n\
It can be a stack frame number or the address of the frame.\n\
With argument, nothing is printed if input is coming from\n\
add_com ("backtrace", class_stack, backtrace_command, _("\
Print backtrace of all stack frames, or innermost COUNT frames.\n\
-With a negative argument, print outermost -COUNT frames.\n\
-Use of the 'full' qualifier also prints the values of the local variables.\n"));
+With a negative argument, print outermost -COUNT frames.\nUse of the \
+'full' qualifier also prints the values of the local variables.\n"));
add_com_alias ("bt", "backtrace", class_stack, 0);
if (xdb_commands)
{
add_setshow_auto_boolean_cmd ("disassemble-next-line", class_stack,
&disassemble_next_line, _("\
-Set whether to disassemble next source line or insn when execution stops."), _("\
-Show whether to disassemble next source line or insn when execution stops."), _("\
+Set whether to disassemble next source line or insn when execution stops."),
+ _("\
+Show whether to disassemble next source line or insn when execution stops."),
+ _("\
If ON, GDB will display disassembly of the next source line, in addition\n\
to displaying the source line itself. If the next source line cannot\n\
be displayed (e.g., source is unavailable or there's no line info), GDB\n\
void find_frame_funname (struct frame_info *frame, char **funname,
enum language *funlang, struct symbol **funcp);
-typedef void (*iterate_over_block_arg_local_vars_cb) (const char *symbol_print_name,
+typedef void (*iterate_over_block_arg_local_vars_cb) (const char *print_name,
struct symbol *sym,
void *cb_data);
else
templ = exec_bfd;
if (templ == NULL)
- error (_("\
-Must use symbol-file or exec-file before add-symbol-file-from-memory."));
+ error (_("Must use symbol-file or exec-file "
+ "before add-symbol-file-from-memory."));
symbol_file_add_from_memory (templ, addr, NULL, from_tty);
}
return 0;
}
-/* Try to add the symbols for the vsyscall page, if there is one. This function
- is called via the inferior_created observer. */
+/* Try to add the symbols for the vsyscall page, if there is one.
+ This function is called via the inferior_created observer. */
static void
add_vsyscall_page (struct target_ops *target, int from_tty)
``bfd_runtime'' (a BFD created using the loaded image) file
format should fix this. */
{
- warning (_("\
-Could not load vsyscall page because no executable was specified\n\
-try using the \"file\" command first."));
+ warning (_("Could not load vsyscall page "
+ "because no executable was specified\n"
+ "try using the \"file\" command first."));
return;
}
args.bfd = bfd;
_initialize_symfile_mem (void)
{
add_cmd ("add-symbol-file-from-memory", class_files,
- add_symbol_file_from_memory_command, _("\
-Load the symbols out of memory from a dynamically loaded object file.\n\
-Give an expression for the address of the file's shared object file header."),
+ add_symbol_file_from_memory_command,
+ _("Load the symbols out of memory from a "
+ "dynamically loaded object file.\n"
+ "Give an expression for the address "
+ "of the file's shared object file header."),
&cmdlist);
/* Want to know of each new inferior so that its vsyscall info can
#include "psymtab.h"
-int (*deprecated_ui_load_progress_hook) (const char *section, unsigned long num);
+int (*deprecated_ui_load_progress_hook) (const char *section,
+ unsigned long num);
void (*deprecated_show_load_progress) (const char *section,
unsigned long section_sent,
unsigned long section_size,
show_symbol_reloading (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Dynamic symbol table reloading multiple times in one run is %s.\n"),
+ fprintf_filtered (file, _("Dynamic symbol table reloading "
+ "multiple times in one run is %s.\n"),
value);
}
return p;
}
-/* Concatenate NULL terminated variable argument list of `const char *' strings;
- return the new string. Space is found in the OBSTACKP. Argument list must
- be terminated by a sentinel expression `(char *) NULL'. */
+/* Concatenate NULL terminated variable argument list of `const char *'
+ strings; return the new string. Space is found in the OBSTACKP.
+ Argument list must be terminated by a sentinel expression `(char *)
+ NULL'. */
char *
obconcat (struct obstack *obstackp, ...)
continue;
bfd_set_section_vma (abfd, cur_sec, offsets[cur_sec->index]);
- exec_set_section_address (bfd_get_filename (abfd), cur_sec->index,
+ exec_set_section_address (bfd_get_filename (abfd),
+ cur_sec->index,
offsets[cur_sec->index]);
offsets[cur_sec->index] = 0;
}
show_debug_file_directory (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-The directory where separate debug symbols are searched for is \"%s\".\n"),
+ fprintf_filtered (file,
+ _("The directory where separate debug "
+ "symbols are searched for is \"%s\".\n"),
value);
}
memset (new_request, 0, sizeof (struct memory_write_request));
section_data = xcalloc (1, sizeof (struct load_progress_section_data));
new_request->begin = bfd_section_lma (abfd, asec) + args->load_offset;
- new_request->end = new_request->begin + size; /* FIXME Should size be in instead? */
+ new_request->end = new_request->begin + size; /* FIXME Should size
+ be in instead? */
new_request->data = xmalloc (size);
new_request->baton = section_data;
}
}
else
- error (_("USAGE: add-symbol-file <filename> <textaddress> [-mapped] [-readnow] [-s <secname> <addr>]*"));
+ error (_("USAGE: add-symbol-file <filename> <textaddress>"
+ " [-mapped] [-readnow] [-s <secname> <addr>]*"));
}
}
}
show_ext_args (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Mapping between filename extension and source language is \"%s\".\n"),
+ fprintf_filtered (file,
+ _("Mapping between filename extension "
+ "and source language is \"%s\".\n"),
value);
}
cp++;
if (*cp == '\0')
- error (_("'%s': two arguments required -- filename extension and language"),
+ error (_("'%s': two arguments required -- "
+ "filename extension and language"),
ext_args);
/* Null-terminate first arg */
cp++;
if (*cp == '\0')
- error (_("'%s': two arguments required -- filename extension and language"),
+ error (_("'%s': two arguments required -- "
+ "filename extension and language"),
ext_args);
/* Lookup the language from among those we know. */
struct obj_section *sec, *sec2;
if (!overlay_debugging)
- error (_("\
-Overlay debugging not enabled. Use either the 'overlay auto' or\n\
-the 'overlay manual' command."));
+ error (_("Overlay debugging not enabled. Use "
+ "either the 'overlay auto' or\n"
+ "the 'overlay manual' command."));
if (args == 0 || *args == 0)
error (_("Argument required: name of an overlay section"));
struct obj_section *sec;
if (!overlay_debugging)
- error (_("\
-Overlay debugging not enabled. Use either the 'overlay auto' or\n\
-the 'overlay manual' command."));
+ error (_("Overlay debugging not enabled. "
+ "Use either the 'overlay auto' or\n"
+ "the 'overlay manual' command."));
if (args == 0 || *args == 0)
error (_("Argument required: name of an overlay section"));
if (cache_ovly_table != NULL)
/* Does its cached location match what's currently in the symtab? */
if (cache_ovly_table_base ==
- SYMBOL_VALUE_ADDRESS (lookup_minimal_symbol ("_ovly_table", NULL, NULL)))
+ SYMBOL_VALUE_ADDRESS (lookup_minimal_symbol ("_ovly_table",
+ NULL, NULL)))
/* Then go ahead and try to look up this single section in the cache */
if (simple_overlay_update_1 (osect))
/* Found it! We're done. */
c = add_cmd ("add-symbol-file", class_files, add_symbol_file_command, _("\
Load symbols from FILE, assuming FILE has been dynamically loaded.\n\
-Usage: add-symbol-file FILE ADDR [-s <SECT> <SECT_ADDR> -s <SECT> <SECT_ADDR> ...]\n\
-ADDR is the starting address of the file's text.\n\
+Usage: add-symbol-file FILE ADDR [-s <SECT> <SECT_ADDR> -s <SECT> <SECT_ADDR>\
+ ...]\nADDR is the starting address of the file's text.\n\
The optional arguments are section-name section-address pairs and\n\
should be specified if the data and bss segments are not contiguous\n\
with the text. SECT is a section name to be loaded at SECT_ADDR."),
};
extern struct section_addr_info *
- build_section_addr_info_from_objfile (const struct objfile *objfile);
+ build_section_addr_info_from_objfile (const struct objfile *objfile);
extern void relative_addr_info_to_section_offsets
(struct section_offsets *section_offsets, int num_sections,
extern char *obsavestring (const char *, int, struct obstack *);
-/* Concatenate NULL terminated variable argument list of `const char *' strings;
- return the new string. Space is found in the OBSTACKP. Argument list must
- be terminated by a sentinel expression `(char *) NULL'. */
+/* Concatenate NULL terminated variable argument list of `const char
+ *' strings; return the new string. Space is found in the OBSTACKP.
+ Argument list must be terminated by a sentinel expression `(char *)
+ NULL'. */
extern char *obconcat (struct obstack *obstackp, ...) ATTRIBUTE_SENTINEL;
fprintf_filtered (outfile, "Read from object file %s (", objfile->name);
gdb_print_host_address (objfile, outfile);
fprintf_filtered (outfile, ")\n");
- fprintf_filtered (outfile, "Language: %s\n", language_str (symtab->language));
+ fprintf_filtered (outfile, "Language: %s\n",
+ language_str (symtab->language));
/* First print the line table. */
l = LINETABLE (symtab);
if (args == NULL)
{
- error (_("\
-Arguments missing: an output file name and an optional symbol file name"));
+ error (_("Arguments missing: an output file name "
+ "and an optional symbol file name"));
}
argv = gdb_buildargv (args);
cleanups = make_cleanup_freeargv (argv);
if (args == NULL)
{
- error (_("print-msymbols takes an output file name and optional symbol file name"));
+ error (_("print-msymbols takes an output file "
+ "name and optional symbol file name"));
}
argv = gdb_buildargv (args);
cleanups = make_cleanup_freeargv (argv);
immediate_quit++;
ALL_PSPACES (pspace)
ALL_PSPACE_OBJFILES (pspace, objfile)
- if (symname == NULL
- || (!stat (objfile->name, &obj_st) && sym_st.st_ino == obj_st.st_ino))
+ if (symname == NULL || (!stat (objfile->name, &obj_st)
+ && sym_st.st_ino == obj_st.st_ino))
dump_msymbols (objfile, outfile);
immediate_quit--;
fprintf_filtered (outfile, "\n\n");
symtab->dirname ? symtab->dirname : "(null)");
printf_filtered (" fullname %s\n",
symtab->fullname ? symtab->fullname : "(null)");
- printf_filtered (" blockvector ((struct blockvector *) %s)%s\n",
+ printf_filtered (" "
+ "blockvector ((struct blockvector *) %s)%s\n",
host_address_to_string (symtab->blockvector),
symtab->primary ? " (primary)" : "");
- printf_filtered (" linetable ((struct linetable *) %s)\n",
+ printf_filtered (" "
+ "linetable ((struct linetable *) %s)\n",
host_address_to_string (symtab->linetable));
- printf_filtered (" debugformat %s\n", symtab->debugformat);
+ printf_filtered (" debugformat %s\n",
+ symtab->debugformat);
printf_filtered (" }\n");
}
}
is_full_physname_constructor = is_constructor_name (physname);
- is_constructor =
- is_full_physname_constructor || (newname && strcmp (field_name, newname) == 0);
+ is_constructor = is_full_physname_constructor
+ || (newname && strcmp (field_name, newname) == 0);
if (!is_destructor)
is_destructor = (strncmp (physname, "__dt", 4) == 0);
STATIC_BLOCK : GLOBAL_BLOCK);
sym = lookup_block_symbol (block, name, domain);
if (!sym)
- error (_("Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n%s may be an inlined function, or may be a template function\n(if a template, try specifying an instantiation: %s<type>)."),
+ error (_("\
+Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n\
+%s may be an inlined function, or may be a template function\n\
+(if a template, try specifying an instantiation: %s<type>)."),
kind == GLOBAL_BLOCK ? "global" : "static",
name, symtab->filename, name, name);
}
sym = lookup_block_symbol (block, name, STRUCT_DOMAIN);
if (!sym)
/* FIXME; error is wrong in one case */
- error (_("Internal: global symbol `%s' found in %s psymtab but not in symtab.\n\
+ error (_("\
+Internal: global symbol `%s' found in %s psymtab but not in symtab.\n\
%s may be an inlined function, or may be a template function\n\
(if a template, try specifying an instantiation: %s<type>)."),
name, symtab->filename, name, name);
* so of course we can't find the real func/line info,
* but the "break" still works, and the warning is annoying.
* So I commented out the warning. RT */
- /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ;
+ /* warning ("In stub for %s; unable to find real function/line info",
+ SYMBOL_LINKAGE_NAME (msymbol)) */ ;
/* fall through */
- else if (SYMBOL_VALUE_ADDRESS (mfunsym) == SYMBOL_VALUE_ADDRESS (msymbol))
+ else if (SYMBOL_VALUE_ADDRESS (mfunsym)
+ == SYMBOL_VALUE_ADDRESS (msymbol))
/* Avoid infinite recursion */
/* See above comment about why warning is commented out */
- /* warning ("In stub for %s; unable to find real function/line info", SYMBOL_LINKAGE_NAME (msymbol)) */ ;
+ /* warning ("In stub for %s; unable to find real function/line info",
+ SYMBOL_LINKAGE_NAME (msymbol)) */ ;
/* fall through */
else
return find_pc_line (SYMBOL_VALUE_ADDRESS (mfunsym), 0);
case '\\': /* regexp quoting */
if (p[1] == '*')
{
- if (p[2] == '=') /* 'operator\*=' */
+ if (p[2] == '=') /* 'operator\*=' */
*end = p + 3;
else /* 'operator\*' */
*end = p + 2;
else if (p[1] == '[')
{
if (p[2] == ']')
- error (_("mismatched quoting on brackets, try 'operator\\[\\]'"));
+ error (_("mismatched quoting on brackets, "
+ "try 'operator\\[\\]'"));
else if (p[2] == '\\' && p[3] == ']')
{
*end = p + 4; /* 'operator\[\]' */
return p;
case '(':
if (p[1] != ')')
- error (_("`operator ()' must be specified without whitespace in `()'"));
+ error (_("`operator ()' must be specified "
+ "without whitespace in `()'"));
*end = p + 2;
return p;
case '?':
if (p[1] != ':')
- error (_("`operator ?:' must be specified without whitespace in `?:'"));
+ error (_("`operator ?:' must be specified "
+ "without whitespace in `?:'"));
*end = p + 2;
return p;
case '[':
if (p[1] != ']')
- error (_("`operator []' must be specified without whitespace in `[]'"));
+ error (_("`operator []' must be specified "
+ "without whitespace in `[]'"));
*end = p + 2;
return p;
default:
}
printf_filtered ("\n\n");
- printf_filtered ("Source files for which symbols will be read in on demand:\n\n");
+ printf_filtered ("Source files for which symbols "
+ "will be read in on demand:\n\n");
first = 1;
map_partial_symbol_filenames (output_partial_symbol_filename, &first);
if (*opname)
{
- int fix = -1; /* -1 means ok; otherwise number of spaces needed. */
+ int fix = -1; /* -1 means ok; otherwise number of
+ spaces needed. */
if (isalpha (*opname) || *opname == '_' || *opname == '$')
{
e.g., c++ static const members.
We only want to skip enums here. */
&& !(SYMBOL_CLASS (sym) == LOC_CONST
- && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_ENUM))
- || (kind == FUNCTIONS_DOMAIN && SYMBOL_CLASS (sym) == LOC_BLOCK)
- || (kind == TYPES_DOMAIN && SYMBOL_CLASS (sym) == LOC_TYPEDEF))))
+ && TYPE_CODE (SYMBOL_TYPE (sym))
+ == TYPE_CODE_ENUM))
+ || (kind == FUNCTIONS_DOMAIN
+ && SYMBOL_CLASS (sym) == LOC_BLOCK)
+ || (kind == TYPES_DOMAIN
+ && SYMBOL_CLASS (sym) == LOC_TYPEDEF))))
{
/* match */
- psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search));
+ psr = (struct symbol_search *)
+ xmalloc (sizeof (struct symbol_search));
psr->block = i;
psr->symtab = real_symtab;
psr->symbol = sym;
== NULL)
{
/* match */
- psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search));
+ psr = (struct symbol_search *)
+ xmalloc (sizeof (struct symbol_search));
psr->block = i;
psr->msymbol = msymbol;
psr->symtab = NULL;
};
#define ANOFFSET(secoff, whichone) \
- ((whichone == -1) \
- ? (internal_error (__FILE__, __LINE__, _("Section index is uninitialized")), -1) \
- : secoff->offsets[whichone])
+ ((whichone == -1) \
+ ? (internal_error (__FILE__, __LINE__, \
+ _("Section index is uninitialized")), -1) \
+ : secoff->offsets[whichone])
/* The size of a section_offsets table for N sections. */
#define SIZEOF_N_SECTION_OFFSETS(n) \
extern enum language language_of_main;
/* Check global symbols in objfile. */
-struct symbol *lookup_global_symbol_from_objfile (const struct objfile *objfile,
+struct symbol *lookup_global_symbol_from_objfile (const struct objfile *,
const char *name,
const domain_enum domain);
const char *value)
{
if (value != NULL && *value != '\0')
- printf_filtered (_("\
-The target description will be read from \"%s\".\n"),
+ printf_filtered (_("The target description will be read from \"%s\".\n"),
value);
else
- printf_filtered (_("\
-The target description will be read from the target.\n"));
+ printf_filtered (_("The target description will be "
+ "read from the target.\n"));
}
static void
VEC_iterate (tdesc_feature_p, tdesc->features, ix, feature);
ix++)
{
- printf_unfiltered (" feature = tdesc_create_feature (result, \"%s\");\n",
+ printf_unfiltered (" \
+feature = tdesc_create_feature (result, \"%s\");\n",
feature->name);
for (ix2 = 0;
qsort (VEC_address (memory_write_request_s, flash),
VEC_length (memory_write_request_s, flash),
- sizeof (struct memory_write_request), compare_block_starting_address);
+ sizeof (struct memory_write_request),
+ compare_block_starting_address);
}
}
len = target_write_with_progress (¤t_target,
TARGET_OBJECT_FLASH, NULL,
- r->data, r->begin, r->end - r->begin,
+ r->data, r->begin,
+ r->end - r->begin,
progress_cb, r->baton);
if (len < (LONGEST) (r->end - r->begin))
error (_("Error writing data to flash"));
(void (*) (struct regcache *))
noprocess);
de_fault (deprecated_xfer_memory,
- (int (*) (CORE_ADDR, gdb_byte *, int, int, struct mem_attrib *, struct target_ops *))
+ (int (*) (CORE_ADDR, gdb_byte *, int, int,
+ struct mem_attrib *, struct target_ops *))
nomemory);
de_fault (to_files_info,
(void (*) (struct target_ops *))
fprintf_unfiltered (gdb_stderr,
"Magic number of %s target struct wrong\n",
t->to_shortname);
- internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
+ internal_error (__FILE__, __LINE__,
+ _("failed internal consistency check"));
}
/* Find the proper stratum to install this target in. */
fprintf_unfiltered (gdb_stderr,
"Magic number of %s target struct wrong\n",
t->to_shortname);
- internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
+ internal_error (__FILE__, __LINE__,
+ _("failed internal consistency check"));
}
for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->beneath)
throw_error (TLS_LOAD_MODULE_NOT_FOUND_ERROR,
_("TLS load module not found"));
- addr = target->to_get_thread_local_address (target, ptid, lm_addr, offset);
+ addr = target->to_get_thread_local_address (target, ptid,
+ lm_addr, offset);
}
/* If an error occurred, print TLS related messages here. Otherwise,
throw the error to some higher catcher. */
switch (ex.error)
{
case TLS_NO_LIBRARY_SUPPORT_ERROR:
- error (_("Cannot find thread-local variables in this thread library."));
+ error (_("Cannot find thread-local variables "
+ "in this thread library."));
break;
case TLS_LOAD_MODULE_NOT_FOUND_ERROR:
if (objfile_is_library)
const unsigned char *myaddr = NULL;
fprintf_unfiltered (gdb_stdlog,
- "%s:target_xfer_partial (%d, %s, %s, %s, %s, %s) = %s",
+ "%s:target_xfer_partial "
+ "(%d, %s, %s, %s, %s, %s) = %s",
ops->to_shortname,
(int) object,
(annex ? annex : "(null)"),
show_trust_readonly (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Mode for reading from readonly sections is %s.\n"),
+ fprintf_filtered (file,
+ _("Mode for reading from readonly sections is %s.\n"),
value);
}
the memory is 'patchy'. However, supporting 'patchy' memory would require
trying to read every single byte, and it seems unacceptable solution.
Explicit memory map is recommended for this case -- and
- target_read_memory_robust will take care of reading multiple ranges then. */
+ target_read_memory_robust will take care of reading multiple ranges
+ then. */
static void
-read_whatever_is_readable (struct target_ops *ops, ULONGEST begin, ULONGEST end,
+read_whatever_is_readable (struct target_ops *ops,
+ ULONGEST begin, ULONGEST end,
VEC(memory_read_result_s) **result)
{
gdb_byte *buf = xmalloc (end-begin);
if (xfer == first_half_end - first_half_begin)
{
- /* This half reads up fine. So, the error must be in the other half. */
+ /* This half reads up fine. So, the error must be in the
+ other half. */
current_begin = second_half_begin;
current_end = second_half_end;
}
/* Got an error reading full chunk. See if maybe we can read
some subrange. */
xfree (buffer);
- read_whatever_is_readable (ops, offset + xfered, offset + xfered + to_read, &result);
+ read_whatever_is_readable (ops, offset + xfered,
+ offset + xfered + to_read, &result);
xfered += to_read;
}
else
if ((int) (t->to_stratum) <= (int) dummy_stratum)
continue;
if (has_all_mem)
- printf_unfiltered (_("\tWhile running this, GDB does not access memory from...\n"));
+ printf_unfiltered (_("\tWhile running this, "
+ "GDB does not access memory from...\n"));
printf_unfiltered ("%s:\n", t->to_longname);
(t->to_files_info) (t);
has_all_mem = (*t->to_has_all_memory) (t);
|| t->to_stratum == arch_stratum)
continue;
- error (_("\
-The \"%s\" target does not support \"run\". Try \"help target\" or \"continue\"."),
+ error (_("The \"%s\" target does not support \"run\". "
+ "Try \"help target\" or \"continue\"."),
t->to_shortname);
}
inf = find_inferior_pid (ptid_get_pid (ptid));
if (inf == NULL || inf->aspace == NULL)
- internal_error (__FILE__, __LINE__, "\
-Can't determine the current address space of thread %s\n",
+ internal_error (__FILE__, __LINE__,
+ "Can't determine the current address space of thread %s\n",
target_pid_to_str (ptid));
return inf->aspace;
int retval = t->to_core_of_thread (t, ptid);
if (targetdebug)
- fprintf_unfiltered (gdb_stdlog, "target_core_of_thread (%d) = %d\n",
+ fprintf_unfiltered (gdb_stdlog,
+ "target_core_of_thread (%d) = %d\n",
PIDGET (ptid), retval);
return retval;
}
int retval = t->to_verify_memory (t, data, memaddr, size);
if (targetdebug)
- fprintf_unfiltered (gdb_stdlog, "target_verify_memory (%s, %s) = %d\n",
+ fprintf_unfiltered (gdb_stdlog,
+ "target_verify_memory (%s, %s) = %d\n",
paddress (target_gdbarch, memaddr),
pulongest (size),
retval);
{
int retval;
- retval = debug_target.to_can_accel_watchpoint_condition (addr, len, rw, cond);
+ retval = debug_target.to_can_accel_watchpoint_condition (addr, len,
+ rw, cond);
fprintf_unfiltered (gdb_stdlog,
- "target_can_accel_watchpoint_condition (%s, %d, %d, %s) = %ld\n",
+ "target_can_accel_watchpoint_condition "
+ "(%s, %d, %d, %s) = %ld\n",
core_addr_to_string (addr), len, rw,
host_address_to_string (cond), (unsigned long) retval);
return retval;
retval = debug_target.to_thread_architecture (ops, ptid);
- fprintf_unfiltered (gdb_stdlog, "target_thread_architecture (%s) = %s [%s]\n",
- target_pid_to_str (ptid), host_address_to_string (retval),
+ fprintf_unfiltered (gdb_stdlog,
+ "target_thread_architecture (%s) = %s [%s]\n",
+ target_pid_to_str (ptid),
+ host_address_to_string (retval),
gdbarch_bfd_arch_info (retval)->printable_name);
return retval;
}
current_target.to_remove_watchpoint = debug_to_remove_watchpoint;
current_target.to_stopped_by_watchpoint = debug_to_stopped_by_watchpoint;
current_target.to_stopped_data_address = debug_to_stopped_data_address;
- current_target.to_watchpoint_addr_within_range = debug_to_watchpoint_addr_within_range;
- current_target.to_region_ok_for_hw_watchpoint = debug_to_region_ok_for_hw_watchpoint;
- current_target.to_can_accel_watchpoint_condition = debug_to_can_accel_watchpoint_condition;
+ current_target.to_watchpoint_addr_within_range
+ = debug_to_watchpoint_addr_within_range;
+ current_target.to_region_ok_for_hw_watchpoint
+ = debug_to_region_ok_for_hw_watchpoint;
+ current_target.to_can_accel_watchpoint_condition
+ = debug_to_can_accel_watchpoint_condition;
current_target.to_terminal_init = debug_to_terminal_init;
current_target.to_terminal_inferior = debug_to_terminal_inferior;
- current_target.to_terminal_ours_for_output = debug_to_terminal_ours_for_output;
+ current_target.to_terminal_ours_for_output
+ = debug_to_terminal_ours_for_output;
current_target.to_terminal_ours = debug_to_terminal_ours;
current_target.to_terminal_save_ours = debug_to_terminal_save_ours;
current_target.to_terminal_info = debug_to_terminal_info;
\f
static char targ_desc[] =
-"Names of targets and files being debugged.\n\
-Shows the entire stack of targets currently in use (including the exec-file,\n\
+"Names of targets and files being debugged.\nShows the entire \
+stack of targets currently in use (including the exec-file,\n\
core-file, and process, if any), as well as the symbol file name.";
static void
struct cmd_list_element *c,
const char *value)
{
- fprintf_filtered (file, _("\
-Controlling the inferior in asynchronous mode is %s.\n"), value);
+ fprintf_filtered (file,
+ _("Controlling the inferior in "
+ "asynchronous mode is %s.\n"), value);
}
/* Temporary copies of permission settings. */
This information is updated only when:
- update_thread_list is called
- thread stops
- If the core cannot be determined -- either for the specified thread, or
- right now, or in this debug session, or for this target -- return -1. */
+ If the core cannot be determined -- either for the specified
+ thread, or right now, or in this debug session, or for this
+ target -- return -1. */
int (*to_core_of_thread) (struct target_ops *, ptid_t ptid);
/* Verify that the memory in the [MEMADDR, MEMADDR+SIZE) range
/* From mem-break.c */
-extern int memory_remove_breakpoint (struct gdbarch *, struct bp_target_info *);
+extern int memory_remove_breakpoint (struct gdbarch *,
+ struct bp_target_info *);
-extern int memory_insert_breakpoint (struct gdbarch *, struct bp_target_info *);
+extern int memory_insert_breakpoint (struct gdbarch *,
+ struct bp_target_info *);
-extern int default_memory_remove_breakpoint (struct gdbarch *, struct bp_target_info *);
+extern int default_memory_remove_breakpoint (struct gdbarch *,
+ struct bp_target_info *);
-extern int default_memory_insert_breakpoint (struct gdbarch *, struct bp_target_info *);
+extern int default_memory_insert_breakpoint (struct gdbarch *,
+ struct bp_target_info *);
/* From target.c */
#endif /* ! defined (HAVE_SGTTY_H) */
#endif /* ! defined (HAVE_TERMIO_H) */
#endif /* ! defined (HAVE_TERMIOS_H) */
-#endif /* !defined (HAVE_TERMIOS) && !defined(HAVE_TERMIO) && !defined(HAVE_SGTTY) */
+#endif /* !defined (HAVE_TERMIOS) && !defined (HAVE_TERMIO) &&
+ !defined (HAVE_SGTTY) */
#if defined(HAVE_TERMIOS)
#include <termios.h>
/* Warn the user. */
if (frame_level > 0 && !ui_out_is_mi_like_p (uiout))
{
- warning (_("\
-Couldn't restore frame #%d in current thread, at reparsed frame #0\n"),
+ warning (_("Couldn't restore frame #%d in "
+ "current thread, at reparsed frame #0\n"),
frame_level);
/* For MI, we should probably have a notification about
current frame change. But this error is not very
printf_filtered (_("\nThread %d (%s):\n"),
tp->num, target_pid_to_str (inferior_ptid));
execute_command (cmd, from_tty);
- strcpy (cmd, saved_cmd); /* Restore exact command used previously */
+ strcpy (cmd, saved_cmd); /* Restore exact command used
+ previously. */
}
do_cleanups (old_chain);
show_print_thread_events (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Printing of thread events is %s.\n"),
+ fprintf_filtered (file,
+ _("Printing of thread events is %s.\n"),
value);
}
show_caution (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Whether to confirm potentially dangerous operations is %s.\n"),
+ fprintf_filtered (file, _("Whether to confirm potentially "
+ "dangerous operations is %s.\n"),
value);
}
show_history_filename (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-The filename in which to record the command history is \"%s\".\n"),
+ fprintf_filtered (file, _("The filename in which to record "
+ "the command history is \"%s\".\n"),
value);
}
if (expanded < 0)
{
xfree (history_value);
- return command_line_input (prompt_arg, repeat, annotation_suffix);
+ return command_line_input (prompt_arg, repeat,
+ annotation_suffix);
}
if (strlen (history_value) > linelength)
{
/* Second line is a copyright notice. */
- fprintf_filtered (stream, "Copyright (C) 2011 Free Software Foundation, Inc.\n");
+ fprintf_filtered (stream,
+ "Copyright (C) 2011 Free Software Foundation, Inc.\n");
/* Following the copyright is a brief statement that the program is
free software, that users are free to copy and change it on
there is no warranty. */
fprintf_filtered (stream, "\
-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
-This is free software: you are free to change and redistribute it.\n\
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\
+\nThis is free software: you are free to change and redistribute it.\n\
There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\n\
and \"show warranty\" for details.\n");
fprintf_filtered (stream, "This GDB was configured as \"");
if (strcmp (host_name, target_name) != 0)
{
- fprintf_filtered (stream, "--host=%s --target=%s", host_name, target_name);
+ fprintf_filtered (stream, "--host=%s --target=%s",
+ host_name, target_name);
}
else
{
const char *value)
{
if (interactive_mode == AUTO_BOOLEAN_AUTO)
- fprintf_filtered (file, "\
-Debugger's interactive mode is %s (currently %s).\n",
+ fprintf_filtered (file, "Debugger's interactive mode "
+ "is %s (currently %s).\n",
value, input_from_terminal_p () ? "on" : "off");
else
fprintf_filtered (file, "Debugger's interactive mode is %s.\n", value);
void
set_history (char *args, int from_tty)
{
- printf_unfiltered (_("\"set history\" must be followed by the name of a history subcommand.\n"));
+ printf_unfiltered (_("\"set history\" must be followed "
+ "by the name of a history subcommand.\n"));
help_list (sethistlist, "set history ", -1, gdb_stdout);
}
show_async_command_editing_p (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Editing of command lines as they are typed is %s.\n"),
+ fprintf_filtered (file, _("Editing of command lines as "
+ "they are typed is %s.\n"),
value);
}
show_exec_done_display_p (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Notification of completion for asynchronous execution commands is %s.\n"),
+ fprintf_filtered (file, _("Notification of completion for "
+ "asynchronous execution commands is %s.\n"),
value);
}
static void
rl_add_defun ("operate-and-get-next", gdb_rl_operate_and_get_next, 15);
add_setshow_string_cmd ("prompt", class_support,
- &new_async_prompt, _("\
-Set gdb's prompt"), _("\
-Show gdb's prompt"), NULL,
- set_async_prompt,
+ &new_async_prompt,
+ _("Set gdb's prompt"),
+ _("Show gdb's prompt"),
+ NULL, set_async_prompt,
show_new_async_prompt,
&setlist, &showlist);
add_com ("dont-repeat", class_support, dont_repeat_command, _("\
-Don't repeat this command.\n\
-Primarily used inside of user-defined commands that should not be repeated when\n\
+Don't repeat this command.\nPrimarily \
+used inside of user-defined commands that should not be repeated when\n\
hitting return."));
add_setshow_boolean_cmd ("editing", class_support,
{
CORE_ADDR trace_pc;
- if (trace_frame == NULL) /* Cease debugging any trace buffers. */
+ if (trace_frame == NULL) /* Cease debugging any trace buffers. */
{
traceframe_fun = 0;
traceframe_sal.pc = traceframe_sal.line = 0;
if (tsv)
{
tsv->initial_value = initval;
- printf_filtered (_("Trace state variable $%s now has initial value %s.\n"),
+ printf_filtered (_("Trace state variable $%s "
+ "now has initial value %s.\n"),
tsv->name, plongest (tsv->initial_value));
do_cleanups (old_chain);
return;
tsv = create_trace_state_variable (internalvar_name (intvar));
tsv->initial_value = initval;
- printf_filtered (_("Trace state variable $%s created, with initial value %s.\n"),
+ printf_filtered (_("Trace state variable $%s "
+ "created, with initial value %s.\n"),
tsv->name, plongest (tsv->initial_value));
do_cleanups (old_chain);
t->number);
struct cleanup *cleanups = make_cleanup (xfree, tmpbuf);
- l = read_command_lines (tmpbuf, from_tty, 1, check_tracepoint_command, t);
+ l = read_command_lines (tmpbuf, from_tty, 1,
+ check_tracepoint_command, t);
do_cleanups (cleanups);
breakpoint_set_commands (t, l);
}
{
if (SYMBOL_CLASS (exp->elts[2].symbol) == LOC_CONST)
{
- error (_("constant `%s' (value %ld) will not be collected."),
+ error (_("constant `%s' (value %ld) "
+ "will not be collected."),
SYMBOL_PRINT_NAME (exp->elts[2].symbol),
SYMBOL_VALUE (exp->elts[2].symbol));
}
- else if (SYMBOL_CLASS (exp->elts[2].symbol) == LOC_OPTIMIZED_OUT)
+ else if (SYMBOL_CLASS (exp->elts[2].symbol)
+ == LOC_OPTIMIZED_OUT)
{
- error (_("`%s' is optimized away and cannot be collected."),
+ error (_("`%s' is optimized away "
+ "and cannot be collected."),
SYMBOL_PRINT_NAME (exp->elts[2].symbol));
}
}
memranges->listsize);
}
- if (type != memrange_absolute) /* Better collect the base register! */
+ if (type != memrange_absolute) /* Better collect the base register! */
add_register (memranges, type);
}
break;
case tracepoint_error:
if (ts->stopping_tracepoint)
- printf_filtered (_("Trace stopped by an error (%s, tracepoint %d).\n"),
+ printf_filtered (_("Trace stopped by an "
+ "error (%s, tracepoint %d).\n"),
ts->error_desc, ts->stopping_tracepoint);
else
printf_filtered (_("Trace stopped by an error (%s).\n"),
if (ts->traceframes_created >= 0
&& ts->traceframe_count != ts->traceframes_created)
{
- printf_filtered (_("Buffer contains %d trace frames (of %d created total).\n"),
+ printf_filtered (_("Buffer contains %d trace "
+ "frames (of %d created total).\n"),
ts->traceframe_count, ts->traceframes_created);
}
else if (ts->traceframe_count >= 0)
{
if (current_trace_status ()->disconnected_tracing)
{
- if (!query (_("Trace is running and will continue after detach; detach anyway? ")))
+ if (!query (_("Trace is running and will "
+ "continue after detach; detach anyway? ")))
error (_("Not confirmed."));
}
else
{
- if (!query (_("Trace is running but will stop on detach; detach anyway? ")))
+ if (!query (_("Trace is running but will "
+ "stop on detach; detach anyway? ")))
error (_("Not confirmed."));
}
}
int regno;
if (args == 0 || *args == 0)
- error (_("requires an argument (function, line or *addr) to define a scope"));
+ error (_("requires an argument (function, "
+ "line or *addr) to define a scope"));
sals = decode_line_1 (&args, 1, NULL, 0, &canonical, NULL);
if (sals.nelts == 0)
We assume the objfile architecture will contain all the
standard registers that occur in debug info in that
objfile. */
- regno = SYMBOL_REGISTER_OPS (sym)->register_number (sym, gdbarch);
+ regno = SYMBOL_REGISTER_OPS (sym)->register_number (sym,
+ gdbarch);
if (SYMBOL_IS_ARGUMENT (sym))
printf_filtered ("an argument in register $%s",
break;
case LOC_REGPARM_ADDR:
/* Note comment at LOC_REGISTER. */
- regno = SYMBOL_REGISTER_OPS (sym)->register_number (sym, gdbarch);
+ regno = SYMBOL_REGISTER_OPS (sym)->register_number (sym,
+ gdbarch);
printf_filtered ("the address of an argument, in register $%s",
gdbarch_register_name (gdbarch, regno));
break;
if (80 + strlen (srctype) > buf_size)
error (_("Buffer too small for source encoding"));
sprintf (buf, "%x:%s:%s:%x:%x:",
- tpnum, phex_nz (addr, sizeof (addr)), srctype, 0, (int) strlen (src));
+ tpnum, phex_nz (addr, sizeof (addr)),
+ srctype, 0, (int) strlen (src));
if (strlen (buf) + strlen (src) * 2 >= buf_size)
error (_("Source string too long for buffer"));
bin2hex (src, buf + strlen (buf), 0);
if (utp->cond_string)
{
encode_source_string (utp->number, utp->addr,
- "cond", utp->cond_string, buf, MAX_TRACE_UPLOAD);
+ "cond", utp->cond_string,
+ buf, MAX_TRACE_UPLOAD);
fprintf (fp, "tp Z%s\n", buf);
}
for (a = 0; VEC_iterate (char_ptr, utp->cmd_strings, a, act); ++a)
{
t = find_matching_tracepoint (utp);
if (t)
- printf_filtered (_("Assuming tracepoint %d is same as target's tracepoint %d at %s.\n"),
- t->number, utp->number, paddress (get_current_arch (), utp->addr));
+ printf_filtered (_("Assuming tracepoint %d is same "
+ "as target's tracepoint %d at %s.\n"),
+ t->number, utp->number,
+ paddress (get_current_arch (), utp->addr));
else
{
t = create_tracepoint_from_upload (utp);
if (t)
- printf_filtered (_("Created tracepoint %d for target's tracepoint %d at %s.\n"),
- t->number, utp->number, paddress (get_current_arch (), utp->addr));
+ printf_filtered (_("Created tracepoint %d for "
+ "target's tracepoint %d at %s.\n"),
+ t->number, utp->number,
+ paddress (get_current_arch (), utp->addr));
else
- printf_filtered (_("Failed to create tracepoint for target's tracepoint %d at %s, skipping it.\n"),
- utp->number, paddress (get_current_arch (), utp->addr));
+ printf_filtered (_("Failed to create tracepoint for target's "
+ "tracepoint %d at %s, skipping it.\n"),
+ utp->number,
+ paddress (get_current_arch (), utp->addr));
}
/* Whether found or created, record the number used by the
target, to help with mapping target tracepoints back to their
if (tsv)
{
if (info_verbose)
- printf_filtered (_("Assuming trace state variable $%s is same as target's variable %d.\n"),
+ printf_filtered (_("Assuming trace state variable $%s "
+ "is same as target's variable %d.\n"),
tsv->name, utsv->number);
}
else
{
tsv = create_tsv_from_upload (utsv);
if (info_verbose)
- printf_filtered (_("Created trace state variable $%s for target's variable %d.\n"),
+ printf_filtered (_("Created trace state variable "
+ "$%s for target's variable %d.\n"),
tsv->name, utsv->number);
}
/* Give precedence to numberings that come from the target. */
p = unpack_varlen_hex (++p1, &val);
ts->stop_reason = trace_never_run;
}
- else if (strncmp (p, stop_reason_names[tracepoint_passcount], p1 - p) == 0)
+ else if (strncmp (p, stop_reason_names[tracepoint_passcount],
+ p1 - p) == 0)
{
p = unpack_varlen_hex (++p1, &val);
ts->stop_reason = tracepoint_passcount;
p += 2 * xlen;
}
else
- warning (_("Unrecognized char '%c' in tracepoint definition, skipping rest"), *p);
+ warning (_("Unrecognized char '%c' in tracepoint "
+ "definition, skipping rest"), *p);
}
utp = get_uploaded_tp (num, addr, utpp);
utp->type = type;
/* But don't try to guess if tracepoint is multi-location... */
if (tp->loc->next)
{
- warning ("Tracepoint %d has multiple locations, cannot infer $pc",
+ warning ("Tracepoint %d has multiple "
+ "locations, cannot infer $pc",
tp->number);
return;
}
{
tfile_ops.to_shortname = "tfile";
tfile_ops.to_longname = "Local trace dump file";
- tfile_ops.to_doc =
- "Use a trace file as a target. Specify the filename of the trace file.";
+ tfile_ops.to_doc
+ = "Use a trace file as a target. Specify the filename of the trace file.";
tfile_ops.to_open = tfile_open;
tfile_ops.to_close = tfile_close;
tfile_ops.to_fetch_registers = tfile_fetch_registers;
tfile_ops.to_files_info = tfile_files_info;
tfile_ops.to_get_trace_status = tfile_get_trace_status;
tfile_ops.to_trace_find = tfile_trace_find;
- tfile_ops.to_get_trace_state_variable_value = tfile_get_trace_state_variable_value;
+ tfile_ops.to_get_trace_state_variable_value
+ = tfile_get_trace_state_variable_value;
tfile_ops.to_stratum = process_stratum;
tfile_ops.to_has_all_memory = tfile_has_all_memory;
tfile_ops.to_has_memory = tfile_has_memory;
/* String that is the encoded form of the tracepoint's condition. */
char *cond;
- /* Vectors of strings that are the encoded forms of a tracepoint's actions. */
+ /* Vectors of strings that are the encoded forms of a tracepoint's
+ actions. */
VEC(char_ptr) *actions;
VEC(char_ptr) *step_actions;
extern void parse_trace_status (char *line, struct trace_status *ts);
-extern void parse_tracepoint_definition (char *line, struct uploaded_tp **utpp);
+extern void parse_tracepoint_definition (char *line,
+ struct uploaded_tp **utpp);
extern void parse_tsv_definition (char *line, struct uploaded_tsv **utsvp);
extern struct uploaded_tp *get_uploaded_tp (int num, ULONGEST addr,
static ui_file_read_ftype stdio_file_read;
static ui_file_isatty_ftype stdio_file_isatty;
static ui_file_delete_ftype stdio_file_delete;
-static struct ui_file *stdio_file_new (FILE * file, int close_p);
+static struct ui_file *stdio_file_new (FILE *file, int close_p);
static ui_file_flush_ftype stdio_file_flush;
static int stdio_file_magic;
/* Override methods used by specific implementations of a UI_FILE
object. */
-typedef void (ui_file_flush_ftype) (struct ui_file * stream);
-extern void set_ui_file_flush (struct ui_file *stream, ui_file_flush_ftype * flush);
+typedef void (ui_file_flush_ftype) (struct ui_file *stream);
+extern void set_ui_file_flush (struct ui_file *stream,
+ ui_file_flush_ftype *flush);
/* NOTE: Both fputs and write methods are available. Default
implementations that mapping one onto the other are included. */
-typedef void (ui_file_write_ftype) (struct ui_file * stream, const char *buf, long length_buf);
-extern void set_ui_file_write (struct ui_file *stream, ui_file_write_ftype *fputs);
-
-typedef void (ui_file_fputs_ftype) (const char *, struct ui_file * stream);
-extern void set_ui_file_fputs (struct ui_file *stream, ui_file_fputs_ftype * fputs);
-
-typedef long (ui_file_read_ftype) (struct ui_file * stream, char *buf, long length_buf);
-extern void set_ui_file_read (struct ui_file *stream, ui_file_read_ftype *fread);
-
-typedef int (ui_file_isatty_ftype) (struct ui_file * stream);
-extern void set_ui_file_isatty (struct ui_file *stream, ui_file_isatty_ftype * isatty);
-
-typedef void (ui_file_rewind_ftype) (struct ui_file * stream);
-extern void set_ui_file_rewind (struct ui_file *stream, ui_file_rewind_ftype * rewind);
-
-typedef void (ui_file_put_method_ftype) (void *object, const char *buffer, long length_buffer);
-typedef void (ui_file_put_ftype) (struct ui_file *stream, ui_file_put_method_ftype * method, void *context);
-extern void set_ui_file_put (struct ui_file *stream, ui_file_put_ftype * put);
+typedef void (ui_file_write_ftype) (struct ui_file *stream,
+ const char *buf, long length_buf);
+extern void set_ui_file_write (struct ui_file *stream,
+ ui_file_write_ftype *fputs);
+
+typedef void (ui_file_fputs_ftype) (const char *, struct ui_file *stream);
+extern void set_ui_file_fputs (struct ui_file *stream,
+ ui_file_fputs_ftype *fputs);
+
+typedef long (ui_file_read_ftype) (struct ui_file *stream,
+ char *buf, long length_buf);
+extern void set_ui_file_read (struct ui_file *stream,
+ ui_file_read_ftype *fread);
+
+typedef int (ui_file_isatty_ftype) (struct ui_file *stream);
+extern void set_ui_file_isatty (struct ui_file *stream,
+ ui_file_isatty_ftype *isatty);
+
+typedef void (ui_file_rewind_ftype) (struct ui_file *stream);
+extern void set_ui_file_rewind (struct ui_file *stream,
+ ui_file_rewind_ftype *rewind);
+
+typedef void (ui_file_put_method_ftype) (void *object, const char *buffer,
+ long length_buffer);
+typedef void (ui_file_put_ftype) (struct ui_file *stream,
+ ui_file_put_method_ftype *method,
+ void *context);
+extern void set_ui_file_put (struct ui_file *stream, ui_file_put_ftype *put);
typedef void (ui_file_delete_ftype) (struct ui_file * stream);
-extern void set_ui_file_data (struct ui_file *stream, void *data, ui_file_delete_ftype * delete);
+extern void set_ui_file_data (struct ui_file *stream, void *data,
+ ui_file_delete_ftype *delete);
extern void *ui_file_data (struct ui_file *file);
extern int ui_file_isatty (struct ui_file *);
-extern void ui_file_write (struct ui_file *file, const char *buf, long length_buf);
+extern void ui_file_write (struct ui_file *file, const char *buf,
+ long length_buf);
/* NOTE: copies left to right */
-extern void ui_file_put (struct ui_file *src, ui_file_put_method_ftype *write, void *dest);
+extern void ui_file_put (struct ui_file *src,
+ ui_file_put_method_ftype *write, void *dest);
/* Returns a freshly allocated buffer containing the entire contents
of FILE (as determined by ui_file_put()) with a NUL character
extern struct cleanup *make_cleanup_ui_out_table_begin_end (struct ui_out *ui_out,
int nr_cols,
- int nr_rows,
- const char *tblid);
+ int nr_rows,
+ const char *tblid);
/* Compatibility wrappers. */
extern struct cleanup *make_cleanup_ui_out_list_begin_end (struct ui_out *uiout,
/* An array of the builtin user registers. */
-static struct gdb_user_regs builtin_user_regs = { NULL, &builtin_user_regs.first };
+static struct gdb_user_regs builtin_user_regs = {
+ NULL, &builtin_user_regs.first
+};
void
user_reg_add_builtin (const char *name, user_reg_read_ftype *read,
/* Add a builtin register (present in all architectures). */
extern void user_reg_add_builtin (const char *name,
- user_reg_read_ftype *read, const void *baton);
+ user_reg_read_ftype *read,
+ const void *baton);
/* Add a per-architecture frame register. */
extern void user_reg_add (struct gdbarch *gdbarch, const char *name,
show_demangle (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Demangling of encoded C++/ObjC names when displaying symbols is %s.\n"),
+ fprintf_filtered (file,
+ _("Demangling of encoded C++/ObjC names "
+ "when displaying symbols is %s.\n"),
value);
}
show_asm_demangle (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Demangling of C++/ObjC names in disassembly listings is %s.\n"),
+ fprintf_filtered (file,
+ _("Demangling of C++/ObjC names in "
+ "disassembly listings is %s.\n"),
value);
}
show_sevenbit_strings (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Printing of 8-bit characters in strings as \\nnn is %s.\n"),
+ fprintf_filtered (file, _("Printing of 8-bit characters "
+ "in strings as \\nnn is %s.\n"),
value);
}
*(closure->variable) = closure->value;
}
-/* Remember the current value of *VARIABLE and make it restored when the cleanup
- is run. */
+/* Remember the current value of *VARIABLE and make it restored when
+ the cleanup is run. */
struct cleanup *
make_cleanup_restore_integer (int *variable)
xfree);
}
-/* Remember the current value of *VARIABLE and make it restored when the cleanup
- is run. */
+/* Remember the current value of *VARIABLE and make it restored when
+ the cleanup is run. */
struct cleanup *
make_cleanup_restore_uinteger (unsigned int *variable)
void
do_all_intermediate_continuations (void)
{
- iterate_over_threads (do_all_intermediate_continuations_thread_callback, NULL);
+ iterate_over_threads (do_all_intermediate_continuations_thread_callback,
+ NULL);
}
/* Callback for iterate over threads. */
void
discard_all_intermediate_continuations (void)
{
- iterate_over_threads (discard_all_intermediate_continuations_thread_callback, NULL);
+ iterate_over_threads (discard_all_intermediate_continuations_thread_callback,
+ NULL);
}
\f
abort (); /* NOTE: GDB has only three calls to abort(). */
}
-/* Check whether GDB will be able to dump core using the dump_core function. */
+/* Check whether GDB will be able to dump core using the dump_core
+ function. */
static int
can_dump_core (const char *reason)
if (rlim.rlim_max == 0)
{
fprintf_unfiltered (gdb_stderr,
- _("%s\nUnable to dump core, use `ulimit -c unlimited'"
- " before executing GDB next time.\n"), reason);
+ _("%s\nUnable to dump core, use `ulimit -c"
+ " unlimited' before executing GDB next time.\n"),
+ reason);
return 0;
}
#endif /* HAVE_GETRLIMIT */
char *msg;
msg = xstrvprintf (fmt, ap);
- reason = xstrprintf ("\
-%s:%d: %s: %s\n\
-A problem internal to GDB has been detected,\n\
-further debugging may prove unreliable.", file, line, problem->name, msg);
+ reason = xstrprintf ("%s:%d: %s: %s\n"
+ "A problem internal to GDB has been detected,\n"
+ "further debugging may prove unreliable.",
+ file, line, problem->name, msg);
xfree (msg);
make_cleanup (xfree, reason);
}
(char *) NULL),
0/*allow-unknown*/, &maintenance_show_cmdlist);
- set_doc = xstrprintf (_("\
-Set whether GDB should quit when an %s is detected"),
+ set_doc = xstrprintf (_("Set whether GDB should quit "
+ "when an %s is detected"),
problem->name);
- show_doc = xstrprintf (_("\
-Show whether GDB will quit when an %s is detected"),
+ show_doc = xstrprintf (_("Show whether GDB will quit "
+ "when an %s is detected"),
problem->name);
add_setshow_enum_cmd ("quit", class_maintenance,
internal_problem_modes,
xfree (set_doc);
xfree (show_doc);
- set_doc = xstrprintf (_("\
-Set whether GDB should create a core file of GDB when %s is detected"),
+ set_doc = xstrprintf (_("Set whether GDB should create a core "
+ "file of GDB when %s is detected"),
problem->name);
- show_doc = xstrprintf (_("\
-Show whether GDB will create a core file of GDB when %s is detected"),
+ show_doc = xstrprintf (_("Show whether GDB will create a core "
+ "file of GDB when %s is detected"),
problem->name);
add_setshow_enum_cmd ("corefile", class_maintenance,
internal_problem_modes,
wrap_here ("");
vfprintf_filtered (gdb_stdout, ctlstr, args);
- printf_filtered (_("(%s or %s) [answered %c; input not from terminal]\n"),
+ printf_filtered (_("(%s or %s) [answered %c; "
+ "input not from terminal]\n"),
y_string, n_string, def_answer);
gdb_flush (gdb_stdout);
show_lines_per_page (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Number of lines gdb thinks are in a page is %s.\n"),
+ fprintf_filtered (file,
+ _("Number of lines gdb thinks are in a page is %s.\n"),
value);
}
show_chars_per_line (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Number of characters gdb thinks are in a line is %s.\n"),
+ fprintf_filtered (file,
+ _("Number of characters gdb thinks "
+ "are in a line is %s.\n"),
value);
}
{
/* This should have been allocated, but be paranoid anyway. */
if (!wrap_buffer)
- internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
+ internal_error (__FILE__, __LINE__,
+ _("failed internal consistency check"));
if (wrap_buffer[0])
{
}
wrap_pointer = wrap_buffer;
wrap_buffer[0] = '\0';
- if (chars_per_line == UINT_MAX) /* No line overflow checking */
+ if (chars_per_line == UINT_MAX) /* No line overflow checking. */
{
wrap_column = 0;
}
{
fputs_unfiltered (wrap_indent, stream);
*wrap_pointer = '\0'; /* Null-terminate saved stuff */
- fputs_unfiltered (wrap_buffer, stream); /* and eject it */
+ fputs_unfiltered (wrap_buffer, stream); /* and eject it */
/* FIXME, this strlen is what prevents wrap_indent from
containing tabs. However, if we recurse to print it
and count its chars, we risk trouble if wrap_indent is
if (*lineptr == '\n')
{
chars_printed = 0;
- wrap_here ((char *) 0); /* Spit out chars, cancel further wraps */
+ wrap_here ((char *) 0); /* Spit out chars, cancel
+ further wraps. */
lines_printed++;
fputc_unfiltered ('\n', stream);
lineptr++;
show_debug_timestamp (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("Timestamping debugging messages is %s.\n"), value);
+ fprintf_filtered (file, _("Timestamping debugging messages is %s.\n"),
+ value);
}
\f
if (hex_len > width)
width = hex_len;
if (width + 2 >= CELLSIZE)
- internal_error (__FILE__, __LINE__,
- _("hex_string_custom: insufficient space to store result"));
+ internal_error (__FILE__, __LINE__, _("\
+hex_string_custom: insufficient space to store result"));
strcpy (result_end - width - 2, "0x");
memset (result_end - width, '0', width);
}
#define AMBIGUOUS_MESS1 ".\nMatching formats:"
-#define AMBIGUOUS_MESS2 ".\nUse \"set gnutarget format-name\" to specify the format."
+#define AMBIGUOUS_MESS2 \
+ ".\nUse \"set gnutarget format-name\" to specify the format."
const char *
gdb_bfd_errmsg (bfd_error_type error_tag, char **matching)
if (TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type1)))
!= TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type2))))
- error (_("\
-First argument of `-' is a pointer and second argument is neither\n\
-an integer nor a pointer of the same type."));
+ error (_("First argument of `-' is a pointer and "
+ "second argument is neither\n"
+ "an integer nor a pointer of the same type."));
sz = TYPE_LENGTH (check_typedef (TYPE_TARGET_TYPE (type1)));
if (sz == 0)
= TYPE_TARGET_TYPE (check_typedef (value_type (argvec[0])));
return value_zero (return_type, VALUE_LVAL (arg1));
}
- return call_function_by_hand (argvec[0], 2 - static_memfuncp, argvec + 1);
+ return call_function_by_hand (argvec[0], 2 - static_memfuncp,
+ argvec + 1);
}
throw_error (NOT_FOUND_ERROR,
_("member function %s not found"), tstr);
if (TYPE_CODE (type2) != TYPE_CODE_BITSTRING
&& TYPE_CODE (type2) != TYPE_CODE_BOOL)
{
- error (_("Bitstrings or booleans can only be concatenated with other bitstrings or booleans."));
+ error (_("Bitstrings or booleans can only be concatenated "
+ "with other bitstrings or booleans."));
}
error (_("unimplemented support for bitstring/boolean concatenation."));
}
/* The DFP extension to the C language does not allow mixing of
* decimal float types with other float types in expressions
* (see WDTR 24732, page 12). */
- error (_("Mixing decimal floating types with other floating types is not allowed."));
+ error (_("Mixing decimal floating types with "
+ "other floating types is not allowed."));
/* Obtain decimal value of arg1, converting from other types
if necessary. */
errno = 0;
v = pow (v1, v2);
if (errno)
- error (_("Cannot perform exponentiation: %s"), safe_strerror (errno));
+ error (_("Cannot perform exponentiation: %s"),
+ safe_strerror (errno));
break;
case BINOP_MIN:
struct cmd_list_element *c,
const char *value)
{
- fprintf_filtered (file, _("\
-Overload resolution in evaluating C++ functions is %s.\n"),
+ fprintf_filtered (file, _("Overload resolution in evaluating "
+ "C++ functions is %s.\n"),
value);
}
else
{
if (!target_has_execution)
- error (_("evaluation of this expression requires the target program to be active"));
+ error (_("evaluation of this expression "
+ "requires the target program to be active"));
else
- error (_("evaluation of this expression requires the program to have a function \"%s\"."), name);
+ error (_("evaluation of this expression requires the "
+ "program to have a function \"%s\"."),
+ name);
}
}
}
if (value_logical_not (val))
{
if (!target_has_execution)
- error (_("No memory available to program now: you need to start the target first"));
+ error (_("No memory available to program now: "
+ "you need to start the target first"));
else
error (_("No memory available to program: call to malloc failed"));
}
v2 = coerce_ref (arg2);
else
v2 = value_ind (arg2);
- gdb_assert (TYPE_CODE (check_typedef (value_type (v2))) == TYPE_CODE_STRUCT
- && !!"Why did coercion fail?");
+ gdb_assert (TYPE_CODE (check_typedef (value_type (v2)))
+ == TYPE_CODE_STRUCT && !!"Why did coercion fail?");
v2 = value_cast_structs (t1, v2);
/* At this point we have what we can have, un-dereference if needed. */
if (v2)
low_bound = 0, high_bound = 0;
new_length = val_length / element_length;
if (val_length % element_length != 0)
- warning (_("array element type size does not divide object size in cast"));
+ warning (_("array element type size does not "
+ "divide object size in cast"));
/* FIXME-type-allocation: need a way to free this type when
we are done with it. */
range_type = create_range_type ((struct type *) NULL,
{
arg_type = check_typedef (TYPE_TARGET_TYPE (arg_type));
if (TYPE_CODE (arg_type) != TYPE_CODE_CLASS)
- error (_("Argument to dynamic_cast does not have pointer to class type"));
+ error (_("Argument to dynamic_cast does "
+ "not have pointer to class type"));
}
/* Handle NULL pointers. */
regnum = VALUE_REGNUM (val);
gdbarch = get_frame_arch (frame);
- fprintf_unfiltered (gdb_stdlog, "\
-{ value_fetch_lazy (frame=%d,regnum=%d(%s),...) ",
+ fprintf_unfiltered (gdb_stdlog,
+ "{ value_fetch_lazy "
+ "(frame=%d,regnum=%d(%s),...) ",
frame_relative_level (frame), regnum,
user_reg_map_regnum_to_name (gdbarch, regnum));
changed_len = TYPE_LENGTH (type);
if (changed_len > (int) sizeof (LONGEST))
- error (_("Can't handle bitfields which don't fit in a %d bit word."),
+ error (_("Can't handle bitfields which "
+ "don't fit in a %d bit word."),
(int) sizeof (LONGEST) * HOST_CHAR_BIT);
read_memory (changed_addr, buffer, changed_len);
/ HOST_CHAR_BIT;
if (changed_len > (int) sizeof (LONGEST))
- error (_("Can't handle bitfields which don't fit in a %d bit word."),
+ error (_("Can't handle bitfields which "
+ "don't fit in a %d bit word."),
(int) sizeof (LONGEST) * HOST_CHAR_BIT);
get_frame_register_bytes (frame, value_reg, offset,
}
}
-/* Make sure that VAL lives in target memory if it's supposed to. For instance,
- strings are constructed as character arrays in GDB's storage, and this
- function copies them to the target. */
+/* Make sure that VAL lives in target memory if it's supposed to. For
+ instance, strings are constructed as character arrays in GDB's
+ storage, and this function copies them to the target. */
struct value *
value_coerce_to_target (struct value *val)
if (TYPE_CODE (tt1) == TYPE_CODE_REF
/* We should be doing hairy argument matching, as below. */
- && (TYPE_CODE (check_typedef (TYPE_TARGET_TYPE (tt1))) == TYPE_CODE (tt2)))
+ && (TYPE_CODE (check_typedef (TYPE_TARGET_TYPE (tt1)))
+ == TYPE_CODE (tt2)))
{
if (TYPE_CODE (tt2) == TYPE_CODE_ARRAY)
t2[i] = value_coerce_array (t2[i]);
{
v = value_static_field (type, i);
if (v == 0)
- error (_("field %s is nonexistent or has been optimized out"),
+ error (_("field %s is nonexistent or "
+ "has been optimized out"),
name);
}
else
name_matched = 1;
check_stub_method_group (type, i);
if (j > 0 && args == 0)
- error (_("cannot resolve overloaded method `%s': no arguments supplied"), name);
+ error (_("cannot resolve overloaded method "
+ "`%s': no arguments supplied"), name);
else if (j == 0 && args == 0)
{
v = value_fn_field (arg1p, f, j, type, offset);
if (TYPE_CODE (t) != TYPE_CODE_STRUCT
&& TYPE_CODE (t) != TYPE_CODE_UNION)
- error (_("Attempt to extract a component of a value that is not a %s."), err);
+ error (_("Attempt to extract a component of a value that is not a %s."),
+ err);
/* Assume it's not, unless we see that it is. */
if (static_memfuncp)
if (v == (struct value *) - 1)
{
- error (_("One of the arguments you tried to pass to %s could not be converted to what the function wants."), name);
+ error (_("One of the arguments you tried to pass to %s could not "
+ "be converted to what the function wants."), name);
}
else if (v == 0)
{
if (TYPE_CODE (t) != TYPE_CODE_STRUCT
&& TYPE_CODE (t) != TYPE_CODE_UNION)
- error (_("Attempt to extract a component of a value that is not a struct or union"));
+ error (_("Attempt to extract a component of a "
+ "value that is not a struct or union"));
return find_method_list (argp, method, 0, t, num_fns,
basetype, boffset);
the function part. Do not try this for non-functions (e.g.
function pointers). */
if (qualified_name
- && TYPE_CODE (check_typedef (SYMBOL_TYPE (fsym))) == TYPE_CODE_FUNC)
+ && TYPE_CODE (check_typedef (SYMBOL_TYPE (fsym)))
+ == TYPE_CODE_FUNC)
{
char *temp;
case 1: /* Incomparable top contenders. */
/* This is an error incompatible candidates
should not have been proposed. */
- error (_("Internal error: incompatible overload candidates proposed"));
+ error (_("Internal error: incompatible "
+ "overload candidates proposed"));
break;
case 2: /* Function champion. */
method_oload_champ = -1;
else if (match_quality == NON_STANDARD)
{
if (method == METHOD)
- warning (_("Using non-standard conversion to match method %s%s%s to supplied arguments"),
+ warning (_("Using non-standard conversion to match "
+ "method %s%s%s to supplied arguments"),
obj_type_name,
(obj_type_name && *obj_type_name) ? "::" : "",
name);
else
- warning (_("Using non-standard conversion to match function %s to supplied arguments"),
+ warning (_("Using non-standard conversion to match "
+ "function %s to supplied arguments"),
func_name);
}
{
if (method)
fprintf_filtered (gdb_stderr,
- "Overloaded method instance %s, # of parms %d\n",
+ "Overloaded method instance %s, # of parms %d\n",
fns_ptr[ix].physname, nparms);
else
fprintf_filtered (gdb_stderr,
- "Overloaded function instance %s # of parms %d\n",
+ "Overloaded function instance "
+ "%s # of parms %d\n",
SYMBOL_DEMANGLED_NAME (oload_syms[ix]),
nparms);
for (jj = 0; jj < nargs - static_offset; jj++)
fprintf_filtered (gdb_stderr,
"...Badness @ %d : %d\n",
jj, bv->rank[jj].rank);
- fprintf_filtered (gdb_stderr,
- "Overload resolution champion is %d, ambiguous? %d\n",
+ fprintf_filtered (gdb_stderr, "Overload resolution "
+ "champion is %d, ambiguous? %d\n",
oload_champ, oload_ambiguous);
}
}
if (TYPE_CODE (t) != TYPE_CODE_STRUCT
&& TYPE_CODE (t) != TYPE_CODE_UNION)
- error (_("Internal error: non-aggregate type to value_struct_elt_for_reference"));
+ error (_("Internal error: non-aggregate type "
+ "to value_struct_elt_for_reference"));
for (i = TYPE_NFIELDS (t) - 1; i >= TYPE_N_BASECLASSES (t); i--)
{
for (j = 0; j < len; ++j)
{
if (compare_parameters (TYPE_FN_FIELD_TYPE (f, j), intype, 0)
- || compare_parameters (TYPE_FN_FIELD_TYPE (f, j), intype, 1))
+ || compare_parameters (TYPE_FN_FIELD_TYPE (f, j),
+ intype, 1))
break;
}
if (j == len)
- error (_("no member function matches that type instantiation"));
+ error (_("no member function matches "
+ "that type instantiation"));
}
else
{
/* Desired method is ambiguous if more than one
method is defined. */
if (j != -1)
- error (_("non-unique member `%s' requires type instantiation"), name);
+ error (_("non-unique member `%s' requires "
+ "type instantiation"), name);
j = ii;
}
/* Check if object is in memory */
if (VALUE_LVAL (argp) != lval_memory)
{
- warning (_("Couldn't retrieve complete object of RTTI type %s; object may be in register(s)."),
+ warning (_("Couldn't retrieve complete object of RTTI "
+ "type %s; object may be in register(s)."),
TYPE_NAME (real_type));
return argp;
if (sym == NULL)
{
if (complain)
- error (_("current stack frame does not contain a variable named `%s'"),
+ error (_("current stack frame does not contain a variable named `%s'"),
name);
else
return NULL;
show_print_max (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Limit on string chars or array elements to print is %s.\n"),
+ fprintf_filtered (file,
+ _("Limit on string chars or array "
+ "elements to print is %s.\n"),
value);
}
show_input_radix (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Default input radix for entering numbers is %s.\n"),
+ fprintf_filtered (file,
+ _("Default input radix for entering numbers is %s.\n"),
value);
}
show_output_radix (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Default output radix for printing of values is %s.\n"),
+ fprintf_filtered (file,
+ _("Default output radix for printing of values is %s.\n"),
value);
}
show_stop_print_at_null (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Printing of char arrays to stop at first null char is %s.\n"),
+ fprintf_filtered (file,
+ _("Printing of char arrays to stop "
+ "at first null char is %s.\n"),
value);
}
show_unionprint (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file, _("\
-Printing of unions interior to structures is %s.\n"),
+ fprintf_filtered (file,
+ _("Printing of unions interior to structures is %s.\n"),
value);
}
case 'o':
val = int_string (val_long, 8, 0, 0, use_c_format); break;
default:
- internal_error (__FILE__, __LINE__, _("failed internal consistency check"));
+ internal_error (__FILE__, __LINE__,
+ _("failed internal consistency check"));
}
fputs_filtered (val, stream);
}
}
}
-/* VALADDR points to a char integer of LEN bytes. Print it out in appropriate language form on stream.
+/* VALADDR points to a char integer of LEN bytes.
+ Print it out in appropriate language form on stream.
Omit any leading zero chars. */
void
function be eliminated. */
static int
-partial_memory_read (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int *errnoptr)
+partial_memory_read (CORE_ADDR memaddr, gdb_byte *myaddr,
+ int len, int *errnoptr)
{
int nread; /* Number of bytes actually read. */
int errcode; /* Error from last read. */
int errcode; /* Errno returned from bad reads. */
unsigned int nfetch; /* Chars to fetch / chars fetched. */
unsigned int chunksize; /* Size of each fetch, in chars. */
- gdb_byte *bufptr; /* Pointer to next available byte in buffer. */
+ gdb_byte *bufptr; /* Pointer to next available byte in
+ buffer. */
gdb_byte *limit; /* First location past end of fetch buffer. */
struct cleanup *old_chain = NULL; /* Top of the old cleanup chain. */
because finding the null byte (or available memory) is what actually
limits the fetch. */
- fetchlimit = (len == -1 ? options->print_max : min (len, options->print_max));
+ fetchlimit = (len == -1 ? options->print_max : min (len,
+ options->print_max));
errcode = read_string (addr, len, width, fetchlimit, byte_order,
&buffer, &bytes_read);
addr += bytes_read;
- /* We now have either successfully filled the buffer to fetchlimit, or
- terminated early due to an error or finding a null char when LEN is -1. */
+ /* We now have either successfully filled the buffer to fetchlimit,
+ or terminated early due to an error or finding a null char when
+ LEN is -1. */
/* Determine found_nul by looking at the last character read. */
found_nul = extract_unsigned_integer (buffer + bytes_read - width, width,
input_radix_1 = input_radix = radix;
if (from_tty)
{
- printf_filtered (_("Input radix now set to decimal %u, hex %x, octal %o.\n"),
+ printf_filtered (_("Input radix now set to "
+ "decimal %u, hex %x, octal %o.\n"),
radix, radix, radix);
}
}
break;
default:
output_radix_1 = output_radix;
- error (_("Unsupported output radix ``decimal %u''; output radix unchanged."),
+ error (_("Unsupported output radix ``decimal %u''; "
+ "output radix unchanged."),
radix);
}
output_radix_1 = output_radix = radix;
if (from_tty)
{
- printf_filtered (_("Output radix now set to decimal %u, hex %x, octal %o.\n"),
+ printf_filtered (_("Output radix now set to "
+ "decimal %u, hex %x, octal %o.\n"),
radix, radix, radix);
}
}
set_input_radix_1 (0, radix);
if (from_tty)
{
- printf_filtered (_("Input and output radices now set to decimal %u, hex %x, octal %o.\n"),
+ printf_filtered (_("Input and output radices now set to "
+ "decimal %u, hex %x, octal %o.\n"),
radix, radix, radix);
}
}
{
if (input_radix == output_radix)
{
- printf_filtered (_("Input and output radices set to decimal %u, hex %x, octal %o.\n"),
+ printf_filtered (_("Input and output radices set to "
+ "decimal %u, hex %x, octal %o.\n"),
input_radix, input_radix, input_radix);
}
else
{
- printf_filtered (_("Input radix set to decimal %u, hex %x, octal %o.\n"),
+ printf_filtered (_("Input radix set to decimal "
+ "%u, hex %x, octal %o.\n"),
input_radix, input_radix, input_radix);
- printf_filtered (_("Output radix set to decimal %u, hex %x, octal %o.\n"),
+ printf_filtered (_("Output radix set to decimal "
+ "%u, hex %x, octal %o.\n"),
output_radix, output_radix, output_radix);
}
}
extern void maybe_print_array_index (struct type *index_type, LONGEST index,
struct ui_file *stream,
- const struct value_print_options *options);
+ const struct value_print_options *);
extern void val_print_array_elements (struct type *, const gdb_byte *,
CORE_ADDR, struct ui_file *, int,
/* Now absnum is always absolute and origin zero. */
chunk = value_history_chain;
- for (i = (value_history_count - 1) / VALUE_HISTORY_CHUNK - absnum / VALUE_HISTORY_CHUNK;
+ for (i = (value_history_count - 1) / VALUE_HISTORY_CHUNK
+ - absnum / VALUE_HISTORY_CHUNK;
i > 0; i--)
chunk = chunk->next;
static struct internalvar *internalvars;
-/* If the variable does not already exist create it and give it the value given.
- If no value is given then the default is zero. */
+/* If the variable does not already exist create it and give it the
+ value given. If no value is given then the default is zero. */
static void
init_if_undefined_command (char* args, int from_tty)
{
/* Extract the variable from the parsed expression.
In the case of an assign the lvalue will be in elts[1] and elts[2]. */
if (expr->elts[1].opcode != OP_INTERNALVAR)
- error (_("The first parameter to init-if-undefined should be a GDB variable."));
+ error (_("The first parameter to init-if-undefined "
+ "should be a GDB variable."));
intvar = expr->elts[2].internalvar;
/* Only evaluate the expression if the lvalue is void.
printf_filtered (("\n"));
}
if (!varseen)
- printf_unfiltered (_("\
-No debugger convenience variables now defined.\n\
-Convenience variables have names starting with \"$\";\n\
-use \"set\" as in \"set $foo = 5\" to define them.\n"));
+ printf_unfiltered (_("No debugger convenience variables now defined.\n"
+ "Convenience variables have "
+ "names starting with \"$\";\n"
+ "use \"set\" as in \"set "
+ "$foo = 5\" to define them.\n"));
}
\f
/* Extract a value as a C number (either long or double).
*/
struct value *
-value_fn_field (struct value **arg1p, struct fn_field *f, int j, struct type *type,
+value_fn_field (struct value **arg1p, struct fn_field *f,
+ int j, struct type *type,
int offset)
{
struct value *v;
break;
default:
- error (_("\
-Unexpected type (%d) encountered for unsigned integer constant."),
+ error (_("Unexpected type (%d) encountered "
+ "for unsigned integer constant."),
TYPE_CODE (type));
}
}
\"$__\" holds the contents of the last address examined with \"x\"."),
&showlist);
- add_cmd ("values", no_class, show_values,
- _("Elements of value history around item number IDX (or last ten)."),
+ add_cmd ("values", no_class, show_values, _("\
+Elements of value history around item number IDX (or last ten)."),
&showlist);
add_com ("init-if-undefined", class_vars, init_if_undefined_command, _("\
}
/* Deletes a varobj and all its children if only_children == 0,
- otherwise deletes only the children; returns a malloc'ed list of all the
- (malloc'ed) names of the variables that have been deleted (NULL terminated) */
+ otherwise deletes only the children; returns a malloc'ed list of
+ all the (malloc'ed) names of the variables that have been deleted
+ (NULL terminated) */
int
varobj_delete (struct varobj *var, char ***dellist, int only_children)
char *print_value = NULL;
/* We need to know the varobj's type to decide if the value should
- be fetched or not. C++ fake children (public/protected/private) don't have
- a type. */
+ be fetched or not. C++ fake children (public/protected/private)
+ don't have a type. */
gdb_assert (var->type || CPLUS_FAKE_CHILD (var));
changeable = varobj_value_is_changeable_p (var);
to compare with. */
if (!initial && changeable)
{
- /* If the value of the varobj was changed by -var-set-value, then the
- value in the varobj and in the target is the same. However, that value
- is different from the value that the varobj had after the previous
- -var-update. So need to the varobj as changed. */
+ /* If the value of the varobj was changed by -var-set-value,
+ then the value in the varobj and in the target is the same.
+ However, that value is different from the value that the
+ varobj had after the previous -var-update. So need to the
+ varobj as changed. */
if (var->updated)
{
changed = 1;
}
if (cr == NULL)
{
- warning
- ("Assertion failed: Could not find varobj \"%s\" in root list",
- var->obj_name);
+ warning ("Assertion failed: Could not find "
+ "varobj \"%s\" in root list",
+ var->obj_name);
return;
}
if (prer == NULL)
{
struct varobj *var = new_variable ();
- var->root = (struct varobj_root *) xmalloc (sizeof (struct varobj_root));;
+ var->root = (struct varobj_root *) xmalloc (sizeof (struct varobj_root));
var->root->lang = NULL;
var->root->exp = NULL;
var->root->valid_block = NULL;
return (*var->root->lang->number_of_children) (var);;
}
-/* What is the expression for the root varobj VAR? Returns a malloc'd string. */
+/* What is the expression for the root varobj VAR? Returns a malloc'd
+ string. */
static char *
name_of_variable (struct varobj *var)
{
return (*var->root->lang->name_of_variable) (var);
}
-/* What is the name of the INDEX'th child of VAR? Returns a malloc'd string. */
+/* What is the name of the INDEX'th child of VAR? Returns a malloc'd
+ string. */
static char *
name_of_child (struct varobj *var, int index)
{
{
case TYPE_CODE_ARRAY:
if (cname)
- *cname = xstrdup (int_string (index
- + TYPE_LOW_BOUND (TYPE_INDEX_TYPE (type)),
- 10, 1, 0, 0));
+ *cname
+ = xstrdup (int_string (index
+ + TYPE_LOW_BOUND (TYPE_INDEX_TYPE (type)),
+ 10, 1, 0, 0));
if (cvalue && value)
{
*ctype = TYPE_FIELD_TYPE (type, type_index);
if (cfull_expression)
- *cfull_expression = xstrprintf ("((%s)%s%s)", parent_expression,
- join,
- TYPE_FIELD_NAME (type, type_index));
+ *cfull_expression
+ = xstrprintf ("((%s)%s%s)", parent_expression,
+ join,
+ TYPE_FIELD_NAME (type, type_index));
}
else if (index < TYPE_N_BASECLASSES (type))
{
memset (varobj_table, 0, sizeof_table);
add_setshow_zinteger_cmd ("debugvarobj", class_maintenance,
- &varobjdebug, _("\
-Set varobj debugging."), _("\
-Show varobj debugging."), _("\
-When non-zero, varobj debugging is enabled."),
- NULL,
- show_varobjdebug,
+ &varobjdebug,
+ _("Set varobj debugging."),
+ _("Show varobj debugging."),
+ _("When non-zero, varobj debugging is enabled."),
+ NULL, show_varobjdebug,
&setlist, &showlist);
}
enum varobj_scope_status
{
VAROBJ_IN_SCOPE = 0, /* Varobj is scope, value available. */
- VAROBJ_NOT_IN_SCOPE = 1, /* Varobj is not in scope, value not available,
- but varobj can become in scope later. */
+ VAROBJ_NOT_IN_SCOPE = 1, /* Varobj is not in scope, value not
+ available, but varobj can become in
+ scope later. */
VAROBJ_INVALID = 2, /* Varobj no longer has any value, and never
will. */
};
#define VEC_ASSERT_DECL ,const char *file_,unsigned line_
#define VEC_ASSERT_PASS ,file_,line_
#define vec_assert(expr, op) \
- ((void)((expr) ? 0 : (gdb_assert_fail (op, file_, line_, ASSERT_FUNCTION), 0)))
+ ((void)((expr) ? 0 : (gdb_assert_fail (op, file_, line_, \
+ ASSERT_FUNCTION), 0)))
#define VEC(T) VEC_##T
#define VEC_OP(T,OP) VEC_##T##_##OP
int numsyms;
- /* Position of the start of the line number information for this psymtab. */
+ /* Position of the start of the line number information for this
+ psymtab. */
unsigned int lineno_off;
};
static void
bf_notfound_complaint (void)
{
- complaint (&symfile_complaints, _("line numbers off, `.bf' symbol not found"));
+ complaint (&symfile_complaints,
+ _("line numbers off, `.bf' symbol not found"));
}
static void
(*stabvector)->length += INITIAL_STABVECTOR_LENGTH;
*stabvector = (struct pending_stabs *)
xrealloc ((char *) *stabvector, sizeof (struct pending_stabs) +
- (*stabvector)->length * sizeof (char *));
+ (*stabvector)->length * sizeof (char *));
}
(*stabvector)->stab[(*stabvector)->count++] = stabname;
}
{ /* make sure you have room. */
fentry_size *= 2;
fentry = (struct linetable_entry *)
- xrealloc (fentry, fentry_size * sizeof (struct linetable_entry));
+ xrealloc (fentry,
+ fentry_size * sizeof (struct linetable_entry));
}
fentry[function_count].line = ii;
fentry[function_count].pc = oldLineTb->item[ii].pc;
return oldLineTb;
}
else if (function_count > 1)
- qsort (fentry, function_count, sizeof (struct linetable_entry), compare_lte);
+ qsort (fentry, function_count,
+ sizeof (struct linetable_entry), compare_lte);
/* allocate a new line table. */
newLineTb = (struct linetable *)
for (ii = 0; ii < inclIndx; ++ii)
{
if (inclTable[ii].subfile != ((struct subfile *) &main_subfile)
- && (inclTable[ii].subfile)->line_vector) /* Useless if!!! FIXMEmgo */
+ && (inclTable[ii].subfile)->line_vector) /* Useless if!!!
+ FIXMEmgo */
{
struct linetable *lineTb, *lv;
/* Enter a given range of lines into the line vector.
can be called in the following two ways:
- enter_line_range (subfile, beginoffset, endoffset, startaddr, 0, firstLine) or
- enter_line_range (subfile, beginoffset, 0, startaddr, endaddr, firstLine)
+ enter_line_range (subfile, beginoffset, endoffset,
+ startaddr, 0, firstLine) or
+ enter_line_range (subfile, beginoffset, 0,
+ startaddr, endaddr, firstLine)
endoffset points to the last line table entry that we should pay
attention to. */
static void
-enter_line_range (struct subfile *subfile, unsigned beginoffset, unsigned endoffset, /* offsets to line table */
+enter_line_range (struct subfile *subfile, unsigned beginoffset,
+ unsigned endoffset, /* offsets to line table */
CORE_ADDR startaddr, /* offsets to line table */
CORE_ADDR endaddr, unsigned *firstLine)
{
}
else if (symbol.n_sclass & 0x80)
{
- retval =
- ((struct coff_symfile_info *) objfile->deprecated_sym_private)->debugsec
+ retval = ((struct coff_symfile_info *)
+ objfile->deprecated_sym_private)->debugsec
+ symbol.n_offset;
- raw_symbol +=
- coff_data (objfile->obfd)->local_symesz;
+ raw_symbol += coff_data (objfile->obfd)->local_symesz;
++symnum;
}
else
{
if (last_source_file)
{
- pst->symtab =
- end_symtab (cur_src_end_addr, objfile, SECT_OFF_TEXT (objfile));
+ pst->symtab = end_symtab (cur_src_end_addr, objfile,
+ SECT_OFF_TEXT (objfile));
end_stabs ();
}
{
complete_symtab (filestring, file_start_addr);
cur_src_end_addr = file_end_addr;
- end_symtab (file_end_addr, objfile, SECT_OFF_TEXT (objfile));
+ end_symtab (file_end_addr, objfile,
+ SECT_OFF_TEXT (objfile));
end_stabs ();
start_stabs ();
/* Give all csects for this source file the same
{
last_csect_name = cs->c_name;
last_csect_val = cs->c_value;
- last_csect_sec = secnum_to_section (cs->c_secnum, objfile);
+ last_csect_sec = secnum_to_section (cs->c_secnum,
+ objfile);
}
}
continue;
end_symtab (file_end_addr, objfile, SECT_OFF_TEXT (objfile));
end_stabs ();
- /* XCOFF, according to the AIX 3.2 documentation, puts the filename
- in cs->c_name. But xlc 1.3.0.2 has decided to do things the
- standard COFF way and put it in the auxent. We use the auxent if
- the symbol is ".file" and an auxent exists, otherwise use the symbol
- itself. Simple enough. */
+ /* XCOFF, according to the AIX 3.2 documentation, puts the
+ filename in cs->c_name. But xlc 1.3.0.2 has decided to
+ do things the standard COFF way and put it in the auxent.
+ We use the auxent if the symbol is ".file" and an auxent
+ exists, otherwise use the symbol itself. Simple
+ enough. */
if (!strcmp (cs->c_name, ".file") && cs->c_naux > 0)
{
bfd_coff_swap_aux_in (abfd, raw_auxptr, cs->c_type, cs->c_sclass,
record_debugformat (debugfmt);
last_csect_name = 0;
- /* reset file start and end addresses. A compilation unit with no text
- (only data) should have zero file boundaries. */
+ /* reset file start and end addresses. A compilation unit
+ with no text (only data) should have zero file
+ boundaries. */
file_start_addr = file_end_addr = 0;
break;
case C_UNTAG:
case C_ENTAG:
{
- complaint (&symfile_complaints, _("Unrecognized storage class %d."),
+ complaint (&symfile_complaints,
+ _("Unrecognized storage class %d."),
cs->c_sclass);
}
break;
else if (strcmp (cs->c_name, ".eb") == 0)
{
if (context_stack_depth <= 0)
- { /* We attempted to pop an empty context stack */
+ { /* We attempted to pop an empty context stack */
eb_complaint (cs->c_symnum);
break;
}
#define SYMNAME_ALLOC(NAME, ALLOCED) \
- ((ALLOCED) ? (NAME) : obsavestring ((NAME), strlen (NAME), &objfile->objfile_obstack))
+ ((ALLOCED) ? (NAME) : obsavestring ((NAME), strlen (NAME), \
+ &objfile->objfile_obstack))
/* process one xcoff symbol. */
static char buffer[BUFSIZ];
if (aux_entry->x_file.x_n.x_zeroes == 0)
- strcpy (buffer,
- ((struct coff_symfile_info *) objfile->deprecated_sym_private)->strtbl
+ strcpy (buffer, ((struct coff_symfile_info *)
+ objfile->deprecated_sym_private)->strtbl
+ aux_entry->x_file.x_n.x_offset);
else
{
static void
read_symbol (struct internal_syment *symbol, int symno)
{
- int nsyms =
- ((struct coff_symfile_info *) this_symtab_psymtab->objfile->deprecated_sym_private)->symtbl_num_syms;
- char *stbl =
- ((struct coff_symfile_info *) this_symtab_psymtab->objfile->deprecated_sym_private)->symtbl;
+ int nsyms
+ = ((struct coff_symfile_info *)
+ this_symtab_psymtab->objfile->deprecated_sym_private)->symtbl_num_syms;
+ char *stbl = ((struct coff_symfile_info *)
+ this_symtab_psymtab->objfile->deprecated_sym_private)->symtbl;
if (symno < 0 || symno >= nsyms)
{
xcoff_symfile_init (struct objfile *objfile)
{
/* Allocate struct to keep track of the symfile */
- objfile->deprecated_sym_private = xmalloc (sizeof (struct coff_symfile_info));
+ objfile->deprecated_sym_private
+ = xmalloc (sizeof (struct coff_symfile_info));
/* XCOFF objects may be reordered, so set OBJF_REORDERED. If we
find this causes a significant slowdown in gdb then we could
unsigned char lengthbuf[4];
char *strtbl;
- ((struct coff_symfile_info *) objfile->deprecated_sym_private)->strtbl = NULL;
+ ((struct coff_symfile_info *) objfile->deprecated_sym_private)->strtbl
+ = NULL;
if (bfd_seek (abfd, offset, SEEK_SET) < 0)
error (_("cannot seek to string table in %s: %s"),
as long as we have its symbol table around. */
strtbl = (char *) obstack_alloc (&objfile->objfile_obstack, length);
- ((struct coff_symfile_info *) objfile->deprecated_sym_private)->strtbl = strtbl;
+ ((struct coff_symfile_info *) objfile->deprecated_sym_private)->strtbl
+ = strtbl;
/* Copy length buffer, the first byte is usually zero and is
used for stabs with a name length of zero. */
error (_("cannot read string table from %s: %s"),
bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ()));
if (strtbl[length - 1] != '\0')
- error (_("bad symbol file: string table does not end with null character"));
+ error (_("bad symbol file: string table "
+ "does not end with null character"));
return;
}
((struct symloc *) pst->read_symtab_private)->lineno_off =
first_fun_line_offset;
first_fun_line_offset = 0;
- pst->n_global_syms =
- objfile->global_psymbols.next - (objfile->global_psymbols.list + pst->globals_offset);
- pst->n_static_syms =
- objfile->static_psymbols.next - (objfile->static_psymbols.list + pst->statics_offset);
+ pst->n_global_syms = objfile->global_psymbols.next
+ - (objfile->global_psymbols.list + pst->globals_offset);
+ pst->n_static_syms = objfile->static_psymbols.next
+ - (objfile->static_psymbols.list + pst->statics_offset);
pst->number_of_dependencies = number_dependencies;
if (number_dependencies)
}
else if (symbol->n_sclass & 0x80)
{
- *name = ((struct coff_symfile_info *) objfile->deprecated_sym_private)->debugsec
- + symbol->n_offset;
+ *name = ((struct coff_symfile_info *)
+ objfile->deprecated_sym_private)->debugsec + symbol->n_offset;
}
else
{
- *name = ((struct coff_symfile_info *) objfile->deprecated_sym_private)->strtbl
- + symbol->n_offset;
+ *name = ((struct coff_symfile_info *)
+ objfile->deprecated_sym_private)->strtbl + symbol->n_offset;
}
++*symnump;
*raw += coff_data (objfile->obfd)->local_symesz;
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);
}
abfd = objfile->obfd;
next_symbol_text_func = xcoff_next_symbol_text;
- sraw_symbol = ((struct coff_symfile_info *) objfile->deprecated_sym_private)->symtbl;
- nsyms = ((struct coff_symfile_info *) objfile->deprecated_sym_private)->symtbl_num_syms;
+ sraw_symbol = ((struct coff_symfile_info *)
+ objfile->deprecated_sym_private)->symtbl;
+ nsyms = ((struct coff_symfile_info *)
+ objfile->deprecated_sym_private)->symtbl_num_syms;
ssymnum = 0;
while (ssymnum < nsyms)
{
warning (_("More than one XMC_TC0 symbol found."));
toc_offset = symbol.n_value;
- /* Make TOC offset relative to start address of section. */
+ /* Make TOC offset relative to start address of
+ section. */
bfd_sect = secnum_to_bfd_section (symbol.n_scnum, objfile);
if (bfd_sect)
toc_offset -= bfd_section_vma (objfile->obfd, bfd_sect);
default:
{
complaint (&symfile_complaints,
- _("Storage class %d not recognized during scan"), sclass);
+ _("Storage class %d not recognized during scan"),
+ sclass);
}
/* FALLTHROUGH */
switch (p[1])
{
case 'S':
- symbol.n_value += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
+ symbol.n_value += ANOFFSET (objfile->section_offsets,
+ SECT_OFF_DATA (objfile));
if (gdbarch_static_transform_name_p (gdbarch))
namestring = gdbarch_static_transform_name
continue;
case 'G':
- symbol.n_value += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
+ symbol.n_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,
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 (?). */
function_outside_compilation_unit_complaint (name);
xfree (name);
}
- symbol.n_value += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ symbol.n_value += ANOFFSET (objfile->section_offsets,
+ SECT_OFF_TEXT (objfile));
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_BLOCK,
&objfile->static_psymbols,
if (strncmp (namestring, "@FIX", 4) == 0)
continue;
- symbol.n_value += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
+ symbol.n_value += ANOFFSET (objfile->section_offsets,
+ SECT_OFF_TEXT (objfile));
add_psymbol_to_list (namestring, p - namestring, 1,
VAR_DOMAIN, LOC_BLOCK,
&objfile->global_psymbols,
case '8':
case '9':
case '-':
- case '#': /* for symbol identification (used in live ranges) */
+ case '#': /* For symbol identification (used in
+ live ranges). */
continue;
case ':':
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
- a backslash. */
+ /* 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,
_("unknown symbol descriptor `%c'"), p[1]);
If no XMC_TC0 is found, toc_offset should be zero. Another place to obtain
this information would be file auxiliary header. */
- ((struct coff_symfile_info *) objfile->deprecated_sym_private)->toc_offset = toc_offset;
+ ((struct coff_symfile_info *) objfile->deprecated_sym_private)->toc_offset
+ = toc_offset;
}
/* Return the toc offset value for a given objfile. */
xcoff_get_toc_offset (struct objfile *objfile)
{
if (objfile)
- return ((struct coff_symfile_info *) objfile->deprecated_sym_private)->toc_offset;
+ return ((struct coff_symfile_info *)
+ objfile->deprecated_sym_private)->toc_offset;
return 0;
}
}
}
}
- ((struct coff_symfile_info *) objfile->deprecated_sym_private)->debugsec =
- debugsec;
+ ((struct coff_symfile_info *)
+ objfile->deprecated_sym_private)->debugsec
+ = debugsec;
}
}
size = coff_data (abfd)->local_symesz * num_symbols;
((struct coff_symfile_info *) objfile->deprecated_sym_private)->symtbl =
obstack_alloc (&objfile->objfile_obstack, size);
- ((struct coff_symfile_info *) objfile->deprecated_sym_private)->symtbl_num_syms =
- num_symbols;
+ ((struct coff_symfile_info *)
+ objfile->deprecated_sym_private)->symtbl_num_syms
+ = num_symbols;
- val = bfd_bread (((struct coff_symfile_info *) objfile->deprecated_sym_private)->symtbl,
+ val = bfd_bread (((struct coff_symfile_info *)
+ objfile->deprecated_sym_private)->symtbl,
size, abfd);
if (val != size)
perror_with_name (_("reading symbol table"));
}
\f
static void
-xcoff_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs)
+xcoff_symfile_offsets (struct objfile *objfile,
+ struct section_addr_info *addrs)
{
asection *sect = NULL;
int i;
bfd_target_xcoff_flavour,
- xcoff_new_init, /* sym_new_init: init anything gbl to entire symtab */
- xcoff_symfile_init, /* sym_init: read initial info, setup for sym_read() */
- xcoff_initial_scan, /* sym_read: read a symbol file into symtab */
- xcoff_symfile_finish, /* sym_finish: finished with file, cleanup */
- xcoff_symfile_offsets, /* sym_offsets: xlate offsets ext->int form */
- default_symfile_segments, /* sym_segments: Get segment information from
- a file. */
- aix_process_linenos, /* sym_read_linetable */
- default_symfile_relocate, /* sym_relocate: Relocate a debug section. */
+ xcoff_new_init, /* init anything gbl to entire symtab */
+ xcoff_symfile_init, /* read initial info, setup for sym_read() */
+ xcoff_initial_scan, /* read a symbol file into symtab */
+ xcoff_symfile_finish, /* finished with file, cleanup */
+ xcoff_symfile_offsets, /* xlate offsets ext->int form */
+ default_symfile_segments, /* Get segment information from a file. */
+ aix_process_linenos,
+ default_symfile_relocate, /* Relocate a debug section. */
&psym_functions
};
/* Skip over the first vmap, it is the main program, always loaded. */
vp = vp->nxt;
- printf_unfiltered ("\
-Text Range Data Range Syms Shared Object Library\n");
+ printf_unfiltered ("Text Range Data Range "
+ "Syms Shared Object Library\n");
for (; vp != NULL; vp = vp->nxt)
{
If \"on\", symbols from all shared object libraries will be loaded\n\
automatically when the inferior begins execution, when the dynamic linker\n\
informs gdb that a new library has been loaded, or when attaching to the\n\
-inferior. Otherwise, symbols must be loaded manually, using `sharedlibrary'."),
+inferior. Otherwise, symbols must be loaded manually, using \
+`sharedlibrary'."),
NULL,
NULL, /* FIXME: i18n: */
&setlist, &showlist);
char *member; /* ptr to member name */
CORE_ADDR tstart; /* virtual addr where member is mapped */
CORE_ADDR tend; /* virtual upper bound of member */
- CORE_ADDR tvma; /* virtual addr of text section in object file */
+ CORE_ADDR tvma; /* virtual addr of text section in
+ object file */
CORE_ADDR toffs; /* offset of text section in object file */
CORE_ADDR dstart; /* virtual address of data start */
CORE_ADDR dend; /* virtual address of data end */
- CORE_ADDR dvma; /* virtual addr of data section in object file */
+ CORE_ADDR dvma; /* virtual addr of data section in
+ object file */
/* This is NULL for the exec-file. */
struct objfile *objfile;
if (dirname != NULL)
make_cleanup (xfree, dirname);
- sysinfo = syscall_parse_xml (full_file, xml_fetch_content_from_file, dirname);
+ sysinfo = syscall_parse_xml (full_file,
+ xml_fetch_content_from_file, dirname);
do_cleanups (back_to);
return sysinfo;
if (sysinfo == NULL)
{
if (xml_syscall_file)
- warning (_("\
-Could not load the syscall XML file `%s/%s'."),
+ warning (_("Could not load the syscall XML file `%s/%s'."),
gdb_datadir, xml_syscall_file);
else
- warning (_("\
-There is no XML file to open."));
+ warning (_("There is no XML file to open."));
- warning (_("\
-GDB will not be able to display syscall names nor to verify if\n\
-any provided syscall numbers are valid."));
+ warning (_("GDB will not be able to display "
+ "syscall names nor to verify if\n"
+ "any provided syscall numbers are valid."));
}
/* Saving the data-directory used to read this XML info. */
field_name);
if (data->current_type_size != 0)
gdb_xml_error (parser,
- _("Explicitly sized type can not contain non-bitfield \"%s\""),
+ _("Explicitly sized type can not "
+ "contain non-bitfield \"%s\""),
field_name);
field_type = tdesc_named_type (data->current_feature, field_type_id);
{
if (data->current_type_size == 0)
gdb_xml_error (parser,
- _("Implicitly sized type can not contain bitfield \"%s\""),
+ _("Implicitly sized type can "
+ "not contain bitfield \"%s\""),
field_name);
if (end >= 64)
gdb_xml_error (parser,
- _("Bitfield \"%s\" goes past 64 bits (unsupported)"),
+ _("Bitfield \"%s\" goes past "
+ "64 bits (unsupported)"),
field_name);
/* Assume that the bit numbering in XML is "lsb-zero". Most
field_name);
if (end >= data->current_type_size * TARGET_CHAR_BIT)
- gdb_xml_error (parser, _("Bitfield \"%s\" does not fit in struct"));
+ gdb_xml_error (parser,
+ _("Bitfield \"%s\" does not fit in struct"));
tdesc_add_bitfield (t, field_name, start, end);
}