Commit Graph

9002 Commits

Author SHA1 Message Date
Todd Fiala f9c3c9fe44 gdbremote testing: added regex support to match packets and propagate/test against previously stored matches.
Added a test validating that $qC after an inferior launch via $A
returns a thread id that an immediately followig $? reports for the
active thread. This is currently skipped on debugserver (the thread
ids don't match) and isn't yet implemented in TOT for llgs.

llvm-svn: 208061
2014-05-06 06:15:23 +00:00
Jason Molenda 6076bf4edb Change ProcessGDBRemote::DoReadMemory to use the x packet to read
data if it is available.

Change ProcessGDBRemote's maximum read/write packet size from a
fixed 512 byte value to asking the remote gdb stub what its maximum
is, using up to 128kbyte sizes if that's allowed, and falling back
to 512 if the remote gdb stub doesn't advertise a max packet size.

Add a new "process plugin packet xfer-size" command that can be used
to override the maximum packet size (although not exceeding any packet
size maximum published by the remote gdb stub).
<rdar://problem/16032150> 

llvm-svn: 208058
2014-05-06 04:34:52 +00:00
Jason Molenda bdc4f12f19 Add GetxPacketSupported to test if the 'x' packet is supported.
<rdar://problem/16032150> 

llvm-svn: 208052
2014-05-06 02:59:39 +00:00
Jason Molenda 018ff31462 Add a simple qSupported packet, fix a bug in decode_binary_data(),
add a new 'x' packet for reading data in binary format.  Document
the 'x' packet.  
<rdar://problem/16032150> 

llvm-svn: 208051
2014-05-06 02:53:43 +00:00
Todd Fiala 6764c00687 Refactored gdb remote protocol testing sequence handling.
Pushed gdbremote protocol sequence expectations into a separate
class and defer matching of llgs/debugserver output to the
sequence entry.  Pre-step to adding regex matching and
grouped content collecting.

No longer require anything before the read/send packet
portion of slurped-up log lines used for setting up
gdb remote test sequences.  Several packet logging options
produce a wide range of content before the read/send packet.

Added helpers to TestLldbGdbServer to clean up test setup
and test expectations matching.

llvm-svn: 207998
2014-05-05 20:54:01 +00:00
Jim Ingham 8646d3c164 Rename eExecution*** to eExpression*** to be consistent with the result type.
llvm-svn: 207945
2014-05-05 02:47:44 +00:00
Jim Ingham 1624a2d3c8 Make the Expression Execution result enum available to the SB API layer.
Add a callback that will allow an expression to be cancelled between the
expression evaluation stages (for the ClangUserExpressions.)

<rdar://problem/16790467>, <rdar://problem/16573440>

llvm-svn: 207944
2014-05-05 02:26:40 +00:00
Alp Toker cf55e88a11 Track recent changes in clang internals
llvm-svn: 207913
2014-05-03 15:05:45 +00:00
Alp Toker 01d9c64055 Remove obsolete CXX11 buld instructions
There's an element of guesswork involved in the GCC updates but it seems better
than what was there before.

llvm-svn: 207912
2014-05-03 15:05:40 +00:00
Greg Clayton 745b6688b4 LLDB could segfault if it got a .a file that had extra padding bytes at the end of the file.
<rdar://problem/16732178>

llvm-svn: 207877
2014-05-02 22:25:51 +00:00
Joerg Sonnenberger a53b3593f0 Use posix_spawn on NetBSD as well.
llvm-svn: 207864
2014-05-02 19:09:40 +00:00
Joerg Sonnenberger bf2a31053b For now, use FreeBSD's host configuration for NetBSD as well.
llvm-svn: 207863
2014-05-02 19:01:25 +00:00
Joerg Sonnenberger 420708a374 Fix format string for 32bit systems.
llvm-svn: 207862
2014-05-02 19:00:27 +00:00
Joerg Sonnenberger 2cd8f5245f Use correct readline header on NetBSD.
llvm-svn: 207861
2014-05-02 18:59:49 +00:00
Joerg Sonnenberger ff9620f975 LLDB_INVALID_ADDRESS may not be too large for a uintptr_t, so cast
first.

llvm-svn: 207860
2014-05-02 18:58:51 +00:00
Joerg Sonnenberger 6764b3e82a EOF is outside the value range of char on architectures with unsigned
char like ARM. Check for EOF explicitly.

llvm-svn: 207859
2014-05-02 18:53:53 +00:00
Joerg Sonnenberger 4f51a0740a LLDB_INVALID_OFFSET can be large than a size_t on ILP32 systems, so use
SIZE_MAX here.

llvm-svn: 207855
2014-05-02 18:26:40 +00:00
Greg Clayton f29bf9a169 "DONE" is being left in multi-line results when it shouldn't for non terminal input.
<rdar://problem/16790579>

llvm-svn: 207818
2014-05-02 01:03:07 +00:00
Greg Clayton f0066ad07f Fixed CTRL+C related issues:
- CTRL+C wasn't clearing the command in lldb
- CTRL+C doesn't work in python macros in lldb
- Ctrl+C no longer interrupts the running process that you attach to

<rdar://problem/15949205> 
<rdar://problem/16778652> 
<rdar://problem/16774411>

llvm-svn: 207816
2014-05-02 00:45:31 +00:00
Greg Clayton 4cc3ba56bf Fixed whitespace issues.
llvm-svn: 207778
2014-05-01 18:13:08 +00:00
Greg Clayton 40286e0b6d Sometimes when launching through a shell, we can run into cases where the /bin/sh or /usr/bin/arch can crash the process due to security measures. Now we correctly report when a process exited in the process of launching so we can show the reason why it crashed instead of just showing “initial process state wasn't stopped: exited”.
llvm-svn: 207700
2014-04-30 20:29:09 +00:00
Greg Clayton bb49289023 Allow for a task port to change when we exec.
llvm-svn: 207699
2014-04-30 20:27:01 +00:00
Greg Clayton 040c560f2c Report the result of waitpid() a little more clearly as well as clearly logging the process status.
llvm-svn: 207698
2014-04-30 20:24:10 +00:00
Jason Molenda f0d5b54030 Correct offsets in the debugserver arm back end for the s and d registers so we get the offsets
of these correct after the changes of r194302.
<rdar://problem/16176270> 

llvm-svn: 207600
2014-04-30 00:30:07 +00:00
Todd Fiala 41c60c818f Added gdb remote protocol tests for no output and inferior non-zero exit code.
Tests added for debugserver and lldb-gdbserver.  lldb-gdbserver marked as
XFAIL on top of tree.

Added build_gdbremote_A_packet test helper to construct a gdbremote A
launch packet from a list of args.

llvm-svn: 207568
2014-04-29 18:21:07 +00:00
Ed Maste 993fa0604d Fix interval recalculation in the event that usleep is interrupted
llvm-svn: 207566
2014-04-29 18:09:44 +00:00
Ed Maste e61c7b06c9 Typo: forever is one word
llvm-svn: 207564
2014-04-29 17:48:06 +00:00
Ed Maste 5c4661881b Add decorator for FreeBSD buildbot failure
llvm.org/pr19605

llvm-svn: 207557
2014-04-29 17:00:45 +00:00
Todd Fiala 71afe0b1d5 Make lldb-gdbserver configure/(g)make build parity with cmake.
This now builds lldb-gdbserver on all Linux and FreeBSD architectures
rather than being locked to x86_64 architectures only.

Please note lldb-gdbserver is not yet functional, this just enables
the non-x86_64 Linux/FreeBSD build using the configure/make build
system.

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

M    tools/Makefile

llvm-svn: 207556
2014-04-29 16:57:45 +00:00
Todd Fiala 56b25f74ce Added debugserver/llgs protocol test for output and clean exit.
Tests for $vCont;c program start, $O output and $W status code.
@llgs_test variant currently marked as expected fail.

llvm-svn: 207492
2014-04-29 05:01:01 +00:00
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
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
Hafiz Abid Qadeer 224746a400 Remove > 1 check against a boolean.
I saw a complain about this code on the LLVM channel. It looks wrong to me
as has_tag is a boolean. I am committing it as obvious.

llvm-svn: 206270
2014-04-15 10:06:47 +00:00
Jason Molenda c6fa5db747 Add some basic sanity checks to DynamicLoaderDarwinKernel::ReadKextSummaryHeader()
when it is reading the kext table, in case we're reading out of a core file with
corrupt contents in this region.
<rdar://problem/16601915> 

llvm-svn: 206233
2014-04-15 01:04:00 +00:00
Greg Clayton 3434b578be Fix LLDB to build with top of tree LLVM/Clang.
Patch from Michael Tao.

llvm-svn: 206213
2014-04-14 21:33:38 +00:00
Greg Clayton 81057edda3 Include additional libLLVMARM64Utils.a file.
llvm-svn: 206212
2014-04-14 21:33:10 +00:00
Greg Clayton 8334e14efc Fixed SBThread.GetStopReasonDataAtIndex() to correctly return breakpoint location ID.
Patch from Vyacheslav Karpukhin.

llvm-svn: 206040
2014-04-11 17:27:02 +00:00
Enrico Granata bd4885f129 <rdar://problem/16540961>
The "unexpected value" message only matters to me, but is bound to make the experience more confusing for people when some uninitialized memory looks like an NSNumber and then can't be formatted properly, and that error comes out in the UI

Just drop the error message entirely - nobody but me cares

llvm-svn: 205978
2014-04-10 18:17:30 +00:00
Enrico Granata 1ac6296376 <rdar://problem/12055586>
Enable data formatters to see-through pointers/references to typedefs

For instance, if Foo is a typedef to Bar, and there is a formatter for any/all of Bar*, Bar&, Bar&&, then Foo*, Foo&, and Foo&& should pick these up if Foo-specific formatters don't exist

llvm-svn: 205939
2014-04-10 00:14:07 +00:00
Enrico Granata 699e14f3ce When trying to extract the type info for an r-value reference type, dont' cast to an l-value reference type
llvm-svn: 205932
2014-04-09 21:54:17 +00:00
Enrico Granata a0db6ed44b <rdar://problem/16477472>
Set the correct FormatManager revision before starting to figure out the new formatters
This can avoid entering some corner cases where as part of figuring out formatters we try to figure out dynamic types, and in turn that causes us to go back in trying to fetch new formatters - it is not only a futile exercise, it's also prone to endless recursion

This would only cause a behavior change if getting this chain started would eventually cause something to run and alter the formatters, a very unlikely if at all possible sequence of events

llvm-svn: 205928
2014-04-09 21:06:11 +00:00
Ed Maste 5b031ebc70 Use the default TID format in curses UI
TIDs are conventionally shown as decimal values on FreeBSD and Linux.
Thus, use the ${thread.id%tid} format string to display the thread ID,
instead of a fixed hex format.

llvm.org/pr19380

llvm-svn: 205912
2014-04-09 16:39:30 +00:00
Ed Maste 6562983234 Do not rely on invalid pthread API use in thread test
Calling mutex_lock from one thread and then mutex_unlock from another is
not permitted.  Replace the awkward mutex usage with a mutex and
condition variable.

llvm.org/pr18061                                                            

llvm-svn: 205900
2014-04-09 14:48:25 +00:00
Sean Callanan 131be99d24 Fixed a problem where IRForTarget wasn't ignoring
dbg_value intrinsics appropriately.

<rdar://problem/16504649>

llvm-svn: 205825
2014-04-09 00:59:41 +00:00
Greg Clayton 1b7c6ab8ee Fixed module spec matching to not try to compare the platform path if there isn't one in the ModuleSpec that is asked if it matches.
<rdar://problem/16558568>

llvm-svn: 205816
2014-04-08 23:57:44 +00:00
Jim Ingham 35878c4752 Fix the behavior when hand-calling a function times out on one thread,
but by the time we go to halt, it has already stopped by hitting the 
function end breakpoint.  That wasn't being shown to the threads so the
Function call thread plan didn't know its job was done.

<rdar://problem/16515785>

llvm-svn: 205803
2014-04-08 21:33:21 +00:00
Jim Ingham 7e9eff664c This function should be const.
llvm-svn: 205790
2014-04-08 20:24:45 +00:00
Enrico Granata 2b8fc66df2 Fix the GetArrayElementType() call so it will not crash when called on a non-array thing
Also, the stride is now a pointer so one can avoid passing it if it's not required

llvm-svn: 205782
2014-04-08 18:36:09 +00:00
Ed Maste 42c549b346 Revert r205769 as it breaks the build on FreeBSD:
error: declaration of constexpr static data member 'spec' requires an
initializer

llvm-svn: 205776
2014-04-08 17:02:25 +00:00
Ed Maste 4a06df95b9 Accept DWARF version 2 and 3 in debug_line tables
Issue reported by Matthew Gardiner.  Further work is necessary to
synchronize LLDB's DWARF classes with the derivatives now in LLVM.

llvm-svn: 205771
2014-04-08 15:12:07 +00:00
Virgile Bello 97a70e4f7e Added i686 architecture (ArchSpec::Core::eCore_x86_32_i686).
llvm-svn: 205770
2014-04-08 14:48:48 +00:00
Virgile Bello 8250ebdd8a Improve demangler to compile with MSVC.
llvm-svn: 205769
2014-04-08 14:46:44 +00:00
Greg Clayton 86e70cb3ac Fixed an issue where if you called:
SBTarget::AddModule(const char *path,
                    const char *triple,
                    const char *uuid_cstr,
                    const char *symfile);
                    
If "symfile" was filled in, it would cause us to not correctly add the module. Same goes for:

SBTarget::AddModule(SBModuleSpec ...)

Where you filled in the symfile.

<rdar://problem/16529799>

llvm-svn: 205750
2014-04-07 23:50:17 +00:00
Greg Clayton c7797accb8 Fixed a case where we could spin indefinitely if we got an error from fgets that isn't EINTR.
<rdar://problem/16535437>

llvm-svn: 205740
2014-04-07 21:37:59 +00:00
Greg Clayton 78d1019703 Cleanup the code a bit.
llvm-svn: 205739
2014-04-07 21:37:03 +00:00
Greg Clayton 521c2278ab Disable JITLoaderGDB on "vendor == apple" for now due to performance slowdowns for every first run process as a global name lookup in all shared libraries if performed.
<rdar://problem/16542894>

llvm-svn: 205734
2014-04-07 20:13:57 +00:00
Ed Maste 8b2c281a75 Correct typo: waychpoint -> watchpoint
llvm-svn: 205719
2014-04-07 16:33:53 +00:00
Ed Maste e63b5125e0 Add decorator for FreeBSD DynamicValueTestCase failure
Not yet root-caused, but I presume it is the same issue that affects
Linux.

llvm-svn: 205712
2014-04-07 13:42:05 +00:00
Ed Maste 99ed6dfa00 Add failure decorators
These tests started failing on FreeBSD after r205497 "Make the fail
messages"

llvm.org/pr19347

llvm-svn: 205652
2014-04-04 21:16:39 +00:00
Greg Clayton d20deac32d Xcode 5 crashes if lldb stops at breakpoint if long c++ template lists are present.
This fix reduces the stack size of SymbolFileDWARF::ParseType(). It seems that clang is not very good at sharing locations on the stack with local variables in large functions that have many blocks and each variable gets unique locations. The reduction in size was done by:
1 - removing some large locals that were default constructed by not used
2 - Placing some larger local variables into std::unique_ptr<> to make them on the heap
3 - removing local variables there were large and being populated but not being used
4 - reducing the size of some typedefs to llvm::SmallVector<T, N> so that N wasn’t excessively large


<rdar://problem/16431645>

llvm-svn: 205640
2014-04-04 18:15:18 +00:00
Greg Clayton c9cf579837 Don’t exit the command interpreter if we get interrupted by an EINTR when calling fgets().
llvm-svn: 205638
2014-04-04 18:11:31 +00:00
Jim Ingham 2e3881c0f5 Remember to clear the cached data for the OptionValueFileSpec in SetValueFromCString.
<rdar://problem/16179718> target.expr-prefix contents appear to be cached for an entire session

llvm-svn: 205636
2014-04-04 18:06:54 +00:00
Greg Clayton 7ec287cda3 Don’t crash when we get an invalid .debug_aranges set, just ignore it. Also print out warning messages if LLDB_CONFIGURATION_DEBUG is defined.
<rdar://problem/16516343>

llvm-svn: 205634
2014-04-04 17:53:30 +00:00
Saleem Abdulrasool 324a103619 sweep up -Wformat warnings from gcc
This is a purely mechanical change explicitly casting any parameters for printf
style conversion.  This cleans up the warnings emitted by gcc 4.8 on Linux.

llvm-svn: 205607
2014-04-04 04:06:10 +00:00
Ed Maste 0fdeb7158e Avoid crash if symbol returns a null name
llvm-svn: 205555
2014-04-03 19:27:39 +00:00
Jim Ingham 2f4693aa77 Get "dis -c -s" working again.
pr19324

llvm-svn: 205544
2014-04-03 17:16:17 +00:00
Ed Maste 0dcccf7bf3 Add explict dependencies on swig .i files for cmake builds
llvm.org/pr19316

llvm-svn: 205539
2014-04-03 15:03:11 +00:00
Jim Ingham 6c9ed91cca Make the fail messages
llvm-svn: 205497
2014-04-03 01:26:14 +00:00
Jim Ingham 6cc0d2f61d Print the new eStopReasonExec in stop_reason_to_str.
llvm-svn: 205496
2014-04-03 01:25:28 +00:00
Jim Ingham 24e84d2c87 I removed SetCallback from the Python API's since it wasn't actually useful, and added SetScriptCallbackFunction,
and SetScriptCallbackBody.  So add these to the default constructor test case.

llvm-svn: 205494
2014-04-03 00:50:56 +00:00
Jason Molenda 987cbaa09b Add a missing arm64 idef.
llvm-svn: 205488
2014-04-02 23:52:55 +00:00
Ed Maste abd482a650 Add decorator for pr19311 on FreeBSD
A breakpoint at the resume address for "continue" is skipped.  This is
presumably the root cause for the Linux failure as well.

llvm-svn: 205482
2014-04-02 23:01:04 +00:00
Jim Ingham 46d005dbc4 Workaround for collision between enum members in LLVM's MachO.h and system headers
on Mac OS X (in particular mach/machine.h).

<rdar://problem/16494607>

llvm-svn: 205480
2014-04-02 22:53:21 +00:00
Greg Clayton 711861fec5 Don’t #include "llvm/Support/MachO.h” as it isn’t needed here.
llvm-svn: 205462
2014-04-02 20:39:20 +00:00
Greg Clayton 3657e9c592 Don’t include “llvm/Support/MachO.h” as it isn’t needed here.
llvm-svn: 205461
2014-04-02 20:38:03 +00:00
Greg Clayton eadcca97cb Don’t #include “llvm/Support/MachO.h” in a header file if we can avoid it.
llvm-svn: 205460
2014-04-02 20:36:22 +00:00
Enrico Granata c1fb7bd33e rdar://16424649
Clean up the DynamicValueTestCase

Namely, I split off the part of the test that validates child counts to a separate test

llvm-svn: 205450
2014-04-02 18:55:29 +00:00
Ed Maste e7f59bb04d Add annotation for failure from new Attach/Resume test case on FreeBSD
llvm-svn: 205427
2014-04-02 14:45:46 +00:00
Andrew MacPherson 82aae0d835 Use getpgid() with waitpid() in case the process pgid is not equal to its pid, as is the case with a forked subprocess. Also a couple of fixes for unit test failures from Todd Fiala.
llvm-svn: 205405
2014-04-02 06:57:45 +00:00
Saleem Abdulrasool 3985c8c646 sanitise sign comparisons
This is a mechanical change addressing the various sign comparison warnings that
are identified by both clang and gcc.  This helps cleanup some of the warning
spew that occurs during builds.

llvm-svn: 205390
2014-04-02 03:51:35 +00:00
Saleem Abdulrasool f7da6c1fcf build: ignore pragma warnings with GCC
GCC does not support '#pragma mark'.  Add -Wno-unknown-pragmas if the compiler
supports it.

llvm-svn: 205389
2014-04-02 03:51:16 +00:00
Jim Ingham 7d8f86ceae Test case for the previous commit.
llvm-svn: 205381
2014-04-02 01:05:27 +00:00
Jim Ingham d80102e420 Add the ability to set python breakpoint commands from the SBBreakpoint & SBBreakpointLocation API's.
You can either provide the function name, or function body text.
Also propagate the compilation error up from where it is checked so we can report compilation errors.

<rdar://problem/9898371>

llvm-svn: 205380
2014-04-02 01:04:55 +00:00
Enrico Granata a4d5fc3841 Use continue instead of next
llvm-svn: 205354
2014-04-01 19:37:14 +00:00
Ed Maste c97323ea8b Use libc++ on FreeBSD as on Darwin
llvm-svn: 205345
2014-04-01 18:47:58 +00:00
Ed Maste 4e0999bc22 Implement ProcessMonitor::Kill for Linux
On FreeBSD ptrace(PT_KILL) is used to terminate the traced process
(as if PT_CONTINUE had been used with SIGKILL as the signal to be
delivered), and is the desired behaviour for ProcessPOSIX::DoDestroy.

On Linux, after ptrace(PTRACE_KILL) the traced process still exists
and can be interrogated.  It is only upon resume that it exits as though
it received SIGKILL.

As the Linux PTRACE_KILL behaviour is not used by LLDB, rename
BringProcessIntoLimbo to Kill, and change the implementation to simply
call kill() instead of using ptrace.

Thanks to Todd F for testing (Ubuntu 12.04, gcc 4.8.2).

Sponsored by: DARPA, AFRL
Differential Revision: http://llvm-reviews.chandlerc.com/D3159

llvm-svn: 205337
2014-04-01 18:14:06 +00:00
Ed Maste a837576a2a Add mips64 to the list of 64-bit Host architectures
llvm-svn: 205333
2014-04-01 18:06:45 +00:00
Ed Maste af58e02d1c mips64: clean up register context storage
Store the gpr data in a DataBufferHeap and use a DataExtractor to
extract register values with appropriate endianness.  This avoids hard-
coding the register count, and with some further work would allow this
class to provide generic register context storage for any CPU.

llvm-svn: 205329
2014-04-01 17:27:25 +00:00
Ed Maste 70882939f1 Implement ProcessMonitor::Kill for FreeBSD
On FreeBSD ptrace(PT_KILL) is used to terminate the traced process
(as if PT_CONTINUE had been used with SIGKILL as the signal to be
delivered), and is the desired behaviour for ProcessPOSIX::DoDestroy.

On Linux, after ptrace(PTRACE_KILL) the traced process still exists
and can be interrogated.  It is only upon resume that it exits as though
it received SIGKILL.

For now I'm committing only the FreeBSD change, until the Linux change
(review D3159) is successfully tested.

http://llvm.org/pr18894

llvm-svn: 205315
2014-04-01 14:30:56 +00:00
Ed Maste 1087f2980d Add errno import missed in r205246
llvm-svn: 205306
2014-04-01 12:49:21 +00:00
Enrico Granata 7ca1c76520 <rdar://problem/16424592>
For some reason, the libc++ vector<bool> data formatter was essentially a costly no-up, doing everything required of it, except actually generating the child values!

This restores its functionality

llvm-svn: 205259
2014-03-31 23:02:25 +00:00
Ed Maste ce5ac7d776 Workaround test trace output dir creation race condition
Since dosep.ty started invoking multiple tests in parallel, the FreeBSD
buildbot occasionally has a failure due to os.mkdir returning EEXIST.
Silently ignore that exception, but reraise any other.

llvm-svn: 205246
2014-03-31 20:36:38 +00:00
Ed Maste 801335cc64 Fix one thread timeout logic
This should fix the seemingly-random failures observed on the FreeBSD
buildbot.

llvm-svn: 205241
2014-03-31 19:28:14 +00:00
Colin Riley aba2539989 Fixing MSVC windows build. Please respect code order when ifdefing out MSVC specifics :)
llvm-svn: 205211
2014-03-31 15:48:33 +00:00
Jason Molenda f8310d40c8 Include string.h for memset() prototype. Thanks Dmitri.
llvm-svn: 205115
2014-03-29 19:29:04 +00:00
Jason Molenda a332978b2a lldb arm64 import.
These changes were written by Greg Clayton, Jim Ingham, Jason Molenda.

