Commit Graph

8555 Commits

Author SHA1 Message Date
Todd Fiala 9ce4a73c89 Adjust TestConcurrentEvents.py test running for Linux.
Related to this bug:
http://llvm.org/bugs/show_bug.cgi?id=16714

On TOT lldb svn r202507, I found several of the tests disabled within
TestConcurrentEvents.py to run fine, and several of them to fail 100%
of the time on my system (25 out of 25 times).

This changes the following tests for Linux:

Enables (these all work consistently):
* test_many_watchpoints_dwarf
* test_signal_watch_break_dwarf (line 250)
* test_signal_watch_break_dwarf (line 260 - same named test?)
* test_crash_with_watchpoint_dwarf
* test_crash_with_watchpoint_breakpoint_signal_dwarf
* test_delayed_crash_with_breakpoint_watchpoint_dwarf

Marks as expected failure (these all fail consistently):
* test_many_watchpoints_dwarf
* test_watch_break_dwarf
* test_delay_watch_break_dwarf
* test_watch_break_dwarf_delay
* test_signal_watch_dwarf
* test_delay_signal_watch_dwarf
* test_signal_delay_watch_dwarf
* test_two_breakpoints_one_watchpoint_dwarf
* test_breakpoints_delayed_breakpoint_one_watchpoint_dwarf
* test_two_watchpoint_threads_dwarf
* test_watchpoint_with_delay_watchpoint_threads_dwarf
* test_two_watchpoints_one_breakpoint_dwarf
* test_two_watchpoints_one_delay_breakpoint_dwarf
* test_watchpoint_delay_watchpoint_one_breakpoint_dwarf
* test_two_watchpoints_one_signal_dwarf
* test_signal_watch_break_dwarf

llvm-svn: 202511
2014-02-28 16:50:05 +00:00
Todd Fiala 722311edc8 Enabled TestBreakAfterJoin.py on Linux.
This is related to:
http://llvm.org/bugs/show_bug.cgi?id=16170

This test ran successfully 40 out of 40 times on Ubuntu 12.04 LTS
x86_64.

llvm-svn: 202508
2014-02-28 15:54:36 +00:00
Todd Fiala f9dc4b7373 Change TestStopHookMechanism to @expectedFailureLinux.
Similar to my previous check-in related to:
http://llvm.org/bugs/show_bug.cgi?id=15037

10 out of 10 runs of this failed.  Mark it XFAIL.

llvm-svn: 202507
2014-02-28 15:47:48 +00:00
Todd Fiala 71c53fb25b Marked linux TestStopHookMultipleThreads as expected failure.
Related to this bug:
http://llvm.org/bugs/show_bug.cgi?id=15037

Previously this was marked as skipped. I tried running it 10 times in
a row and it failed every time. Switched it to XFAIL.

llvm-svn: 202506
2014-02-28 15:26:10 +00:00
Ed Maste 2c2f83ef07 Fix types to eliminate compiler warnings in FreeBSD host class
llvm-svn: 202498
2014-02-28 13:46:51 +00:00
Jim Ingham 286fb1ef32 Plumb the EvaluateExpressionOptions::{Set,Get}StopOthers through the SB API, and make it work in RunThreadPlan.
Also remove SetStopOthers from the ThreadPlanCallFunction, because if the value you have doesn't match what is
in the EvaluateExpressionOptions the plan was passed when created it won't work correctly.

llvm-svn: 202464
2014-02-28 02:52:06 +00:00
Todd Fiala 550b1a298a Re-enable TestExprDoesntBlock.py on Linux.
This is related to:
http://llvm.org/bugs/show_bug.cgi?id=15258

I ran this test 10 times successfully against Ubuntu 12.04 LTS x86_64
with lldb built with gcc 4.8.2 and July 2013 libedit.

llvm-svn: 202456
2014-02-28 00:46:57 +00:00
Todd Fiala 7ffb2b0b53 Enable TestCallThatRestarts test on Linux.
This is related to:
http://llvm.org/bugs/show_bug.cgi?id=15278

I ran this 20 times in a row without failure at svn r202440 on Ubuntu
12.04 LTS x86_64 using July 2013 libedit and gcc 4.8.2.

llvm-svn: 202448
2014-02-28 00:20:10 +00:00
Greg Clayton 52c3a07ece Revert Xcode run argument settings that were accidentally checked in.
llvm-svn: 202447
2014-02-28 00:13:03 +00:00
Todd Fiala 347284f82d 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.

