<rdar://problem/15593026>

Fix the algorithm used to detect a loop in a std::list



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202205 91177308-0d34-0410-b5e6-96231b3b80d8
Suppress python readline module under Linux to fix a seg fault.

Bug fix for pr18841:
http://llvm.org/bugs/show_bug.cgi?id=18841

This change creates a stub Python readline.so module that does almost
nothing. Its whole purpose is to prevent Python from loading the real
module, something it does during the embedded Python interpreter's
initialization sequence (and way before lldb ever requests it within
embedded_interpreter.py).

On Ubuntu 12.04 and 13.10 x86_64, and in the Python 2.7.6 tree, the
stock Python readline module links against the GNU readline library.
This appears to be the case on all Pythons except where __APPLE__ is
defined. LLDB now requires linking against the libedit library.
Something about having both libedit.so and libreadline.so linked into
the same process space is causing the Python readline.so to trigger a
NULL memory access. I have put in a separate patch to python.org.

This suppression of embedded interpreter readline support can be
removed if at least any one of the following happens:

1. The stock python distribution accepts a patch similar to what I
submitted to Python 2.7.6's Modules/readline.c file.

2. The stock python distribution implements Modules/readline.c in
terms of libedit's readline compatibility mode (i.e. essentially
compiles it the way __APPLE__ compiles that module) under Linux.

3. a clean-room implementation of the python readline module is
implemented against libedit (either readline compatibility mode or
native libedit). This could be implemented within the readline.cpp
file that this change introduces. It cannot be a fork of python's
readline.c module due to llvm licensing.

The net effect of this change on Linux is that the embedded python's
readline support will not exist.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202243 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename PYTHON_INCLUDES to PYTHON_INC_DIR to match the similar declaration
in lldb.svn/Makefile
* Use CPP.Flags to export the declaration. The current solution broke all builds
on http://llvm-jenkins.debian.net/




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202270 91177308-0d34-0410-b5e6-96231b3b80d8
remove useless declaration. Triggers 20 warnings on http://buildd-clang.debian.net/scan-build/

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202281 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed lldb cmake build to include missing libpanel/libncurses.

These libraries became necessary recently to link properly.
I think they are needed everywhere non-Windows, but if they
end up breaking on a given platform, we can conditionalize this
further.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202282 91177308-0d34-0410-b5e6-96231b3b80d8
Add libexecinfo for backtrace() on FreeBSD


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202284 91177308-0d34-0410-b5e6-96231b3b80d8
Fix x86 32-bit register context definition to build properly on 32 and 64-bit hosts.

This fix changes thee x86 32-bit floating point register area to be
the proper size independent of the host platform.

Note as of this change list, this register context is not yet used
since selecting it exposes issues with watchpoint assertions.

Change by Matthew Gardiner.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202285 91177308-0d34-0410-b5e6-96231b3b80d8
Small fix for i386 extended backtraces; wasn't skipping a
4-byte reserved area when reading the libBacktraceRecording API results.
Also, add a little logging about queues being created.
<rdar://problem/16127752> 


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202306 91177308-0d34-0410-b5e6-96231b3b80d8
Remove link_system_libs, unused after LLVM r201969


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202309 91177308-0d34-0410-b5e6-96231b3b80d8
A better long term fix for stopping the process when it is running by writing to the pipe that was used for cancel. 

We now write a 'q' to indicate to exit the IOHandlerProcessSTDIO::Run(), and a 'i' to interrupt the process. This should make this code safer to use in a signal handler function.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202311 91177308-0d34-0410-b5e6-96231b3b80d8
update the declaration from llvm::OwningPtr to llvm::IntrusiveRefCntPtr to match the clang update (r202346) on ASTContext

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202376 91177308-0d34-0410-b5e6-96231b3b80d8
Fix build break due to signature change on ASTContext' setExternalSource parameter.

This change converts points to clang::ExternalASTSource from llvm::OwningPtr<> to
llvm::IntrusiveRefCntPtr<>.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202411 91177308-0d34-0410-b5e6-96231b3b80d8
Improve logging a bit by printing the exception or signal type description.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202423 91177308-0d34-0410-b5e6-96231b3b80d8
Remove an assertion that was being hit due to slow DNS name lookups on MacOSX for "localhost". 

Changed all "localhost" to "127.0.0.1" to prevent potentially long name lookups.

<rdar://problem/16154630>



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202424 91177308-0d34-0410-b5e6-96231b3b80d8
Check call to fgetc for EINTR.

<rdar://problem/16140277>

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202426 91177308-0d34-0410-b5e6-96231b3b80d8
Fix linux x86 debugging on a linux x86 host (32-bit on 32-bit).

This change fixes up issues with specifying the size of the i386
register infos for FPU registers.  The bug was that for the i386
register context, the size of the FPU registers were still being
computed based on the x86_64 FXSAVE structure.

This change permits the FPR_SIZE macro to optionally be defined
outside of RegisterInfos_i386.h, which RegisterContextLinux_i386.cpp
does properly. It redefines the FPR_i386 structure with all the
accessible parts that RegisterInfos_i386.h wants to see, which we had
not done before when we made the overall size of the structure
properly sized a recently.

This change also modifies POSIXThread to create a
RegisterContextLinux_i386 only when the host is 32-bit; otherwise, it
uses the RegisterContextLinux_x86_64, which works properly for 32-bit
and 64-bit inferiors on a 64-bit host.

I tested this debugging a Linux x86 exe on an x86 host (Ubuntu 13.10
x86), and debugging a Linux x86 exe and a Linux x86-64 exe on an
x86-64 host (Ubuntu 12.04 LTS).  Those cases all worked.

Thanks to Matthew Gardiner who discoverd may key insights into
tracking down the issue. The motivation for this change and some of
the code originates from him via this thread:

http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140224/010554.html



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202428 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed the lldb_perf_clang.cpp test case to be able to run correctly.

1 - There were some outdated options being passed to clang
2 - There were some bad paths being passed as options
3 - The path to the main.cpp file ("/tmp/main.cpp") was wrong when the tests were being run, now we create a temp file
4 - Added a new ActionType::eNone to do nothing (no continue, step, or kill)



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202431 91177308-0d34-0410-b5e6-96231b3b80d8
remove useless declarations found thanks to scan-build

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@202440 91177308-0d34-0410-b5e6-96231b3b80d8
Re-enable TestMultithreaded.py test on Linux.

I could not get http://llvm.org/bugs/show_bug.cgi?id=16016)
to fail on my end running 10 times in a row.  Re-enabling
the test.


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