<div dir="ltr">If you're still looking for it, we at Xamarin have recently created some C# bindings for LLDB. We also built a proof of concept native debugger addin for Xamarin Studio.<div><br></div><div>It's all open source, the bindings themselves are available here: <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_tritao_LLDBSharp&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=DDUMf06MYELAe1Nlv7KChiwJLLHbYha4jtK_AOiWqwQ&m=jomaB1kj3G-Kmld6fVsL2tIaVlqC6KX44m3T_hBxZ3M&s=P0w3OxJNMX7vD7g_R2P9tNTuKRap7woGszsQTyWQR_M&e=">https://github.com/tritao/LLDBSharp</a><div><br></div></div><div>Let me know if you find them useful for need some help in generating the bindings for other ABIs (Windows).</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 7, 2015 at 6:19 PM, Colin Riley <span dir="ltr"><<a href="mailto:colin@codeplay.com" target="_blank">colin@codeplay.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div style="font-family:Calibri,sans-serif;font-size:11pt">I think that's what I used. Hence why I want lldb C# bindings! But yeah. Horridly underdocumented.</div></div><div dir="ltr"><hr><span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">From: </span><span style="font-family:Calibri,sans-serif;font-size:11pt"><a href="mailto:zturner@google.com" target="_blank">Zachary Turner</a></span><br><span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">Sent: </span><span style="font-family:Calibri,sans-serif;font-size:11pt">07/04/2015 18:10</span><br><span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">To: </span><span style="font-family:Calibri,sans-serif;font-size:11pt"><a href="mailto:colin@codeplay.com" target="_blank">Colin Riley</a>; <a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a></span><br><span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">Subject: </span><span style="font-family:Calibri,sans-serif;font-size:11pt">Re: [lldb-dev] [LLVMdev] PDB support in LLVM</span><br><br></div><div><div class="h5">Btw the python tools project doesn't use Dbgeng extensibility model, it's a newer richer extensibility framework that is even less documented (most people probably wouldn't even know it exists) but much more powerful. And it's all in managed code, so you get the c# stuff for free.<br><br>But still, 4-5 weeks seems very aggressive <br><div class="gmail_quote">On Tue, Apr 7, 2015 at 9:48 AM Colin Riley <<a href="mailto:colin@codeplay.com" target="_blank">colin@codeplay.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<div bgcolor="#FFFFFF" text="#000000">
You could try extending the codeview and then relying on the ms
linker to emit a pdb from it (last time I checked it converts on the
fly - this may have changed recently, and what it converts may not
be fully featured). <br>
<br>
The Debug Engine extensibility for visual studio is, as Zach says,
not well documented at all. Despite that, in the past I have had
LLDB chatting in a limited way to visual studio. It was incredibly
messy, and the way I chose to do it was go from Visual Studio ->
c# -> c++/CLI -> C++ lldb api. Don't do it that way if you
attempt it: Create lldb C# bindings instead and go that direction.
I've been looking at that lately but it's a side project so cant be
relied on if you need it quickly.<br>
<br>
As for the time frame, 4-5 weeks isn't going to get far given the
lack of documentation. The debug engine samples don't go far enough
in terms of requiring a native C++ environment.<br>
<br>
Colin</div><div bgcolor="#FFFFFF" text="#000000"><br>
<br>
<div>On 07/04/2015 17:25, Zachary Turner
wrote:<br>
</div>
</div><div bgcolor="#FFFFFF" text="#000000"><blockquote type="cite">
<div dir="ltr">It sounds like if you have a time frame of 4-5
weeks, you've got a tall order cut out for yourself. I don't
want to say impossible, but... that's pretty rough.<br>
<br>
<div>I think you've got two options:</div>
<div>1) Try to figure out how to emit PDB. The format is
undocumented, so you're kind of on your own here.</div>
<div>2) Try to figure out how to get Visual Studio to understand
DWARF. Visual Studio has a reasonably rich extensibility
model which is also not very well documented, so you're
probably on your own here as well. You may want to have a
look at <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Microsoft_PTVS&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=DDUMf06MYELAe1Nlv7KChiwJLLHbYha4jtK_AOiWqwQ&m=jomaB1kj3G-Kmld6fVsL2tIaVlqC6KX44m3T_hBxZ3M&s=8a3S_5_fq9P_PPLdrlRv0JfEG22oedBfy9rXopws-sY&e=" target="_blank">PythonTools for
Visual Studio</a>. It's entirely open source and adds
Python debugging to Visual Studio. Obviously you don't need
to be able to debug Python, but it's the best source of
documentation I know of for extending Visual Studio in this
kind of way so maybe it will help. If you end up doing this,
it would be great if you could try to upstream it back to
LLDB. Visual Studio integration with LLDB would be nice to
have.</div>
</div>
<br>
<div class="gmail_quote">On Mon, Apr 6, 2015 at 5:02 PM Rohan
Bajaj <<a href="mailto:rohanbajaj84@gmail.com" target="_blank">rohanbajaj84@gmail.com</a>>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<div dir="ltr">
<div>Moving to lldb-dev per suggestion.</div>
<div><br>
</div>
<div>Using Visual Studio is only criteria for us. It could
be DWARF or PDB.</div>
<div><br>
</div>
<div>But I need to implement this soon (4-5 weeks from now).
What do you recommend?</div>
<div><br>
</div>
<div>Zachary do you also suggest using LLDB on Windows?</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Apr 6, 2015 at 4:35 PM,
Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<div dir="ltr"><br>
<br>
<div class="gmail_quote"><span>On Mon, Apr 6, 2015 at
4:16 PM Chandler Carruth <<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<div dir="ltr">
<div class="gmail_quote">On Mon, Apr 6, 2015
at 3:46 PM Rohan Bajaj <<a href="mailto:rohanbajaj84@gmail.com" target="_blank">rohanbajaj84@gmail.com</a>>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<div dir="ltr">
<div>Is making PDB files for
corresponding IR supported in LLVM
latest version?</div>
</div>
</blockquote>
<div><br>
</div>
</div>
</div>
<div dir="ltr">
<div class="gmail_quote">
<div>Not today.</div>
</div>
</div>
<div dir="ltr">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<div dir="ltr">
<div><br>
</div>
<div>After some searching I see
llvm-pdbdump, but I want to annotate
the IR with debug information so that
when I write bitcode it has pdb
information.</div>
<div><br>
</div>
<div>I've heard of CodeView, but it
seems to be only for line information.
I want variable values also.</div>
<div><br>
</div>
<div>I would be ok to use DWARF if
Visual Studio could understand it
using LLDB but I don't know how to do
that or if it is support.</div>
</div>
</blockquote>
<div><br>
</div>
</div>
</div>
<div dir="ltr">
<div class="gmail_quote">
<div>Zach (CC-ed) and others are actively
working on making LLDB work well on
Windows, including reading DWARF debug
information on Windows and potentially
integration with Visual Studio (although I
think that is further away at the moment).
However, further discussion might be
better on the LLDB mailing lists.</div>
</div>
</div>
</blockquote>
<div><br>
</div>
</span>
<div>It's worth pointing out that CodeView is
**not** only for line information. It's for
everything. It's just that LLVM currently only
understands a subset of CodeView record types
related to line information.</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"></blockquote>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<br>
</blockquote></div><div bgcolor="#FFFFFF" text="#000000"><blockquote type="cite"><pre>_______________________________________________
lldb-dev mailing list
<a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
- Colin Riley
Senior Director,
Parallel/Graphics Debugger Systems
</pre>
</div>
______________________________<u></u>_________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/lldb-dev</a><br>
</blockquote></div>
</div></div></div><br>_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">João Matos</div>
</div>