public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/6] disasm, record: fix "record instruction-history /m"
@ 2015-09-21 14:55 Markus Metzger
  2015-09-21 14:54 ` [PATCH 2/6] disasm: add struct disas_insn to describe to-be-disassembled instruction Markus Metzger
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Markus Metzger @ 2015-09-21 14:55 UTC (permalink / raw)
  To: palves, dje; +Cc: gdb-patches

The /m modifier interleaves source lines with the disassembly of recorded
instructions.  This calls disasm.c's do_mixed_source_and_assembly once for
each recorded instruction to be printed.

The latter really does a source print with intermixed disassembly.  To that
purpose, it may reorder instructions to better match the source.  This doesn't
work for printing a single instruction.

The new DISASSEMBLY_SOURCE mode promises to improve that as it preserves the
order of instructions.  It still assumes a consecutive range of instructions
in some places.

Extend it so it can be used for source interleaving in the "record
instruction-history" command.

There is an open regarding MI output of "record instruction-history".  The
current version seems pretty broken as it will put each instruction into its
own "asm_insns" list.  This isn't that bad since there is no real MI support
for record btrace, yet.

This new version puts all instructions into the same list - unless there are
gaps in the trace.  For gaps, we will end up with one list per consecutive trace
segment plus the error message for the gaps.

To get this also into a single "asm_insns" list, we'd need to further extend
struct disas_insn to support gaps instead of instructions.  I have not done
this as I first wanted to see if the current changes are not already too
intrusive.

See also branch users/mmetzger/disasm-vec.

I tested this series on 64-bit IA running RHEL 7.


Markus Metzger (6):
  disasm: change dump_insns to print a single instruction
  disasm: add struct disas_insn to describe to-be-disassembled
    instruction
  disas: add gdb_disassembly_vec
  disasm: use entire line table in line_has_code_p
  disasm: determine preceding lines independent of last_line
  btrace: use gdb_disassembly_vec and new source interleaving method

 gdb/disasm.c        | 549 +++++++++++++++++++++++++++-------------------------
 gdb/disasm.h        |  24 +++
 gdb/record-btrace.c |  54 +++---
 gdb/record.c        |   2 +-
 4 files changed, 341 insertions(+), 288 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-10-20 11:29 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-21 14:55 [PATCH 0/6] disasm, record: fix "record instruction-history /m" Markus Metzger
2015-09-21 14:54 ` [PATCH 2/6] disasm: add struct disas_insn to describe to-be-disassembled instruction Markus Metzger
2015-10-09 12:51   ` Pedro Alves
2015-10-12  8:44     ` Metzger, Markus T
2015-10-20 11:29       ` Pedro Alves
2015-09-21 14:54 ` [PATCH 6/6] btrace: use gdb_disassembly_vec and new source interleaving method Markus Metzger
2015-09-21 21:48   ` Andrew Burgess
2015-09-22  6:18     ` Metzger, Markus T
2015-09-21 14:54 ` [PATCH 1/6] disasm: change dump_insns to print a single instruction Markus Metzger
2015-09-21 14:55 ` [PATCH 3/6] disas: add gdb_disassembly_vec Markus Metzger
2015-10-09 12:49   ` Pedro Alves
2015-10-09 13:17     ` Metzger, Markus T
2015-10-12  8:59       ` Andrew Burgess
2015-10-18 20:39       ` Doug Evans
2015-09-21 14:55 ` [PATCH 4/6] disasm: use entire line table in line_has_code_p Markus Metzger
2015-09-21 14:55 ` [PATCH 5/6] disasm: determine preceding lines independent of last_line Markus Metzger
2015-10-12 14:19 ` [PATCH 0/6] disasm, record: fix "record instruction-history /m" Metzger, Markus T
2015-10-18 21:17   ` Doug Evans
2015-10-19  9:35     ` Metzger, Markus T

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).