Supporting cross-debugging vmcores in libkvm (Testing needed)
Julian Elischer
julian at freebsd.org
Thu Aug 13 04:43:27 UTC 2015
On 8/13/15 1:50 AM, John Baldwin wrote:
> On Tuesday, August 04, 2015 10:56:09 AM John Baldwin wrote:
>> Many debuggers (recent gdb and lldb) support cross-architecture debugging
>> just fine. My current WIP port of kgdb to gdb7 supports cross-debugging for
>> remote targets already, but I wanted it to also support cross-debugging for
>> vmcores.
>>
>> The existing libkvm/kgdb code in the tree has some limited support for
>> cross-debugging. It requires building a custom libkvm (e.g. libkvm-i386.a)
>> and custom kgdb for each target platform. However, gdb (and lldb) both
>> support multiple targets in a single binary, so I'd like to have a single
>> kgdb binary that can cross-debug anything.
>>
>> I started hacking on libkvm last weekend and have a prototype that I've used
>> (along with some patches to my kgdb port) to debug an amd64 vmcore on an
>> i386 machine and vice versa.
>>
>> ...
>>
>> What I'm mostly after is comments on the API, etc. Once that is settled I
>> will move forward on converting and/or stubbing the other backends (the
>> stub route would be to only support other backends on native systems for
>> now).
> I guess this is closer to a nuclear power plant than a bikeshed judging by the
> feedback.
It has "keep well clear" and "beware of the leopard" written all over it.
and when you get past those you see "dragons be here".
More information about the freebsd-arch
mailing list