llvm-svn: 202446
2014-02-28 00:13:00 +00:00
Sylvestre Ledru 451ca2924c remove useless declarations found thanks to scan-build
llvm-svn: 202440
2014-02-27 22:46:23 +00:00
Greg Clayton 46822c7c72 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)

llvm-svn: 202431
2014-02-27 21:35:49 +00:00
Todd Fiala 4507f06aaa 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

llvm-svn: 202428
2014-02-27 20:46:12 +00:00
Jim Ingham d6efa2a977 Check call to fgetc for EINTR.
<rdar://problem/16140277>

llvm-svn: 202426
2014-02-27 19:48:13 +00:00
Greg Clayton 1681092f96 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>

llvm-svn: 202424
2014-02-27 19:38:18 +00:00
Greg Clayton fdbad6d5d8 Improve logging a bit by printing the exception or signal type description.
llvm-svn: 202423
2014-02-27 19:35:12 +00:00
Todd Fiala 955fe6f6ed Fix build break due to signature change on ASTContext' setExternalSource parameter.
This change converts points to clang::ExternalASTSource from llvm::OwningPtr<> to
llvm::IntrusiveRefCntPtr<>.

llvm-svn: 202411
2014-02-27 17:18:23 +00:00
Sylvestre Ledru 7ba631f651 update the declaration from llvm::OwningPtr to llvm::IntrusiveRefCntPtr to match the clang update (r202346) on ASTContext
llvm-svn: 202376
2014-02-27 10:46:57 +00:00
Greg Clayton 19e1135108 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.

llvm-svn: 202311
2014-02-26 22:47:33 +00:00
Ed Maste 1b019d8ae2 Remove link_system_libs, unused after LLVM r201969
llvm-svn: 202309
2014-02-26 22:39:31 +00:00
Jason Molenda d84f606deb 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> 

llvm-svn: 202306
2014-02-26 22:27:09 +00:00
Todd Fiala 994f63dc00 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.

llvm-svn: 202285
2014-02-26 18:51:03 +00:00
Ed Maste 0121e43b5b Add libexecinfo for backtrace() on FreeBSD
llvm-svn: 202284
2014-02-26 18:21:42 +00:00
Todd Fiala 86dccb39c2 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.

llvm-svn: 202282
2014-02-26 17:44:00 +00:00
Sylvestre Ledru 91d2101722 remove useless declaration
llvm-svn: 202281
2014-02-26 17:28:21 +00:00
Sylvestre Ledru f4733b159d remove useless declaration. Triggers 20 warnings on http://buildd-clang.debian.net/scan-build/
llvm-svn: 202271
2014-02-26 16:01:37 +00:00
Sylvestre Ledru 743e2b2139 * 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/

llvm-svn: 202270
2014-02-26 15:05:48 +00:00
Todd Fiala 9bb71b73d9 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.

llvm-svn: 202243
2014-02-26 07:39:20 +00:00
Enrico Granata c6f0a6ac27 <rdar://problem/15593026>
Fix the algorithm used to detect a loop in a std::list

llvm-svn: 202205
2014-02-25 23:34:40 +00:00
Jim Ingham 5689a217e3 Switch debugserver to detach on error by default, and change the flag to kill-on-error.
Also fix the bug where lldb prints: "Got a connection and launched debugserver" rather
than the name of the process it actually launched.

llvm-svn: 202189
2014-02-25 19:57:47 +00:00
Enrico Granata dc598febe4 Make TestStdCXXDisassembly.StdCXXDisassembleTestCase work with libc++
<rdar://problem/16115219>

llvm-svn: 202180
2014-02-25 18:47:23 +00:00
Ed Maste 96e51b890b Reapply r184270 by Jim Ingham to avoid abort on FreeBSD
Don't actually Halt in the Interrupt handler for the Process, just
  send an AsyncInterrupt.  That's actually not async-signal-clean, but
  it is a lot safer than Halt...

