[lldb-dev] Do we have any infrastructure for creating mini dump files from a loaded process or from a core file?
Zachary Turner via lldb-dev
lldb-dev at lists.llvm.org
Wed Jun 13 14:54:23 PDT 2018
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
On Wed, Jun 13, 2018 at 2:51 PM Zachary Turner <zturner at google.com> wrote:
> 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.
>
> On Wed, Jun 13, 2018 at 2:42 PM Greg Clayton <clayborg at gmail.com> wrote:
>
>> 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.
>>
>> Greg
>>
>>
>> On Jun 13, 2018, at 2:29 PM, Zachary Turner via lldb-dev <
>> lldb-dev at lists.llvm.org> wrote:
>>
>> 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.
>>
>> On Wed, Jun 13, 2018 at 1:58 PM Leonard Mosescu <mosescu at google.com>
>> wrote:
>>
>>> That being said, it's not exactly trivial to produce a good minidump.
>>>> Crashpad <https://chromium.googlesource.com/crashpad/crashpad>has a
>>>> native & cross-platform minidump writer, that's what I'd start with.
>>>>
>>>
>>> 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.
>>>
>>> On Wed, Jun 13, 2018 at 1:50 PM, Leonard Mosescu <mosescu at google.com>
>>> wrote:
>>>
>>>> The minidump format is more or less documented in MSDN
>>>> <https://msdn.microsoft.com/en-us/library/windows/desktop/ms679293(v=vs.85).aspx>
>>>> .
>>>>
>>>> That being said, it's not exactly trivial to produce a good minidump. Crashpad
>>>> <https://chromium.googlesource.com/crashpad/crashpad>has a native &
>>>> cross-platform minidump writer, that's what I'd start with.
>>>>
>>>> On Wed, Jun 13, 2018 at 1:38 PM, Adrian McCarthy via lldb-dev <
>>>> lldb-dev at lists.llvm.org> wrote:
>>>>
>>>>> 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.
>>>>>
>>>>> 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.
>>>>>
>>>>> On Wed, Jun 13, 2018 at 12:07 PM, Zachary Turner via lldb-dev <
>>>>> lldb-dev at lists.llvm.org> wrote:
>>>>>
>>>>>> We can’t produce them, but you should check out the source code of
>>>>>> google breakpad / crashpad which can.
>>>>>>
>>>>>> That said it’s a pretty simple format, there may be enough in our
>>>>>> consumer code that should allow you to produce them
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> lldb-dev mailing list
>>>>>> lldb-dev at lists.llvm.org
>>>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> lldb-dev mailing list
>>>>> lldb-dev at lists.llvm.org
>>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>>>>
>>>>>
>>>>
>>> _______________________________________________
>> lldb-dev mailing list
>> lldb-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20180613/319f9c84/attachment.html>
More information about the lldb-dev
mailing list