btrace: add instruction-history /s and fix documentation
Add support for the /s modifier of the "record instruction-history" command. It behaves exactly like /m and prints disassembled instructions in the order in which they were recorded with interleaved sources. We accept /s in addition to /m to align with the "disassemble" command. The "record instruction-history" modifiers were not documented. Document all of them. gdb/ * record.c (get_insn_history_modifiers): Set DISASSEMBLY_SOURCE instead of DISASSEMBLY_SOURCE_DEPRECATED. Also accept /s. (_initialize_record): Document the /s modifier. * NEWS: Announce record instruction-history's new /s modifier. doc/ * gdb.texinfo (Process Record and Replay): Document "record instruction-history" modifiers.
This commit is contained in:
parent
f94cc8975c
commit
0c532a2980
|
@ -1,3 +1,10 @@
|
||||||
|
2015-11-04 Markus Metzger <markus.t.metzger@intel.com>
|
||||||
|
|
||||||
|
* record.c (get_insn_history_modifiers): Set DISASSEMBLY_SOURCE
|
||||||
|
instead of DISASSEMBLY_SOURCE_DEPRECATED. Also accept /s.
|
||||||
|
(_initialize_record): Document the /s modifier.
|
||||||
|
* NEWS: Announce record instruction-history's new /s modifier.
|
||||||
|
|
||||||
2015-11-04 Markus Metzger <markus.t.metzger@intel.com>
|
2015-11-04 Markus Metzger <markus.t.metzger@intel.com>
|
||||||
|
|
||||||
* record-btrace.c (struct btrace_line_range): New.
|
* record-btrace.c (struct btrace_line_range): New.
|
||||||
|
|
3
gdb/NEWS
3
gdb/NEWS
|
@ -51,6 +51,9 @@ show remote multiprocess-extensions-packet
|
||||||
The "/m" option is now considered deprecated: its "source-centric"
|
The "/m" option is now considered deprecated: its "source-centric"
|
||||||
output hasn't proved useful in practice.
|
output hasn't proved useful in practice.
|
||||||
|
|
||||||
|
* The "record instruction-history" command accepts a new modifier: /s.
|
||||||
|
It behaves exactly like /m and prints mixed source+disassembly.
|
||||||
|
|
||||||
* The "set scheduler-locking" command supports a new mode "replay".
|
* The "set scheduler-locking" command supports a new mode "replay".
|
||||||
It behaves like "off" in record mode and like "on" in replay mode.
|
It behaves like "off" in record mode and like "on" in replay mode.
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2015-11-04 Markus Metzger <markus.t.metzger@intel.com>
|
||||||
|
|
||||||
|
* gdb.texinfo (Process Record and Replay): Document "record
|
||||||
|
instruction-history" modifiers.
|
||||||
|
|
||||||
2015-10-12 Andrew Burgess <andrew.burgess@embecosm.com>
|
2015-10-12 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||||
|
|
||||||
* gdb.texinfo (Frames): Remove 'frame' and 'select-frame'
|
* gdb.texinfo (Frames): Remove 'frame' and 'select-frame'
|
||||||
|
|
|
@ -6741,6 +6741,20 @@ default, ten instructions are disassembled. This can be changed using
|
||||||
the @code{set record instruction-history-size} command. Instructions
|
the @code{set record instruction-history-size} command. Instructions
|
||||||
are printed in execution order.
|
are printed in execution order.
|
||||||
|
|
||||||
|
It can also print mixed source+disassembly if you specify the the
|
||||||
|
@code{/m} or @code{/s} modifier, and print the raw instructions in hex
|
||||||
|
as well as in symbolic form by specifying the @code{/r} modifier.
|
||||||
|
|
||||||
|
The current position marker is printed for the instruction at the
|
||||||
|
current program counter value. This instruction can appear multiple
|
||||||
|
times in the trace and the current position marker will be printed
|
||||||
|
every time. To omit the current position marker, specify the
|
||||||
|
@code{/p} modifier.
|
||||||
|
|
||||||
|
To better align the printed instructions when the trace contains
|
||||||
|
instructions from more than one function, the function name may be
|
||||||
|
omitted by specifying the @code{/f} modifier.
|
||||||
|
|
||||||
Speculatively executed instructions are prefixed with @samp{?}. This
|
Speculatively executed instructions are prefixed with @samp{?}. This
|
||||||
feature is not available for all recording formats.
|
feature is not available for all recording formats.
|
||||||
|
|
||||||
|
|
|
@ -458,7 +458,8 @@ get_insn_history_modifiers (char **arg)
|
||||||
switch (*args)
|
switch (*args)
|
||||||
{
|
{
|
||||||
case 'm':
|
case 'm':
|
||||||
modifiers |= DISASSEMBLY_SOURCE_DEPRECATED;
|
case 's':
|
||||||
|
modifiers |= DISASSEMBLY_SOURCE;
|
||||||
modifiers |= DISASSEMBLY_FILENAME;
|
modifiers |= DISASSEMBLY_FILENAME;
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
|
@ -817,7 +818,7 @@ Argument is instruction number, as shown by 'info record'."),
|
||||||
|
|
||||||
add_cmd ("instruction-history", class_obscure, cmd_record_insn_history, _("\
|
add_cmd ("instruction-history", class_obscure, cmd_record_insn_history, _("\
|
||||||
Print disassembled instructions stored in the execution log.\n\
|
Print disassembled instructions stored in the execution log.\n\
|
||||||
With a /m modifier, source lines are included (if available).\n\
|
With a /m or /s modifier, source lines are included (if available).\n\
|
||||||
With a /r modifier, raw instructions in hex are included.\n\
|
With a /r modifier, raw instructions in hex are included.\n\
|
||||||
With a /f modifier, function names are omitted.\n\
|
With a /f modifier, function names are omitted.\n\
|
||||||
With a /p modifier, current position markers are omitted.\n\
|
With a /p modifier, current position markers are omitted.\n\
|
||||||
|
|
Loading…
Reference in New Issue