[lldb-dev] Is anyone using lldb on Windows to debug a _Windows_ application
Todd Fiala
tfiala at google.com
Sun Jun 15 23:08:09 PDT 2014
> I hope llgs will not use anything strictly bionic and/or binder dependand.
I've been focusing on Ubuntu Linux, initially 12.04 LTS but soon to be
focusing more on 14.04 LTS. First x86_64, then other architectures. We'll
also be bringing in Android support. So no, not focusing only on Android
(and as part of bring-up, focusing on Ubuntu Linux first).
I expect most of the Android code will be more or less pure Linux.
However, there are some areas where some of the changes in Android (e.g.
security-related lock-down) may require making Android-specific calls at
some point to handle an Android target. We'll keep those areas cleanly
abstracted though as the bulk of the Linux process monitoring should be
identical.
> Seems like extending native lldb support to ARM and/or AArch64 is not
something individual contributor should or can do and need some discussion
with wider agreement of wider board of developers.
Feel free to take a shot at it if you're interested. If you're interested
in local debugging, you can try to modify the existing TOT Linux
ProcessMonitor code and the relevant RegisterContext code. If you want to
fork the llgs branch, have a look at
NativeProcessProtocol/NativeThreadProtocol/NativeRegisterContext. These
are implemented for Linux with NativeProcessLinux, NativeThreadLinux and
NativeRegisterContextLinux_x86_64. The register context code is the big
place that will need some adjustment. There is some register context
factory code in NativeThreadLinux that will need some tweaks, and some
software breakpoint code that will need to change in NativeProcessLinux.
Otherwise, we'll be happily getting to it for the llgs side.
On Sun, Jun 15, 2014 at 10:52 AM, Paul Osmialowski <pawelo at king.net.pl>
wrote:
> Hi Todd,
>
> Seems like accidently I've started off-topic here. The guy asked about
> Windows while I'm more into Linux and I brought my issues only due to
> obvious similarities.
>
>
> For sure the Linux support is really just x86_64 and x86 32-bit to some
>>
> extent, and not other architectures.
>
>>
>> It's very likely we'll have AArch64 Linux working at some point. We're
>>
> working on bringing LLDB up on Android, and one of the earlier steps is
> getting lldb-gdbserver (llgs) working on Linux (first x86_64,
>
>> but later many of the architectures that Android supports).
>>
>
> For varoius reasons I'm avoiding limiting myself to Android. Even on my
> PandaBoard I'm running Ubuntu image downloaded from Linaro. I hope llgs
> will not use anything strictly bionic and/or binder dependand.
>
>
> We're less focused on local debugging than on debugging through the
>>
> gdb-remote protocol. However, Greg Clayton and I have talked some about
> bringing the NativeProcessProtocol and NativeThreadProtocol
>
>> mechanisms by which llgs is getting implemented to the local debugging
>>
> side as well (i.e. re-engineering local debugging in terms of
> Native{Process,Thread}Protocol).
>
> Seems like extending native lldb support to ARM and/or AArch64 is not
> something individual contributor should or can do and need some discussion
> with wider agreement of wider board of developers.
>
>
>
> On Sat, 14 Jun 2014, Todd Fiala wrote:
>
> Hi Paul,
>> > Seems like only 'MacOSX and Linux' on 'i686 and x86_64' are properly
>> supported.
>>
>> For sure the Linux support is really just x86_64 and x86 32-bit to some
>> extent, and not other architectures.
>>
>> It's very likely we'll have AArch64 Linux working at some point. We're
>> working on bringing LLDB up on Android, and one of the earlier steps is
>> getting lldb-gdbserver (llgs) working on Linux (first x86_64,
>> but later many of the architectures that Android supports).
>>
>> We're less focused on local debugging than on debugging through the
>> gdb-remote protocol. However, Greg Clayton and I have talked some about
>> bringing the NativeProcessProtocol and NativeThreadProtocol
>> mechanisms by which llgs is getting implemented to the local debugging
>> side as well (i.e. re-engineering local debugging in terms of
>> Native{Process,Thread}Protocol).
>>
>> If you're interested, you can see the latest state of the lldb-gdbserver
>> support here:
>>
>> https://github.com/tfiala/lldb/tree/dev-tfiala-native-
>> protocol-linux-x86_64
>>
>> llgs is getting implemented for linux-x86_64 first. Ed Maste is planning
>> on getting it working for FreeBSD, and Greg and the Apple folks plan to
>> move from debugserver over to llgs at some point after we
>> work the kinks out of llgs.
>>
>> I did spend several days attempting to get an Aarch64 build environment
>> on a DS-5 simulator and a Linaro Aarch64 linux distro but the combination
>> of the lack of speed and the challenges I worked through with
>> some very helpful ARM engineers made this a less productive avenue than
>> my current linux x86_64 bring-up. I plan to return back to that or a
>> similar arm64 environment in the near future.
>>
>>
>> On Sat, Jun 14, 2014 at 7:49 AM, Paul Osmialowski <pawelo at king.net.pl>
>> wrote:
>> Hi Eran,
>>
>> I got the same when I try to debug a _Linux_ application on Linux
>> running on non-PC CPU. Seems like only 'MacOSX and Linux' on 'i686 and
>> x86_64' are properly supported. Problem was already
>> described in the message here: http://comments.gmane.org/
>> gmane.comp.debugging.lldb.devel/3530
>>
>> I'd love to try and extend lldb support to Linux on AArch64,
>> although cross-compilation comes with its own struggles that I need to deal
>> with first.
>>
>> I guess woriking out this kind of support for Windows on PC should
>> not be hard.
>>
>> On Sat, 14 Jun 2014, Eran Ifrah wrote:
>>
>> Hi,
>>
>> I tried both building lldb with MSVC and with MinGW both
>> failed to debug
>> native Windows executables (I actually tried 3 types of
>> executables, 1
>> built with MinGW, 1 with clang 3.4 and 1 with Visual Studio)
>>
>> This is the error I am getting:
>>
>> $ lldb D:/src/TestArea/ClangVC/Debug/ClangVC.exe
>> error: 'D:/src/TestArea/ClangVC/Debug/ClangVC.exe' doesn't
>> contain any
>> 'host' platform architectures:
>> (lldb)
>>
>> So the question is:
>> ?Is it possible to use lldb on Windows (for local debugging
>> not remote
>> debugging)
>>
>> --
>> Eran Ifrah
>> Author of codelite, a cross platform open source C/C++ IDE:
>> http://www.codelite.org
>> wxCrafter, a wxWidgets RAD: http://wxcrafter.codelite.org
>>
>> _______________________________________________
>> lldb-dev mailing list
>> lldb-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>>
>>
>>
>>
>> --
>> Todd Fiala |
>> Software Engineer |
>> tfiala at google.com |
>> 650-943-3180
>>
>>
--
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140615/334a97c0/attachment.html>
More information about the lldb-dev
mailing list