std::function is a better choice than a raw function pointer here. You probably still want to be careful about cleaning up stuff you captured, but it's not like a function pointer wasn't going to let you shoot yourself in the foot given enough dedication.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217718 91177308-0d34-0410-b5e6-96231b3b80d8
ResolveUsername should resolve "~" to the user's home directory as well as "~/".  This 
gets command-line file completion from ~ working again.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217719 91177308-0d34-0410-b5e6-96231b3b80d8
Revert 217719, that wasn't the right fix, that should complete user names, and
anyway /Vol doesn't complete correctly either.  Somehow we're chopping the names
up incorrectly before passing them into the completer.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217720 91177308-0d34-0410-b5e6-96231b3b80d8
Fix incorrect initializer list style.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217721 91177308-0d34-0410-b5e6-96231b3b80d8
Don't make paths with /Foo//bar, that confuses everybody down the line.
This gets the file completer for absolute paths working again.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217722 91177308-0d34-0410-b5e6-96231b3b80d8
Nope, I was right originally.  ResolveUsername should resolve "~" to the 
current user, and ResolvePartialUsername will resolve "~" to the list of
users.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217723 91177308-0d34-0410-b5e6-96231b3b80d8
Correct typo in tutorial page



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217733 91177308-0d34-0410-b5e6-96231b3b80d8
Fix build break in Xcode build of lldb-tool.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217772 91177308-0d34-0410-b5e6-96231b3b80d8
Check for byte order correctness in GDBRemoteCommunicationClient::GetCurrentProcessInfo.

This is useful for checking inconsistencies between what the remote debug server thinks we are debugging and we think we are debugging. This follows the check for pointer byte size done just above.

Change by Stephane Sezer.

Tested:
Ubuntu 14.04 x86_64, llvm-3.5-built lldb
MacOSX 10.9.4, Xcode-Beta(2014-09-09)-built lldb.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217773 91177308-0d34-0410-b5e6-96231b3b80d8
Properly decode architecture type in GDBRemoteCommunicationClient::GetCurrentProcessInfo.

Instead of forcing the remote arch type to MachO all the time, we
inspect the OS/vendor that the remote debug server reports and use it to
set the arch type to MachO, ELF or COFF accordingly.

See thread here for more context:
http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140915/012968.html

Change by Stephane Sezer.

Tested:
MacOSX 10.9.4 x86_64
Ubuntu 14.04 x86_64


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217779 91177308-0d34-0410-b5e6-96231b3b80d8
Handle ARM ELF symbols properly: skip $t* and $a* symbols in ObjectFileELF.

ELF objects contain marker symbols to differentiate between ARM and
THUMB functions. Instead of storing them internally and having garbage
show up when symbols are searched for by the user, we can just skip them
and not store them at all, as we never actually need them.

Change by Stephane Sezer.

Tested:
Ubuntu 14.04 x86_64
MacOSX 10.9.4 x86_64


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217782 91177308-0d34-0410-b5e6-96231b3b80d8
lldb fix ARM64 register access - llgs side

See http://reviews.llvm.org/D5341 for more details.

Change by Paul Osmialowski.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217788 91177308-0d34-0410-b5e6-96231b3b80d8
Add a --help (-h) option to "command script add" that enables users to define a one-liner short help for their command

Also, in case they don't define any, change the default from "Run Python function <blah>" into "For more information run help <blah>"

The core issue here is that Python only allows one docstring per function, so we can't really attach both a short and a long help to the same command easily
There are alternatives but this is not a pressing enough concern to go through the motions quite yet

Fixes rdar://18322737



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217795 91177308-0d34-0410-b5e6-96231b3b80d8
Fix JITLoaderGDB for 64-bit host and 32-bit target

There are target pointer members in struct jit_code_entry and jit_descriptor.

Data layout of those structures should be decided by target, not host.

This fixes JITLoaderGDB for 64-bit host and 32-bit target.

See http://reviews.llvm.org/D5339 for more details.

Change by Tong Shen.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217816 91177308-0d34-0410-b5e6-96231b3b80d8
use std::atomic<> to protect variables being accessed by multiple threads

There are several places where multiple threads are accessing the same variables simultaneously without any kind of protection. I propose using std::atomic<> to make it safer. I did a special build of lldb, using the google tool 'thread sanitizer' which identified many cases of multiple threads accessing the same memory. std::atomic is low overhead and does not use any locks for simple types such as int/bool.

See http://reviews.llvm.org/D5302 for more details.

Change by Shawn Best.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217818 91177308-0d34-0410-b5e6-96231b3b80d8
Merge upstream llvm.org r217818 into dev-llgs-local-launch