aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-01-05 22:22:53 +0000
committerMichael Snyder <msnyder@vmware.com>2011-01-05 22:22:53 +0000
commit3e43a32aaa2d78fca10dea6746b820176f39bcc8 (patch)
tree32cf854a33e1036a2e60037dabd2aaf4b4e81e03 /gdb/tracepoint.c
parent9689e3a3a7895308b7b2eac3fa6e4d560cf4b8c7 (diff)
downloadgdb-3e43a32aaa2d78fca10dea6746b820176f39bcc8.zip
gdb-3e43a32aaa2d78fca10dea6746b820176f39bcc8.tar.gz
gdb-3e43a32aaa2d78fca10dea6746b820176f39bcc8.tar.bz2
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.
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r--gdb/tracepoint.c89
1 files changed, 58 insertions, 31 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index b2916f6..8f261af 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -232,7 +232,7 @@ set_traceframe_context (struct frame_info *trace_frame)
{
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;
@@ -364,7 +364,8 @@ trace_variable_command (char *args, int from_tty)
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;
@@ -374,7 +375,8 @@ trace_variable_command (char *args, int from_tty)
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);
@@ -549,7 +551,8 @@ trace_actions_command (char *args, int from_tty)
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);
}
@@ -643,13 +646,16 @@ validate_actionline (char **line, struct breakpoint *t)
{
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));
}
}
@@ -854,7 +860,7 @@ add_memrange (struct collection_list *memranges,
memranges->listsize);
}
- if (type != memrange_absolute) /* Better collect the base register! */
+ if (type != memrange_absolute) /* Better collect the base register! */
add_register (memranges, type);
}
@@ -1683,7 +1689,8 @@ trace_status_command (char *args, int from_tty)
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"),
@@ -1702,7 +1709,8 @@ trace_status_command (char *args, int from_tty)
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)
@@ -1864,12 +1872,14 @@ disconnect_tracing (int from_tty)
{
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."));
}
}
@@ -2284,7 +2294,8 @@ scope_info (char *args, int from_tty)
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)
@@ -2343,7 +2354,8 @@ scope_info (char *args, int from_tty)
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",
@@ -2366,7 +2378,8 @@ scope_info (char *args, int from_tty)
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;
@@ -2594,7 +2607,8 @@ encode_source_string (int tpnum, ULONGEST addr,
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);
@@ -2746,7 +2760,8 @@ trace_save (const char *filename, int target_does_save)
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)
@@ -3053,17 +3068,23 @@ merge_uploaded_tracepoints (struct uploaded_tp **uploaded_tps)
{
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
@@ -3141,14 +3162,16 @@ merge_uploaded_trace_state_variables (struct uploaded_tsv **uploaded_tsvs)
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. */
@@ -3390,7 +3413,8 @@ Status line: '%s'\n"), p, line);
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;
@@ -3524,7 +3548,8 @@ parse_tracepoint_definition (char *line, struct uploaded_tp **utpp)
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;
@@ -3878,7 +3903,8 @@ tfile_fetch_registers (struct target_ops *ops,
/* 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;
}
@@ -4121,8 +4147,8 @@ init_tfile_ops (void)
{
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;
@@ -4130,7 +4156,8 @@ init_tfile_ops (void)
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;