<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Greg is right that this was a libedis feature and has no equivalent
    in LLDB today.<br>
    <br>
    MCInst, however, doesn't have enough information by itself to do
    this.  The reason is that for many things that are considered
    "operands," the MCInst has several underlying operands.  For
    example, an operand that was expressed as a register + an offset
    would be represented in MCInst as a register operand and in
    immediate operand, and only correlating the opcode with the LLVM
    instruction tables (and possibly some special knowledge) would tell
    you that the two belong together.<br>
    <br>
    Additionally, libedis could express the semantics of the instruction
    operands (e.g., "this is a source operand and represents the result
    of dereferncing rbp - 4") , and inform the client what ranges of
    characters in the generated string represented each high level
    operand.  Both of these features are not exposed anywhere at the
    moment, and in fact the underlying knowledge was lost when the edis
    TableGen backend was deprecated.<br>
    <br>
    There are a few LLDB features that reads instructions and attempt to
    interpret them:<br>
    <ul>
      <li>The fast unwinder looks for specific bit patterns (see
        UnwindAssembly_x86::GetFastUnwindPlan in
        UnwindAssembly-x86.cpp);</li>
      <li>The ARM instruction emulator has its own home-grown
        instruction table (see EmulateInstructionARM64.cpp); and<br>
      </li>
      <li>The crash diagnose functionality actually parses the output
        strings from the disassembler (see DoGuessValueAt in
        StackFrame.cpp).<br>
      </li>
    </ul>
    Sean<br>
    <br>
    <div class="moz-cite-prefix">On 8/31/17 11:09 AM, Greg Clayton via
      lldb-dev wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:C510A3E8-84D6-475B-97E7-A65F2C6BE7E6@gmail.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      I believe libedis was deprecated many years ago and hasn't
      returned. We use the standard LLVM disassembler, so any features
      need to be built into llvm::MCInst. 
      <div class=""><br class="">
        <div>
          <blockquote type="cite" class="">
            <div class="">On Aug 31, 2017, at 10:42 AM, Tatyana
              Krasnukha via lldb-dev <<a
                href="mailto:lldb-dev@lists.llvm.org" class=""
                moz-do-not-send="true">lldb-dev@lists.llvm.org</a>>
              wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <div class="WordSection1" style="page: WordSection1;
                font-family: Menlo-Regular; font-size: 12px; font-style:
                normal; font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;">
                <div style="margin: 0in 0in 0.0001pt; font-size: 11pt;
                  font-family: Calibri, sans-serif;" class="">Hello,<o:p
                    class=""></o:p></div>
                <div style="margin: 0in 0in 0.0001pt; font-size: 11pt;
                  font-family: Calibri, sans-serif;" class=""><o:p
                    class=""> </o:p></div>
                <div style="margin: 0in 0in 0.0001pt; font-size: 11pt;
                  font-family: Calibri, sans-serif;" class="">As I
                  understand it, old disassembler (based on libedis)
                  could print symbolic information instead/beside
                  address operand of an instruction. And it looks like
                  there is not such ability in disassembler now. Is this<span
                    class="Apple-converted-space"> </span><span
                    class="text">responsibility shifted on some other
                    component of lldb? Or it was considered as useless
                    and was removed at all?<o:p class=""></o:p></span></div>
                <div style="margin: 0in 0in 0.0001pt; font-size: 11pt;
                  font-family: Calibri, sans-serif;" class=""><span
                    class="text"><o:p class=""> </o:p></span></div>
                <div style="margin: 0in 0in 0.0001pt; font-size: 11pt;
                  font-family: Calibri, sans-serif;" class=""><span
                    class="text">Thanks,<o:p class=""></o:p></span></div>
                <div style="margin: 0in 0in 0.0001pt; font-size: 11pt;
                  font-family: Calibri, sans-serif;" class=""><span
                    class="text">Tatyana</span><o:p class=""></o:p></div>
              </div>
              <span style="font-family: Menlo-Regular; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;" class="">_______________________________________________</span><br
                style="font-family: Menlo-Regular; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <span style="font-family: Menlo-Regular; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px; float: none; display:
                inline !important;" class="">lldb-dev mailing list</span><br
                style="font-family: Menlo-Regular; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <a href="mailto:lldb-dev@lists.llvm.org" style="color:
                rgb(149, 79, 114); text-decoration: underline;
                font-family: Menlo-Regular; font-size: 12px; font-style:
                normal; font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; orphans: auto; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; widows: auto; word-spacing: 0px;
                -webkit-text-size-adjust: auto;
                -webkit-text-stroke-width: 0px;" class=""
                moz-do-not-send="true">lldb-dev@lists.llvm.org</a><br
                style="font-family: Menlo-Regular; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; text-align:
                start; text-indent: 0px; text-transform: none;
                white-space: normal; word-spacing: 0px;
                -webkit-text-stroke-width: 0px;" class="">
              <a
                href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev"
                style="color: rgb(149, 79, 114); text-decoration:
                underline; font-family: Menlo-Regular; font-size: 12px;
                font-style: normal; font-variant-caps: normal;
                font-weight: normal; letter-spacing: normal; orphans:
                auto; text-align: start; text-indent: 0px;
                text-transform: none; white-space: normal; widows: auto;
                word-spacing: 0px; -webkit-text-size-adjust: auto;
                -webkit-text-stroke-width: 0px;" class=""
                moz-do-not-send="true">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a></div>
          </blockquote>
        </div>
        <br class="">
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
lldb-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lldb-dev@lists.llvm.org">lldb-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>