Commit Graph

16602 Commits

Author SHA1 Message Date
Saleem Abdulrasool 6c13510c10 Plugins: fix resolution ambiguity in PDB plugin
A clang change caused the inclusion of `llvm::Type` and
`lldb_private::Type` to be pulled into the global namespace due to the
`using namespace llvm;` and `using namespace lldb_private;`.  Explicitly
qualify the `Type` to resolve the ambiguity.  NFC

llvm-svn: 312841
2017-09-09 00:13:49 +00:00
Adrian McCarthy 8fe23bc520 Fix for bug 34510 - Minidump target does not resolve new symbols correctly
Even though the content of the minidump does not change in a debugging session,
frames can't be indiscriminately be cached since modules and symbols can be
explicitly added after the minidump is loaded.

The fix is simple, just let the base Thread::ClearStackFrames() do its job.

submitted by amccarth on behalf of lemo

Bug: https://bugs.llvm.org/show_bug.cgi?id=34510

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

llvm-svn: 312735
2017-09-07 18:29:48 +00:00
Ted Woodward 9927431d81 Fix lldb-mi test data_read_memory_bytes_global
Summary:
Test was skipped because -data-evaluate-expression was thought
to not work on globals. This is not the case - the issue was clang
removes debug info for globals in cpp files that are not used.

Add a reference to the globals in question, and fix memory patter in
test to match memory pattern in testcase.

Reviewers: ki.stfu, abidh

Reviewed By: ki.stfu

Subscribers: aprantl, lldb-commits

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

llvm-svn: 312726
2017-09-07 16:24:39 +00:00
Chris Bieneman 5226a2a6de [CMake] Need to set WITH_LOCKDOWN on debugserver target
Turns out WITH_LOCKDOWN define changes the struct layout and constructor implementation for RNBSocket which is used in debugserver.cpp, so we need to make sure this is consistent.

In the future we should change WITH_LOCKDOWN to be configured in a generated header, but for now we can just set it correctly.

<rdar://problem/33900552>

llvm-svn: 312666
2017-09-06 20:15:43 +00:00
Jan Kratochvil 75a79e72ae Fix DW_FORM_strp parsing
Differential revision: https://reviews.llvm.org/D37441