It builds cleanly against TOT llvm with xcodebuild.  I updated the
cmake files by visual inspection but did not try a build.  I haven't
built these sources on any non-Mac platforms - I don't think this
patch adds any code that requires darwin, but please let me know if
I missed something.

In debugserver, MachProcess.cpp and MachTask.cpp were renamed to
MachProcess.mm and MachTask.mm as they picked up some new Objective-C
code needed to launch processes when running on iOS.

llvm-svn: 205113
2014-03-29 18:54:20 +00:00
Jason Molenda d5dd36a020 Link against the zlib solib, required to build against TOT llvm.
llvm-svn: 205082
2014-03-29 07:11:52 +00:00
Jim Ingham 914f4e7092 Add the ability from the SB API's to set the "one thread" timeout
for expression evaluations that try one and then all threads.

<rdar://problem/15598528>

llvm-svn: 205060
2014-03-28 21:58:28 +00:00
Jim Ingham 6c8824d216 Wait for the reply from the 'D' detach packet before tearing down the debugger. Avoids a race
condition where we could end up killing debugserver (and thus the target) before it had a chance
to detach.
Also fix debugserver to send the OK AFTER it detaches to avoid the same race condition.

<rdar://problem/16202713>

llvm-svn: 205043
2014-03-28 20:00:07 +00:00
Jason Molenda 14c604ecc0 Link in the llvm/lib/ProfileData build product.
llvm-svn: 204895
2014-03-27 03:03:24 +00:00
Greg Clayton 241de26bdf Add the "lldb_complete" .editrc command back in case veteran users of LLDB had .editrc key mappings in their ~/.editrc.
<rdar://problem/16279283>

