Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Mar 2014 08:33:27 +0100
From:      Mike Ma <mikemandarine@gmail.com>
To:        Julian Elischer <julian@freebsd.org>
Cc:        freebsd-hackers@freebsd.org, Ed Maste <emaste@freebsd.org>
Subject:   Re: GSoC proposal: kernel debugging support for LLDB
Message-ID:  <CA%2BcqwfcjjsRawhqcR19kdWH8UYTBzEcjgYXtG92n1_Q7XJ6RNA@mail.gmail.com>
In-Reply-To: <532895C2.1010006@freebsd.org>
References:  <CA%2BcqwfckT4s3iNwaoNR5p57er7Voofo7f2VnAp%2BGpEiFE-0pJg@mail.gmail.com> <532895C2.1010006@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Julian,

Actually LLDB has GDB remote protocol and serial port support.
We'll just need to connect the dots and make it fully on FreeBSD.

On Tue, Mar 18, 2014 at 7:51 PM, Julian Elischer <julian@freebsd.org> wrote:
> most interesting kernel debug support is for live debugging (with the remote
> stub or similar)
> how does this relate to that?
>
>
> On 3/17/14, 12:35 PM, Mike Ma wrote:
>>
>> Hi all,
>>
>> I've submitted a GSoC proposal here,
>>
>> http://www.google-melange.com/gsoc/proposal/public/google/gsoc2014/mikemandarine/5665319561461760.
>> I'm copying the proposal here for wider audience.
>> Any suggestions or comments are more than appreciated.
>>
>> Thanks a lot for your time.
>>
>> Project Description
>> I'm planning to add a plugin called FreeBSD-kernel to LLDB, and the
>> existing userland ELF core strategies can be inherited. On FreeBSD
>> system, kernel virtual memory image can be accessed using libkvm
>> interfaces, as to support kernel debugging, libkvm APIs, i.e.
>> kvm_read(3)/kvm_write(3), will be mainly used. To fully support kernel
>> debugging, module metadata parsing and module automatic loading will
>> also be implemented.
>>
>> There is some existing work related to this project. The first is kgdb
>> in FreeBSD code base, it is a kernel debugger based on gdb. Plus,
>> there is Mac OS X kernel debugging support in LLDB as well. This
>> project will be focused on the platform that LLDB supports, including
>> amd64, mips and i386. Once this project is done, remote kernel
>> debugging and cross-platform kernel debugging would be the next steps
>> of interest.
>>
>> Deliverables
>>     - There are two major milestones:
>>     #1 Basic support for opening kernel crash dumps and /dev/mem.
>> (mid-term deliverable)
>>     #2 Full debugging support by adding module parsing and loading.
>> (final deliverable)
>>
>> Test Plan
>>    - Check all functionalities and commands are working properly, and
>> compare behavior with kgdb and LLDB.
>>    - Benchmark tests on startup, stepping, etc.
>>
>> Project Schedule
>>    - Week 1 - 3: Kernel crash dumps support.
>>    - Week 4 - 6: Live debugging against /dev/mem support.
>>    - Week 7 - 10: Kernel Module parsing and loading support.
>>    - Week 11 - 12: Tests and bug fixing, and documentation work.
>>    All features should be done by the suggested Pencils down day (Aug.
>> 11th).
>>
>>
>



-- 
Cheers,
Mike



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BcqwfcjjsRawhqcR19kdWH8UYTBzEcjgYXtG92n1_Q7XJ6RNA>