llvm-svn: 312562
2017-09-05 19:01:01 +00:00
Davide Italiano cd28bce8df [ABI] Rewrite RegisterIsCalleeSaved.
The goal of this patch is twofold:
First, it removes a wrong comment (at least, not correctly describing
what the function does).
Then, it rewrites the function to use a StringSwitch where the
registers are enumerated explicitly instead of being computed
programmatically. Other than being much shorter, it's much easier to
read (and given the ABI won't change anytime soon, I don't think
there's need to generalize).

While here, I added an assert that the register name is always empty,
as the previous implementation of the function assumed so.

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

llvm-svn: 312501
2017-09-04 21:21:12 +00:00
Davide Italiano d8f067539b [UUID] Reimplement comparison operators more canonically. NFCI.
llvm-svn: 312457
2017-09-03 20:53:24 +00:00
Davide Italiano 45188dd9ae [Interpreter] Simplify else after return. NFCI.
llvm-svn: 312454
2017-09-03 19:27:56 +00:00
Davide Italiano e08ea3a154 [Core/Value] Remove dead code that hasn't been touched in years. NFC.
llvm-svn: 312453
2017-09-03 19:24:58 +00:00
Ed Maste a64594da50 Add test case for attach-by-pid from different cwd
This was failing on FreeBSD prior to r312430.
Patch by Vignesh Balu.

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

llvm-svn: 312431
2017-09-03 01:44:35 +00:00
Ed Maste 207184f345 FreeBSD: attach to pid from different cwd
attach by pid worked when running from the directory from which the
target was launched, but failed from a different directory. Use the
kern.proc.pathname sysctl to locate the target, falling back to the
original case of the target's argv[0] if that fails. Based on a patch
from Vignesh Balu.

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

llvm-svn: 312430
2017-09-03 01:41:31 +00:00
Ted Woodward 91635e0cef lldb-mi: -var-update can hang when traversing complex types with pointers
Summary:
-var-update calls CMICmdCmdVarUpdate::ExamineSBValueForChange to check if a varObj has been updated. It checks that the varObj is updated, then recurses on all of its children. If a child is a pointer pointing back to a parent node, this will result in an infinite loop, and lldb-mi hanging.

The problem is exposed by packages/Python/lldbsuite/test/tools/lldb-mi/variable/TestMiVar.py, but this test is skipped everywhere.

This patch changes ExamineSBValueForChange to not traverse children of varObjs that are pointers.

Reviewers: ki.stfu, zturner, clayborg, abidh

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 312270
2017-08-31 19:22:33 +00:00
Davide Italiano 9ce4432174 [TypeSystem] Reduce code duplication merging two almost identical functions.
llvm-svn: 312267
2017-08-31 18:47:49 +00:00
Eugene Zemtsov 37b1d7b36f Now a ppc64le binary is correctly detected:
(lldb) target create "tst"
Current executable set to 'tst' (powerpc64le).
(lldb) disassemble -n main
tst`main:
tst[0x7b0] <+0>: addis 2, 12, 2
tst[0x7b4] <+4>: addi 2, 2, 30544
tst[0x7b8] <+8>: mflr 0

Wihout the patch, the endianess was incorrect:
(lldb) target create "tst"
Current executable set to 'tst' (powerpc64).
(lldb) disassemble -n main
tst`main:
tst[0x7b0] <+0>: .long 0x02004c3c ; unknown opcode
tst[0x7b4] <+4>: rlwimi 23, 3, 8, 8, 28
tst[0x7b8] <+8>: lhzu 16, 2172(2)
tst[0x7bc] <+12>: .long 0x100001f8 ; unknown opcode

Simple binary used is identified as:
$ file tst
tst: ELF 64-bit LSB shared object, 64-bit PowerPC or cisco 7500, version
1 (SYSV), dynamically linked, interpreter /lib64/ld64.so.2, for
GNU/Linux 3.2.0, BuildID[sha1]=17a8fa2b24ce2837ba6625fabb34e6b29c6c5db7,
not stripped

Patch by Gustavo Serra Scalet <gustavo.scalet@eldorado.org.br>
Differential Revision: https://reviews.llvm.org/D36804

llvm-svn: 312151
2017-08-30 18:36:48 +00:00
Chris Bieneman c6f6aa441b [IPv6] Fix a bug in the IPv6 listen behavior
The socket bind address should either be localhost or anyaddress. This bug in the listen behavior was preventing lldb-server from opening sockets for non-localhost connections.

The added test verifies that opening an anyaddress socket works and has a non-zero port assignment.

This should resolve PR34183.

llvm-svn: 312008
2017-08-29 16:13:41 +00:00
Jason Molenda af6e7e2b0c update xpc service name.
llvm-svn: 311978
2017-08-29 04:28:48 +00:00
Jim Ingham 7fd34e4b80 Add the DWARF DWP files to the Xcode project.
llvm-svn: 311786
2017-08-25 17:48:01 +00:00
Tamas Berghammer 963ce483b8 Add support for the DWP debug info format
Summary:
The DWP (DWARF package) format is used to pack multiple dwo files
generated by split-dwarf into a single ELF file to make distributing
them easier. It is part of the DWARFv5 spec and can be generated by
dwp or llvm-dwp from a set of dwo files.

Caviats:
* Only the new version of the dwp format is supported (v2 in GNU
  numbering schema and v5 in the DWARF spec). The old version (v1) is
  already deprecated but binutils 2.24 still generates that one.
* Combining DWP files with module debugging is not yet supported.

Subscribers: emaste, mgorny, aprantl

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

llvm-svn: 311775
2017-08-25 13:56:14 +00:00
Jim Ingham 44ea319596 Fixed a typo in the example (getName -> GetName)
but while I was at it I converted the example to use
properties, since that's much nicer looking.

llvm-svn: 311679
2017-08-24 18:01:50 +00:00
Jason Molenda 9ff294f039 Change the ftag x87 register from being 8-bits wide to 16-bits wide
to match the changes Saleem Abdulrasool committed in r311579.  Fixes
a testsuite failure now that the testsuite expects a 16 bit return
value for thsi reg.

llvm-svn: 311627
2017-08-24 03:22:08 +00:00
Jason Molenda c064881a36 When parsing the DBGSourcePathRemapping plist entries
in a dSYM, and it's a version 2 DBGSourcePathRemapping,
in addition to the build/source paths specified, add 
build/source paths with the last two filename components
removed.  This more generic remapping can sometimes
help lldb to find the correct source file in complex
projects.
<rdar://problem/33973545> 

llvm-svn: 311622
2017-08-24 00:58:14 +00:00
Jim Ingham a4bb80b211 Log whether we found a step out plan or not.
llvm-svn: 311590
2017-08-23 19:40:21 +00:00
Saleem Abdulrasool 5b7cc3600a test: fix missed test
I had built without python bindings and did not find this in the grep
output.  Adjust the test output for the printing format update.

llvm-svn: 311582
2017-08-23 18:05:19 +00:00
Saleem Abdulrasool bf2a8a2878 Process: fix FXSAVE on x86
The FXSAVE member `ftw` (FPU Tag Word) was given the wrong size (8-bit)
instead of the correct width (16-bit) as per the x87 Programmer's
Manual.  Adjust this to ensure that we print out the complete value for
the register.

llvm-svn: 311579
2017-08-23 17:23:12 +00:00
Saleem Abdulrasool fe3a5bfb25 ObjC: fix some -Wpedantic warnings by removing ';'
Remove some stray ';' that were in the source code.  NFC.

llvm-svn: 311577
2017-08-23 17:00:14 +00:00
Kuba Mracek 5adc46ca3e Fixup for r311483: Use correct path to StreamString.h
llvm-svn: 311484
2017-08-22 19:09:39 +00:00
Kuba Mracek 20bce855ca [lldb] Correctly escape newlines and backslashes in the JSON serializer
JSON serializer fails to escape newlines and backslashes. Let's fix that.

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

llvm-svn: 311483
2017-08-22 18:36:12 +00:00
Bruce Mitchener 416bc3d70a lldb-argdumper doesn't need lldbCore.
Summary: lldb-argdumper only needs lldbUtility to successfully build and link.

Reviewers: beanz, zturner, labath

Subscribers: mgorny, lldb-commits

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

llvm-svn: 311399
2017-08-21 22:54:49 +00:00
Michal Gorny d5ac1812b7 [unittests] Build LLVMTestingSupport for out-of-source builds
The Process/gdb-remote test now requires the LLVMTestingSupport library
that is not installed by LLVM. As a result, when doing an out-of-source
build it fails being unable to find the library. To solve that, build
a local copy of the library when building LLDB with unittests and LLVM
sources available. This is based on how we deal with bundled gtest
sources.

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

llvm-svn: 311355
2017-08-21 17:41:39 +00:00
Michal Gorny 7e1c51e0c1 [cmake] Explicitly link dependency libraries in the Host library
Add explicit linkage to the necessary system libraries in the Host
library. Otherwise, the library fails to build with -Wl,--as-needed.
The system libraries ended up being listed on the linker command-line
before the static libraries needing them, resulting in --as-needed
stripping them.

Listing the dependent libraries explicitly is the canonical way of
declaring libraries in CMake. It guarantees that the system library
dependencies will be correctly propagated to reverse dependencies.

The code used to link libraries reuses existing EXTRA_LIBS variable,
copying code from other parts of LLDB. We might eventually remove
the direct use of system libraries in the programs; however, I would
prefer if we focused on fixing the build regressions in 5.0 branch
first, and went further after the release.

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

llvm-svn: 311354
2017-08-21 17:41:33 +00:00
Davide Italiano 7e930d12df [Plugins/ObjC] Remove more semicolons to placate -Wpedantic. NFCI.
llvm-svn: 311245
2017-08-19 16:32:19 +00:00
Davide Italiano c8bee2ced2 [Plugins/ObjC] Remove unneded semicolon(s) to placate GCC -Wpedantic.
llvm-svn: 311244
2017-08-19 16:30:47 +00:00
Jason Molenda fba547d7e7 Commiting Christopher Brook's patch for
"Prevent negative chars from being sign-extended into isprint and isspace which take and int and crash if the int is negative"

https://reviews.llvm.org/D36620

llvm-svn: 311207
2017-08-18 22:57:59 +00:00
Michal Gorny 8e58ad5182 [cmake] Add explicit linkage from Core to curses
The Core library calls functions provided by the curses library. Add
an appropriate explicit LINK_LIBS to ${CURSES_LIBRARIES} to propagate
the dependency correctly within the build system.

It seems that so far the linkage was handled by some kind of implicit
magic LLDB_SYSTEM_LIBS variable. However, it stopped working for
unittests as the curses libraries are passed before the LLDBCore
library, resulting in `-Wl,--as-needed` stripping the yet-unused library
before it is required by LLDBCore, and effectively breaking the build.
I think it's better to focus on listing all the dependencies explicitly
and let CMake propagate them rather than trying to figure out why this
hack stopped working.

This is also more consistent with LLVM where the curses linkage
in LLVMSupport is expressed directly in the library rather than deferred
to the final programs.

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

llvm-svn: 311122
2017-08-17 20:33:21 +00:00
Ed Maste 83f0cd17eb convert hard tabs to spaces in PlatformOpenBSD.cpp
Another case of this was responsible for the whitespace conflict
in D34776.

llvm-svn: 311003
2017-08-16 13:10:07 +00:00
Ed Maste 37c40af712 Make i386-*-freebsd expression work on JIT path
* Enable i386 ABI creation for freebsd
* Added an extra argument in ABISysV_i386::PrepareTrivialCall for mmap
  syscall
* Unlike linux, the last argument of mmap is actually 64-bit(off_t).
  This requires us to push an additional word for the higher order bits.
* Prior to this change, ktrace dump will show mmap failures due to
  invalid argument coming from the 6th mmap argument.

Patch by Karnajit Wangkhem

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

llvm-svn: 311002
2017-08-16 12:55:02 +00:00
Tamas Berghammer bba2c83493 Remove the DWARFExpression -> Clang ExpressionParser dependency
It was completly unused and broke the part of the encapsulation that
common code shouldn't depend on specific plugins or language specific
features.

llvm-svn: 311000
2017-08-16 11:45:10 +00:00
Lang Hames ccfc80ccc7 Fix typo in variable name.
llvm-svn: 310984
2017-08-16 01:50:32 +00:00
Jason Molenda bb93483c11 Update NSArray/NSDictionary/NSSet formatters to handle new
macOS 10.13 - High Sierra - internal layouts.  Patch by 
Sean Callanan.

<rdar://problem/33282015>

llvm-svn: 310959
2017-08-15 21:23:14 +00:00
Chris Bieneman a944dd109b [CMake] Fixing an error in STREQUAL usage.
llvm-svn: 310955
2017-08-15 20:56:04 +00:00
Chris Bieneman 30f044b72c [CMake] Disable code sign entitlements when using lldb_codesign
Turns out self-signed certificates and entitlements don't always play well together...

llvm-svn: 310936
2017-08-15 17:42:20 +00:00
Nitesh Jain f7a5851d42 [LLDB][MIPS] Fix process load/unload on android.
To detect the correct function name based on the list of available symbols instead of the SDK version

Reviewers: tberghammer, clayborg

Subscribers: jaydeep, bhushan, lldb-commits

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

llvm-svn: 310856
2017-08-14 16:39:16 +00:00
Nitesh Jain 8ac63e8f9f [LLDB][MIPS] Set the Section's file address for
ELF section to LLDB_INVALID_ADDRESS if SHF_ALLOC is not set.

Reviewers: labath, clayborg

Subscribers: jaydeep, bhushan, lldb-commits

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

llvm-svn: 310855
2017-08-14 16:30:25 +00:00
Ed Maste 93cdee661c remove FreeBSD xfail decorator from TestCppNsImport
The Linux xfail decorator was removed in r272326 with the claim that the
test "runs reliably on the linux x86 buildbot." It also runs reliably on
FreeBSD for me.

llvm.org/pr25925

llvm-svn: 310644
2017-08-10 18:26:52 +00:00
Ed Maste 140dd57242 remove FreeBSD xfail decorator from TestCallStdStringFunction
This test is consistently reporting unexpected pass for me on FreeBSD
10 and 12. It was failing on the old FreeBSD buildbot which has now been
retired for some time. Will investigate further if this fails once a new
buildbot is configured and running tests.

llvm.org/pr17807

llvm-svn: 310626
2017-08-10 17:01:51 +00:00
Ed Maste e3842476de remove FreeBSD xfail decorator from TestExitDuringBreak
This test passes for me on FreeBSD 10 and 12(-CURRENT).

llvm.org/pr18190

llvm-svn: 310624
2017-08-10 16:48:36 +00:00
Ed Maste 5e82ca353d Report inferior signals as signals, not exceptions, on FreeBSD
This is the FreeBSD equivalent of r238549.

This serves 2 purposes:

* LLDB should handle inferior process signals SIGSEGV/SIGILL/SIGBUS/
  SIGFPE the way it is suppose to be handled. Prior to this fix these
  signals will neither create a coredump, nor exit from the debugger
  or work for signal handling scenario.
* eInvalidCrashReason need not report "unknown crash reason" if we have
  a valid si_signo

llvm.org/pr23699

Patch by Karnajit Wangkhem

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

llvm-svn: 310591
2017-08-10 13:47:17 +00:00
Tim Hammerquist 118a928931 Add remainder of unittests to Xcode project
Resolves a few build settings required to run DWARF tests as well.

rdar://problem/33664378

llvm-svn: 310512
2017-08-09 19:44:18 +00:00
Tim Hammerquist 5706f1e6f6 Fix VASprintfTest.cpp for Darwin, add checks
Summary:
The EncodingError test ensures that trying to encode a multibyte wchar
with a given codepage fails. If setlocale() fails, the encoding is
performed using the current locale, which may or may not fail.

This patch asserts that both setlocale() operations are successful, as
well as falling back to a widely available unibyte encoding for
non-Windows systems.

<rdar://problem/33782806>

Reviewers: zturner, labath, lhames

Reviewed By: zturner

Subscribers: lldb-commits

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

llvm-svn: 310499
2017-08-09 17:27:02 +00:00
Vadim Macagon 48df75fc65 Fix PlatformPythonTestCase.test_platform_list for the build bots
llvm-svn: 310488
2017-08-09 15:49:15 +00:00
Vadim Macagon c10e34d07c Expose active and available platform lists via SBDebugger API
Summary:
The available platform list was previously only accessible via the
`platform list` command, this patch makes it possible to access that
list via the SBDebugger API. The active platform list has likewise
been exposed via the SBDebugger API.

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

llvm-svn: 310452
2017-08-09 09:20:40 +00:00
Tim Hammerquist 3666adf2f2 Add existing unit tests to Xcode project
Summary:
This adds gtest test files to the Xcode project which were
previously only in the cmake config. This is the first of several
planned merges.

Reviewers: beanz, spyffe, jingham

Reviewed By: jingham

Subscribers: lldb-commits

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

llvm-svn: 310417
2017-08-08 20:59:20 +00:00
Abhishek Aggarwal 95bd95c075 Checking in files accidentally missed in later diffs of revision r310261
-- 2 files were missing in this commit which should have been there.
    These files were submitted initially for review and were reviewed.
    However, while updating the revision with newer diffs, I accidentally
    forgot to include them in newer diffs. So commiting now.
    

llvm-svn: 310341
2017-08-08 09:25:50 +00:00
Abhishek Aggarwal a8af18ac1d Fixed build failure for revision r310261
-- Was failing for Linux

llvm-svn: 310270
2017-08-07 17:15:26 +00:00
Abhishek Aggarwal 96bea51234 Fixed build failure for revision r310261
-- Build was failing for freebsd

llvm-svn: 310266
2017-08-07 15:53:30 +00:00
Abhishek Aggarwal 307db0f897 Tool for using Intel(R) Processor Trace hardware feature
Summary:
1. Provide single library for all Intel specific hardware features instead
    of individual libraries for each feature
2. Added Intel(R) Processor Trace hardware feature in this single library.
    Details about the tool implementing this feature is as follows:

     Tool developed on top of LLDB to provide its users the execution
     trace of the debugged inferiors. Tool's API are exposed as C++ object
     oriented interface in a shared library. API are designed especially to be
     easily integrable with IDEs providing LLDB as an application debugger.
     Entire API is also available as Python functions through a script bridging
     interface allowing development of python modules.

     This patch also provides a CLI wrapper to use the Tool through LLDB's command
     line. Highlights of the Tool and the wrapper are given below:

  ******************************
  Intel(R) Processor Trace Tool:
  ******************************
       - Provides execution trace of the debugged application
       - Uses Intel(R) Processor Trace hardware feature (already implemented inside LLDB)
         for this purpose
           -- Collects trace packets generated by this feature from LLDB, decodes and
              post-processes them
           -- Constructs the execution trace of the application
           -- Presents execution trace as a list of assembly instructions
       - Provides 4 APIs (exposed as C++ object oriented interface)
           -- start trace with configuration options for a thread/process,
           -- stop trace for a thread/process,
           -- get the execution flow (assembly instructions) for a thread,
           -- get trace specific information for a thread
       - Easily integrable into IDEs providing LLDB as application debugger
       - Entire API available as Python functions through script bridging interface
           -- Allows developing python apps on top of Tool
       - README_TOOL.txt provides more details about the Tool, its dependencies, building
         steps and API usage
       - Tool ready to use through LLDB's command line
           -- CLI wrapper has been developed on top of the Tool for this purpose

  *********************************
  CLI wrapper: cli-wrapper-pt.cpp
  *********************************
       - Provides 4 commands (syntax similar to LLDB's CLI commands):
           -- processor-trace start
           -- processor-trace stop
           -- processor-trace show-trace-options
           -- processor-trace show-instr-log
       - README_CLI.txt provides more details about commands and their options

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

Reviewers: clayborg, jingham, lldb-commits, labath

Reviewed By: clayborg

Subscribers: ravitheja, emaste, krytarowski, mgorny

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

llvm-svn: 310261
2017-08-07 15:26:11 +00:00
Jim Ingham 1c7dc829bc Cut and paste error from r23162.
llvm-svn: 309977
2017-08-03 19:38:38 +00:00
Jim Ingham f08f5c9926 Add an auto-continue flag to breakpoints & locations.
You can get a breakpoint to auto-continue by adding "continue"
as a command, but that has the disadvantage that if you hit two
breakpoints simultaneously, the continue will force the process
to continue, and maybe even forstalling the commands on the other.
The auto-continue flag means the breakpoints can negotiate about
whether to stop.

Writing tests, I wanted to supply some commands when I made the
breakpoints, so I also added that ability.

llvm-svn: 309969
2017-08-03 18:13:24 +00:00
Rafael Espindola 86b875fc08 Update for llvm api change.
llvm-svn: 309916
2017-08-03 02:45:01 +00:00
Vadim Macagon 59e8ab5112 Fix ProcessAPITestCase.test_get_process_info
llvm-svn: 309803
2017-08-02 10:12:12 +00:00
Jim Ingham af26b22cd2 Fix a mis-feature with propagation of breakpoint options -> location options.
When an option was set at on a location, I was just copying the whole option set 
to the location, and letting it shadow the breakpoint options.  That was wrong since
it meant changes to unrelated options on the breakpoint would no longer take on this
location.  I added a mask of set options and use that for option propagation.

I also added a "location" property to breakpoints, and added SBBreakpointLocation.{G,S}etCommandLineCommands
since I wanted to use them to write some more test cases.

<rdar://problem/24397798>

llvm-svn: 309772
2017-08-02 00:16:10 +00:00
Sean Callanan 4115b36100 xfail test_get_process_info pending bot fixes
llvm-svn: 309714
2017-08-01 17:43:54 +00:00
Jim Ingham 11b8731f6b Remember to make API headers Public in the LLDB target.
llvm-svn: 309709
2017-08-01 17:19:59 +00:00
Sean Callanan 2b89c14b8c [build system] Add SBProcessInfo to the xcodeproj
llvm-svn: 309702
2017-08-01 17:08:46 +00:00
Vadim Macagon 141a6263da Expose process instance info via SB API
Summary:
Implement SBProcessInfo to wrap lldb_private::ProcessInstanceInfo,
and add SBProcess::GetProcessInfo() to retrieve info like parent ID,
group ID, user ID etc. from a live process.

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

llvm-svn: 309664
2017-08-01 07:34:26 +00:00
Eugene Zemtsov 9c410c1b21 Fix incorrect use of std::unique
llvm-svn: 309648
2017-08-01 01:29:55 +00:00
Sean Callanan 558e52c108 [build-script] Bring in modernizations from downstream:
- Don't do any checks of the current SCM repository if the
  llvm repositories are already there.  Useful for bots.
- When symlinking, remove old symlinks.
- Support loading build-script as a library, not necessarily
  under Xcode.
- Stringify args before passing them to subprocess.

llvm-svn: 309631
2017-07-31 21:50:00 +00:00
Jan Kratochvil b14f1da23c Fix LLDB crash accessing unknown DW_FORM_* attributes
Current LLDB (that is without DWZ support) crashes accessing Fedora debug info:
READ of size 8 at 0x60200000ffc8 thread T0
    #0 in DWARFDebugInfoEntry::BuildAddressRangeTable(SymbolFileDWARF*, DWARFCompileUnit const*, DWARFDebugAranges*) const tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:1336

Greg Clayton: We will need a warning to be emitted in
SymbolFileDWARF::CalculateAbilities() stating we won't parse the DWARF due to
"unsupported DW_FORM value of 0x1f20".

Patch has been mostly written by Greg Clayton.

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

llvm-svn: 309581
2017-07-31 17:02:52 +00:00
Tamas Berghammer 15cf379519 Add support for base address entries in the .debug_ranges section
Summary:
Clang recently started to emit base address entries into the
.debug_ranges section to reduce the number of relocations needed. Lets
make sure LLDB can read them.

llvm-svn: 309554
2017-07-31 10:26:19 +00:00
Chris Bieneman 20f45a3e73 [CMake] Add SharingPtr.h to the Framework header list
lldb-forward.h which is a public header uses SharingPtr, so we need to include that header as well.

llvm-svn: 309429
2017-07-28 20:27:38 +00:00
Chris Bieneman 6678e39aa4 [CMake] debugserver-nonui doesn't go in the framework
Small change to correct the install path of the nonui debugserver.

llvm-svn: 309428
2017-07-28 20:27:37 +00:00
Chris Bieneman b311741011 [CMake] libcompression is optional not required for debugserver
Fix a quick bug from r309395.

llvm-svn: 309396
2017-07-28 15:44:16 +00:00
Chris Bieneman 8c01cc54eb [CMake] Add checks for libcompression
This enables libcompression when available in the CMake build system.

llvm-svn: 309395
2017-07-28 15:39:51 +00:00
Chris Bieneman 0025f3f6ba [CMake] Cleanup of header fixup and installation
This patch does the following:

* Gets the header copy step to re-run whenever header change
* Gets the header fix-up step to re-run whenever headers are copied
* Removes lldb-private*.h headers from the installed headers

llvm-svn: 309394
2017-07-28 15:39:51 +00:00
Chris Bieneman e142631443 [CMake] Enable OS_LOG support on Darwin
This gets CMake to match the Xcode project build

llvm-svn: 309393
2017-07-28 15:39:50 +00:00
Chris Bieneman 6bcc4b96b3 [CMake] Adapt to clang r309390
This removes the configuration order dependence between LLDB and Clang.

llvm-svn: 309392
2017-07-28 15:39:49 +00:00
Tamas Berghammer b3ad17fbf7 XFAIL/XFlakey some tests what become very flakey on the Linux buildbot
llvm-svn: 309265
2017-07-27 12:01:32 +00:00
Nitesh Jain d055b8f808 [LLDB][MIPS] Fix emulation of Instruction for MIPS64R6 target.
Subscribers: jaydeep, bhushan, lldb-commits, slthakur
llvm-svn: 309250
2017-07-27 05:34:33 +00:00
Jim Ingham a81bd7f101 Fix the formatting for help on option value types.
Patch by Jessica Han <jessicah@juniper.net>

https://reviews.llvm.org/D35525

llvm-svn: 309238
2017-07-27 00:18:18 +00:00
Sean Callanan 3c023abe55 Skip test_unique_stacks on Darwin, because it doesn't terminate reliably.
rdar://problem/33462362

llvm-svn: 309046
2017-07-25 22:44:34 +00:00
Chris Bieneman 09736e314c [CMake] Build debugserver & debugserver_nonui
When building for iOS we build two variants of debugserver. One which supports UI functionality like Springboard for launching applications, and one which does not.

This patch adds support for building debugserver with and without UI support libraries being available.

llvm-svn: 309026
2017-07-25 20:31:53 +00:00
Chris Bieneman 3769777f11 [CMake] Update Framework construction for iOS
On iOS frameworks don't have versions or resources, they are flatter bundles. This updates the LLDB framework build to accommodate the flatter bundles.

llvm-svn: 309025
2017-07-25 20:31:15 +00:00
Chris Bieneman 7f47b85c52 [CMake] Rework construction of framework bundle
This adds an explicit step for processing the headers and restructures how the framework bundles are constructed. This should make the frameworks more reliably constructed.

llvm-svn: 309024
2017-07-25 20:30:58 +00:00
Chris Bieneman 4a1db1b037 [CMake] Fix framework build
The LLDB framework build looks for the swig-generated source in the wrong place. This should resolve that.

llvm-svn: 309023
2017-07-25 20:30:35 +00:00
Chris Bieneman 5493c34c85 [CMake] NFC. Cleanup unnecessary CMake policy
This is just setting to the default behavior, so it does nothing.

llvm-svn: 309022
2017-07-25 20:30:18 +00:00
Chris Bieneman 5deeda88a3 [CMake] Cleanup unnecessary definition
This is only used in one file, and we already set it correctly on that file, so we don't need to set this everywhere.

llvm-svn: 309021
2017-07-25 20:29:45 +00:00
Chris Bieneman 712fe007cd [CMake] Add debugserver entitlements
When consigning debugserver we should also include the entitlements file on the code sign command.

llvm-svn: 309020
2017-07-25 20:29:28 +00:00
Adrian Prantl 4b2113036d Improve the fix for PR33875 by not hardcoding the section name.
This is a follow-up to r308905.

llvm-svn: 309019
2017-07-25 20:12:25 +00:00
Sean Callanan afc70ab3e2 [TypeSystem] Guard the global `ASTSourceMap` with a mutex
s_source_map in ClangExternalASTSourceCommon.cpp is unguarded 
and therefore can break in multithreaded conditions. This can 
cause crashes in particular if multiple targets are being set
up at once.

This patch wraps s_source_map in a function that ensures 
exclusivity, and makes every user of it use that function
instead.

<rdar://problem/33429774> lldb crashes after "resume_off"

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

llvm-svn: 308993
2017-07-25 17:33:37 +00:00
Eugene Zemtsov 7cff7d4664 Extend 'target symbols add' to load symbols from a given module
Now -shlib flag can be provided alongside with names of symbols files:

(lldb) target symbols add --shlib stripper-lib.so unstripper-lib.so

This is helpful when default matching mechanisms by name and UUID
can't find a module, and the user needs to explicitly specify
which module the given symbol file belongs to.

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

llvm-svn: 308933
2017-07-24 22:52:39 +00:00
Sean Callanan 206c973b1b Skip test_lldbmi_var_update on Darwin.
llvm-svn: 308919
2017-07-24 20:11:20 +00:00
Greg Clayton ea5df1049b Don't allow .debug_types to be parsed as LLDB can crash when enums are not able to be found.
Differential Revision: https://reviews.llvm.org/D35734

llvm-svn: 308911
2017-07-24 18:40:33 +00:00
Adrian Prantl 8bbb130793 RFix PR33875 by distinguishing between DWO and clang modules.
This reapplies https://reviews.llvm.org/D35740 with a tweak to find
the section by name rather than type. Section types don't distinguish
between regular sections and their DWO counterparts.

llvm-svn: 308905
2017-07-24 18:06:39 +00:00
Greg Clayton 2434d45b85 Don't crash when hostname is empty. StringRef will assert and kill your program.
llvm-svn: 308896
2017-07-24 16:47:04 +00:00
Adrian Prantl ed6f69c111 Revert "Fix PR33875 by distinguishing between DWO and clang modules"
This reverts commit r308850.

llvm-svn: 308851
2017-07-23 20:24:41 +00:00
Adrian Prantl 651166c2d2 Fix PR33875 by distinguishing between DWO and clang modules
The DWO handling code can get confused by clang modules which also use
skeleton CUs to point to the object file with the full debug
info. This patch detects whether an object is a "real" DWO or a clang
module and prevents LLDB from interpreting clang modules as DWO. This
fixes the regression in TestWithModuleDebugging.

http://llvm.org/bugs/show_bug.cgi?id=33875

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

llvm-svn: 308850
2017-07-23 17:59:07 +00:00
Greg Clayton 5b075d636f Added a missing "break;" after seeing a clang warning about potential fall through annotation.
llvm-svn: 308776
2017-07-21 20:20:25 +00:00
Pavel Labath 28e1335d12 XFail TestWithModuleDebugging on linux (bug 33875)
llvm-svn: 308732
2017-07-21 12:51:37 +00:00
Bruce Mitchener 2b13913b12 Fix typo in error message in 'platform status'.
llvm-svn: 308716
2017-07-21 07:08:20 +00:00
Jim Ingham d030991600 Add help text for "expression" telling how to enter multi-line mode.
This seemed natural to us, but wasn't documented anywhere and was
not clear to everybody.

<rdar://problem/33316164>

llvm-svn: 308549
2017-07-19 23:25:42 +00:00
Chris Bieneman 04f3910537 Fix GreenDragon bots
This commit removes a very old deprecated API that was causing compile failures for LLDB on Darwin. Since the comment says we only needed to keep the old API around for a few Xcode builds, and the comment was written 6 years ago... I think this can safely go away.

Failure URL:
http://lab.llvm.org:8080/green/view/LLDB/job/lldb_build_test/29936/console

llvm-svn: 308509
2017-07-19 18:57:16 +00:00
Saleem Abdulrasool f76e099ca7 silence a couple of -Wqual-cast warning from GCC (NFC)
Cast to `const uint8_t *` instead of `uint8_t *` to avoid the warning
from GCC.

  EmulationStateARM.cpp:206:34: warning: cast from type 'const void*' to type 'uint8_t* {aka unsigned char*}' casts away qualifiers [-Wcast-qual]

Cast to `const uint32_t *` and the explicitly cast away the const-ness
of the value.  This seems pretty sketchy as the `DataExtractor` holds a
const reference to the data.  However, this is no worse than before.

  ObjectFilePECOFF.cpp:540:78: warning: cast from type 'const uint8_t* {aka const unsigned char*}' to type 'uint32_t* {aka unsigned int*}' casts away qualifiers [-Wcast-qual]

llvm-svn: 308489
2017-07-19 15:46:21 +00:00
Bruce Mitchener ccbf7987a3 Expose hit count via SBBreakpointLocation.
Summary:
SBBreakpointLocation exposed the ignore count, but didn't expose
the hit count. Both values were exposed by SBBreakpoint and
SBWatchpoint, so this makes things a bit more consistent.

Reviewers: lldb-commits

Subscribers: lldb-commits

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

llvm-svn: 308480
2017-07-19 14:31:19 +00:00
Bruce Mitchener e54a9a268d Fix typos in documentation.
Reviewers: lldb-commits

Subscribers: lldb-commits

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

llvm-svn: 308426
2017-07-19 09:35:58 +00:00
Bruce Mitchener c92c508fd7 Update API headers.
Summary:
* Provide API doc for SBProcess::SaveCore.
* Fix typo in SBAttachInfo doc comments.
* SBBreakpointList: Name some variables same as C++.

Subscribers: lldb-commits

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

llvm-svn: 308425
2017-07-19 09:30:04 +00:00
Tim Hammerquist c635cb223e cmake build needs to run tests AND collect results
CMake target "check-lldb" runs the lldb dotest.py suite, but doesn't
collect the results in a usable format. In adding the arguments
necessary to collect these results, I found some minor bugs in CMake
that prevented dotest overrides from being used. This patch fixes them.

<rdar://problem/33389717> cmake build needs to run tests AND collect results

llvm-svn: 308393
2017-07-18 23:45:06 +00:00
Chris Bieneman f6b8ac28ab [CMake] A few fixups to support building LLDB for iOS
These changes enable proper configuration of LLDB targeting iOS.

llvm-svn: 308378
2017-07-18 21:15:53 +00:00
Chris Bieneman f396708f4c [CMake] Refactor debugserver build system
This refactoring changes two significant things about how the debugserver build system works:

(1) debugserver will include all appropriate architecture support, so we can now build arm or ppc debugservers
(2) debugserver can be built by itself, so you don't have to configure all of LLDB in order to generate debugserver.

llvm-svn: 308377
2017-07-18 21:15:27 +00:00
Chris Bieneman 154a5ff15b [CMake] [NFC] Remove out of date and redundant version requirement
Since we set the minimum required version elsewhere to be higher this actually has meaningful good impact.

llvm-svn: 308376
2017-07-18 21:15:14 +00:00
Pavel Labath f40f8fc415 Fix NetBSD/FreeBSD build after r308304
llvm-svn: 308307
2017-07-18 14:03:47 +00:00
Pavel Labath b6dbe9a99c Clean up lldb-types.h
Summary:
It defined a couple of types (condition_t) which we don't use anymore,
as we have c++11 goodies now. I remove these definitions.

Also it unnecessarily included a couple of headers which weren't
necessary for it's operation. I remove these, and place the includes in
the relevant files (usually .cpp, usually in Host code) which use them.
This allows us to reduce namespace pollution in most of the lldb files
which don't need the OS-specific definitions.

Reviewers: zturner, jingham

Subscribers: ki.stfu, lldb-commits

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

llvm-svn: 308304
2017-07-18 13:14:01 +00:00
Pavel Labath 4e138e1d8c Fix linux arm and mips builds broken by r308282
llvm-svn: 308292
2017-07-18 10:42:36 +00:00
Pavel Labath 82abefa4b1 Remove shared pointer from NativeProcessProtocol
Summary:
The usage of shared_from_this forces us to separate construction and
initialization phases, because shared_from_this() is not available in
the constructor (or destructor). The shared semantics are not necessary,
as we always have a clear owner of the native process class
(GDBRemoteCommunicationServerLLDB object). Even if we need shared
semantics in the future (which I think we should strongly avoid),
reverting this will not be necessary -- the owners can still easily
store the native process object in a shared pointer if they really want
to -- this just prevents the knowledge of that from leaking into the
class implementation.

After this a NativeThread object will hold a reference to the parent
process (instead of a weak_ptr) -- having a process instance always
available allows us to simplify some logic in this class (some of it was
already simplified because we were asserting that the process is
available, but this makes it obvious).

Reviewers: krytarowski, eugene, zturner

Subscribers: lldb-commits

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

llvm-svn: 308282
2017-07-18 09:24:48 +00:00
Eugene Zemtsov 20d28a168e Fixing LLDB build after refactoring of clang's MacroInfo
llvm-svn: 308219
2017-07-17 20:50:21 +00:00
Chris Bieneman 7dc58b238d Fix debugserver accepting remote connections
While adding IPv6 support to debugserver I broke handling wildcard addresses and fully qualified address filtering. This patch resolves that bug and adds a test for matching the address "*".

<rdar://problem/32947613>

llvm-svn: 307957
2017-07-13 20:58:13 +00:00
Jim Ingham 055e65f0d4 Enable parsing C++ names generated by lambda functions.
https://reviews.llvm.org/D34911 from Weng Xuetian.

llvm-svn: 307944
2017-07-13 19:48:43 +00:00
Jim Ingham 61949c9f6f Convert a few more tests to use run_to_source_breakpoint.
llvm-svn: 307943
2017-07-13 19:46:21 +00:00
Jim Ingham 30bac79162 Fix a deadlock in the Python interpreter vrs. SIGINT.
The interpreter gets invoked in the sigint handler to cancel
long-running Python operations.  That requires the interpreter
lock, but that may be held by the Python operation that's getting
interrupted, so the mutex needs to be recursive.

<rdar://problem/33179086>

llvm-svn: 307942
2017-07-13 19:45:54 +00:00
Kuba Mracek b244c2bafe Upstreaming a patch from Github: When evaluation user expressions, ignore InstrumentationRuntime breakpoints. (#235)
llvm-svn: 307881
2017-07-13 04:35:27 +00:00
Jim Ingham a6c57dd989 The llvm.org bugzilla moved.
llvm-svn: 307870
2017-07-13 00:36:21 +00:00
Petr Pavlu 8c5dafde49 [MainLoop] Fix possible use of an invalid iterator
Store file descriptors from loop.m_read_fds (if FORCE_PSELECT is
defined) and signals from loop.m_signals that need to be processed in
MainLoop::RunImpl::ProcessEvents() into a separate vector and then
iterate over this container to invoke the callbacks.

This prevents a problem where when the code iterated directly over
m_read_fds/m_signals, a callback invoked from within the loop could
modify these variables and invalidate the loop iterator. This would then
result in an assertion failure in llvm::DenseMapIterator::operator++().

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

llvm-svn: 307782
2017-07-12 12:38:31 +00:00
Ravitheja Addepally fa73e34082 Fixing Android builder
llvm-svn: 307773
2017-07-12 11:54:17 +00:00
Ravitheja Addepally dab1d5f3cd Adding Support for Error Strings in Remote Packets
Summary:
This patch adds support for sending strings along with
error codes in the reply packets. The implementation is
based on the feedback recieved in the lldb-dev mailing
list. The patch also adds an extra packet for the client
to query if the server has the capability to provide
strings along with error replys.

Reviewers: labath, jingham, sas, lldb-commits, clayborg

Reviewed By: labath, clayborg

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

llvm-svn: 307768
2017-07-12 11:15:34 +00:00
Tim Hammerquist 95c003b96f switch on enum should be exhaustive and warning-free
Summary:
Testing the value of type_code against the closed enum TypeCodes
provides statically verifiable completeness of testing. However, one
branch assigns to type_code by casting directly from a masked integer
value. This is currently handled by adding a default: case after
checking each TypeCodes instance. This patch introduces a bool variable
containing the "default" state value, allowing the switch to be
exhaustive, protect against future instances not being handled in the
switch, and preserves the original logic.

This addresses the warning:
warning: default label in switch which covers all enumeration values
[-Wcovered-switch-default]

As an issue of maintainability, the bitmask on line 524 handles the
current values of TypeCodes enum, but this will be invalid if the enum
is extended. This patch does not address this, and a more closed
conversion from cfinfoa -> TypeCodes would help protect against this.

Reviewers: spyffe, lhames, sas

Reviewed By: sas

Subscribers: sas, lldb-commits

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

llvm-svn: 307712
2017-07-11 21:06:20 +00:00
Pavel Labath 21a365ba59 NativeProcessLinux: Fix handling of raise(SIGTRAP)
In NativeProcessLinux::MonitorSIGTRAP we were asserting that the si_code
value is one of the codes we know about. However, that list was very
incomplete -- for example, we were not handling SI_TKILL/SI_USER,
generated by raise(SIGTRAP). A cursory examination show there are at
least a dozen codes like these that an app can generate, and more can be
added at any point.

So, instead of trying to play catchup, I change the default behavior to
treat an unknown si_code like an ordinary signal. The only reason we
needed to inspect si_code in the first place is because
watchpoint/breakpoints are notified as SIGTRAP, but we already know
about those, and us starting to use a new debug event is far less likely
than somebody introducing a new non-debug event.

I add a test case to TestRaise to verify we are handling raise(SIGTRAP)
in an application properly.

llvm-svn: 307644
2017-07-11 10:38:40 +00:00
Pavel Labath 993f2a4299 NativeProcessLinux: Fix some compiler warnings
llvm-svn: 307636
2017-07-11 09:03:38 +00:00
Pavel Labath cc72ede081 [LLDB][ppc64le] Rename enums in AuxVector
Summary:
On linux on ppc64le some of the enums in AuxVector have the same name
as macros defined in the system.

Reviewers: mikesart, labath

Reviewed By: labath

Subscribers: joerg, gut, krytarowski, lldb-commits

Differential Revision: https://reviews.llvm.org/D35065
Patch by Bruno Rosa <bruno.rosa@eldorado.org.br>

llvm-svn: 307632
2017-07-11 08:39:44 +00:00
Jason Molenda 529d235cfc Pass in the disassembler flavor when disassembling in
DumpDataExtractor.  Patch from Jeffrey Crowell,

https://reviews.llvm.org/D34929

llvm-svn: 307618
2017-07-11 04:22:31 +00:00
Zachary Turner ac43c1bb87 Don't access Python objects while not holding the GIL.
Patch by Tatyana Krasnukha
Differential Revision: https://reviews.llvm.org/D34942

llvm-svn: 307512
2017-07-09 23:32:15 +00:00
Kuba Mracek e21b03daea Update message that Main Thread Checker produces.
llvm-svn: 307464
2017-07-08 05:18:19 +00:00
Jason Molenda f62080451c The x86 instruction unwinder can be asked to disassemble non-instruction
blocks of memory, and if the final bytes of that block look like a long
x86 instruction, it can cause the llvm disassembler to read past the end
of the buffer.  Use the maximum allowed instruction length that we pass
to the llvm disassembler as a way to limit this to the size of the buffer.

An example of how to trigger this is when lldb does a function call, it
puts a breakpoint on the beginning of main() and uses that as the return
address from the function call.  When we stop at that location, lldb may
try to find the first frame up the stack.  Because this is on the first
instruction of a function, it will get the word-size value at the stack
pointer and assume that this was the caller's pc value.  But this is random
stack memory and could point to anything - an object in memory, something
in the data section, whatever.  And if we have a symbol for that thing,
we'll try to disassemble it.

This was leading to infrequent crashes in customer scenarios; figured out
what was happening with address sanitizer.

<rdar://problem/30463256> 

llvm-svn: 307454
2017-07-08 00:12:15 +00:00
Pavel Labath daf42491e6 Disable TestGoASTContext
it fails with go 1.8 and we don't seem to have a maintainer of that
functionality.

llvm-svn: 307391
2017-07-07 11:02:28 +00:00
Pavel Labath 96e600fcf5 Add a NativeProcessProtocol Factory class
Summary:
This replaces the static functions used for creating
NativeProcessProtocol instances with a factory pattern, and modernizes
the interface of the new class in the process -- I use llvm::Expected
instead of the Status+value combo. I also move some of the common code
(like the Delegate registration into the base class). The new
arrangement has multiple benefits:
- it removes the NativeProcess*** dependency from Process/gdb-remote
  (which for example means that liblldb no longer pulls in this code).
- it enables unit testing of the GDBRemoteCommunicationServerLLGS class
  (by providing a mock Native Process).
- serves as another example on how to use the llvm::Expected class (I
  couldn't get rid of the Initialize-type functions completely here
  because of the use of shared_from_this, but that's the next thing on
  my list here)

Tests still pass on Linux and I've made sure NetBSD compiles after this.

Reviewers: zturner, eugene, krytarowski

Subscribers: srhines, lldb-commits, mgorny

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

llvm-svn: 307390
2017-07-07 11:02:19 +00:00
Tim Hammerquist 85ca1df472 Fix Xcode project file for gtest schemes.
<rdar://problem/33066993>

llvm-svn: 307335
2017-07-06 23:25:35 +00:00
David L. Jones d4053fb2ec Change remaining references to lit.util.capture to use subprocess.check_output.
Summary:
The capture() function was removed in r306625. This should fix PGO breakages
reported by Michael Zolotukhin.

Reviewers: mzolotukhin

Subscribers: sanjoy, llvm-commits

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

llvm-svn: 307320
2017-07-06 21:46:47 +00:00
Jim Ingham 19c28eee46 Working through testcases, converting to run_to_source_breakpoint.
llvm-svn: 307287
2017-07-06 18:06:25 +00:00
Pavel Labath 21fb07b715 Fix a copy-paste error in r307161
llvm-svn: 307253
2017-07-06 11:43:25 +00:00
Pavel Labath 0fa8396165 Revert "Android.rules: build x86 tests with -mstackrealign"
Starting with android ndk r15, clang much more tests are affected by the
-mstackrealign bugl (now nearly all functions are affected, and not just
the ones requiring 16-byte alignment). Due to their numbers, Xfailing
all of them is not a viable option, so we will just have to declare this
configuration unsupported, and wait until ndk ships a clang version that
has this bug fixed.

llvm-svn: 307252
2017-07-06 11:43:20 +00:00
Jim Ingham a15e7f296b Add a lldbutils routine that gathers up the boiler-plate
to make a target, set a source regex breakpoint, run to 
the breakpoint and find the thread that hit the breakpoint.

Start the process of replacing the boiler plate with this
routine.

llvm-svn: 307234
2017-07-06 02:18:16 +00:00
Tim Hammerquist 42a96a286c add googlemock include dir to lldb-gtest Xcode target
Add the googlemock include directory from LLVM to CFLAGS arguments in
Xcode's lldb-gtest.

<rdar://problem/33066993>

llvm-svn: 307228
2017-07-06 00:08:54 +00:00
Kuba Mracek c40ca13519 [lldb] Add a testcase for MainThreadCheckerRuntime plugin
This adds a simple testcase for MainThreadCheckerRuntime. The tool (Main Thread Checker) is only available on Darwin, so the test also detects the presence of libMainThreadChecker.dylib and is skipped if the tool is not available.

llvm-svn: 307170
2017-07-05 16:29:36 +00:00
Pavel Labath ef7aff507b Fix assorted compiler warnings (mismatched signedness and printf specifiers)
llvm-svn: 307161
2017-07-05 14:54:46 +00:00
Pavel Labath d37c946991 Fix "process load" on new android targets
Summary:
On older android targets, we needed a dlopen rename workaround to get
"process load" working. Since API 26 this is not required as the targets
have a proper libdl so with the function names one would expect.

To make this work I've had to remove the const qualifier from the
GetLibdlFunctionDeclarations function (as now the declarations can
depend on the connected target). Since I was already modifying the
prototype (and the lower levels were already converted to StringRef) I
took the oportunity to convert this function as well.

llvm-svn: 307160
2017-07-05 14:54:41 +00:00
Pavel Labath 11b16c8110 Update lldb architecture docs
Summary:
Due to recent refactors, the descriptions of various modules were wildly
out of date. With this patch, I am not trying to legislate anything,
I am merely documenting the current state of affairs.

I am also deleting one copy of the architecture docs. AFAIK, this one is
not referenced from the web page.

Reviewers: zturner, jingham

Subscribers: lldb-commits

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

llvm-svn: 307072
2017-07-04 12:29:34 +00:00
Pavel Labath 88c6534877 Fix some warnings in ProcessorTraceTest.cpp
llvm-svn: 307071
2017-07-04 12:29:30 +00:00
Ravitheja Addepally f4ffae91cb Fixing warnings for unused variables and copy ellision
Summary:
The std::move was preventing copy ellision when compiled with
clang, the patch fixes the warning along with rearranging code
to remove unused variables warnings on Linux machines with
older perf_event interface.

Reviewers: labath, ted

Reviewed By: labath

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

llvm-svn: 307030
2017-07-03 15:07:36 +00:00
Pavel Labath 9bf0e0362f Fix typo/unbreak windows build broken by r307009
llvm-svn: 307018
2017-07-03 11:01:49 +00:00
Pavel Labath c1a6b128c7 Use llvm::sys::RetryAfterSignal instead of a manual while errno!=EINTR loop
Reviewers: zturner, eugene, krytarowski

Subscribers: emaste, mgorny, lldb-commits

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

llvm-svn: 307009
2017-07-03 09:25:55 +00:00
Pavel Labath f1fb38b746 Remove dead Core/StreamFile includes
llvm-svn: 306817
2017-06-30 11:31:13 +00:00
Pavel Labath cc78ea6985 Fix a cmake typo to unbreak windows unit tests
llvm-svn: 306802
2017-06-30 07:54:35 +00:00
Sean Callanan 48bccc9448 [Data formatters] Make NSSetM support both old- and new-style representation
NSSetM has two in-memory representations depending on what Foundation version is in use.
This patch separates the two.

rdar://33057292

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

llvm-svn: 306773
2017-06-30 00:39:17 +00:00
Tim Hammerquist 0a94072e4d Fix some type-based warnings
llvm-svn: 306765
2017-06-29 23:33:40 +00:00
Jason Molenda d2d4c8db45 Update default cpu subtype for armv7 processes to armv7k, the most
likely cpu subtype at this point.

llvm-svn: 306752
2017-06-29 22:50:53 +00:00
Jim Ingham 804eb1fbab Timer.{h,cpp} moved, find them again in the project file.
llvm-svn: 306725
2017-06-29 18:54:40 +00:00
Pavel Labath ef9fc29d4e Speculative fix for windows build broken by r306668
llvm-svn: 306693
2017-06-29 16:15:42 +00:00
Pavel Labath 480907248e Fix Mac build for the Timer move
llvm-svn: 306686
2017-06-29 15:24:38 +00:00
Pavel Labath 217a763bb2 Android.rules: build x86 tests with -mstackrealign
All android builds systems have switched to -mstackrealign for building
x86 binaries, so follow their cue with our mini build system.

This presently breaks just one test (TestReturnValue), and this is due
to a compiler bug, which has already been fixed in clang, but it hasn't
made it yet into the official NDK compiler. While I'm touching that
test, I also remove an android-specific XFAIL, which is not relevant
anymore.

llvm-svn: 306683
2017-06-29 14:32:23 +00:00
Pavel Labath 38d0632e6a Move Timer and TraceOptions from Core to Utility
Summary:
The classes have no dependencies, and they are used both by lldb and
lldb-server, so it makes sense for them to live in the lowest layers.

Reviewers: zturner, jingham

Subscribers: emaste, mgorny, lldb-commits

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

llvm-svn: 306682
2017-06-29 14:32:17 +00:00
Pavel Labath 0e44cff13b Make scripts/analyze-project-deps.py executable
llvm-svn: 306669
2017-06-29 13:02:15 +00:00
Pavel Labath 7ed3e22f00 [unittests] Add a helper function for getting an input file
Summary:
Fetching an input file required about five lines of code, and this was
repeated in multiple unit tests, with slight variations. Add a helper
function for doing that into the lldbUtilityMocks module (which I rename
to lldbUtilityHelpers to commemorate the fact it includes more than
mocks)

Reviewers: zturner, eugene

Subscribers: emaste, mgorny, lldb-commits

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

llvm-svn: 306668
2017-06-29 13:02:11 +00:00
Pavel Labath 8996346bba [UnwindAssembly/x86] Add support for "lea imm(%ebp), %esp" pattern
Summary:
The instruction pattern:
and $-16, %esp
sub $imm, %esp
...
lea imm(%ebp), %esp

appears when the compiler is realigning the stack (for example in
main(), or almost everywhere with -mstackrealign switch). The "and"
instruction is very difficult to model, but that's not necessary, as
these frames are always %ebp-based (the compiler also needs a way to
restore the original %esp). Therefore the plans we were generating for
these function were almost correct already. The only place we were doing
it wrong were the last instructions of the epilogue (usually just
"ret"), where we had to revert to %esp-based unwinding, as the %ebp had
been popped already.

This was wrong because our "distance of esp from cfa" counter had picked
up the "sub" instruction (and incremented the counter) but it had not
seen that the register was reset by the "lea" instruction.

This patch fixes that shortcoming, and adds a test for handling
functions like this.

I have not been able to tickle the compiler into producing a 64-bit
function with this pattern, but I don't see a reason why it couldn't
produce it, if it chose to, so I add a x86_64 test as well.

Reviewers: jasonmolenda, tberghammer

Subscribers: lldb-commits

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

llvm-svn: 306666
2017-06-29 12:40:13 +00:00
Jason Molenda 7f5bd34b18 Fix two places in RegisterContextLLDB::InitializeNonZerothFrame where
I'm not running the saved pc through FixCodeAddress as soon as I should.

<rdar://problem/30686307> 

llvm-svn: 306634
2017-06-29 03:02:24 +00:00
Jason Molenda 43294c9f48 Change the ABI class to have a weak pointer to its Process;
some methods in the ABI need a Process to do their work.
Instead of passing it in as a one-off argument to those
methods, this patch puts it in the base class and the methods
can retrieve if it needed.

Note that ABI's are sometimes built without a Process 
(e.g. SBTarget::GetStackRedZoneSize) so it's entirely
possible that the process weak pointer will not be
able to reconsistitue into a strong pointer.

<rdar://problem/32526754> 

llvm-svn: 306633
2017-06-29 02:57:03 +00:00
Sean Callanan 5a5c14ab94 Added a project for the unified IR interpreter.
llvm-svn: 306611
2017-06-28 22:51:16 +00:00
Pavel Labath 3f2a08183f [DWARFCallFrameInfo] Add Type enum to differentiate eh/debug_frame sections
Summary:
instead of using a boolean to differentiate between the two section
types, use an enum to make the intent clearer.

I also remove the RegisterKind argument from the constructor, as this
can be deduced from the Type argument.

Reviewers: clayborg, jasonmolenda

Subscribers: lldb-commits

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

llvm-svn: 306521
2017-06-28 09:09:19 +00:00
Ravitheja Addepally 2f797585b5 Linux unit tests should only run on
Linux based systems.

llvm-svn: 306520
2017-06-28 09:01:17 +00:00
Ravitheja Addepally 99e376956d Implementation of Intel(R) Processor Trace support for Linux
Summary:
This patch implements support for Intel(R) Processor Trace
in lldb server. The changes have support for
starting/stopping and reading the trace data. The code
is only available on Linux versions where the perf
attributes for aux buffers are available.

The patch also consists of Unit tests for testing the
core buffer reading function.

Reviewers: lldb-commits, labath, clayborg, zturner, tberghammer

Reviewed By: labath, clayborg

Subscribers: mgorny

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

llvm-svn: 306516
2017-06-28 07:58:31 +00:00
Kuba Mracek ad3d174674 Upstream the 'eInstrumentationRuntimeTypeSwiftRuntimeReporting' value of the 'eInstrumentationRuntimeType' enum from the swift-lldb project (to avoid potential clashes).
llvm-svn: 306469
2017-06-27 21:39:15 +00:00
Sean Callanan 5805d9e9ac [build system] If there's an OVERRIDE, don't guess the current SCM.
This makes automatic checkout work even in situations where the
current repository can't be determined, such as in the case of a 
Git tag.

llvm-svn: 306460
2017-06-27 20:35:53 +00:00
Jim Ingham 3f91be52c3 Fix up the Xcode project:
1) Renaming the InstrumentationRuntime directory & file names
2) Bunch of stuff moved from Core to Utility
3) Deleted a bunch of files records for files that have gone away

