Commit Graph

8813 Commits

Author SHA1 Message Date
Greg Clayton 0c4129f2f7 Make sure that the CommandInterpreter::m_command_io_handler_sp gets reset when we quit.
Currently if you run _any_ python, python has the "lldb.debugger" global variable and it has a strong reference to a lldb_private::Debugger since it is a lldb::SBDebugger object with a shared pointer.

This makes sure that your LLDB command interpreter history is saved each time you quit command line LLDB.

llvm-svn: 207164
2014-04-25 00:35:14 +00:00
Jason Molenda a0560152cb Only allow on thread to run when calling libBacktraceRecording.
Make sure the timeout is set to 0.5s for these.
<rdar://problem/16719510> 

llvm-svn: 207163
2014-04-25 00:06:26 +00:00
Jason Molenda 2dd5deb1e6 Missed this file with the r207160 commit.
llvm-svn: 207161
2014-04-25 00:02:11 +00:00
Jason Molenda b9ffa98cab Add a new SBThread::GetQueue() method to get the queue that is
currently associated with a given thread, on relevant targets.

Change the queue detection code to verify that the queues 
associated with all live threads are included in the list.
<rdar://problem/16411314> 

llvm-svn: 207160
2014-04-25 00:01:15 +00:00
Greg Clayton b0d5e4d6ed Remove print statements I was using to debug this script additions.
llvm-svn: 207150
2014-04-24 22:05:25 +00:00
Greg Clayton 676d4de918 Fix the build-llvm.pl to use glob to find all llvm and clang .a files for libllvmclang.a.
llvm-svn: 207149
2014-04-24 21:53:40 +00:00
Sean Callanan 4640a01c1c Fixed a flipped conditional when writing back the
values of variables in the Materializer.

The Materializer should not write the variable
back if its new value is the *same* as the old
value, not if the new value is *different*.

<rdar://problem/16712205>

llvm-svn: 207148
2014-04-24 21:43:04 +00:00
Greg Clayton 4296c221d3 Fixed an issue where we would try to interrupt a process while it is in the process of naturally stopping due to another reason (breakpoint, or step).
Added a new MachProcess::Interrupt() which correctly tracks such cases and "does the right thing".

<rdar://problem/16593556>

llvm-svn: 207139
2014-04-24 19:54:32 +00:00
Enrico Granata 6bfbdc55f8 Making a SharingPtr out of a nullptr_t should be a safe and allowed operation
llvm-svn: 207129
2014-04-24 17:28:09 +00:00
Ed Maste 97b9dfaa3d If CMake finds a python interpreter, use it
The FreeBSD package building cluster installs e.g. 'python2.7', but no
plain 'python' to avoid version-related issues.

CMake's FindPythonInterp locates an interpreter with such a name and
provides it in the PYTHON_EXECUTABLE variable.  Use that if it's set,
falling back to the original '/usr/bin/env python' otherwise.

Patch by Brooks Davis in FreeBSD ports commit r352012

llvm-svn: 207122
2014-04-24 16:18:21 +00:00
Colin Riley dabdca14f3 Windows Fix: added inttypes.h. Introduces macro redefinition warnings due to LLVM itself externally defining the PRI macros, but now builds on vs2013.
llvm-svn: 207100
2014-04-24 11:59:56 +00:00
Enrico Granata 8a068e6c43 Allow summary formatters to take ValueObjects into account when deciding whether values/children should be printed and if child names should be shown
This decision has always been statically-bound to the individual formatter. With this patch, the idea is that this decision could potentially be dynamic depending on the ValueObject itself

llvm-svn: 207046
2014-04-23 23:16:25 +00:00
Greg Clayton 885a33a0a3 Remove the using namespace directives to make it clear where code is scoped.
llvm-svn: 207041
2014-04-23 22:20:25 +00:00
Greg Clayton cc3594d6ee Change the default key bindings for multi-line mode:
Up/down arrows select next/prev line in multi-line mode
CTRL+N and CTRL+P do next/prev history

llvm-svn: 207033
2014-04-23 21:42:31 +00:00
Greg Clayton 90e9692d05 Fixed a case where if someone added a "bind -v" to their ~/.editrc file, key mappings would get messed up.
I fixed this by only doing el_set(e, EL_BIND, ...) calls before sourcing the .editrc files.

<rdar://problem/16614095>

llvm-svn: 207005
2014-04-23 17:57:26 +00:00
Ed Maste 8ddc423afa Honour DESTDIR when installing LLDB python module
llvm-svn: 206978
2014-04-23 12:59:28 +00:00
Ed Maste 433790a69c Remove duplication in expectedFailure* decorators
Differential Revision: http://reviews.llvm.org/D3452