llvm-svn: 204870
2014-03-26 22:48:57 +00:00
Greg Clayton bc711e0575 Fixed a crasher when using 1 character type names in “type summary”, “type synthetic” and “type filter”.
Also fixed a missing return when making python summary functions on the fly.

<rdar://problem/16265491>

llvm-svn: 204867
2014-03-26 22:35:52 +00:00
Ed Maste fdb85d8dc3 Remove annotation for llvm.org/pr19241
The issue has been fixed by r204745 and r204750

llvm-svn: 204779
2014-03-26 02:45:44 +00:00
Sean Callanan c4ca2c1d60 Made the Materializer not write back variables
if they didn't change, just like it does for
registers.  This makes life easier for kernel
debugging and any other situation where values
are read-only.

<rdar://problem/16367795>

llvm-svn: 204764
2014-03-25 22:30:19 +00:00
Enrico Granata dd75b8556d Add a test case for the previous commit
llvm-svn: 204763
2014-03-25 22:09:24 +00:00
Enrico Granata 894f735953 <rdar://problem/14862302>
For small structs, the frame format now prints them as one-liners
This follows the same definition that frame variable does for deciding what a "small struct" is, and as such should be fairly consistent with the variable display in general

llvm-svn: 204762
2014-03-25 22:03:52 +00:00
Enrico Granata f6601d0498 Make sure this test has a looser dependency on the exact class generated here.. it is going to be some sort of NS-provided String, but let's not bet on the details
llvm-svn: 204761
2014-03-25 21:59:40 +00:00
Andrew MacPherson 6ef17b96aa Make ProcessLinux return true for DetachRequiresHalt() because PTRACE_DETACH requires this.
llvm-svn: 204759
2014-03-25 21:40:04 +00:00
Enrico Granata afcbdb1570 <rdar://problem/14515139>
Add a GetFoundationVersion() to AppleObjCRuntime
This API is used to return and cache the major version of Foundation.framework, which is potentially a useful piece of data to key off of to enable or disable certain ObjC related behaviors (especially in data formatters)

