Add an option for debugserver to propagate its environment to programs it launches using the --forward-env or -F:

% ./debugserver --forward-env localhost:1234 -- /bin/ls
% ./debugserver -F localhost:1234 -- /bin/ls

Also allow new environment variables to be set using the "--env" or "-e":

% ./debugserver --env FOO=1 --env BAR=2 localhost:1234 -- /bin/ls
% ./debugserver -e FOO=1 -e BAR=2 localhost:1234 -- /bin/ls

<rdar://problem/17350654> 



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211200 91177308-0d34-0410-b5e6-96231b3b80d8
Don't allow multiple line entries with the same address to exist sequentially.

The compiler, when JIT'ing code, can emit illegal DWARF line tables (address is line table sequences must increase). This changes fixes that issue by replacing previous line entries whose start address is the same with the new line entry to avoid having multiple line entries with the same address. Since the address range of lines entries is determined by the delta between the current and next line entry, this shouldn't cause any issues.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211212 91177308-0d34-0410-b5e6-96231b3b80d8
Add a lock in the UnwindTable class so two Targets won't try
to modify the same UnwindTable object simultaneously.  Fix
HistoryThread and HistoryUnwind's mutex lock acqusition to
retain the lock for the duration of the operation instead of
releasing the temporary immediately.
<rdar://problem/17055023>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211241 91177308-0d34-0410-b5e6-96231b3b80d8
Actually make a real scoped locker rather than constructing one that gets immediately thrown away... 


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211242 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed up gdb-remote auxv regex issues with binary data.
Fixes two causes for https://github.com/tfiala/lldb/issues/7.

1. Ensures the inferior program has started executing, by printing
a message on output first thing (per the "message:" command line arg)
and waiting for that text to arrive before doing any checks related
to auxv support.

2. Fixes up auxv-related regex patterns to be compiled with the Python
re.MULTILINE and re.DOTALL options.  The multiline is needed because
the binary data can include what look like newlines when interpreted
as text, and the DOTALL is needed to have the (.*) content portion match
newlines.

Added interrupt packet helper methods to add interrupt test sequence
packets and parse the results from them.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211283 91177308-0d34-0410-b5e6-96231b3b80d8
Switch over to using object_getClass to get the class of an object.  Previously we were
directly accessing the isa pointer of a class object to get its meta-class, but the isa
pointers are not simple pointers on arm64, so this would cause the stepping to fail.
object_getClass does whatever magic needs doing in this case.

<rdar://problem/17239690>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211289 91177308-0d34-0410-b5e6-96231b3b80d8
Test commit: Correct type in two comments.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211296 91177308-0d34-0410-b5e6-96231b3b80d8
Command files that switch input handlers didn't work, now they do.

The issue was when we called Debugger::RunIOHandler(), it would run the current IOHandler by activating it, and running it and then try to pop it and exit regardless of wether it was on top or not.

The new code will push the IOHandler that was passed in, and run the IOHandlers until the one passed in is successfully popped. This allows files for the "command source" to switch input handlers:

% cat /tmp/commands
br s -S alignLeftEdges:
br command add
bt
frame var
po self
DONE
b s -n main
br command add
bt
frame var
DONE

Note above we set a breakpoint, then add commands do it. The "br command add" will push the breakpoint comment gatherer until it sees "DONE" and then pop itself off the stack. The a new breakpoint will be set and it does the same thing again.

Now this file can be sourced from the command line:

% lldb -s /tmp/commands /path/to/a.out

And your breakpoints will be correctly setup!

<rdar://problem/17081650>



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211329 91177308-0d34-0410-b5e6-96231b3b80d8
Merge remote-tracking branch 'upstream/master' into gsoc