Quiet unused variable warning that only occurs
when compiling optimized.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217429 91177308-0d34-0410-b5e6-96231b3b80d8
Add a comment explaining why we're casting the local
variable.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217456 91177308-0d34-0410-b5e6-96231b3b80d8
Create a HostThread abstraction.

This patch moves creates a thread abstraction that represents a
thread running inside the LLDB process.  This is a replacement for
otherwise using lldb::thread_t, and provides a platform agnostic
interface to managing these threads.

Differential Revision: http://reviews.llvm.org/D5198

Reviewed by: Jim Ingham

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217460 91177308-0d34-0410-b5e6-96231b3b80d8
Try to fix the FreeBSD build.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217462 91177308-0d34-0410-b5e6-96231b3b80d8
Include the correct headers for kinfo_proc on FreeBSD.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217464 91177308-0d34-0410-b5e6-96231b3b80d8
Fix FreeBSD build after thread changes

More work on the GetName/SetName arguments (thread_t vs tid_t) is needed
but this change should restore the build and basic operation.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217502 91177308-0d34-0410-b5e6-96231b3b80d8
Move FreeBSD's thread SetName implementation to ThisThread

SetName is only used in LLDB to set a thead's own name.  Move it there
to match OS X and Windows and slightly reduce the effort in any future
HostThread/ThisThread name refactoring.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217521 91177308-0d34-0410-b5e6-96231b3b80d8
llgs: implement qThreadStopInfo.

This change implements this ticket:
http://llvm.org/bugs/show_bug.cgi?id=20899

Adds the qThreadStopInfo RSP command for llgs and includes a test that
verifies both debugserver and llgs respond with something reasonable
on a multithreaded app.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217549 91177308-0d34-0410-b5e6-96231b3b80d8
Rework how resetting breakpoints in changed modules works.  Try to match up old
locations with new ones if possible.

Next up some test cases...


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217551 91177308-0d34-0410-b5e6-96231b3b80d8
DWARF64 Fixes

1. DW_FORM_strp and DW_FORM_sec_offset are 64bits for DWARF64 / 32bits for DWARF32
They are different from DW_FORM_addr, whose size is specified in .debug_info

2. Bump DWARF version support form [2,3] to [2,4] in DWARFDebugLine.cpp

3. Fix DWARFDebugLine to support DWARF64

See http://reviews.llvm.org/D5307 for more details.
Reviewed by Greg Clayton and Jason Molenda.

Change by Tong Shen.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217607 91177308-0d34-0410-b5e6-96231b3b80d8
gdb-remote tests: added test to verify thread stop info when multi-threaded app is interrupted.

The Linux version is marked XFAIL for the moment, fixing next.

Related to http://llvm.org/bugs/show_bug.cgi?id=20908.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217613 91177308-0d34-0410-b5e6-96231b3b80d8
Fix Windows build.

* ssize_t isn't defined by default on Windows.
* New public API files need to be defined in a different file for
  Windows.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217624 91177308-0d34-0410-b5e6-96231b3b80d8
Update HostProcess to use the same facade pattern as HostThread.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217632 91177308-0d34-0410-b5e6-96231b3b80d8
Add missing constructor definition.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217634 91177308-0d34-0410-b5e6-96231b3b80d8
When deciding if one-liner printing applies, and you find a summary, the summary is a good candidate to ask. While in theory one could want one-liner printing with a non-one-liner summary, I don't see LLDB as the best place to solve such inner conflicts

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217641 91177308-0d34-0410-b5e6-96231b3b80d8
Add a ProcessStructReader utility class to LLDB

The purpose of a ProcessStructReader is to allow intelligent reading of data from the underlying process
Traditionally, the way this has been handled is to have a load_address and shuffle it around, and use Process::ReadMemory()-kind APIs

With a ProcessStructReader one can define a clang type that matches exactly the definition of the thing they are trying to ingest from the inferior process, and then just point LLDB at where the data is
Since this work is done in terms of clang types, one can honor packed/aligned attributes, sizes of types on the inferior architecture, and similar tricky caveats without having to hardcode them



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217644 91177308-0d34-0410-b5e6-96231b3b80d8
llgs: fix Ctrl-C inferior interrupt handling to do the right thing.

* Sends a SIGSTOP to the process.
* Fixes busted SIGSTOP handling.  Now builds a list of non-stopped
  that we wait for the PTRACE group-stop for.  When the final must-stop
  tid gets its group stop, we propagate the process state change.
  Only the signal receiving the notification of the pending SIGSTOP
  is marked with the SIGSTOP signal.  All the rest, if they weren't
  already stopped, are marked as stopped with signal 0.
* Fixes a few broken tests.
* Marks the Linux test I added earlier as expect-pass (no longer XFAIL).

Implements fix for http://llvm.org/bugs/show_bug.cgi?id=20908.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217647 91177308-0d34-0410-b5e6-96231b3b80d8
Change SystemRuntimeMacOSX::ReadLibdispatchTSDIndexes to use the
ProcessStructReader instead of reading the structure out of libdispatch
by hand.  I will convert more of the struct readers in SystemRuntimeMacOSX
over to use this class eventually.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217649 91177308-0d34-0410-b5e6-96231b3b80d8
Recent builds of libcxx actually wrap an std::map's children values in a union containing either a member named __cc, or either of __cc and __nc (const vs. non-const). This level of wrapping is quite useless for LLDB to show to people, so try to detect it, and filter it out

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217651 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the ctor ivar initialization formatting for Debugger,
TypeValidatorImpl, FileAction, and ProcessLaunchInfo to match the
lldb coding convention.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217653 91177308-0d34-0410-b5e6-96231b3b80d8