The underlying problem is actually a nested pthread_cond_wait from the
signal handler.  Note frames 4, 13, 18 in the backtrace of the aborting
path below.

    frame #1: 0x000000080715fff9 libc.so.7`abort + 73 at abort.c:65
    frame #2: 0x0000000805d20fda libthr.so.3`_thread_exit(fname=<unavailable>, lineno=<unavailable>, msg=<unavailable>) + 58 at thr_exit.c:182
    frame #3: 0x0000000805d1fdc8 libthr.so.3`cond_wait_common [inlined] cond_wait_user(mp=<unavailable>, abstime=<unavailable>, cancel=<unavailable>) + 936 at thr_cond.c:223
    frame #4: 0x0000000805d1fd5b libthr.so.3`cond_wait_common(cond=<unavailable>, mutex=<unavailable>, abstime=<unavailable>, cancel=<unavailable>) + 827 at thr_cond.c:311
    frame #5: 0x00000008013450b5 liblldb.so.3.5`lldb_private::Condition::Wait(lldb_private::Mutex&, lldb_private::TimeValue const*, bool*) + 117
    frame #6: 0x00000008013411e8 liblldb.so.3.5`lldb_private::Predicate<bool>::WaitForValueEqualTo(bool, lldb_private::TimeValue const*, bool*) + 200
    frame #7: 0x00000008013eb34c liblldb.so.3.5`lldb_private::Listener::WaitForEventsInternal(lldb_private::TimeValue const*, lldb_private::Broadcaster*, lldb_private::ConstString const*, unsigned int, unsigned int, std::__1::shared_ptr<lldb_private::Event>&) + 876
    frame #8: 0x00000008013eb751 liblldb.so.3.5`lldb_private::Listener::WaitForEvent(lldb_private::TimeValue const*, std::__1::shared_ptr<lldb_private::Event>&) + 81
    frame #9: 0x00000008017c5bcf liblldb.so.3.5`lldb_private::Process::Halt(bool) + 783
    frame #10: 0x00000008017def3a liblldb.so.3.5`IOHandlerProcessSTDIO::Interrupt() + 74
    frame #11: 0x00000008013823d3 liblldb.so.3.5`lldb_private::Debugger::DispatchInputInterrupt() + 115
    frame #12: 0x00000008011d69c5 liblldb.so.3.5`lldb::SBDebugger::DispatchInputInterrupt() + 69
    frame #13: 0x000000000040b254 lldb`sigint_handler(int) + 68
    frame #14: 0x0000000805d1b3da libthr.so.3`handle_signal(actp=<unavailable>, sig=<unavailable>, info=<unavailable>, ucp=<unavailable>) + 234 at thr_sig.c:240
    frame #15: 0x0000000805d1afc2 libthr.so.3`thr_sighandler(sig=<unavailable>, info=<unavailable>, _ucp=<unavailable>) + 306 at thr_sig.c:183
    frame #16: 0x00007ffffffff003
    frame #17: 0x0000000805d1fc7e libthr.so.3`cond_wait_common [inlined] cond_wait_user(mp=<unavailable>, abstime=<unavailable>, cancel=1) + 239 at thr_cond.c:255
    frame #18: 0x0000000805d1fb8f libthr.so.3`cond_wait_common(cond=<unavailable>, mutex=<unavailable>, abstime=0x0000000000000000, cancel=1) + 367 at thr_cond.c:311
    frame #19: 0x00000008013450d2 liblldb.so.3.5`lldb_private::Condition::Wait(lldb_private::Mutex&, lldb_private::TimeValue const*, bool*) + 146

llvm-svn: 202154
2014-02-25 14:20:14 +00:00
Jim Ingham 5881318c88 Allow debugserver to detach from the target if the connection is
unexpectedly closed.

llvm-svn: 202110
2014-02-25 04:53:13 +00:00
Greg Clayton e68f5d6b69 Fixed the command line LLDB so that "CTRL+C" will interrupt a running process again.
llvm-svn: 202086
2014-02-24 22:50:57 +00:00
Jim Ingham 40083a4326 Don’t process the stop reply packet as a generic signal if we already figured out what it was from other data in the packet.
llvm-svn: 202066
2014-02-24 19:49:46 +00:00
Steve Pucci 3c5d3339be Fix handling of gdbserver binary packets with escape characters.
We were not properly handling the escape character 0x7d ('}') in responses
from gdbserver which used the binary protocol.

llvm-svn: 202062
2014-02-24 19:07:29 +00:00
Greg Clayton 039697513e LLDB now handles DW_TAG_unspecified_parameters nested inside function prototypes and we now mark the function prototypes as being variadic.
<rdar://problem/16149526> 

llvm-svn: 202061
2014-02-24 18:53:11 +00:00
Ed Maste c00c6e661f Remove TestConnectRemote decorator for FreeBSD
Failure is not reproducible on ToT LLDB locally or on the buildbot.

