Commit Graph

8190 Commits

Author SHA1 Message Date
Jean-Daniel Dupas b2065ecdd6 Remove useless includes
llvm-svn: 197147
2013-12-12 11:52:05 +00:00
Greg Clayton 4705f8d842 LLDB can crash if given DWARF debug info for a class that has a base class which isn't a complete definition.
<rdar://problem/15594781>

We need to not crash at any cost. We currently detect if any base classes are forward declarations, emit an error string that directs the use to file a compiler bug, and continues by completing the class with no contents. This avoids a clang crash that would usually follow when we call setBase().

llvm-svn: 197108
2013-12-12 01:54:04 +00:00
Enrico Granata 601ec50ac9 Actually initialize the magic pointer to NULL safely
llvm-svn: 197107
2013-12-12 01:47:35 +00:00
Enrico Granata 739050236e Having binary files in a repository is not a good thing
With this checkin, we use the installed clang compiler to build crashinfo.so from crashinfo.c upon every test suite execution
We also try to cleanup after ourselves, which of course will only work if the test suite does not actually crash

llvm-svn: 197106
2013-12-12 01:42:17 +00:00
Enrico Granata 2c3f140551 <rdar://problem/15640353>
Add an hook for the test suite into the OSX-only CrashReporter "App-specific info"

This allows the test suite to set the crash info to the name and file location of every test as the test gets executed
If the test suite crashes, the crash log will then report which test is the culprit, even when not using verbose mode

This only works on OSX, and defaults to not doing anything on other platforms, but OS/platform-specific invocations
can be devised by each individual platform

llvm-svn: 197095
2013-12-12 00:02:05 +00:00
Greg Clayton 78f4d95d09 Fixed parsing the DW_TAG_member children for structs, unions and classes to not alway treat every member as a bitfield.
The previous fix for bitfields made us always search for anonymous bitfields regardless of the member (bitfield or normal field).

llvm-svn: 197088
2013-12-11 23:10:39 +00:00
Greg Clayton 7cff313335 Make this test an expected fail on darwin until we can fix this bug.
llvm-svn: 197087
2013-12-11 23:08:25 +00:00
Sylvestre Ledru 7746736ece Bug #18214 - Adds LLVMObjCARCOpts.a to Makefile linkage for liblldb.
Patch by Todd Fiala

llvm-svn: 197078
2013-12-11 21:55:00 +00:00
Ed Maste 30df85e67f Fix Linux by partially reverting 196787
llvm-svn: 197065
2013-12-11 20:43:27 +00:00
Greg Clayton 4570d3eba0 Massive test suite cleanup to stop everyone from manually having to compute "mydir" inside each test case.
This has led to many test suite failures because of copy and paste where new test cases were based off of other test cases and the "mydir" variable wasn't updated.

Now you can call your superclasses "compute_mydir()" function with "__file__" as the sole argument and the relative path will be computed for you. 

llvm-svn: 196985
2013-12-10 23:19:29 +00:00
Greg Clayton eeb15653c6 Fix the test suite after the changes made in revision 196616 exposed issues in the test suite.
We must make sure that all ValueObject objects always contain a valid target.

llvm-svn: 196983
2013-12-10 23:16:40 +00:00
Greg Clayton d30ed41c13 Revert change I didn't mean to check in.
llvm-svn: 196956
2013-12-10 19:44:41 +00:00
Greg Clayton c93068b54f Add the "--unix-socket" opton back as it was being used.
<rdar://problem/15622900>

llvm-svn: 196952
2013-12-10 19:36:45 +00:00
Greg Clayton 765d2e234c Fix autocompletion for multi-word commands.
<rdar://problem/14183288>

llvm-svn: 196949
2013-12-10 19:14:04 +00:00
Ed Maste 8f46ed79bd test: Skip register test hanging on FreeBSD buildbot
llvm-svn: 196941
2013-12-10 18:35:19 +00:00
Sylvestre Ledru a7830a47f1 As consistency, invoke python with /usr/bin/env (like it is done in the rest of the file). Thanks to Xavier De Gaye for the patch
llvm-svn: 196933
2013-12-10 16:51:35 +00:00
Ed Maste 0508125cd4 test: FreeBSD calls the 64-bit x86 platform amd64
Also add decorator for an issue that this uncovered: llvm.org/pr18200

llvm-svn: 196920
2013-12-10 14:25:28 +00:00
Ed Maste 687a0c043a test: Fix match string to work with st0 or stmm0
llvm-svn: 196919
2013-12-10 14:20:50 +00:00
Jean-Daniel Dupas 7782de923e Remove 'const' constraint on ProcessLaunchInfo parameter in Process::DoLaunch().
This 'const' is not required and prevent us to defer the launch to the Host layer.