llvm-svn: 204756
2014-03-25 20:53:33 +00:00
Andrew MacPherson c3826b5ba6 Move calls to DisableAllBreakpointSites() and m_thread_list.DiscardThreadPlans() into base Process::Destroy() instead of in subclass DoDestroy() methods.
llvm-svn: 204752
2014-03-25 19:59:36 +00:00
Sean Callanan 9287289d66 Added a missing "break" to avoid falling through
when other cases get added.

llvm-svn: 204751
2014-03-25 19:47:07 +00:00
Sean Callanan 576a4374b7 Fixed the IRInterpreter to ignore call instructions
that call debug-information intrinsics.

llvm-svn: 204750
2014-03-25 19:33:15 +00:00
Todd Fiala 4339f3a434 Improve Elf object file UUID calculation performance.
This change makes significant improvements in the performance of
calculating a UUID within ObjectFileELF, and handles both running
processes and core files correctly. This does lazy evaluation of
UUID generation and caches the result when calculated.

Change by Piotr Rak.

llvm-svn: 204749
2014-03-25 19:29:09 +00:00
Todd Fiala e373b68977 Fixed up intermittently failing tests to skip on Linux.
Also added 'import sys' on some tests that are using non-standard
unittest2.skipUnless blocks with code that is intended to do things
that we have more specializes @* attributes for.  These skip
conditions were failing to execute due to missing import, causing
darwin-only tests to run on Linux regardless.  Will file a bug for
that separately.