llvm-svn: 306445
2017-06-27 18:48:32 +00:00
Pavel Labath 7396ee923e Fix windows build for the Connection move
llvm-svn: 306400
2017-06-27 11:45:32 +00:00
Pavel Labath cdda23eb7c Add debug_frame section support
Summary:
This is a beefed-up version of D33504, which adds support for dwarf 4
debug_frame section format.

The main difference here is that the decision whether to use eh_frame or
debug_frame is done on a per-function basis instead of per-object file.
This is necessary because one module can contain both sections (for
example, the start files added by the linker will typically pull in
eh_frame), but we want to be able to access both, for maximum
information.

I also add unit test for parsing various CFI formats (eh_frame,
debug_frame v3 and debug_frame v4).

Reviewers: jasonmolenda, clayborg

Subscribers: mgorny, aprantl, abidh, lldb-commits, tatyana-krasnukha

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

llvm-svn: 306397
2017-06-27 11:16:26 +00:00
Pavel Labath f2a8bccf85 Move StructuredData from Core to Utility
Summary:
It had a dependency on StringConvert and file reading code, which is not
in Utility. I've replaced that code by equivalent llvm operations.

I've added a unit test to demonstrate that parsing a file still works.

Reviewers: zturner, jingham

Subscribers: kubamracek, mgorny, lldb-commits

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

