[Lldb-commits] LLGS for Free/NetBSD (was: Re: [PATCH] D25756: FreeBSD ARM support for software single step.)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 24 03:26:35 PDT 2016
Moving the discussion to lldb-dev.
On 21 October 2016 at 18:55, Dmitry Mikulin <dmitrym at juniper.net> wrote:
> Thanks Pavel! I'll start working on it. Do you know when lldb-server Linux changes were committed? I want to use those patches as a template, but it's hard to locate them digging through thousands of commit log entries...
The original remote debug support for linux came as a long series of
patches in February 2015, between r227909 and r227933. However, it
has gone through quite a bit of rewrite since then, so I'd be wary of
using it as an inspiration. I think you'd be better off using the
current state of the linux support instead. You can also find r240543
interesting as well, which removes the old local debug path. That can
be useful to figure out how to setup lldb to launch lldb-server for
debugging (generally, it boils down to returning "true" from
PlatformXXX::CanDebugProcess()).
On 21 October 2016 at 20:12, Kamil Rytarowski <n54 at gmx.com> wrote:
> krytarowski added a comment.
>
> I just scrolled the discussion so it's not really started. Thanks.
>
> My plan is to work on ptrace(2) for about a month.
>
> Then I will take the FreeBSD code as it is and port to NetBSD trying to make it functional. This is difficult part as there is everywhere OS specific interfaces and behavior. I hope to get it to some usable point after a month.
>
> Then ,I will start working on remote debugging, as my previous patch for process tracing (it was buggy) was rejected without this property. I planned to merge my previous work with master as I was forced to keep catching up after the project changes and it was time expensive, and move my focus on proper platform support.
It's not my place to tell you how to work, but I'd recommend a
different approach to this. If you base your work on the current
FreeBSD in-process plugin, then when you get around to actually
implementing remote support, you will find that you will have to
rewrite most of what you have already done to work with lldb-server,
as it uses completely different class hierarchies and everything. I'd
recommend starting with lldb-server right away. It's going to be a bit
more work as (I assume) freebsd implementation is closer to what you
need than linux, but I think it will save you time in the long run. I
can help you with factoring out any linux-specific code that you
encounter.
cheers,
pl
More information about the lldb-commits
mailing list