llvm-svn: 204747
2014-03-25 18:55:48 +00:00
Greg Clayton fc03f8fcb6 A fix for: http://llvm.org/bugs/show_bug.cgi?id=19241
When there was no process, the expression options were set to not ignore breakpoints. This causes debug info to be generated and causes errors when evaluating simple expressions.

llvm-svn: 204745
2014-03-25 18:47:07 +00:00
Ed Maste 03c9207c34 Update 'running threaded' messages after option parsing change
"Running multithreaded with n threads (from LLDB_TEST_THREADS)" is
incorrect in the common case, because the thread count is now obtained
from a --threads option, or a default of multiprocessing.cpu_count().

I left the messages in for now as there are some intermittent issues
that happen while running tests multithreaded and it may help in
triaging those.  We may wish to just remove them later on.

llvm-svn: 204725
2014-03-25 15:17:23 +00:00
Ed Maste 8c3e9b2515 Add expected failure annotation for llvm.org/pr19241
llvm-svn: 204718
2014-03-25 13:15:21 +00:00
Ed Maste b9fe0dd781 Add ObjectFileJIT library
llvm-svn: 204698
2014-03-25 02:03:28 +00:00
Jim Ingham 2f2c876e4f Make "disassemble -a" work when the target is not running yet. It will dump all the functions matching that address, just like "disassemble -n" does before running.
<rdar://problem/16406570>

