Commit Graph

8822 Commits

Author SHA1 Message Date
Ed Maste abb813275f Address warnings in EmulateInstructionARM64
- Remove default for switch which covers all enumeration values

- Remove unused functions
  LSL_C is left in the source under #if 0, as it may be needed in the
  future for emulating other instructions.

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

llvm-svn: 207449
2014-04-28 21:34:04 +00:00
Todd Fiala 9164d9b304 Fixed up lldb-gdbserver to match slightly different debugserver listener host:port message.
Fixed up typo in lldb-gdbserver name missed when working on the OS X side earlier today for debugserver support.

llvm-svn: 207398
2014-04-28 06:04:46 +00:00
Todd Fiala a41d48cac8 Added two new test types: @debugserver_test and @llgs_test.
TestLldbGdbServer now supports both lldb-gdbserver (llgs) and
debugserver tests.  Similar to the dsym/dwarf tests, they allow
running the same underlying gdb remote protocol tests against
lldb-gdbserver and debugserver.  This will help make sure the
protocol-level tests for lldb-gdbserver faithfully represent
what debugserver does on OS X.

Switched back gdb remote protocol test logging to warning
and above (accidentally submitted it at debug level in a
recent commit).

llvm-svn: 207395
2014-04-28 04:49:40 +00:00
Greg Clayton 28432c24e9 Since one or more Editline instances of the same kind (lldb commands, expressions, etc) can exist at once, they should all shared a ref counted history object.
Now they do.

llvm-svn: 207293
2014-04-25 23:55:26 +00:00
Greg Clayton ed6499fe64 Free the strong reference to a lldb::SBDebugger that the script interpreter was holding onto in the "lldb.debugger" global variable.
llvm-svn: 207292
2014-04-25 23:55:12 +00:00
Todd Fiala 260323dba6 Added TestLldbGdbServer test for A start exe packet.
Fixed up bug in XFAIL tests where I appended an array when I intended to merge an array.

llvm-svn: 207285
2014-04-25 23:08:24 +00:00
Todd Fiala 98118c38a3 Prevent TestLldbGdbServer shutdown cleanup failures from failing the test.
Adds try/except blocks around clean-up code. Prevents a race between gdb
remote kill command reception by llgs (which leads llgs to shut down)
and the pexpect server kill (which can fail if the kill command handling
completes first). Warnings are emitted on the logger for any clean-up
code that fails.

llvm-svn: 207273
2014-04-25 21:09:28 +00:00
Todd Fiala 6817df65f0 Modify TestSettings test for stderr.txt/stdout.txt to ignore an
optional path prior to the file base name.

On Linux x86_64 (Ubuntu 12.04) I am sometimes getting a full path
on the stderr.txt.  This changes the test for target.error-path and
target.output-path settings to ignore any optional directory before
the expected file base name.

llvm-svn: 207272
2014-04-25 21:04:48 +00:00
Dmitri Gribenko e601d78f94 Attempt to fix the build
It looks like on 18th April clang added dependency from clangCodeGen.a to
LLVMProfileData.a and since then lldb have problem with linking to
clangCodeGen.a due to missing symbols.

This adds LLVMProfileData.a to USEDLIBS to fix that problem.

Patch by Robert Matusewicz.

llvm-svn: 207216
2014-04-25 09:49:32 +00:00
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