llvm.org/pr18313

llvm-svn: 202043
2014-02-24 15:10:00 +00:00
Ed Maste c099c958bc Fix ptrace log on i386 and include return value
Patch by Matthew Gardiner

llvm-svn: 202036
2014-02-24 14:07:45 +00:00
Deepak Panickal b98a2bb7a8 Patch for fixing the handling of hardware breakpoints.
Differential Revision: http://llvm-reviews.chandlerc.com/D2826

llvm-svn: 202028
2014-02-24 11:50:46 +00:00
Ed Maste 9cd270e26e Stop skipping test on FreeBSD that no longer fails
llvm.org/pr17232

llvm-svn: 201928
2014-02-22 03:13:12 +00:00
Jim Ingham eac0aa47b4 Oops, probably ought to turn on that fix...
llvm-svn: 201897
2014-02-21 22:36:11 +00:00
Jim Ingham 9d67cc59c4 We have to call waitpid on the lldb side for Mac OS X (even though we've successfully called it
on the debugserver side) when we kill a process or it leaves a zombie around.

llvm-svn: 201896
2014-02-21 22:35:29 +00:00
Greg Clayton 700e5085eb Improved the GDBRemoteCommunicationClient::TestPacketSpeed() function so it tests how long it takes to send a 4MB buffer from the REMOTE GDB server to LLDB.
llvm-svn: 201875
2014-02-21 19:11:28 +00:00
Greg Clayton e5671d9cee Add support for the qSpeedTest packet so we can test packet speeds and data throughput.
llvm-svn: 201874
2014-02-21 19:08:33 +00:00
Greg Clayton b922aa9efc Remove the packet speed lines that were "#if 0"'ed out.
llvm-svn: 201873
2014-02-21 19:07:27 +00:00
Greg Clayton 8fe3d4779d Don't crash when we build with python enabled, yet we don't link in the lldb::SB* API layer.
Previously the lldb-platform and lldb-gdbserver would crash.

llvm-svn: 201872
2014-02-21 19:06:44 +00:00
Sylvestre Ledru f561a01a12 remove dead code + simplify a little
llvm-svn: 201865
2014-02-21 18:08:09 +00:00
Jason Molenda 31d7ad4ecf Add a new idea of a "fallback" UnwindPlan to the RegisterContextLLDB
class.  If we try to unwind a stack frame to find a caller stack
frame, and we fail to get a valid-looking frame, AND if the UnwindPlan
we used is an assembly-inspection based UnwindPlan, then we should 
throw away the assembly-inspection UnwindPlan and try unwinding with 
the architectural default UnwindPlan.  

This code path won't be taken if eh_frame unwind instructions are available -
lldb will always prefer those once it's off the zeroth frame.

The problem I'm trying to fix here is the class of unwind failures that
happen when we have hand-written assembly on the stack, with no eh_frame,
and lldb's assembly parser fails to understand the assembly.  People usually
write their hand-written assembly to follow the frame-pointer-preserving
conventions of the platform so the architectural default UnwindPlan will 
often work.  We won't have the spill location for most of the non-volatile
registers if we fall back to this, but it's better than stopping the unwind
prematurely.

This is a bit of a tricky change that I believe is correct, but if we get
unwinds that go of into the weeds / unwind bogus frames at the end of the
stack, I'll need to revisit it.

<rdar://problem/16099440> 

llvm-svn: 201839
2014-02-21 05:20:25 +00:00
Jim Ingham 90331d5cf4 There’s no need to call posix_spawnp_setbinpref_np when we are launching in the shell. That only sets the architecture of the shell, we use “arch —arch” to actually pick the binary we actually want to launch’s architecture.
<rdar://problem/16103187>

llvm-svn: 201831
2014-02-21 01:25:21 +00:00
Ed Maste 4fe0aba12b On FreeBSD "x86_64" is spelled "amd64"
llvm-svn: 201802
2014-02-20 18:40:01 +00:00
Hafiz Abid Qadeer d48460fefe Add example target description file for QEMU for x86-64.
llvm-svn: 201790
2014-02-20 14:02:56 +00:00
Hafiz Abid Qadeer 673b4a3fd1 Improve the handling of stop-reply packet when it does not contain
thread information.