llvm-svn: 206976
2014-04-23 12:55:41 +00:00
Colin Riley 8c3b9ef024 Windows fix: Need to ensure all APIs are forward decl'd with LLDB_API. If not then frontend linker errors appear due to dllexport differences. There may be some others missing, will commit as I find them.
llvm-svn: 206958
2014-04-23 09:18:30 +00:00
Todd Fiala ed7a08ec7f Added a packet-playback test facility for lldb-gdbserver and a few starter tests.
lldbgdbserverutils.py has a new expect_lldb_gdbserver_replay() method
that plays back gdb remote send/receive packets. These packets are the
log lines that come from running the 'log enable gdb-remote packets',
either from the lldb-gdbserver side or the lldb side. There's a flag
to flip which side is the send (lldb-gdbserver input or lldb-gdbserver
output).

This first checkin tests the initial gdbremote handshake, the ability
to turn on the no-ack mode communication style, thread suffix support,
and list threads in stop reply support. The last two are marked xfail
as top of tree does not yet support these.

 --This line, and those below, will be ignored--

M    test/tools/lldb-gdbserver/TestLldbGdbServer.py
M    test/tools/lldb-gdbserver/lldbgdbserverutils.py

llvm-svn: 206930
2014-04-22 23:16:53 +00:00
Ed Maste ec4f47ed1c Switch to Darwin decorator for tests that XPASS on FreeBSD
Since these tests pass on (at least some) other platforms, change the
decorators to @expectedFailureDwarwin.  Tested on FreeBSD with Clang 3.4
and libc++.

rdar://9980907
rdar://15367233

llvm-svn: 206895
2014-04-22 13:42:05 +00:00
Ed Maste bcd2cacb2e Note that the FreeBSD x86_64 buildbot uses CMake
The other buildbots in the list include their build method.

llvm-svn: 206892
2014-04-22 13:20:20 +00:00
Jason Molenda 48cd333b7c When increasing the amount of a file read, read the total of the Mach-O header
plus the size of the load commands in case the LC_UUID load command comes near
the end of the file.
<rdar://problem/16599318> 

llvm-svn: 206865
2014-04-22 04:52:30 +00:00
Saleem Abdulrasool 64e48d72f4 build: use keyword signatures for link dependencies
This updates the target_link_libraries invocation when building with CMake
2.8.12 or newer.  The newer version of CMake warns when keyword and plain
signatures are used for target_link_libraries.  This addresses that difference
while maintaining compatibility with the older releases by defining a macro for
the keyword that is defined based on the current version of CMake.

Patch originally by chapuni!

llvm-svn: 206850
2014-04-22 03:18:34 +00:00
Jim Ingham 23ef27cd46 Give the clang functions names. This is only for logging.
llvm-svn: 206836
2014-04-22 01:42:22 +00:00
Jim Ingham fd95f8961e Make RunThreadPlan start the timeout clock for each part of the expression evaluation AFTER the
successful resume for that part.  This will make the timeouts more stable when lldb is running
in a busy program.

llvm-svn: 206835
2014-04-22 01:41:52 +00:00
Ed Maste a56bd2ed29 Update FreeBSD: Threads and Watchpoints generally work
llvm-svn: 206787
2014-04-21 20:43:20 +00:00
Sylvestre Ledru b96ca6b0c8 Remove useless declaration
llvm-svn: 206764
2014-04-21 17:43:17 +00:00
Todd Fiala 5d66da70d8 TestPtrRef2Typedef.py change - take 2.
Our build is still getting this test to fail with the presence of const in
'(Foo &const) y = 0x' and '(Foo &&const) z = 0x'.  This change simply changes
the match substrings to ignore the portion after the final '&' and before the
closing ')'.  This should cover the presence (or absence) of the const qualifier.

llvm-svn: 206762
2014-04-21 17:09:35 +00:00
Ed Maste 7bff0b690e Remove decorator for now-passing test
The underlying issue was actually a Clang bug, now fixed.  The test now
reports XPASS for me locally and on the buildbot.

llvm.org/pr17183 (LLDB)
llvm.org/pr18950 (Clang)

llvm-svn: 206761
2014-04-21 15:24:07 +00:00
Ed Maste b6209ad8a6 Add a comment to tests that XPASS on FreeBSD
Perhaps these should be @expectedFailureDarwin instead of
@unittest2.expectedFailure (applying to all hosts); I'm not aware of
the details in the rdars.

Just add a comment for now, for the benefit of anyone investigating
FreeBSD test issues in the future.

rdar://9980907
rdar://15367233