llvm-svn: 204689
2014-03-25 00:15:47 +00:00
Jim Ingham a0c0510845 Make ModuleList iterable.
llvm-svn: 204688
2014-03-25 00:12:30 +00:00
Greg Clayton 6f228bf965 Add ObjectFile/JIT to the makefile.
llvm-svn: 204685
2014-03-24 23:30:43 +00:00
Greg Clayton 8541258b4e Make cmake build the new ObjectFileJIT.
llvm-svn: 204683
2014-03-24 23:11:37 +00:00
Greg Clayton 23f8c95a44 JITed functions can now have debug info and be debugged with debug and source info:
(lldb) b puts
(lldb) expr -g -i0 -- (int)puts("hello")

First we will stop at the entry point of the expression before it runs, then we can step over a few times and hit the breakpoint in "puts", then we can continue and finishing stepping and fininsh the expression.

Main features:
- New ObjectFileJIT class that can be easily created for JIT functions
- debug info can now be enabled when parsing expressions
- source for any function that is run throught the JIT is now saved in LLDB process specific temp directory and cleaned up on exit
- "expr -g --" allows you to single step through your expression function with source code

<rdar://problem/16382881>

llvm-svn: 204682
2014-03-24 23:10:19 +00:00
Greg Clayton 2256d0dced Add a "--threads N" option instead of having to use an environment variable. It also now defaults to running with the number of CPUs on the machine.
llvm-svn: 204681
2014-03-24 23:01:57 +00:00
Ed Maste b04fb08c8a Add annotation for test failure due to clang 3.4
FreeBSD recently updated to Clang 3.4 and the TestFormatters test case
started failing as it omits the C1 complete object constructor when not
needed.