llvm-svn: 201773
2014-02-20 10:23:20 +00:00
Juergen Ributzka a864ce741e Revert "Track Clang virtualFileSystem change (r201618)"
This reverts commit r201671, because the clang changes have been reverted.

llvm-svn: 201759
2014-02-20 06:49:12 +00:00
Jim Ingham ff26163768 Don't have both lldb and debugserver call waitpid on the target process. This sets up a race condition,
and if lldb wins, then debugserver won't get the correct error status to lldb.

<rdar://problem/16030008>

llvm-svn: 201744
2014-02-20 00:52:37 +00:00
Jason Molenda 5a0dd572a8 Add newline at end of file, clang compiler warning.
llvm-svn: 201743
2014-02-20 00:07:30 +00:00
Sean Callanan 92cdbc8f2d Emit a warning diagnostic if a symbol was promoted
to a variable.  This helps people figure out what
happened if they tried to do something to the variable
and it didn't work because we gave it the default type
of void*.

llvm-svn: 201737
2014-02-19 23:37:25 +00:00
Ed Maste dc97e23b02 Disable breakpoint sites upon detach on FreeBSD
llvm.org/pr18894

llvm-svn: 201724
2014-02-19 22:12:57 +00:00
Enrico Granata 8a2a0dfba5 Restore the ability of SBFrame::FindValue() to look for file global variables
This should clean up the new test failures caused by r201614

llvm-svn: 201710
2014-02-19 19:35:13 +00:00
Ed Maste c30e764942 Treat 'amd64' as 'x86_64' as done for other tests
And add a decorator for llvm.org/pr18200

Patch by John Wolfe.

llvm-svn: 201708
2014-02-19 18:55:39 +00:00
Ed Maste a4be2c5dcd FreeBSD hardware watchpoint implementation
Implement x86_64 debug register read/write in support of hardware
watchpoints. Hoist LinuxThread::TraceNotify code back into
POSIXThread::TraceNotify()

Patch by John Wolfe.

We still need to rework this later to avoid the #ifdef FreeBSD.

llvm-reviews.chandlerc.com/D2572
llvm.org/pr16706

llvm-svn: 201706
2014-02-19 18:34:06 +00:00
Ed Maste 01fd1c60cd Update decorator for test that still fails with FreeBSD Watchpoint support
llvm.org/pr18832

llvm-svn: 201705
2014-02-19 18:26:48 +00:00
Ed Maste 954e4b9259 Track Clang virtualFileSystem change (r201618)
Clang now requires calling CompilerInstance::createVirtualFileSystem
before CompilerInstance::createFileManager.

llvm-svn: 201671
2014-02-19 13:00:08 +00:00
Deepak Panickal 6d3df420d2 Initial patch for supporting Hexagon DSP
llvm-svn: 201665
2014-02-19 11:16:46 +00:00
Jason Molenda 9c37cbdb86 Re-apply r201292. We're not going to enforce proper stack frame alignment on i386/x86_64
because there are too many trap handlers that will have an improperly aligned caller sp 
and this will cause the unwinder to stop too early.  

llvm-svn: 201637
2014-02-19 03:42:19 +00:00
Enrico Granata bdab3dee8f <rdar://problem/15906684>
The way in which we were determining whether a python module had already been imported in the current session stopped working due to the IOHandler changes
As a result, importing in a new debug session a module which had been imported in a previous session did not work
This commit restores that functionality by checking for the module's presence in the session dictionary (which should be more correct anyway)

llvm-svn: 201623
2014-02-19 01:45:22 +00:00
Enrico Granata 08a04327a9 <rdar://problem/15960553>
Fix a bug where calling SBFrame::FindValue() would cause a copy of all variables in the block to be inserted in the frame's variable list, regardless of whether those same variables were there or not - which means one could end up with a frame with lots of duplicate copies of the same variables

llvm-svn: 201614
2014-02-18 23:48:11 +00:00
Jason Molenda 7b535d5453 Also recognize interrupt as a possible trap handler name.
llvm-svn: 201611
2014-02-18 22:48:27 +00:00
Jason Molenda 33489c1678 Add two additional trap handler names for PlatformDarwinKernel.
<rdar://problem/15246793> 

llvm-svn: 201609
2014-02-18 22:35:38 +00:00
Ed Maste 63f358baad Eliminate kernel warning when running tests on FreeBSD
pexpect had a hack to work around some old buggy platforms, and as a
result of the hack running the tests on FreeBSD produced a stream of
kernel warnings in the system log:

  Feb 5 17:19:11 feynman kernel: WARNING pid 11323 (python2.7):
    ioctl sign-extension ioctl ffffffff80087467

