Commit Graph

1071 Commits

Author SHA1 Message Date
Jim Ingham 02994735b7 Add unittests to the Xcode gtest target.
A handful of test files had been added to lldb, but not to the
appropriate target in the Xcode project.  So they weren't being
run in the Xcode gtest run.  Add them here.

llvm-svn: 352114
2019-01-24 22:03:36 +00:00
Jim Ingham e33a90b9cd Add BreakpadRecords to the Xcode project.
llvm-svn: 351585
2019-01-18 20:20:40 +00:00
Jason Molenda 0053d15d9c Add SymbolFileBreakpad.
llvm-svn: 350990
2019-01-12 03:17:39 +00:00
Adrian Prantl 062297dcc6 Remove Range.* from Xcode project
llvm-svn: 350264
2019-01-02 22:23:51 +00:00
Jason Molenda f00cf36290 Remove the zlib CFLAGS and LDFLAGS settings from the xcode project file.
We're linking against libcompression all the time now, we don't need to
fall back to zlib.  zlib support will still be used when lldb is built on
linux et al systems, so I'm not removing any of the source support, but
when built on darwin with xcode, we'll be using libcompression.

llvm-svn: 349572
2018-12-18 23:33:42 +00:00
Jason Molenda 4a793c846f Force libcompression calls to be enabled when building on Darwin
systems.  It has been available in the OS over over three years
now.  If lldb doesn't link against -lcompression, it should be an
error.

Allocate a scratch buffer for libcompression to use when decoding
packets, instead of it having to allocate & free one on every call.

Fix a typeo with the size of the buffer that compression_decode_buffer()
is expanding into.

<rdar://problem/41601084> 

llvm-svn: 349563
2018-12-18 23:02:50 +00:00
Jason Molenda a305151c40 Add PdbAstBuilder.cpp.
llvm-svn: 349406
2018-12-17 22:07:39 +00:00
Jim Ingham d81b96ece8 Fix the unittests for the move of Listener & Broadcaster
from Core to Utility.

llvm-svn: 349211
2018-12-14 23:27:08 +00:00
Greg Clayton 026e1bf56a Cache memory regions in ProcessMinidump and use the linux maps as the source of the information if available
Breakpad creates minidump files that sometimes have:
- linux maps textual content
- no MemoryInfoList

Right now unless the file has a MemoryInfoList we get no region information.

This patch:

- reads and caches the memory region info one time and sorts it for easy subsequent access
- get the region info from the best source in this order:
  - linux maps info (if available)
  - MemoryInfoList (if available)
  - MemoryList or Memory64List
- returns memory region info for the gaps between regions (before the first and after the last)

Differential Revision: https://reviews.llvm.org/D55522

llvm-svn: 349182
2018-12-14 19:36:01 +00:00
Greg Clayton 82694abac7 Fix Xcode project for MIPS architecture plug-in and move of Event, Listener and Broadcaster to Utility.
llvm-svn: 349180
2018-12-14 19:22:24 +00:00
Jim Ingham fed6740374 Add ObjectFileBreakpad.{cpp,h} to the Xcode project.
llvm-svn: 348890
2018-12-11 19:25:03 +00:00
Jim Ingham 5fa736cc19 Add SBInitializerOptions.h to the Xcode project.
And mark it as a public header so it will get copied
into the LLDB.framework.  A handful of "api" tests were
failing because they couldn't find this file.

llvm-svn: 348561
2018-12-07 02:28:04 +00:00
Jim Ingham 3fee41fef0 Fix the Xcode project build for the addition of NativePDB/DWARFLocationExpression.{h,cpp}
llvm-svn: 348519
2018-12-06 19:23:21 +00:00
Jason Molenda 24fb296589 Add SBInitializerOptions.cpp.
llvm-svn: 348300
2018-12-04 20:34:23 +00:00
Jonas Devlieghere 41c4fb40fc Fix the Xcode project (pt. 2)
Apparently LLVM's libSupport depends on libDemangle to print the stack
trace. I'm not sure if this is desired but for now we don't have much
choice if we want to turn to bot green again.

llvm-svn: 347952
2018-11-30 02:44:16 +00:00
Jonas Devlieghere c651e79c4a Fix the Xcode project
This fixes the driver with the Xcode project. We need to link the driver
against the correct LLVM libraries and make sure we're disabling
exceptions/rtti.

Thanks to Jim for helping me figure this out.

llvm-svn: 347936
2018-11-30 00:09:04 +00:00
Jonas Devlieghere 00eae5ea31 [Driver] Use libOption with tablegen.
This patch modifies the lldb driver to use libOption for option parsing.
It allows us to decouple option parsing from option processing which is
important when arguments affect initialization. This was previously not
possible because the debugger need to be initialized as some option
interpretation (like the scripting language etc) was handled by the
debugger, rather than in the driver.

Differential revision: https://reviews.llvm.org/D54692