llvm-svn: 196837
2013-12-09 22:52:50 +00:00
Ed Maste 8958af36c1 Fix Linux build after r196787
Patch from Xavier de Gaye

llvm-svn: 196830
2013-12-09 22:34:49 +00:00
Ed Maste 90359963ab Handle endianness in the Opcode class
Previously, an opcode set via SetOpcode32 (for example) was later
extracted via GetData() as a byte sequence in host order rather than
target order.

Review: http://llvm-reviews.chandlerc.com/D1838
llvm-svn: 196808
2013-12-09 19:45:33 +00:00
Jean-Daniel Dupas e5f4780d9b Replace 'mkdir' shell invocation by native function call.
Summary: Now that Host provide a MakeDirectory function, we can use it instead of relying on command line tool to create a directory.

CC: lldb-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2356

llvm-svn: 196801
2013-12-09 19:16:14 +00:00
Jean-Daniel Dupas 59ceb0440e Update cmake build instruction to compile LLVM in C++11 mode
Thanks to Xavier de Gaye for the pointer.

llvm-svn: 196794
2013-12-09 18:13:47 +00:00
Ed Maste 1d981a9606 test: Update decorators for FreeBSD failures with threaded inferior support
llvm.org/pr18190
llvm.org/pr18191

llvm-svn: 196792
2013-12-09 17:27:18 +00:00
Ed Maste 10565b61d5 FreeBSD and NetBSD have sa_len in struct sockaddr
llvm-svn: 196790
2013-12-09 16:07:11 +00:00
Ed Maste 7fd845cc9d Threaded inferior support for FreeBSD
Modelled in part on GDBRemoteCommunicationClient.

Review: http://llvm-reviews.chandlerc.com/D2267
llvm-svn: 196787
2013-12-09 15:51:17 +00:00
Ed Maste f369dba051 test: Add annotation for FreeBSD failures w/ threaded inferiors
llvm.org/pr17944
llvm.org/pr17946

llvm-svn: 196786
2013-12-09 15:25:37 +00:00
Ed Maste a4786e0d92 Add decorator for FreeBSD watchpoint failure
llvm.org/pr16706

llvm-svn: 196781
2013-12-09 14:24:09 +00:00
Ed Maste 991fe6c701 Fix Debian GNU/kFreeBSD build
Use the same LaunchProcessPosixSpawn as on FreeBSD and Linux.

llvm-svn: 196742
2013-12-09 01:35:42 +00:00
Jim Ingham b44af8ff25 If the StepThrough plan makes it back to the frame in which it started, it should say
it succeeded, since the plan that was using it can figure out what to do from there.
It should only say it failed if it truely went off into the weeds.

<rdar://problem/15597807>

llvm-svn: 196631
2013-12-07 01:17:30 +00:00
Jean-Daniel Dupas 870c011de5 Replace the last auto_ptr by unique_ptr
llvm-svn: 196625
2013-12-06 23:38:05 +00:00
Sylvestre Ledru c061cceed2 Fixed Makefile-based install to place python packages in the LLDB install tree.
Failure to install python packages now fails the make install.
This patch properly handles the optional DESTDIR variable.

Patch by Todd Fiala

llvm-svn: 196624
2013-12-06 23:16:23 +00:00
Jim Ingham 793d8d9c00 Do a little more prevention against SBValues getting used after the world has been torn down around them.
llvm-svn: 196616
2013-12-06 22:21:04 +00:00
Greg Clayton fb6621ef4b Add a setting to allow users to enable expressions that crash LLDB to show up in crash logs.
<rdar://problem/11549320> 

llvm-svn: 196613
2013-12-06 21:59:52 +00:00
Greg Clayton 3dedae12b5 Fixed the GDBRemoteCommuncation to return a new GDBRemoteCommuncation::PacketResult enum for all packet sends/receives.
<rdar://problem/15600045>

Due to other recent changes, all connections to GDB servers that didn't support the "QStartNoAckMode" packet would cause us to fail to attach to the remote GDB server.

The problem was that SendPacket* and WaitForResponse* packets would return a size_t indicating the number of bytes sent/received. The other issue was WaitForResponse* packets would strip the leading '$' and the trailing "#CC" (checksum) bytes, so the unimplemented response packet of "$#00" would get stripped and the WaitForResponse* packets would return 0.

These new error codes give us flexibility to to more intelligent things in response to what is returned. 

llvm-svn: 196610
2013-12-06 21:45:27 +00:00
Greg Clayton d629980ab3 Replace all in_port_t with uint16_t to avoid compilation issues on different systems.
llvm-svn: 196586
2013-12-06 17:46:35 +00:00
Jean-Daniel Dupas 3cfa8e217e Typo in comments
llvm-svn: 196577
2013-12-06 09:35:53 +00:00
Jean-Daniel Dupas 89d910c397 Tell CMake about the SystemRuntime plugin.
This fixes CMake build on Darwin.