The hack has now been removed upstream, so remove it here too.

llvm.org/pr18749

llvm-svn: 201603
2014-02-18 21:33:10 +00:00
Enrico Granata 9422fd0c14 Make sure we don't try to print the SystemExit exception, or we will cause the containing process to exit() from under us
llvm-svn: 201600
2014-02-18 20:00:20 +00:00
Jim Ingham 1e9947a56d Move the libpanel dependency into the Libraries project folder.
llvm-svn: 201596
2014-02-18 19:22:13 +00:00
Jim Ingham a524a46fde Convert to codesigning by hand to work around bugs in Xcode cert verification.
llvm-svn: 201595
2014-02-18 19:11:49 +00:00
Ed Maste 330fd535f8 elf-core: support 32- and 64-bit x86 registers
This way the same RegisterContext class can support i386 and
amd64/x86_64 core files.

With some further refinement we should be able to merge all of the
processor-specific RegisterContextPOSIX_* classes into a single shared
one.

llvm-svn: 201577
2014-02-18 15:12:35 +00:00
Sean Callanan 11e32d3db4 Properly report when a struct is anonymous.
<rdar://problem/16071066>

llvm-svn: 201539
2014-02-18 00:31:38 +00:00
Deepak Panickal ff4ac8a6e7 Replaced custom variable arguments to standard library for correcting 64 bit Windows build
llvm-svn: 201523
2014-02-17 17:52:22 +00:00
Deepak Panickal 94667bcf70 Fix Windows build, broken by the inclusion of sys/ioctl.h and isatty()
llvm-svn: 201522
2014-02-17 17:43:39 +00:00
Deepak Panickal 0db9d32ff7 Fix the LLDB prompt for older Editline versions, specifically running on Ubuntu 12.04
llvm-svn: 201521
2014-02-17 17:42:25 +00:00
Deepak Panickal f275d09a34 Remove nativecodegen as it forces the native target libraries to be linked in regardless of whether the target was specified in LLVM_TARGETS_TO_BUILD
llvm-svn: 201519
2014-02-17 17:39:27 +00:00
Ed Maste ff8e5f2587 elf-core: Plug latent memory leak
ProcessElfCore::ParseThreadContextsFromNoteSegment was leaking
ThreadData for each ELF note found in core file.  We now allocate it
only once and use std::unique_ptr to ensure it is always being freed.

While at it make ParseFreeBSDThrMisc and ParseFreeBSDPrStatus take
ThreadData by reference, rather than pointer, since those arguments are
not optional.

Patch by Piotr Rak.

http://llvm-reviews.chandlerc.com/D2813

llvm-svn: 201473
2014-02-16 04:01:54 +00:00
Ed Maste 8b5e46a159 Simplify core file register context handling
This seems like a more straightforward approach for instantiating the
appropriate RegisterContext* class, made possible by Michael Sartain's
cleanup of the POSIX RegisterContext class hierarchy in r190647.

Better (user-facing) error handling is still needed.

llvm-svn: 201457
2014-02-15 02:31:22 +00:00
Enrico Granata 465f4bc287 <rdar://problem/16006373>
Revert the spirit of r199857 - a convincing case can be made that overriding a summary's format markers behind its back is not the right thing to do
This commit reverts the behavior of the code to the previous model, and changes the test case to validate the opposite of what it was validating before

llvm-svn: 201455
2014-02-15 01:24:44 +00:00
Jason Molenda 2a6c252df2 Add some additional logging to the Mac OS X SystemRuntime. Fix a bug where lldb could free an inferior's vm_page.
llvm-svn: 201447
2014-02-15 00:20:40 +00:00
Ed Maste 92b1f7e4f9 Allow FreeBSD/i386 core files to be loaded
llvm-svn: 201435
2014-02-14 21:57:27 +00:00
Ed Maste 8b4a283234 Correct offset calculation for FreeBSD i386 core NT_PRSTATUS
llvm-svn: 201434
2014-02-14 21:29:05 +00:00
Ed Maste 96d7f449b1 Adjust logging test case after r201372
The final "HandleCommand, command succeeded" for "log disable lldb"
doesn't make it to the log file before the command takes effect.