llvm-svn: 206760
2014-04-21 15:19:18 +00:00
Ed Maste 626303568b Remove decorator for now-passing test
I am not sure if this is due to an LLDB change, or the fact that FreeBSD
now has Clang 3.4.

llvm.org/pr19075

llvm-svn: 206757
2014-04-21 14:43:18 +00:00
Ed Maste 1a85845b49 Revert "Fix TestPtrRef2Typedef with new const adornment on expected ref type."
The additional "const" breaks the FreeBSD buildbot, and does not appear
to be due to a LLVM or Clang change.  Revert the change while
investigating further.

This reverts revision 206619.

llvm-svn: 206751
2014-04-21 14:10:38 +00:00
Todd Fiala 132b880558 Added a basic connection test for lldb-gdbserver.
The lldb-gdbserver tests are skipped if the lldb-gdbserver exe cannot be found (currently only built for Linux and FreeBSD).  The lldb-gdbserver exe is found by the LLDB_EXEC environment variable, using the same dir as the lldb exe, and then replacing lldb with lldb-gdbserver.

llvm-svn: 206731
2014-04-21 05:30:08 +00:00
Ed Maste d4612ad0f3 Switch NULL to C++11 nullptr in source/Symbol and source/Utility
Patch by Robert Matusewicz

llvm-svn: 206713
2014-04-20 13:17:36 +00:00
Ed Maste d78c9576ca Switch NULL to C++11 nullptr in source/Interpreter
Patch by Robert Matusewicz

llvm-svn: 206711
2014-04-20 00:31:37 +00:00
Saleem Abdulrasool 97fb5e128a Utility: fix compilation on Linux
When compiling on Linux with GCC 4.8, compilation would fail due to the use of
the offsetof macro.  This is a standard macro, defined in stddef.h.  Include
this header to ensure that offsetof is declared.

llvm-svn: 206702
2014-04-19 21:18:28 +00:00
Sean Callanan af90cf528c Included <inttypes.h> in a few headers that were
using preprocessor constants for printf() format
specifications.

llvm-svn: 206679
2014-04-19 03:09:28 +00:00
Todd Fiala 31cb1b547d Marked TestAttachResume.process_attach_continue_interrupt_detach() as XFAIL on Linux per pr19478.
llvm-svn: 206620
2014-04-18 17:07:09 +00:00
Todd Fiala 18f4540f61 Fix TestPtrRef2Typedef with new const adornment on expected ref type.
llvm-svn: 206619
2014-04-18 17:04:21 +00:00
Todd Fiala 3dbe13f6a8 Address hung tests in Linux.
Follow-up patch coming to address test failures exposed by this change.

llvm-svn: 206618
2014-04-18 17:01:01 +00:00
Jason Molenda 3e46e20746 Add FreeBSDSignals.cpp to project file.
llvm-svn: 206524
2014-04-17 23:29:19 +00:00
Greg Clayton c71e7bc415 After updating to Xcode.5.1.1 LLDB framework stopped to support partial (only for STDIN) pseudo terminal usage in the debugging process.
Here is the fix resolving this issue.

Patch from Alexey Ushakov.

llvm-svn: 206476
2014-04-17 17:27:28 +00:00
Ed Maste 94ba368946 elf-core: Add FreeBSD signals
Sponsored by: DARPA, AFRL
Differential Revision: http://reviews.llvm.org/D3401

llvm-svn: 206469
2014-04-17 13:09:29 +00:00
Ed Maste 41736e3c0d elf-core: Strip trailing whitespace
llvm-svn: 206468
2014-04-17 13:06:49 +00:00
Ed Maste dbb67c46db Move FreeBSDSignals to Utility
It will shortly be need by FreeBSD elf core support on all hosts.

llvm-svn: 206466
2014-04-17 13:03:10 +00:00
Jim Ingham fe1c34266f Clean up the logic in setting timeouts a bit, and the logging as well.
llvm-svn: 206351
2014-04-16 02:24:48 +00:00
Jim Ingham b8cd5750b4 m_interrupt_sent wasn't being initialized, and wasn't being reset after an
interrupt.  Do both of those.

llvm-svn: 206350
2014-04-16 02:24:17 +00:00
Ed Maste 9b8d847b8f Add FreeBSD-specific SIGTHR and SIGLIBRT signals
llvm-svn: 206319
2014-04-15 20:22:32 +00:00
Sylvestre Ledru a3e4cebd96 Remove trailing spaces
llvm-svn: 206278
2014-04-15 12:08:57 +00:00
Sylvestre Ledru 5ac35ae6f7 Make LLDB builds against the current LLVM sources (modification on createMCDisassembler introduced by r206241)
llvm-svn: 206277
2014-04-15 12:07:25 +00:00