llvm-svn: 306394
2017-06-27 10:45:31 +00:00
Pavel Labath 4ccd99541b Move Connection and IOObject interfaces to Utility module
Summary:
These interfaces have no dependencies, so it makes sense for them to be
in the lowest level modules, to make sure that other parts of the
codebase can use them without introducing loops.

The only exception here is the Connection::CreateDefaultConnection
method, which I've moved to Host, as it instantiates concrete
implementations, and that's where the implementations live.

Reviewers: jingham, zturner

Subscribers: lldb-commits, mgorny

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

llvm-svn: 306391
2017-06-27 10:33:14 +00:00
Pavel Labath 2a1c09fee9 Shorten sanitizer plugin names
Summary:
The new UndefinedBehaviorSanitizer plugin was breaking file path length
limits, because it's (fairly long name) appears multiple times in the
path. Cmake ends up putting the object file at path
tools/lldb/source/Plugins/InstrumentationRuntime/UndefinedBehaviorSanitizer/CMakeFiles/lldbPluginInstrumentationRuntimeUndefinedBehaviorSanitizer.dir/UndefinedBehaviorSanitizerRuntime.cpp.obj
which is 191 characters long and very dangerously close to the 260
character path limit on windows systems (also, just the include line for
that file was breaking the 80 character line limit).

