[Lldb-commits] [PATCH] D11129: Fix for remote-linux test fails: use currently selected platform on target launch

Omair Javaid omair.javaid at linaro.org
Tue Jul 14 12:56:42 PDT 2015


On 13 July 2015 at 22:47, Greg Clayton <clayborg at gmail.com> wrote:
> clayborg added a comment.
>
> So you must select the platform first:
>
>   target select remote-linux
>   file a.out
>   target connect connect://hostname:5432
>   run

Alright, but if user does something like:

file path to some file or invokes ./lldb path to some file (This
should create a target)
platform select remote-linux
target connect connect://hostname:5432
run

What should be the expected error message here ?

This seems to be pretty common use-case.

1) we give a executable to be debugged to our debugger on command line
and it loads symbols etc figuring out architecture and symbol format
internally.
2) Issue a run at this stage should run the process on host platform
if there is mismatch (Architecture or OS not compatible) then debugger
should exit with a suitable error message.
3) If we want to run the same binary on a remote platform then we
connect to that platform and issue a run which should ideally launch
our process on remote machine where debug agent is being run.

At point 1) LLDB should decide on a platform for the binary image
based on comparison of architecture and Operating System of lldb host
and binary image target.
Do you agree? This is not happening right now and if we agree this
should happen I can go ahead and make those changes.

At point 2) if we run a target built for foreign architecture or OS on
a native local host at least for linux LLDB goes into a indefinite
loop ending up in a crash.
I think I should fix this too. Any thoughts?

At point 3) If we select and connect a remote platform then we cannot
run the target that we created at point 1) and we have create a new
target. If we launch the process using same target created initially
LLDB again goes into a crash on linux platform.
This should also be fixed to make sure we have a standard expected output.

Finally I am still learning this code base so not sure whats the harm
in switching platform to currently selected platform when we issue the
run. I guess we are doing the same when we attach to a process?
Providing a binary image on lldb commandline should be restricted to
native debugging only?


>
>
> http://reviews.llvm.org/D11129
>
>
>



More information about the lldb-commits mailing list