llvm-svn: 347709
2018-11-27 21:00:32 +00:00
Jason Molenda ddfb07567d add PdbSymUid.cpp
llvm-svn: 347122
2018-11-17 01:08:01 +00:00
Jason Molenda 976f876032 A unit test file moved.
llvm-svn: 346991
2018-11-15 20:28:55 +00:00
Jason Molenda 2a8a665e1f update xcode project file for reproducers.
llvm-svn: 346900
2018-11-14 22:14:07 +00:00
Jason Molenda 0585921b7f Change $CURRENT_ARCH settings in xcode project file to hardcoded
"x86_64" - used for finding the llvm build directory.  Newer
Xcodes do not define CURRENT_ARCH.

llvm-svn: 346443
2018-11-08 22:41:19 +00:00
Jason Molenda 36a4272428 Re-commit regularization of the lldb-gtest-build target.
llvm-svn: 346347
2018-11-07 19:28:03 +00:00
Jason Molenda 37b102d2fa Revert r346285 until I can make it work correctly
the way the bots build lldb.

llvm-svn: 346342
2018-11-07 18:38:15 +00:00
Jason Molenda 6b3954da01 Standardize the OTHER_LDFLAGS for the lldb-gtest-build target.
llvm-svn: 346285
2018-11-07 01:19:52 +00:00
Jason Molenda 8fcf0a74af Add MSVCUndecoratedNameParser.cpp.
llvm-svn: 346278
2018-11-06 23:01:42 +00:00
Jim Ingham eea0203ad3 Fix the Xcode project for the removal of the Go, Java & OCaml
plugins.

llvm-svn: 346162
2018-11-05 20:15:27 +00:00
Pavel Labath be828518c9 NativeProcessProtocol: Simplify breakpoint setting code
Summary:
A fairly simple operation as setting a breakpoint (writing a breakpoint
opcode) at a given address was going through three classes:
NativeProcessProtocol which called NativeBreakpointList, which then
called SoftwareBrekpoint, only to end up again in NativeProcessProtocol
to do the actual writing itself. This is unnecessarily complex and can
be simplified by moving all of the logic into NativeProcessProtocol
class itself, removing a lot of boilerplate.

One of the reeasons for this complexity was that (it seems)
NativeBreakpointList class was meant to hold both software and hardware
breakpoints. However, that never materialized, and hardware breakpoints
are stored in a separate map holding only hardware breakpoints.
Essentially, this patch makes software breakpoints follow that approach
by replacing the heavy SoftwareBraekpoint with a light struct of the
same name, which holds only the data necessary to describe one
breakpoint. The rest of the logic is in the main class. As, at the
lldb-server level, handling software and hardware breakpoints is very
different, this seems like a reasonable state of things.

Reviewers: krytarowski, zturner, clayborg

Subscribers: mgorny, lldb-commits

Differential Revision: https://reviews.llvm.org/D52941

llvm-svn: 346093
2018-11-04 10:58:08 +00:00
Kuba Mracek 41ae8e7445 [lldb] Introduce StackFrameRecognizer [take 3]
This patch introduces a concept of "frame recognizer" and "recognized frame". This should be an extensible mechanism that retrieves information about special frames based on ABI, arguments or other special properties of that frame, even without source code. A few examples where that could be useful could be 1) objc_exception_throw, where we'd like to get the current exception, 2) terminate_with_reason and extracting the current terminate string, 3) recognizing Objective-C frames and automatically extracting the receiver+selector, or perhaps all arguments (based on selector).

Differential Revision: https://reviews.llvm.org/D44603

llvm-svn: 345693
2018-10-31 04:00:22 +00:00
Kuba Mracek cb3628bcc0 Revert r345686 due to build failures
llvm-svn: 345688
2018-10-31 01:22:48 +00:00
Kuba Mracek 8fddd98185 [lldb] Introduce StackFrameRecognizer [take 2]
This patch introduces a concept of "frame recognizer" and "recognized frame". This should be an extensible mechanism that retrieves information about special frames based on ABI, arguments or other special properties of that frame, even without source code. A few examples where that could be useful could be 1) objc_exception_throw, where we'd like to get the current exception, 2) terminate_with_reason and extracting the current terminate string, 3) recognizing Objective-C frames and automatically extracting the receiver+selector, or perhaps all arguments (based on selector).

Differential Revision: https://reviews.llvm.org/D44603

llvm-svn: 345686
2018-10-31 00:36:20 +00:00
Kuba Mracek 377f9f9b3f Revert r345678 (build failure on Linux machines).
llvm-svn: 345680
2018-10-31 00:29:17 +00:00
Kuba Mracek ac0ba8c524 [lldb] Introduce StackFrameRecognizer
This patch introduces a concept of "frame recognizer" and "recognized frame". This should be an extensible mechanism that retrieves information about special frames based on ABI, arguments or other special properties of that frame, even without source code. A few examples where that could be useful could be 1) objc_exception_throw, where we'd like to get the current exception, 2) terminate_with_reason and extracting the current terminate string, 3) recognizing Objective-C frames and automatically extracting the receiver+selector, or perhaps all arguments (based on selector).

Differential Revision: https://reviews.llvm.org/D44603