This renames the sanitizer plugins to use shorter names (asan, ubsan,
tsan). I think this will still be quite understandable to everyone as
those are the names everyone uses to refer to them anyway.

Reviewers: zturner, kubamracek, jingham

Subscribers: lldb-commits, mgorny

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

llvm-svn: 306278
2017-06-26 08:13:22 +00:00
Zachary Turner aaea8ee628 Fix LLDB build.
This was broken due to directly including windows.h, which
caused a problem when someone in LLVM called std::min in a header
file.  LLDB has a windows.h include to work around this, but it
wasn't being used in these two files.

llvm-svn: 306186
2017-06-23 23:55:32 +00:00
Sean Callanan f40da17288 Updated the NSArray and NSDictionary formatters to support new storage formats.
Also un-xfailed a testcase that was affected by this.  Thanks to Jason Molenda for the patch.

<rdar://problem/32827216>

llvm-svn: 306180
2017-06-23 23:15:03 +00:00
Mehdi Amini d16a6e32fb Fix typo: using && instead of & when evaluating a mask
Summary: Reported by coverity, I don't know how to provide a test.

Reviewers: zturner

Subscribers: lldb-commits, emaste

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

llvm-svn: 306134
2017-06-23 18:20:13 +00:00
Pavel Labath 93df2fbeab Simplify the gdb-remote unit tests
Instead of every test creating a client-server combo, do that in the
SetUp method of the test fixture. This also means that we can rely on
gtest to not run the test if the SetUp method fails and delete the
if(HasFailure) calls.