llvm.org/pr19011

llvm-svn: 204652
2014-03-24 18:30:59 +00:00
Greg Clayton baf6e8e4b1 Include <mutex> for std::once.
llvm-svn: 204632
2014-03-24 18:08:18 +00:00
Hafiz Abid Qadeer b768fe5ea1 Renamed a struct from i386 to i386_.
It is to avoid build error when gcc defines i386.

llvm-svn: 204628
2014-03-24 17:33:09 +00:00
Greg Clayton 1d77a8203b Modified patch from Piotr Rak that makes GetSharedModuleList() more thread safe and also fixed a missed member initialization on the copy contractor and also makes the assignment operator safer.
llvm-svn: 204622
2014-03-24 16:50:33 +00:00
Greg Clayton 5f1000107d Update for Ubuntu 13.10 after feedback from Eran Ifrah.
llvm-svn: 204619
2014-03-24 16:30:59 +00:00
Hafiz Abid Qadeer 42dde32433 Use --whole-archive linker option for minw too.
It is already used for Linux and FreeBSD. 

llvm-svn: 204603
2014-03-24 13:44:52 +00:00
Hafiz Abid Qadeer 2a40c1ee24 Removed a redundant entry.
Revision 203667 has already added lldbHostWindows.a
to USEDLIBS. Revision 203785 just ended up adding a redundant entry.