llvm-svn: 345678
2018-10-31 00:21:03 +00:00
Kuba Mracek d0243aa3e5 [lldb] Remove enableThreadSanitizer from shared Xcode schemes
This was probably committed accidentally and default Xcode builds of LLDB now have TSan on. Let's turn it off.

llvm-svn: 345155
2018-10-24 15:59:31 +00:00
Jason Molenda 705933ad83 Add UdtRecordCompleter.cpp.
llvm-svn: 345069
2018-10-23 19:03:52 +00:00
Jason Molenda a84c7485cf Add NativePDB subdir again.
llvm-svn: 344414
2018-10-12 20:53:21 +00:00
Jason Molenda 74ccc7aed0 Remove references to source/Plugins/SymbolFile/NativePDB.
llvm-svn: 344323
2018-10-12 00:53:55 +00:00
Jason Molenda 32762fd29d Upstreaming the BridgeOS device support and the
LC_BUILD_VERSION load command handling - this
commit is a combination of patches by Adrian
Prantl and myself.  llvm::Triple::BridgeOS 
isn't defined yet, so all references to that
are currently commented out.  

Also update Xcode project file to build the 
NativePDB etc plugins.

<rdar://problem/43353615> 

llvm-svn: 344209
2018-10-11 00:28:35 +00:00
Shafik Yaghmour 8306f76e56 [DataFormatters] Add formatter for C++17 std::variant
rdar://problem/43691454

Patch by Shafik Yaghmour.

Differential Revision: https://reviews.llvm.org/D51520

llvm-svn: 342563
2018-09-19 18:07:05 +00:00
Vedant Kumar 9b13bea61a Allow use of self.filecheck in LLDB tests (c.f self.expect)
Add a "filecheck" method to the LLDB test base. This allows test authors
to pattern match command output using FileCheck, making it possible to
write stricter tests than what `self.expect` allows.

For context (motivation, examples of stricter checking, etc), see the
lldb-dev thread: "Using FileCheck in lldb inline tests".

Differential Revision: https://reviews.llvm.org/D50751

llvm-svn: 342508
2018-09-18 19:31:47 +00:00
Shafik Yaghmour 2ee93d28fd Revert "[DataFormatters] Add formatter for C++17 std::variant"
This reverts commit r342421.

Because it breaks build bot http://green.lab.llvm.org/green/job/lldb-cmake-clang-5.0.2//418/console

llvm-svn: 342424
2018-09-17 23:15:35 +00:00
Shafik Yaghmour 854a35092c [DataFormatters] Add formatter for C++17 std::variant
rdar://problem/43691454

Patch by Shafik Yaghmour.

Differential Revision: https://reviews.llvm.org/D51520

llvm-svn: 342421
2018-09-17 22:10:44 +00:00
Jim Ingham 2e9470402d Remember to sort the Xcode project file. NFC.
llvm-svn: 342188
2018-09-13 21:55:00 +00:00
Jim Ingham 3815e702e7 Add a "scripted" breakpoint type to lldb.
This change allows you to write a new breakpoint type where the
logic for setting breakpoints is determined by a Python callback
written using the SB API's.

Differential Revision: https://reviews.llvm.org/D51830

llvm-svn: 342185
2018-09-13 21:35:32 +00:00
Davide Italiano fc89d18bb1 [XCodeproj] Remove extra whitespace in SBAPI path.
llvm-svn: 341732
2018-09-07 23:49:05 +00:00
Jim Ingham effe60fdbd Add input files to the "prepare swig bindings" step.
This build phase had no inputs, so you always had to manually
delete LLDBWrapPython.cpp to get it to rebuild.  Add the correct
inputs.

llvm-svn: 341683
2018-09-07 18:10:26 +00:00
Jason Molenda 0dfb84ce9b Enable the fp-armv8 disassembler feature when disassembling Cortex-M
code.  This will enable disassembly of the optional subset of
neon that some Cortex cores support.  Add a unit test to check
that a few of these instructions disassemble as expected.

<rdar://problem/26674303> 

llvm-svn: 341623
2018-09-07 01:28:48 +00:00
Greg Clayton 2f5cf8511a Add a new tool named "lldb-vscode" that implements the Visual Studio Code Debug Adaptor Protocol
This patch adds a new lldb-vscode tool that speaks the Microsoft Visual Studio Code debug adaptor protocol. It has full unit tests that test all packets.

This tool can be easily packaged up into a native extension and used with Visual Studio Code, and it can also be used by Nuclide

Differential Revision: https://reviews.llvm.org/D50365

llvm-svn: 339911
2018-08-16 17:59:38 +00:00
Adrian Prantl c53d36847e Add libc++ data formatters for std::optional.
Patch by Shafik Yaghmour!

This reapplies an earlier version after addressing some post-commit feedback.

Differential Revision: https://reviews.llvm.org/D49271

llvm-svn: 339828
2018-08-15 22:48:48 +00:00
Stefan Granitz 44780cc3b9 Remove unused FastDemangle sources
llvm-svn: 339671
2018-08-14 11:32:51 +00:00
Tatyana Krasnukha 14dc665398 Remove unused type Either from Utility library.
llvm-svn: 339328
2018-08-09 11:42:28 +00:00