llvm-svn: 196575
2013-12-06 09:32:46 +00:00
Arnaud A. de Grandmaison 223bda22f4 Tell CMake about recently added SectionLoadHistory.cpp
llvm-svn: 196566
2013-12-06 08:49:14 +00:00
Greg Clayton d5944cd118 For logical backtrace work, lldb needs to track Module unloads etc & symoblicate an address based on a point in time
<rdar://problem/15314403> 

This patch adds a new lldb_private::SectionLoadHistory class that tracks what shared libraries were loaded given a process stop ID. This allows us to keep a history of the sections that were loaded for a time T. Many items in history objects will rely upon the process stop ID in the future.

llvm-svn: 196557
2013-12-06 01:12:00 +00:00
Greg Clayton 00fe87b488 Modified local spawning in debugserver processes to use a new --reverse-connect option so that debugserver actually connects back to LLDB instead of LLDB connecting to debugserver.
This gets rid of our hacky "get_random_port()" which would grab a random port and tell debugserver to open that port. Now LLDB creates, binds, listens and accepts a connection by binding to port zero and sending the correctly bound port down as the host:port to connect back to.

Fixed the "ConnectionFileDescriptor" to be able to correctly listen for connections from a specified host, localhost, or any host. Prior to this fix "listen://" only accepted the following format:

listen://<port>

But now it can accept:

listen://<port>         // Listen for connection from localhost on port <port>
listen://<host>:<port>  // Listen for connection from <host> and <port>    
listen://*:<port>       // Listen for connection from any host on port <port>

llvm-svn: 196547
2013-12-05 22:58:22 +00:00
Greg Clayton 1251456028 Added two new test case decorator functions: @skipIfRemote and @skipIfRemoteDueToDeadlock.
@skipIfRemote is used to decorate test cases that don't make sense to run remotely.

@skipIfRemoteDueToDeadlock indicates these tests need to be looked at and currently deadlock the running of the test suite when run on remote systems. These issues should be fixed soon.

llvm-svn: 196543
2013-12-05 22:22:32 +00:00
Jean-Daniel Dupas 0fefa67606 Extends StringExtractorGDBRemote to support debugger packets.
CC: lldb-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2337

llvm-svn: 196525
2013-12-05 19:25:45 +00:00
Sylvestre Ledru 13b0fba48b Revert: "Patch from Todd Fiala that install the lldb.py module in the prefix directory and also makes install fail if the prefix directory can't be accessed"
Does not respect the prefix

llvm-svn: 196499
2013-12-05 12:51:47 +00:00
Sylvestre Ledru 34efb6aee1 Fix the build failure of lldb wrt clang recent change. Patch by Todd Fiala
llvm-svn: 196483
2013-12-05 07:55:40 +00:00
Enrico Granata 315133710d Provide an easy way for synthetic child provider front ends to declare themselves “invalid”
This is not being used yet, and in practice, more refactoring would be required to make this fully practical
In practice, the way this should work is that CalculateNumChildren(), GetChildAtIndex(), GetIndexOfChildWithName() and MightHaveChildren() should all default to failure values when m_valid == false. Update() should be the only function actually setting/clearing the flag upon inspecting the backend ValueObject, if it determines it to be in an incongruent state
Given refactoring of the FrontEnd APIs, this work could be automatically performed without the individual providers having to replicate this logic
The way this works now is that each front end picks one or more “key ivars” and keys off those to detect invalidity
This is a baby step 0 to a better world

llvm-svn: 196452
2013-12-05 01:25:20 +00:00
Greg Clayton 8fbbb5b421 Patch from Todd Fiala that install the lldb.py module in the prefix directory and also makes install fail if the prefix directory can't be accessed
llvm-svn: 196413
2013-12-04 21:27:40 +00:00
Greg Clayton dbf0457a7b Allow the hostname to be specified when asking a platform to launch another debugserver in case you want to change it.
The GDB server remote platform how has the debugserver that are launched on iOS devices to use localhost due to the use of a USB mux.

llvm-svn: 196405
2013-12-04 19:40:33 +00:00
Greg Clayton c8b38d3389 Enable POSIX_SPAWN_CLOEXEC_DEFAULT (a darwin specific flag) when available when using posix_spawn to spawn processes to close all file handles.
llvm-svn: 196404
2013-12-04 19:38:57 +00:00
Greg Clayton 7749514293 Remove log line that was left in accidentally.
llvm-svn: 196403
2013-12-04 19:37:53 +00:00