llvm-svn: 204601
2014-03-24 13:05:09 +00:00
Arnaud A. de Grandmaison 62e5f4de3d Cleanup some dead assignements reported by scan-build
No functionnal change.

llvm-svn: 204545
2014-03-22 20:23:26 +00:00
Jim Ingham 7dabe1a1b6 If a single step ends on a breakpoint, it should be reported as a breakpoint hit
even though the underlying exception is a trace exception.

<rdar://problem/15243355>

llvm-svn: 204534
2014-03-22 00:44:41 +00:00
Andrew MacPherson ea77a5528d Suppress SIGSTOP under Linux and don't explicitly call SetResumeSignal() in POSIXThread, instead just let StopInfo handle it.
llvm-svn: 204504
2014-03-21 19:08:37 +00:00
Hafiz Abid Qadeer 8455c44e6c Don't build LLDBWrapPython.cpp for mingw.
Previous check relied on -DLLDB_DISABLE_PYTHON which was not valid as
it is defined in the top level LLDB Makefile which is included after the check.
If this check is moved after the inclusion of top level Makefile then 
BUILT_SOURCES is not properly handled. So I am using the scheme present
in the Host/Makefile.

llvm-svn: 204459
2014-03-21 12:53:28 +00:00
Hafiz Abid Qadeer 8d44206f53 More cleanup of win32.h.
PATH_MAX is defined if it is not already defined. A duplicate
definition is removed. The declaration of struct timespec is moved
outside #ifdef _MSC_VER to make it available for mingw.

llvm-svn: 204449
2014-03-21 10:15:34 +00:00
Greg Clayton 56b26a5707 Fixed case typo.
llvm-svn: 204402
2014-03-20 21:45:00 +00:00
Greg Clayton 906e9acf91 Switch over to use the ArchSpec::GetMachine() instead of ArchSpec::GetCore() to keep the code more portable as we add new core types to ArchSpec.
llvm-svn: 204400
2014-03-20 21:31:55 +00:00
Greg Clayton f587f8ec9a Add support for dumping DW_LNE_set_discriminator line table extended entries.
llvm-svn: 204369
2014-03-20 18:31:11 +00:00
Ed Maste d494b29596 Quiet Clang warning about signed/unsigned comparison
llvm-svn: 204360
2014-03-20 17:34:26 +00:00
Jim Ingham e1c34bf380 Guard against reading from host address of 0 in getting the data from a Value.
llvm-svn: 204359
2014-03-20 17:13:28 +00:00
Hafiz Abid Qadeer 03a2f10349 Only define MAX_PATH if it is not defined already.
This gets rid of a lot warnings when compiling with mingw.

llvm-svn: 204343
2014-03-20 13:52:26 +00:00
Hafiz Abid Qadeer 10511b2a73 Change the type in va_arg call from char to int.
It is supposed to take fully promoted types.

llvm-svn: 204336
2014-03-20 11:24:44 +00:00