llvm-svn: 306013
2017-06-22 15:54:21 +00:00
Zachary Turner 10a601adb2 Fix a python object leak in SWIG glue.
PyObject_CallFunction returns a PyObject which needs to be
decref'ed when it is no longer needed.

Patch by David Luyer
Differential Revision: https://reviews.llvm.org/D33740

llvm-svn: 305873
2017-06-21 01:52:37 +00:00
Kamil Rytarowski 4bb744156b Correct syntax mistake hidden in assert(3)
wait_status cannot be compared with WaitStatus::Stop,
go for wait_status.type.

llvm-svn: 305794
2017-06-20 13:51:06 +00:00
Pavel Labath df1a0d1180 [linux] Change the way we load vdso pseudo-module
Summary:
This is basically a revert of D16107 and parts of D10800, which were
trying to get vdso loading working. They did this by implementing a
generic load-an-elf-file from memory approach, which is not correct,
since we cannot assume that an elf file is loaded in memory in full (it
usually isn't, as there's no need to load section headers for example).
This meant that we would read garbage instead of section sizes, and if
that garbage happened to be a large number, we would crash while trying
to allocate a buffer to accomodate the hypothetical section.

Instead of this, I add a bit of custom code to load the vdso to
DynamicLoaderPOSIXDYLD (which already needed to handle the vdso
specially). I determine the size of the memory to read using
Process::GetMemoryRegionInfo, which is information coming from the OS,
and cannot be forged by a malicious/misbehaving application.

