[Lldb-commits] [PATCH] Add comments to LLDB-MI disassembly.

Ilia K ki.stfu at gmail.com
Fri Apr 10 08:05:51 PDT 2015


Looks like you want to implement the -data-disassemble command for mode=1 (see https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Data-Manipulation.html).

I against to add a comment into the "inst" field. I think you should use the mode=1 (or 3) option to get the "line" and "file" fields. It will look like the following:

  (gdb)
  -data-disassemble -f basics.c -l 32 -n 3 -- 1
  ^done,asm_insns=[
  src_and_asm_line={line="31",
  file="../../../src/gdb/testsuite/gdb.mi/basics.c",
  fullname="/absolute/path/to/src/gdb/testsuite/gdb.mi/basics.c",
  line_asm_insn=[{address="0x000107bc",
  func-name="main",offset="0",inst="save  %sp, -112, %sp"}]},
  src_and_asm_line={line="32",
  file="../../../src/gdb/testsuite/gdb.mi/basics.c",
  fullname="/absolute/path/to/src/gdb/testsuite/gdb.mi/basics.c",
  line_asm_insn=[{address="0x000107c0",
  func-name="main",offset="4",inst="mov  2, %o0"},
  {address="0x000107c4",func-name="main",offset="8",
  inst="sethi  %hi(0x11800), %o2"}]}]
  (gdb)


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8964

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list