Commit Graph

8159 Commits

Author SHA1 Message Date
Eugene Zelenko e65b2cf297 Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in some files in source/Target/.
Simplify smart pointers checks in conditions. Other minor fixes.

llvm-svn: 255598
2015-12-15 01:33:19 +00:00
Kamil Rytarowski cec6b45aec Welcome to NetBSD signals
Summary:
Signals 1-32 are matching the default UNIX platform.

There are platform specific ones above 32.

From the `/usr/include/sys/signal.h` header:

```
#define SIGPWR          32      /* power fail/restart (not reset when caught) */
#ifdef _KERNEL
#define SIGRTMIN        33      /* Kernel only; not exposed to userland yet */
#define SIGRTMAX        63      /* Kernel only; not exposed to userland yet */
#endif
```

Reviewers: emaste, joerg

Subscribers: lldb-commits

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

llvm-svn: 255592
2015-12-15 00:50:19 +00:00
Jason Molenda 25d5b10b22 When constructing an address range to "step" or "next" through,
find the largest address range (possibly combining multiple 
LineEntry's for this line number) that is contiguous.

This allows lldb's fast-step stepping algorithm to potentially
run for a longer address range than if we have to stop at every
LineEntry indicating a subexpression in the source line.

http://reviews.llvm.org/D15407
<rdar://problem/23270882> 

llvm-svn: 255590
2015-12-15 00:40:30 +00:00
Kate Stone a11959dbf7 [Editline] Redesign automatic indentation fix command for robustness
The FixIndentationCommand implementation has proven to be fragile across various libedit iterations. This patch reworks the command to use the same basic strategy as when moving between lines in a multi-line edit session: when indentation changes are required, exit line editing completely and restart with amended content. This approach won't be susceptible to subtle behavior differences libedit has introduced over time.

llvm-svn: 255548
2015-12-14 21:43:59 +00:00
Omair Javaid af9a31aff3 Add failure paths to a few JSONNumber members
Differential revision: http://reviews.llvm.org/D15355

llvm-svn: 255499
2015-12-14 14:52:07 +00:00
Dawn Perchik b59257841e Fix scope-based lookup when more than one function is found.
When multiple functions are found by name, lldb removes duplicate entries of
functions with the same type, so the first function in the symbol context list
is chosen, even if it isn't in scope. This patch uses the declaration context
of the execution context to select the function which is in scope.

This fixes cases like the following:

    int func();
    namespace ns {
	int func();
	void here() {
	    // Run to BP here and eval 'p func()';
	    // lldb used to find ::func(), now finds ns::func().
	}
    }

Reviewed by: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D15312

llvm-svn: 255439
2015-12-12 19:31:41 +00:00
Jason Molenda a38312a9a4 Fix the L1 cache search in MemoryCache::Read to use the
stl upper_bound method instead of lower_bound - we were
failing to find some cached data in the L1 cache resulting
in extra memory read packets while stepping.

The bug with the existing code looked like this:
If the L1 cache has 8 bytes at address 0x1000 and 8 bytes
at address 0x2000 and we are searching for 4 bytes at 0x2004,
the use of lower_bound would return the end() of the container
and so we would incorrectly treat the memory as uncached.

(the L1 cache is memory seeded from debugserver in the T aka
questionmark packet, where debugserver will send up the stack
memory that likely contains the caller's stack pointer and 
frame pointer values.)

<rdar://problem/23869227> 

llvm-svn: 255421
2015-12-12 03:06:10 +00:00
Oleksiy Vyalov 9497cc2bf8 Remove unused mips typedefs.
llvm-svn: 255419
2015-12-12 02:13:17 +00:00
Ted Woodward 4062601cb9 Remove hardcoded registers from Hexagon ABI
Summary: The Hexagon ABI plugin uses hardcoded registers when setting up function calls. This is OK for the Hexagon simulator, but the register numbers are different on the gdbserver running on hardware. Change the hardcoded registers to LLDB generic registers.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 255374
2015-12-11 21:52:47 +00:00
Eugene Zelenko e2ccd33359 Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in source/Target/Target.cpp.
Simplify smart pointers checks in conditions.

llvm-svn: 255364
2015-12-11 19:52:15 +00:00
Sean Callanan d38f4d288f DisassemblerLLVMC now gets the disassembler comments for an instruction
and appends them to our list of comments (which can additionally include
things like decoded addresses).

llvm-svn: 255358
2015-12-11 19:10:04 +00:00
Ewan Crawford cdfb1485be [RenderScript] Support for amd64 RS hooks
Adds support for reading a maximum of six integer arguments from a renderscript hook on X86_64.
Author: Luke Drummond <luke.drummond@codeplay.com>

llvm-svn: 255338
2015-12-11 13:49:21 +00:00
Ted Woodward bff0a21b57 Add Hexagon ABI to System Initialization
Summary: When the Hexagon ABI was added, it was inadvertently left out of initialization/termination. This patch adds it.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 255268
2015-12-10 17:53:07 +00:00
Tamas Berghammer 257e13ae9a Add modules downloaded by ModuleCache to the global ModuleList
Adding the modules to the global module list eleminate issues in the
case when a module is unloaded from the target but some object (e.g.
breakpoint) still referencing them with weak pointers. It also speeds
up the case when we load, unload, load the same shared library because
the global module cache will keep the parsed debug info around between
the 2 load (this scenario happens for some code on android).

Differential revision: http://reviews.llvm.org/D15415

llvm-svn: 255260
2015-12-10 17:08:23 +00:00
Ewan Crawford 8b59062a32 [RenderScript] Refactor condition deciding when to JIT RS runtime
Patch creates a member function that decides when to JIT all the details about an allocation.
By checking for zero pointers we can avoid the situation where we store uninitialised data from previously inspecting the allocation during creation.

llvm-svn: 255238
2015-12-10 10:20:39 +00:00
Aidan Dodds 49ffb02a58 Differential Revision: http://reviews.llvm.org/D15333
llvm-svn: 255237
2015-12-10 10:11:49 +00:00
Ewan Crawford e69df38282 [RenderScript] Add hook for destroyed allocations
New hook for rsdAllocationDestroy() which is called when allocations are deleted.
LLDB should be aware of this so we can remove the allocation from our internal list.

llvm-svn: 255121
2015-12-09 16:01:58 +00:00
Sagar Thakur 4f58827a57 [LLDB][MIPS] Adding call to IsMSAAvailable() while creating RegisterInfoInterface
This patch will fix the test case test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_llgs_* of TestLldbGdbServer.py on mips. The test fails because we were sending RegisterInfo for msa registers to client even when msa registers are not available. With this commit server will send E45(end of resigters) response if msa registers are not available.

llvm-svn: 255108
2015-12-09 12:31:01 +00:00
Sean Callanan 77decf5f20 When printing warnings, the repeat_key should be
const void * because the data is never accessed,
the pointer is the only useful piece of data.

llvm-svn: 255090
2015-12-09 01:25:01 +00:00
Adrian McCarthy 278a6c952b Fix DoReadMemory for Windows mini dumps.
Differential Revision: http://reviews.llvm.org/D15359

llvm-svn: 255083
2015-12-09 00:29:38 +00:00
Ed Maste a3ad0f1e27 Remove default case in switch which covers all enumeration values
This also conveniently eliminates another warning from the unintentional
use of a trigraph:

warning: trigraph converted to '[' character [-Wtrigraphs]
        default: printf("???(%u)", type);
                          ^
llvm-svn: 255049
2015-12-08 20:50:35 +00:00
Greg Clayton dfc0962196 Change DeclContextFindDeclByName to return a vector of CompilerDecl objects. Opaque pointers should only be used for the decl context object. Also made a default implementation so that GoASTContext doesn't need to override DeclContextFindDeclByName.
llvm-svn: 255038
2015-12-08 18:39:50 +00:00
Tamas Berghammer 372810f5f5 Fix MSVC build after rL255016
llvm-svn: 255017
2015-12-08 14:27:40 +00:00
Tamas Berghammer ccd6cffba3 Modify "platform connect" to connect to processes as well
The standard remote debugging workflow with gdb is to start the
application on the remote host under gdbserver (e.g.: gdbserver :5039
a.out) and then connect to it with gdb.

The same workflow is supported by debugserver/lldb-gdbserver with a very
similar syntax but to access all features of lldb we need to be
connected also to an lldb-platform instance running on the target.

Before this change this had to be done manually with starting a separate
lldb-platform on the target machine and then connecting to it with lldb
before connecting to the process.

This change modifies the behavior of "platform connect" with
automatically connecting to the process instance if it was started by
the remote platform. With this command replacing gdbserver in a gdb
based worflow is usually as simple as replacing the command to execute
gdbserver with executing lldb-platform.

Differential revision: http://reviews.llvm.org/D14952

llvm-svn: 255016
2015-12-08 14:08:19 +00:00
Tamas Berghammer 4fbd67ac11 Add a new option to Platform::LoadImage to install the image
This change introduce 3 different working mode for Platform::LoadImage
depending on the file specs specified.
* If only a remote file is specified then the remote file is loaded on
  the target (same behavior as before)
* If only a local file is specified then the local file is installed to
  the current working directory and then loaded from there.
* If both local and remote file is specified then the local file is
  installed to the specified location and then loaded from there.

The same options are exposed on the SB API with a new method LoadImage
method while the old signature presers its meaning.

On the command line the installation of the shared library can be specified
with the "--install" option of "process load".

Differential revision: http://reviews.llvm.org/D15152

llvm-svn: 255014
2015-12-08 13:43:59 +00:00
Bhushan D. Attarde 56222509c3 [LLDB][MIPS] Handle PIC calling convention for MIPS32
SUMMARY:
    - PrepareTrivialCall() to setup register r25 with the address of function to be called.
    - RegisterIsCalleeSaved() to use name of a register instead of its byte_offset.
    
    Reviewers: clayborg
    Subscribers: mohit.bhakkad, sagar, jaydeep, lldb-commits
    Differential Revision: http://reviews.llvm.org/D15273

llvm-svn: 255005
2015-12-08 06:05:57 +00:00
Greg Clayton e6b36cdd4d Trying to submit 254476 one more time. This implement -gmodule debugging support.
It was previously reverted due to issues that showed up only on linux. I was able to reproduce these issues and fix the underlying cause.

So this is the same patch as 254476 with the following two fixes:
- Fix not trying to complete classes that don't have external sources
- Fix ClangASTSource::CompleteType() to check the decl context of types that it finds by basename to ensure we don't complete a type "S" with a type like "std::S". Before this fix ClangASTSource::CompleteType() would accept _any_ type that had a matching basename and copy it into the other type.

<rdar://problem/22992457>

llvm-svn: 254980
2015-12-08 01:02:08 +00:00
Ted Woodward 65a47b31b3 Fix watchpoint check to use watchpoint ranges
Summary: Watchpoints, unlike breakpoints, have an address range. This patch changes WatchpointList::FindByAddress() to match on any address in the watchpoint range, instead of only matching on the watchpoint's base address.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 254931
2015-12-07 19:38:58 +00:00
Ewan Crawford b1651b8d88 [RenderScript] Mips64 allocations workaround
Workaround for Mips64 compiler bug by using function pointers to call 
functions for expression evaluation. This avoids the emission of the JAL instruction, 
which can only jump within a particular range of the PC.

Author: Dean De Leo, dean@codeplay.com
llvm-svn: 254910
2015-12-07 13:50:32 +00:00
Pavel Labath 19da1f16c2 Recommit "Fix race during process interruption"
This is a resubmit of r254403, see that commit's message for context. This fixes an issue in the
original commit, where we would incorrectly interrupt the process if the interrupt request came
just as we were about to send the stopped event to the public.

llvm-svn: 254902
2015-12-07 12:36:52 +00:00
Kamil Rytarowski a019e81df9 Plug-in PlatformNetBSD initializer and terminator
Summary: Other platform parts needed to build this code are already merged.

Reviewers: emaste, clayborg

Subscribers: joerg, lldb-commits

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

llvm-svn: 254865
2015-12-05 21:46:37 +00:00
Zachary Turner 7d2d09842a Python 3 - Fix script import --allow-reload.
Differential Revision: http://reviews.llvm.org/D15209
Reviewed By: Todd Fiala

llvm-svn: 254791
2015-12-04 22:59:14 +00:00
Enrico Granata 4c2bf56850 Reduce memory traffic in ConstString in the std::map formatter
llvm-svn: 254787
2015-12-04 22:49:27 +00:00
Enrico Granata a0b75d7eb4 Do the same iterator caching optimization for std::map
This brings the timings down for 1500 elements from 166 to 2 seconds on my machine - if I can math correctly, that is a 98% improvement

llvm-svn: 254781
2015-12-04 22:25:52 +00:00
Adrian McCarthy 0c35cde9b1 Implement GetMemoryRegionInfo for mini dumps.
Differential Revision: http://reviews.llvm.org/D15218

llvm-svn: 254780
2015-12-04 22:22:15 +00:00
Kamil Rytarowski 8502545123 Fix typo in a comment
llvm-svn: 254768
2015-12-04 21:23:24 +00:00
Enrico Granata 26935d9a09 Cache the incremental iterators as you traverse the list, so that you don't have to keep recomputing them
If memory turns out to be a problem, which I don't think it will in practice because all these ValueObjects, we'd be keeping alive anyway, I can always resort to caching the farthest-most iterator only

This gains us an order of magnitude in my benchmark, cutting the time to traverse a 1500-elements list from 22 seconds down to 2

llvm-svn: 254762
2015-12-04 20:12:46 +00:00
Enrico Granata 367e2fe123 Improve the std::list data formatter to not need to calculate indices for every loop iteration
This saves about 5 seconds on a 1500 elements list from my local estimates

llvm-svn: 254757
2015-12-04 19:48:08 +00:00
Dawn Perchik f268357514 Fix breakpoint language filtering for other C variants (like C99) and Pascal.
This patch fixes setting breakpoints on symbol for variants of C and
Pascal where the language is "unknown" within the filter-by-language
process added in r252356. It also renames GetLanguageForSymbolByName to
GuessLanguageForSymbolByName and adds comments explaining the pitfalls
of the flawed assumption that the language can be determined solely from
the name and target.

Reviewed by: jingham
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D15175

llvm-svn: 254753
2015-12-04 19:34:00 +00:00
Greg Clayton b1583dc67d Fill in the generic register kind if in AugmentRegisterInfoViaABI if it is available.
llvm-svn: 254743
2015-12-04 18:37:48 +00:00
Tamas Berghammer 6d73750b2a Improve the functionality of JSONNumber
* Add support for representing signed integers
* Add new constructors taking any signed or unsigned integer types

Differential revision: http://reviews.llvm.org/D15187

llvm-svn: 254715
2015-12-04 13:23:35 +00:00
Jason Molenda afdf6cbf3c Add a space char so step logging doesn't print things like
"Stepping out from a.out`bar at a.c:3returning to frame"

llvm-svn: 254698
2015-12-04 02:52:49 +00:00
Enrico Granata f3129cbd84 Add a newline at the end of this file
llvm-svn: 254666
2015-12-03 23:53:45 +00:00
Oleksiy Vyalov 9ebe30b265 Fix in-memory section loading for JIT-ed code.
http://reviews.llvm.org/D15172

llvm-svn: 254638
2015-12-03 19:41:21 +00:00
Tamas Berghammer fcdde63ff4 Remove some duplicated code from PlatformPOSIX/Android
The code was duplicated to handle the custom symbol name for functions
in libdl.so for android. This change modify the way we handle the issue
to eliminate a lot of duplicated code.

Differential revision: http://reviews.llvm.org/D15183

llvm-svn: 254608
2015-12-03 12:58:03 +00:00
Jaydeep Patil 7b531c1a11 [LLDB][MIPS] Using enum instead of a constant to fetch PC and CAUSE registers.
SUMMARY:
    Using enum instead of a constant to fetch PC and CAUSE registers.

llvm-svn: 254590
2015-12-03 06:41:24 +00:00
Mohit K. Bhakkad 8be7499507 [LLDB] Switch to assembly view if source is moved
Reviewers: clayborg, jingham, jasonmolenda.
Subscribers: jaydeep, bhushan, sagar, nitesh.jain,lldb-commits.
Differential Revision: http://reviews.llvm.org/D12877

llvm-svn: 254588
2015-12-03 04:56:16 +00:00
Mohit K. Bhakkad 6846bc8de2 [LLDB][MIPS] fix watchpoint searched on client side for same masked variables
Reviewers: clayborg.
Subscribers: jaydeep, bhushan, sagar, nitesh.jain,lldb-commits.
Differential Revision: http://reviews.llvm.org/D15106

llvm-svn: 254522
2015-12-02 17:45:02 +00:00
Tamas Berghammer 3cb132a0f4 Fix "process load/unload" on android
On android the symbols exposed by libdl (dlopen, dlclose, dlerror)
prefixed by "__dl_". This change moves the handling of process
load/unload to the platform object and override it for android to
handle the special prefix.

Differential revision: http://reviews.llvm.org/D11465

llvm-svn: 254504
2015-12-02 11:58:51 +00:00
Tamas Berghammer fcf334b824 Revert "Added support for -gmodule debugging when debug info is left in the .o files on Darwin."
The commit caused a test failure on the linux buildbot in
TestDataFormatterSynthVal.

llvm-svn: 254502
2015-12-02 11:35:54 +00:00
Abhishek Aggarwal 296e063d8f PTRACE ABI to read FXSAVE area for 32-bit inferior
Summary:
 - Problem occurs when:
    -- 32-bit inferiors run on x86_32 machine and
       the architecture doesn't have AVX feature

    -- This causes FPRType to be set to eFPRTypeFXSAVE

    -- PTRACE_GETFPREGS was being used to read FXSAVE area

    -- For 32-bit inferiors running on x86_32 machine,
       PTRACE_GETFPREGS reads FSAVE area and not FXSAVE area

 - Changed ptrace API to PTRACE_GETREGSET for 32-bit inferiors
    -- This reads FPR data in FXSAVE format.
    -- For 64-bit inferiors, no change has been made.

 - Modified XFAIL for TestReturnValue.py
    -- Earlier, this test was passing for Linux OS
    -- Now, it passes for Android OS as well

Change-Id: Ieed72bc969b79516fc7b263b32493aa1e7a1a2ac
Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com>

Reviewers: ovyalov, jingham, lldb-commits, tberghammer, labath

Subscribers: jevinskie, labath, tberghammer, danalbert

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

llvm-svn: 254499
2015-12-02 09:40:17 +00:00
Greg Clayton 5dfc4a4d02 Added support for -gmodule debugging when debug info is left in the .o files on Darwin.
This is done by finding the types that are forward declarations that come from a module, and loading that module's debug info in a separate lldb_private::Module, and copying the type over into the current module using a ClangASTImporter object. ClangASTImporter objects are already used to copy types from on clang::ASTContext to another for expressions so the type copying code has been around for a while.

A new FindTypes variant was added to SymbolVendor and SymbolFile:

size_t
SymbolVendor::FindTypes (const std::vector<CompilerContext> &context, bool append, TypeMap& types);

size_t
SymbolVendor::FindTypes (const std::vector<CompilerContext> &context, bool append, TypeMap& types);

The CompilerContext is a way to represent the exact context of a type and pass it through an agnostic API boundary so that we can find that exact context elsewhere in another file. This was required here because we can have a module that has submodules, both of which have a "foo" type.

I am not able to add tests for this yet as we currently don't build our C/C++/ObjC binaries with the clang binary that we build. There are some driver issues where it can't find the header files for the C and C++ standard library which makes compiling these tests hard. We can't also guarantee that if we are building with clang that it supporst the exact format of -gmodule debugging that we are trying to test. We have had other versions of clang that had a different implementation of -gmodule debugging that we are no longer supporting, so we can't enable tests if we are building with clang without compiling something and looking at the structure of the DWARF that was generated to ensure that it is the format we can actually use.

llvm-svn: 254476
2015-12-02 00:43:32 +00:00
Pavel Labath 00fea63627 Revert "Fix race during process interruption"
The android buildbot gets quite flaky after this change. I'm reverting it while I investigate.

llvm-svn: 254430
2015-12-01 17:59:56 +00:00
Pavel Labath df55f522bd Fix race during process interruption
Summary:
The following situation was occuring in TestAttachResume:
- we did a "continue" from a breakpoint (which involves a private start-stop to step over the
  breakpoint)
- after receiving the stop-reply from the step-over, we issue a "detach" (which requires a
  process interrupt)
- at this moment, the public state is "running", private state is "about-to-be-stopped" (the
  stopped event was broadcast, but it was not received yet)
- StopForDestroyOrDetach (public thread) notes the public state is running, sends an interrupt
  request to the private thread
- private thread gets the eBroadcastBitInterrupt (before the eStateStopped message), and asks the
  process plugin to stop (via Halt())
- process plugin says it has nothing to do as the process is already stopped
- private thread shrugs and carries on. receives the stop event, restores the breakpoint and
  resumes the process.
- after a while, the public thread times out and says it failed to stop the process

This patch does the following:
- splits Halt() into two functions, private and public, their usage depends on the context
  - public Halt(): sends eBroadcastBitInterrupt to the private thread and waits for the Stop
    event
  - HaltPrivate(): asks the plugin to stop and makes a note that the halt was requested. When the
    next stop event comes it sets the interrupt flag on it.
- removes HijackPrivateProcessEvents(), as the only user (old Halt()) has gone away
- removes the m_currently_handling_event hack, as the new Halt() does not need it
- adds a use_run_lock parameter to public Halt() and WaitForProcessToStop(). This was needed
  because RunThreadPlan uses Halt() while holding the run lock and we don't want Halt() to take
  it away from him.

Reviewers: clayborg, jingham

Subscribers: lldb-commits

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

llvm-svn: 254403
2015-12-01 11:28:47 +00:00
Sagar Thakur d4eb7cc3f3 [LLDB][MIPS] Clear bug 25194 - LLDB-Server Assertion raised when single stepping on MIPS
This patch will clear bug 25194 - LLDB-Server Assertion raised when single stepping on MIPS. The problem was that while emulating instructions, old and new pc values would have garbage value in their upper 32 bits. Therefore checking if pc was changed (old_pc == new_pc) would always return false, because of which pc was not getting updated.

/* If we haven't changed the PC, change it here */
if (old_pc == new_pc)
{
    new_pc += 4;
    Context context;
        return false;
}

Reviewers: tberghammer, clayborg
Subscribers: dsanders, lldb-commits, mohit.bhakkad, bhushan, jaydeep, nitesh.jain
Differential: http://reviews.llvm.org/D14633
llvm-svn: 254379
2015-12-01 05:44:18 +00:00
Enrico Granata 7aafb6a1d5 Fix a bug where one-lining display of child values would ignore the user's choice of format
llvm-svn: 254349
2015-12-01 00:04:52 +00:00
Adrian McCarthy fe06b5ad04 Fix hang in global static initialization
Differential Revision: http://reviews.llvm.org/D15092

llvm-svn: 254338
2015-11-30 22:18:43 +00:00
Ewan Crawford 8b244e21d7 [RS] Support RenderScript struct allocations
This patch adds functionality for dumping allocations of struct elements. This involves:

    + Jitting the runtime for details on all the struct fields.

    + Finding the name of the struct type by looking for a global variable of the same type, which will have been reflected back to the java host code.

    + Using this struct type name to pass into expression evaluation for pretty printing the data for the dump command.

llvm-svn: 254294
2015-11-30 10:29:49 +00:00
Pavel Labath abadc22172 [LLGS] Don't forward I/O when process is stopped
Summary:
This makes sure we do not attempt to send output over the gdb-remote protocol when the client is
not expecting it (i.e., after sending the stop-reply packet). Normally, this should not happen
(the process cannot generate output when it is stopped), but due to the fact that pty
communication is asynchronous in the linux kernel (llvm.org/pr25652), we may sometimes get this
output too late. Instead, we just hold the output, and send it next time we resume. This is not
ideal, but at least it makes sure we do not violate the remote protocol. Given that this happens
extremely rarely it's not worth trying to work around it with sleeps or something like that.

I also remove the m_stdio_communication_mutex, as all of LLGS is now single-threaded anyway.

Reviewers: tberghammer, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 254200
2015-11-27 13:33:29 +00:00
Tamas Berghammer b4e95a50d7 Add 64/128 bit arm neon register definitions on linux
Differential revision: http://reviews.llvm.org/D14985

llvm-svn: 254152
2015-11-26 15:02:31 +00:00
Oleksiy Vyalov afd6ce4d29 Prevent ProcessGDBRemote from launching local debug server in case of remote debug server connection failure.
http://reviews.llvm.org/D14895

llvm-svn: 253906
2015-11-23 19:32:24 +00:00
Mohit K. Bhakkad 5a998ed7a6 [LLDB][MIPS] Getting 0 index for H/W watchpoint is not necessarily an error
Reviewers: jaydeep.
Subscribers: bhushan, sagar, nitesh.jain, lldb-commits.
Differential Revision: http://reviews.llvm.org/D14860

llvm-svn: 253864
2015-11-23 12:19:59 +00:00
Jason Molenda e92a74ce64 Add code to PlatformDarwin and HostInfoMacOSX so they return the
correct OS type when running on an apple tv or apple watch.
Also, in TargetList::CreateTargetInternal, check that a platform
is returned by GetPlatformForArchitecture fallback instead of 
adding it to the vector of platforms unconditionally; we can end up
crashing when we call a member function on it later.

<rdar://problem/23601982>, <rdar://problem/21292886>

llvm-svn: 253763
2015-11-21 04:00:43 +00:00
Adrian McCarthy f7d1893f5b Enable saving of mini dumps with lldb process save-core.
Also adds SB API to save a core and tests that use it.

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

llvm-svn: 253734
2015-11-20 23:09:11 +00:00
Sean Callanan aa4d7596f4 Newer versions of the ObjC runtime have an extra field in objc_opt_t.
llvm-svn: 253732
2015-11-20 22:59:57 +00:00
Ed Maste d550002c9d Call Platform::SetHostPlatform in the NetBSD platform only on NetBSD
Patch by Kamil Rytarowski

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

llvm-svn: 253699
2015-11-20 19:32:58 +00:00
Adrian McCarthy f9a2697e13 Revert "FOO"
Accidentally commited before I was done.

This reverts commit 2ec2da4ee52780582d5e9c88b2e982a688fbdbe1.

llvm-svn: 253685
2015-11-20 18:18:21 +00:00
Adrian McCarthy af75dab383 FOO
llvm-svn: 253684
2015-11-20 18:15:14 +00:00
Greg Clayton 9d47212194 Fix a crasher in SymbolContext::SortTypeList() where something that was iterating over a std::multimap was actually mutating the list.
<rdar://problem/23605600>

llvm-svn: 253618
2015-11-19 23:10:45 +00:00
Siva Chandra fc33b110bc Revert "Plug-in PlatformNetBSD initializer and terminator"
Summary:
This reverts commit 2354cd73101e58540b8b39783df462d06023309f as it
introduced a bunch regressions on the linux bot.

Reviewers: emaste, krytarowski

Subscribers: lldb-commits

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

llvm-svn: 253615
2015-11-19 22:58:48 +00:00
Enrico Granata 46252398f0 Fix up LLDB for a change in the way clang represents anonymous unions such that the 'frame variable' command can still find the members of such union as if they were top-level variables in the current scope
llvm-svn: 253613
2015-11-19 22:28:58 +00:00
Ed Maste 3190d17b12 Plug-in PlatformNetBSD initializer and terminator
Patch by Kamil Rytarowski

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

llvm-svn: 253601
2015-11-19 21:30:22 +00:00
Enrico Granata 0cf8c0468d Fix an issue where LLDB would not launch argdumper correctly if there were spaces in the path to it
llvm-svn: 253599
2015-11-19 21:17:56 +00:00
Jason Molenda f638ffddba I like how PlatformAndroid/PlatformLinux log when their platforms
try to CreateInstance, and log the results.  I copied that for the
Mac platforms.

llvm-svn: 253538
2015-11-19 03:15:37 +00:00
Enrico Granata 293207dd57 Pass the ExecutionContext as well, since it is actually useful
llvm-svn: 253537
2015-11-19 02:50:27 +00:00
Enrico Granata d4129b47d0 Allow the language plugins a say in how the function name is rendered as part of frame formatting
llvm-svn: 253531
2015-11-19 01:11:53 +00:00
Enrico Granata 3de08c5f0c Reapply r253423 and r253424 (which cleanup the data formatters iteration model, as well as the type X list commands), along with a change by Zachary Turner to bypass a MSVC bug with SFINAE
llvm-svn: 253493
2015-11-18 19:42:44 +00:00
Todd Fiala f6b2aa5882 remove defunct scripts/build-swig-wrapper-classes.sh; switch autoconf build to prepare_bindings.py.
Xcode moved off of build-swig-wrapper-classes.sh earlier this week.

llvm-svn: 253490
2015-11-18 19:34:03 +00:00
Tamas Berghammer 68aa90a11e Revert 2 commits breaking the MSVC build
Revert "Remove a few vestigial typedefs from the old world"
This reverts commit 05872cda2a00fbd988c4fc761b1f87fe9edce224.

Revert "Cleanup the type X list commands to use the new ForEach goodness"
This reverts commit 85b1d83819a22cdc9ef12f58fd4fa92b473a4f81.

llvm-svn: 253455
2015-11-18 12:11:34 +00:00
Enrico Granata a76e894bd5 Cleanup the type X list commands to use the new ForEach goodness
llvm-svn: 253423
2015-11-18 01:37:49 +00:00
Enrico Granata a2afcc9911 Cleanup indentation
llvm-svn: 253383
2015-11-17 21:55:09 +00:00
Enrico Granata 32936810c3 Cleanup the type X clear commands, so that one base class can implement all of them
llvm-svn: 253381
2015-11-17 21:43:55 +00:00
Enrico Granata be2e5fac68 Move this back to a pid_t; this file is OSX only anyway, and the signedness of pid_t is actually a thing we want here
llvm-svn: 253364
2015-11-17 19:35:26 +00:00
Jim Ingham 055a08a488 Add the ability (through the SB API & command line) to specify an address
breakpoint as "file address" so that the address breakpoint will track that
module even if it gets loaded in a different place.  Also fixed the Address
breakpoint resolver so that it handles this tracking correctly.

llvm-svn: 253308
2015-11-17 03:39:13 +00:00
Zachary Turner 32ac147b00 Python3 - Fix some issues related to `PythonFile` class.
Python 3 has lots of new debug asserts, and some of these were
firing on PythonFile.  Specifically related to handling of invalid
files.

llvm-svn: 253261
2015-11-16 22:40:12 +00:00
Enrico Granata 4fc8416181 Uniquify all the type X delete commands via one common base class
This removes a lot of code, which is A Good Thing(TM)

llvm-svn: 253140
2015-11-14 18:44:37 +00:00
Enrico Granata f7aaf04743 Some cleanup of the type X delete command
llvm-svn: 253137
2015-11-14 18:17:33 +00:00
Enrico Granata b56d01033e The existing logic to loop over formatters is very pre-C++11, using void* batons, and function pointers, and raw memory allocations instead of safer more modern constructs
This is a first pass at a cleanup of that code, modernizing the "type X clear" commands, and providing the basic infrastructure I plan to use all over
More cleanup will come over the next few days

llvm-svn: 253125
2015-11-14 05:44:23 +00:00
Enrico Granata 54c22c2245 Fixes for uniformity in type clear and delete commands
llvm-svn: 253113
2015-11-14 01:09:07 +00:00
Enrico Granata 6f6f7396ba Minor cleanup to the type format list command
llvm-svn: 253110
2015-11-14 00:58:21 +00:00
Enrico Granata 89d8ef7ee3 Upstream some data formatter related cleanups
llvm-svn: 253093
2015-11-13 21:55:41 +00:00
Zachary Turner 8f186f8574 Change the null check to an assert.
llvm-svn: 253092
2015-11-13 21:53:03 +00:00
Enrico Granata c26332abbd Fix indentation
llvm-svn: 253089
2015-11-13 21:37:47 +00:00
Zachary Turner c12392c956 Remove debugging code left in by accident.
llvm-svn: 253088
2015-11-13 21:35:07 +00:00
Zachary Turner 0ee8282f4a Add a null check against the ThreadPlan
I'm seeing some cases where the ThreadPlan is null.  It could
be a sign of a valid race condition, but at least we shouldn't
crash.

llvm-svn: 253086
2015-11-13 21:28:53 +00:00
Zachary Turner 2419f1d57c Modernize FormatBacktrace() and make portable for Python 3.
llvm-svn: 253085
2015-11-13 21:28:45 +00:00
Zachary Turner 1f1c5a7b44 Another fix for LLDB_DISABLE_PYTHON=1
llvm-svn: 253073
2015-11-13 20:28:31 +00:00
Zachary Turner a281b42b32 Make PythonDataObjects.h work when LLDB_DISABLE_PYTHON=1
llvm-svn: 253054
2015-11-13 17:27:20 +00:00
Eugene Leviant c1ba9fcb27 Fix multiple symbol lookup in the same namespace
llvm-svn: 253028
2015-11-13 11:00:10 +00:00
Tamas Berghammer 2e31ce1ea7 Remove a broken hack from Scalar::ULongLong and fix a test
Change Test-rdar-12481949.py to expect GetValueAsUnsigned() to return
0xffffffff if the variable is an int32_t (signed, 4 byte integer) with
value of -1. The previous expectation where we expected the value to be
0xffffffffffffffff doesn't make sense as nothing explains why we would
treat it as an 8 byte value.

This CL also removes a hack from Scalar::ULongLong what was most likely
added to get this test passing as it only worked in case the value of
the variable is -1 and didn't make any sense even in that case.

Differential revision: http://reviews.llvm.org/D14611

llvm-svn: 253027
2015-11-13 10:51:35 +00:00