<div dir="ltr">Also one could imagine using it for many other things too. For example, given a windows dump file, strip it down (i.e. remove heap, etc), or similar types of options for operating on Unix core files to remove certain types of info etc</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 13, 2018 at 2:51 PM Zachary Turner <<a href="mailto:zturner@google.com">zturner@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">What about the case where you already have a Unix core file and you aren't in a debugger but just want to convert it? It seems like we could have a standalone utility that did that (one could imagine doing the reverse too). I'm wondering if it wouldn't be possible to do this as a library or something that didn't have any dependencies on LLDB, that way a standalone tool could link against this library, and so could LLDB. I think this would improve its usefulness quite a bit.</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 13, 2018 at 2:42 PM Greg Clayton <<a href="mailto:clayborg@gmail.com" target="_blank">clayborg@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">The goal is to take a live process (regular process just stopped, or a core file) and run "save_minidump ..." as a command and export a minidump file that can be sent elsewhere. Unix core files are too large to always send and they are less useful if they are not examined in the machine that they were produced on. So LLDB gives us the connection to the live process, and we can then create a minidump file. I am going to create a python module that can do this for us.<div><br></div><div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div>Greg </div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><br><div><br><blockquote type="cite"><div>On Jun 13, 2018, at 2:29 PM, Zachary Turner via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:</div><br class="m_1398703765171950276m_1008117692994414797Apple-interchange-newline"><div><div dir="ltr">Also, if the goal is to have this upstream somewhere, it would be nice to have a tool this be a standalone tool. This seems like something that you shouldn't be required to start up a debugger to do, and probably doesn't have many (or any for that matters) on the rest of LLDB.</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 13, 2018 at 1:58 PM Leonard Mosescu <<a href="mailto:mosescu@google.com" target="_blank">mosescu@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">That being said, it's not exactly trivial to produce a good minidump.<span> </span></span><a href="https://chromium.googlesource.com/crashpad/crashpad" style="color:rgb(17,85,204);font-size:12.8px;background-color:rgb(255,255,255)" target="_blank">Crashpad<span> </span></a><span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">has a native & cross-platform minidump writer, that's what I'd start with.</span>
<br></blockquote><div><br></div></div><div dir="ltr"><div>Addendum: I realized after sending the email that if the goal is to convert core files -> LLDB -> minidump a lot of the complexity found in Crashpad can be avoided, so perhaps writing an LLDB minidump writer from scratch would not be too bad.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 13, 2018 at 1:50 PM, Leonard Mosescu <span dir="ltr"><<a href="mailto:mosescu@google.com" target="_blank">mosescu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The minidump format is more or less <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms679293(v=vs.85).aspx" target="_blank">documented in MSDN</a>. <div><br></div><div>That being said, it's not exactly trivial to produce a good minidump. <a href="https://chromium.googlesource.com/crashpad/crashpad" target="_blank">Crashpad </a>has a native & cross-platform minidump writer, that's what I'd start with.</div></div><div class="m_1398703765171950276m_1008117692994414797m_7758184329384615926HOEnZb"><div class="m_1398703765171950276m_1008117692994414797m_7758184329384615926h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 13, 2018 at 1:38 PM, Adrian McCarthy via lldb-dev <span dir="ltr"><<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Zach's right. On Windows, lldb can produce a minidump, but it just calls out to a Microsoft library to do so. We don't have any platform-agnostic code for producing a minidump.<br><div><br></div><div>I've also pinged another Googler who I know might be interested in converting between minidumps and core files (the opposite direction) to see if he has any additional info. I don't think he's on lldb-dev, though, so I'll act as a relay if necessary.</div></div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Wed, Jun 13, 2018 at 12:07 PM, Zachary Turner via lldb-dev <span dir="ltr"><<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>We can’t produce them, but you should check out the source code of google breakpad / crashpad which can.<br><br>That said it’s a pretty simple format, there may be enough in our consumer code that should allow you to produce them<div class="m_1398703765171950276m_1008117692994414797m_7758184329384615926m_-3393847704277041062m_-9116510851602075078HOEnZb"><div class="m_1398703765171950276m_1008117692994414797m_7758184329384615926m_-3393847704277041062m_-9116510851602075078h5"><br>
</div></div><br></span><span>_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
<br></span></blockquote></div><br></div>
<br>_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</blockquote></div>
_______________________________________________<br>lldb-dev mailing list<br><a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br></div></blockquote></div><br></div></div></blockquote></div>
</blockquote></div>