<div dir="ltr">Hi Ted,<div><br></div><div>Thank you for the answer.</div><div>I'm not sure I understand you well. It seems to me that my program call "Disassembler::FindPlugin" with the "m_options.arch" set to "x86_64". But my toolchain does not contain a LLVM supporting x86_64, so it feels normal to me that it is not able to create this disassembler. What is weird is that the first time I'm executing it, it managed to do so.</div><div><br></div><div>I also have kind of the same issue with breakpoint. It's like if I'm missing the debug information after I do the "run" command:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>(lldb) file test</div><div>Current executable set to 'test' (dpu).</div><div>(lldb) b main</div><div>Breakpoint 1: where = test`main + 24 at test.c:8, address = 0x80000078</div><div>(lldb) r</div><div>Process 21312 launched: '/home/rjodin/work/dpu_tools/llvm/lldb/test/test' (dpu)</div><div>Process 21312 stopped</div><div>* thread #1, name = 'DPUthread0', stop reason = Thread finished</div><div> frame #0: 0x00000000800000c0</div><div>(lldb) b main</div><div>Breakpoint 2: no locations (pending).</div><div>WARNING: Unable to resolve breakpoint to any actual locations.</div><div><br></div></blockquote>When I'm doing the disassembly, I can manage to disassemble if I add the option with my architecture to the command line, but as you can see below, I also do not have the debug information that I had at the first disassembly:<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>(lldb) file test</div><div>Current executable set to 'test' (dpu).</div><div>(lldb) dis -s 0x80000000</div><div>test`__bootstrap:</div><div>test[0x80000000] <+0>: jnz id, 0x80000020</div><div>test[0x80000008] <+8>: move r0, 0xff</div><div>test[0x80000010] <+16>: release r0, 0x0, nz, 0x80000018</div><div>test[0x80000018] <+24>: sub r0, r0, 0x1, pl, 0x80000010</div><div>(lldb) r</div><div>Process 21312 launched: '/home/rjodin/work/dpu_tools/llvm/lldb/test/test' (dpu)</div><div>Process 21312 stopped</div><div>* thread #1, name = 'DPUthread0', stop reason = Thread finished</div><div> frame #0: 0x00000000800000a0</div><div>(lldb) dis -s 0x80000000</div><div>error: Unable to find Disassembler plug-in for the 'x86_64' architecture.</div><div>(lldb) dis -s 0x80000000 -A dpu</div><div> 0x80000000: jnz id, 0x80000020</div><div> 0x80000008: move r0, 0xff</div><div> 0x80000010: release r0, 0x0, nz, 0x80000018</div><div> 0x80000018: sub r0, r0, 0x1, pl, 0x80000010</div><div><br></div></blockquote>Any ideas about it?<div>Thanks,</div><div>Romaric</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 12, 2019 at 6:55 PM Ted Woodward <<a href="mailto:tedwood@quicinc.com">tedwood@quicinc.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div class="gmail-m_-7693231461788861330WordSection1">
<p class="MsoNormal">The error is coming from source/Commands/CommandObjectDisassemble.cpp . It’s not able to create the disassembler for your architecture. The call to Disassembler::FindPlugin fails.<u></u><u></u></p>
<p class="MsoNormal">My guess is something in the call to MCDisasmInstance::Create in source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp is failing. Step through that and make sure everything there is working.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Ted<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid blue;padding:0in 0in 0in 4pt">
<div>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> lldb-dev <<a href="mailto:lldb-dev-bounces@lists.llvm.org" target="_blank">lldb-dev-bounces@lists.llvm.org</a>> <b>On Behalf Of
</b>Romaric Jodin via lldb-dev<br>
<b>Sent:</b> Wednesday, June 12, 2019 8:23 AM<br>
<b>To:</b> <a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<b>Subject:</b> [EXT] [lldb-dev] Disassembling issue<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi everyone,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I'm trying to have lldb being able to debug my architecture. It does it well after loading my elf. But then I run it, stop it in middle, try to disassemble and at that point it seems that I lost some information about my architecture. lldb
tries to disassemble it for x86, which in not possible with my toolchain.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Here is a log of what I am doing:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<blockquote style="margin-left:30pt;margin-right:0in">
<div>
<p class="MsoNormal">(lldb) file test<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Current executable set to 'test' (dpu).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">(lldb) dis -s 0x80000000<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">test`__bootstrap:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">test[0x80000000] <+0>: jnz id, 0x80000020<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">test[0x80000008] <+8>: move r0, 0xff<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">test[0x80000010] <+16>: release r0, 0x0, nz, 0x80000018<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">test[0x80000018] <+24>: sub r0, r0, 0x1, pl, 0x80000010<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">(lldb) r<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Process 21312 launched: '/home/rjodin/work/dpu_tools/llvm/lldb/test/test' (dpu)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Process 21312 stopped<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">* thread #1, name = 'DPUthread0', stop reason = Thread stopped<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> frame #0: 0x0000000080000090<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">(lldb) dis -s 0x80000000<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">error: Unable to find Disassembler plug-in for the 'x86_64' architecture.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">(lldb)<u></u><u></u></p>
</div>
</blockquote>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Any ideas of what I am missing in my implementation?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-size:9.5pt;color:black">Romaric JODIN</span></b><span style="color:rgb(136,136,136)"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt;color:black">UPMEM</span><span style="color:rgb(136,136,136)"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><i><span style="font-size:7.5pt;color:black">Software Engineer</span></i><span style="color:rgb(136,136,136)"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:rgb(136,136,136)"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:rgb(136,136,136)"><img width="50" height="50" style="width: 0.5208in; height: 0.5208in;" id="gmail-m_-7693231461788861330_x0000_i1025" src="cid:16b4f736db54cff311"><u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div style="color:rgb(136,136,136)"><span style="color:rgb(0,0,0);font-size:12.8px"><b>Romaric JODIN</b></span></div><div style="color:rgb(136,136,136)"><span style="color:rgb(0,0,0);font-size:12.8px">UPMEM</span></div><div style="color:rgb(136,136,136)"><font color="#000000" size="1"><i>Software Engineer</i></font></div><div style="color:rgb(136,136,136)"><br></div><div style="color:rgb(136,136,136)"><img src="cid:ii_jm7vnlj17_165ed4ff64757184" width="50" height="50"></div></div></div>