Reviewers: eugene, clayborg

Subscribers: lldb-commits, ravitheja, tberghammer, emaste

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

llvm-svn: 305780
2017-06-20 08:11:47 +00:00
Pavel Labath f891812b7b Remove home-grown thread-local storage wrappers
Summary:
Use c++11 thread_local variables instead. As far as I am aware, they are
supported by all compilers/targets we care about.

Reviewers: zturner, jingham

Subscribers: lldb-commits

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

llvm-svn: 305779
2017-06-20 08:11:43 +00:00
Pavel Labath 6c5c542986 ProcessLauncherPosixFork: Fetch errno early
I was seeing some unlikely errno values here. I am not sure if this will
help, but it nontheless seems like a good idea to stash errno value
before issuing other syscalls.

llvm-svn: 305778
2017-06-20 08:11:37 +00:00
Sean Callanan 18b5d9268c Updated NSNumber formatter for new internal representation.
<rdar://problem/32780109>

llvm-svn: 305727
2017-06-19 18:32:22 +00:00
Pavel Labath 3508fc8cc5 Add pretty-printer for wait(2) statuses and modernize the code handling them
Summary:
A number of places were trying to decode the result of wait(). Add a simple
utility function that does that and a struct that encapsulates the
decoded result. Then also provide a pretty-printer for that class.