llvm-svn: 201422
2014-02-14 16:06:35 +00:00
Ed Maste 96430645eb Update decorators for tests that still fail with FreeBSD Watchpoint support
llvm.org/pr18832

Reported by John Wolfe

llvm-svn: 201418
2014-02-14 14:52:10 +00:00
Jason Molenda 026f389117 Fix minor build warning on Mac OS X x86_64.
llvm-svn: 201387
2014-02-14 05:16:17 +00:00
Jason Molenda a4bea72ee7 Add a new target setting, trap-handler-names, where a user can
specify a list of functions which should be treated as trap handlers.
This will be primarily useful to people working in non-user-level
process debugging - kernels and other standalone environments.
For most people, the trap handler functions provided by the Platform
plugin will be sufficient.

<rdar://problem/15835846>, <rdar://problem/15982682> 

llvm-svn: 201386
2014-02-14 05:06:49 +00:00
Greg Clayton e98008cc58 Fixed deadlocks that could occur when using python for breakpoints, operating system plugins, and other async python usage.
<rdar://problem/16054348>
<rdar://problem/16040833>

llvm-svn: 201372
2014-02-13 23:34:38 +00:00
Jason Molenda abba74b4ee Revert r201292 which relaxed the stack frame alignment requirements.
This was primarily working around problems where we weren't able
to identify trap handlers for different environments -- but instead,
I'm working to make it easier to specify those trap handler function
names.

llvm-svn: 201366
2014-02-13 23:29:36 +00:00
Jason Molenda 2094dbf4e7 Change the way the m_trap_handlers Platform base class ivar is initialized;
add a new pure virtual CalculateTrapHandlerSymbolNames() that Platform 
subclasses must implement which fills in the function name list with any
trap handlers that are expected on that platform.

llvm-svn: 201364
2014-02-13 23:11:45 +00:00
Todd Fiala 6bb55ba42b Re-enable TestAbbreviations.py on Linux after test fix.
See http://llvm.org/bugs/show_bug.cgi?id=18816.

llvm-svn: 201357
2014-02-13 19:21:13 +00:00
Greg Clayton 8b963bbd07 Fixed a test suite failure on Darwin due to logging issues.
llvm-svn: 201356
2014-02-13 18:30:23 +00:00
Ed Maste 800e12ac81 Avoid undesired variable shadowing
Michael Sartain refactored RegisterContextPOSIX_* in r192332, and I must
have missed the now-shadowed variable when I rebased the FreeBSD MIPS64
register context after that.

llvm-svn: 201334
2014-02-13 15:12:57 +00:00
Jason Molenda 6223db2778 The Platform base class now maintains a list of trap handlers
aka asynchronous signal handlers, which subclasses should fill
in as appropriate.  For most Unix user process environments,
the one entry in this list is _sigtramp.  For bare-board and
kernel environments, there will be different sets of trap 
handlers.

The unwinder needs to know when a frame is a trap handler 
because the rules it enforces for the frame "above" the
trap handler is different from most middle-of-the-stack frames.

<rdar://problem/15835846> 

llvm-svn: 201300
2014-02-13 07:11:08 +00:00
Jason Molenda 9098f1d3d9 Change the ABI CallFrameAddressIsValid methods for i386 and x86_64.
They were enforcing 16-byte alignment on stack frames for Darwin x86 programs.
But we've found that trap handlers typically don't have the stack pointer
aligned correctly when a trap happens and lldb wasn't backtracing all
the way through.  This method is only used as a safety guard to prevent
lldb's unwinder from using a bogus address as a stack frame - we'll still
enforce word-size alignment on stack frames so that should be fine.

Also rolled back akaylor's changes from August 2013 in r188952 which changed
the i386 ABI plugin to relax the CallFrameAddressIsValid offsets for non-Darwin
targets where only 4-byte alignment is enforced.  Now Darwin is the same as
those environments.

<rdar://problem/15982682> 

llvm-svn: 201292
2014-02-13 04:19:32 +00:00
Ed Maste 2a798d9c05 Remove decorator for fixed test
llvm.org/pr18805 fixed by r201270

llvm-svn: 201284
2014-02-13 01:10:20 +00:00
Greg Clayton c7d8885be4 Fixed the TestLogging test.
llvm-svn: 201273
2014-02-12 23:46:08 +00:00
Greg Clayton fdde7ccf37 Fixed the functionalities/abbreviation/TestAbbreviations.py test case.
llvm-svn: 201270
2014-02-12 23:40:31 +00:00