Reviewers: zturner, krytarowski, eugene

Subscribers: lldb-commits, mgorny

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

llvm-svn: 305689
2017-06-19 12:47:50 +00:00
Pavel Labath 9376007af7 Tweak SysV_arm64 function entry unwind plan
Summary:
The motivation for this is to make sure the first row of the plan
compares equal to the first row of a generic debug_frame unwind plan.
Right now, the code in FuncUnwinders::GetUnwindPlanAtNonCallSite
considers them unequal because they specify the return address in a
different way (SetReturnAddressRegister(LR) vs. an explicit PC=LR rule).
This means that FuncUnwinders would always choose the debug_frame unwind
plan, which is not correct, as that one is usually not correct at all
locations.

Right now this is basically a noop because we don't have parse any
debug_frame plans, but it fixes some test failures when merging D33504
in.

I have to say I don't understand the full implications of the switch to
SetReturnAddressRegister() way of doing things, but given that all of
our other unwind plans (eh_frame, instruction profiling) do it this way,
it sounds like the right thing to do.

Reviewers: tberghammer, jasonmolenda, omjavaid

Subscribers: aemerson, javed.absar, kristof.beyls, lldb-commits

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

llvm-svn: 305687
2017-06-19 12:39:34 +00:00
Pavel Labath 319b38398e Delete ProcessLauncherPosix
Summary:
ProcessLauncherPosix was using posix_spawn for launching the process,
but this function is not available on all platforms we support, and even
where it was avaialable, it did not support the full range of options we
require for launching (most importantly, launching in stop-on-entry
mode). For these reasons, the set of ifdefs around these functions has
grown untractably large, and we were forced to implement our own
launcher from more basic primitives anyway (ProcessLauncherPosixFork --
used on Linux, Android, and NetBSD).

Therefore, I remove this class, and move the relevant parts of the code
to the darwin-specific Host.mm file. This is the platform that code was
originally written for anyway, and it's the only platform where this
implementation makes sense (e.g. the lack of the "thread-specific
working directory" concept makes these functions racy on all other
platforms). This allows us to remove a lot of ifdefs and simplify the
code.

Effectively, the only change this introduces is that FreeBSD will now
use the fork-based launcher instead of posix_spawnp. That sholdn't be a
problem as this approach works at least on one other BSD-based system
already.

Reviewers: krytarowski, emaste, jingham

Subscribers: srhines, mgorny, lldb-commits

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

llvm-svn: 305686
2017-06-19 12:26:22 +00:00
Sylvestre Ledru f955efc01b Fix a -Wmisleading-indentation warning
llvm-svn: 305664
2017-06-19 06:57:54 +00:00
Kuba Mracek 3abb10268d Fix the CMake files for the new InstrumentationRuntime plugins.
llvm-svn: 305594
2017-06-16 21:18:28 +00:00
Kuba Mracek ef45d8bcd2 Upstreaming the UndefinedBehaviorSanitizerRuntime and MainThreadCheckerRuntime plugins.
llvm-svn: 305589
2017-06-16 20:59:08 +00:00
Jason Molenda bbd1bf9951 Change the code I added to LocateDSYMInVincinityOfExecutable to use
the FileSpec methods for adding/removing file path components instead
of using std::strings; feedback from Sean on the change I added in
r305441.
<rdar://problem/31825940> 

llvm-svn: 305547
2017-06-16 04:19:36 +00:00
Pavel Labath 3adc40876e Add llvm::Error assignment operator to Status class
This enables writing "status = std::move(some_llvm_error)".

llvm-svn: 305462
2017-06-15 11:23:26 +00:00
Pavel Labath 054243f75a [swig] Improve the native module import logic
The simple module import logic was not sufficient for our distribution
model of lldb, which is without the _lldb.pyd file (normally that would
be a symlink to the shared library, but symlinks are not really a thing
on windows).

With the older swigs it worked (loading of the python scripting
machinery from within lldb) because the normal swig import logic
contained a last-ditch import of a global module _lldb (which is defined
when you run python from lldb). Add back the last-ditch import to our
custom import logic as well.

llvm-svn: 305461
2017-06-15 11:23:22 +00:00
Jason Molenda 244b6bb6cb Change how LocateDSYMInVincinityOfExecutable strips off path
components to not depend on "." characters in the fileanme
(e.g. "Foundation.framework") but instead to just use path
separators.  The names of the files themselves may have dots
in them ("com.apple.sbd") which would break the old scheme.

Also add a test case for this (macosx/find-dsym/bundle-with-dot-in-filename)
as well as a test case for r304520 (macosx/find-dsym/deep-bundle)
which needed a similar setup to test correctly on a single machine.
(both of these are really testing remote debug session situations
where the binary can't be found on the system where lldb is running,
complicating the test case a bit.)

<rdar://problem/31825940> 

llvm-svn: 305441
2017-06-15 01:42:48 +00:00
Sean Callanan 4d04b9cd97 [testsuite] xfailed two tests that depend on NSString conforming to NSCopying.
NSString is loaded from the DWARF, which doesn't have the concept of protocols.
When this is used with the NSMutableDictionary type from Objective-C modules,
this produces errors of the form

error: cannot initialize a parameter of type 'id<NSCopying> _Nonnull' with an rvalue of type 'NSString *'

We're aware of these problems and have an internal bug report filed
(<rdar://problem/32777981>)

llvm-svn: 305424
2017-06-14 23:01:43 +00:00
Nitesh Jain 1680ea4c1f [LLDB][MIPS] Skip TestGdbRemoteSingleStep and TestGdbRemote_vCont.py.
The step count depends on code generated by compiler (GCC/Clang).
It will also vary for different MIPS arch variant. Hence skipping these test for MIPS.

Subscribers: jaydeep, bhushan, lldb-commits, slthakur
llvm-svn: 305383
2017-06-14 12:21:26 +00:00
Nitesh Jain 3dcc9e0930 [LLDB][MIPS] Fix TestNoreturnUnwind.py.
bugnumber=llvm.org/pr33452

Subscribers: jaydeep, bhushan, lldb-commits, slthakur
llvm-svn: 305380
2017-06-14 10:47:25 +00:00
Nitesh Jain 0c29ef1b80 [LLDB][MIPS] Fix TestRegisterVariables.py.
Clang does not accept regparm attribute on these platforms.
Fortunately, the default calling convention passes arguments
in registers any way

Subscribers: jaydeep, bhushan, lldb-commits, slthakur
llvm-svn: 305378
2017-06-14 10:02:56 +00:00
Pavel Labath ba6a10fdcc Mark TestCallThatRestarts as flaky on android
This test started being flaky since r303848 (RunThreadPlan: Fix halting
logic in IgnoreBreakpoints = false). I am not reverting that, as I am
confident that actually fixed a problem. A more likely explanation is
that there is still one corner case that is not handled correctly there.

Marking the test as flaky until I get a chance to investigate. I also
mark the test as no-debug-info-dependend -- it stresses expression
evaluation, as far as debug info goes, the test if extremely simple.

llvm-svn: 305286
2017-06-13 11:13:11 +00:00