Commit Graph

12137 Commits

Author SHA1 Message Date
Ravitheja Addepally 72ab9e5c6c Removing redundant check from r244875
llvm-svn: 244886
2015-08-13 11:53:23 +00:00
Tamas Berghammer a58332fb5b Add missing include to RegisterInfoInterface.h
llvm-svn: 244881
2015-08-13 10:41:55 +00:00
Tamas Berghammer 64ad85cef2 Fix Linux build after r244875
llvm-svn: 244877
2015-08-13 09:19:27 +00:00
Ravitheja Addepally 4778e410d0 Set orig_eax to -1 for Linux x86 platforms
Summary:
For Linux x86 based environments the orig_eax/orig_rax
register should be set to -1 to prevent the instruction pointer
to be decremented, which was the cause for the SIGILL exception.

Fix for Bug 23659

Reviewers: zturner, ashok.thirumurthi, mikesart, jingham, clayborg

Subscribers: clayborg, labath

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

llvm-svn: 244875
2015-08-13 09:05:11 +00:00
Jaydeep Patil 1142f83ce2 [LLDB][MIPS] Use qfThreadID if qC packet is not supported by target
SUMMARY:
    The patch uses qfThreadID to get the thread IDs if qC packet is not supported by target.
    
    Reviewers: jingham, clayborg
    Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits
    Differential Revision: http://reviews.llvm.org/D11519

llvm-svn: 244866
2015-08-13 03:46:36 +00:00
Jaydeep Patil 725666cc65 [LLDB][MIPS] Support standard GDB remote stop reply packet for watchpoint
SUMMARY:
    The patch supports TAAwatch:addr packet. The patch also sets m_watchpoints_trigger_after_instruction 
    to eLazyBoolNo when qHostInfo or qWatchpointSupportInfo is not supported by the target.
    
    Reviewers: jingham, clayborg
    Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits
    Differential Revision: http://reviews.llvm.org/D11747

llvm-svn: 244865
2015-08-13 03:46:01 +00:00
Jaydeep Patil 831435042e [LLDB][MIPS] Handle false positives for MIPS hardware watchpoints
SUMMARY:
    Last 3bits of the watchpoint address are masked by the kernel. For example, n is 
    at 0x120010d00 and m is 0x120010d04. When a watchpoint is set at m, then watch 
    exception is generated even when n is read/written. To handle this case, instruction 
    at PC is emulated to find the base address of the load/store instruction. This address 
    is then appended to the description of the stop-info packet. Client then reads this 
    information to check whether the user has set a watchpoint on this address.
    
    Reviewers: jingham, clayborg
    Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits
    Differential Revision: http://reviews.llvm.org/D11672

llvm-svn: 244864
2015-08-13 03:44:09 +00:00
Bruce Mitchener 023e3050c5 Add missing newline at EOF.
This fixes a warning on the Mac OS X build.

llvm-svn: 244863
2015-08-13 02:44:40 +00:00
Bruce Mitchener aab764965a Remove DNBConfig.h
Summary:
This was no longer needed and hasn't been needed since r143244
in 2011.  This removes everything associated with generating
or using it.

Reviewers: clayborg, jasonmolenda

Subscribers: lldb-commits

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

llvm-svn: 244850
2015-08-13 00:32:01 +00:00
Enrico Granata 53f2a4aff3 Convert GetNumTemplateArguments() and GetTemplateArgument() to be instance functions on the CompilerType and the TypeSystem
llvm-svn: 244846
2015-08-13 00:24:24 +00:00
Greg Clayton 4d48e5b371 Fix process_events.py to auto continue the process if we attached so the process doesn't just sit there suspended.
llvm-svn: 244801
2015-08-12 20:04:01 +00:00
Chaoren Lin b6325d0cad Make dosep.py PEP8 compliant. NFC.
Reviewers: zturner, clayborg

Subscribers: lldb-commits

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

llvm-svn: 244784
2015-08-12 18:02:54 +00:00
Chaoren Lin e80372a43a Refactor dosep to use list comprehension. NFC.
Reviewers: zturner

Subscribers: lldb-commits

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

llvm-svn: 244783
2015-08-12 18:02:53 +00:00
Chaoren Lin 5a59e46460 Don't print number of failures and percentage if no tests ran.
Reviewers: zturner

Subscribers: lldb-commits

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

llvm-svn: 244782
2015-08-12 18:02:51 +00:00
Chaoren Lin ffc63b044c Make dosep output status by overwriting the same line.
Summary: Update to D11816.

Reviewers: zturner

Subscribers: zturner, lldb-commits

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

llvm-svn: 244781
2015-08-12 18:02:49 +00:00
Tamas Berghammer 6a2b73c8b0 Remove printf most likely left from some debugging section
llvm-svn: 244759
2015-08-12 15:55:04 +00:00
Omair Javaid 1fd2a8cfa7 Fix AArch64 watchpoint handlers in NativeRegisterContextLinux_arm64
http://reviews.llvm.org/D11899

llvm-svn: 244750
2015-08-12 13:42:24 +00:00
Tamas Berghammer 40caea63c4 Fix read only watchpoints on x86_64
On x86/x86_64 read only watchpoints aren't supported. Fall back
to read/write watchpoints in that case.

Note: Logic should be added to ignore the watchpoint hit when
occurred because of a write.

llvm-svn: 244742
2015-08-12 12:22:42 +00:00
Omair Javaid cf8eb9da4d Fix LLGS to enable read type watchpoints
http://reviews.llvm.org/D11902

llvm-svn: 244741
2015-08-12 11:30:21 +00:00
Tamas Berghammer 94f2bb5535 Improve check for ASAN callbacks
The ASAN callbacks are public symbols so we can search for them
with reading only the symbol table (not the debug info). Whit this
change the attach time for big executables with debug symbols
decreased by a factor of ~4.

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

llvm-svn: 244739
2015-08-12 11:13:11 +00:00
Tamas Berghammer ec3f92a5e2 Download symbol file for .oat files on android
On android .oat files (compiled java code) don't have symbol
information but on SDK 23+ it can be generated by the oatdump tool
(based on the dex information).

This CL adds logic to download this information and store it in the
module cache.

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

llvm-svn: 244738
2015-08-12 11:10:25 +00:00
Tamas Berghammer 1d0d90b906 Fetch SDK version from PlatformAndroid
The SDK version implies the features supported by a given android
device. This version number will be used in future changes to execute
the right command on the device.

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

llvm-svn: 244737
2015-08-12 11:10:19 +00:00
Jason Molenda 6acc86c3f5 Have debugserver send the OS version string plus
major, minor, and patchlevel in the qHostInfo reply.  
Document that qHostInfo may report major/minor/patch
separately / in addition to the version: combination.

<rdar://problem/22125465> 

llvm-svn: 244716
2015-08-12 03:27:33 +00:00
Chaoren Lin 4ec3e13c91 Export snprintf to avoid linking error with liblldb on Windows.
Reviewers: zturner, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 244710
2015-08-12 01:22:24 +00:00
Greg Clayton a1e5dc86a6 ClangASTType is now CompilerType.
This is more preparation for multiple different kinds of types from different compilers (clang, Pascal, Go, RenderScript, Swift, etc).

llvm-svn: 244689
2015-08-11 22:53:00 +00:00
Greg Clayton 42b0148a49 Fix a infinite loop when killing a process that is in the middle of loading shared libraries.
The issue was we were sending a "qSymbol::" packet and it we were already disconnected were weren't exiting the while loop if we didn't successfully send the qSymbol packet.

<rdar://problem/22098746> 

llvm-svn: 244683
2015-08-11 22:07:46 +00:00
Greg Clayton c6f0468937 Added missing files from checking regarding:
http://reviews.llvm.org/D8712

llvm-svn: 244681
2015-08-11 21:49:32 +00:00
Greg Clayton d8d4a57b37 First step in getting LLDB ready to support multiple different type systems.
This is the work done by Ryan Brown from http://reviews.llvm.org/D8712 that makes a TypeSystem class and abstracts types to be able to use a type system.

All tests pass on MacOSX and passed on linux the last time this was submitted. 

llvm-svn: 244679
2015-08-11 21:38:15 +00:00
Greg Clayton 8c3f9c9868 Don't crash if the file we want to touch doesn't exist.
llvm-svn: 244663
2015-08-11 21:01:32 +00:00
Ilia K d7f932a8c8 Add size field to library load event (MI)
Summary:
(This revision supersedes the abandon: http://reviews.llvm.org/D9716)
Size field is used to let the debugger attribute an address to a specific library when symbols are not available. 
For example:
	OpenGLESApp4.app!Cube_draw() Line 74	C
 	OpenGLESApp4.app!-[GameViewController glkView:drawInRect:](GameViewController * self, SEL _cmd, GLKView * view, CGRect rect) Line 89	C++
 	GLKit!<redacted>	
 	QuartzCore!<redacted>	
 	QuartzCore!<redacted>	
 	QuartzCore!<redacted>	
 	QuartzCore!<redacted>	
 	QuartzCore!<redacted>	
 	UIKit!<redacted>	
 	UIKit!<redacted>	
 	UIKit!<redacted>	
 	UIKit!<redacted>	
 	FrontBoardServices!<redacted>	
 	CoreFoundation!<redacted>	

Patch from paulmay@microsoft.com

Reviewers: ChuckR, abidh, ki.stfu

Subscribers: greggm, lldb-commits

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

llvm-svn: 244573
2015-08-11 06:07:14 +00:00
Oleksiy Vyalov 9dcdd2ee03 Revert r244308 since it's introducing test regressions on Linux:
- TestLldbGdbServer.py both clang & gcc, i386 and x86_64
 - TestConstVariables.py gcc, i386 and x86_64
 - 112 failures clang, i386

llvm-svn: 244514
2015-08-10 21:49:50 +00:00
Zachary Turner 38e64175db Allow dosep.py to print dotest.py output on success.
Previously all test output was reported by each individual
instance of dotest.py.  After a recent patch, dosep gets dotest
outptu via a pipe, and selectively decides which output to
print.

This breaks certain scripts which rely on having full output
of each dotest instance to do various parsing and/or log-scraping.

While we make no promises about the format of dotest output, it's
easy to restore this to the old behavior for now, although it is
behind a flag.  To re-enable full output, run dosep.py with the -s
option.

Differential Revision: http://reviews.llvm.org/D11816
Reviewed By: Chaoren Lin

llvm-svn: 244469
2015-08-10 17:46:11 +00:00
Jason Molenda 484900bd3b Feedback from Jim: Change the "optimized code" warning to be entirely
contained within Process so that we won't be duplicating the warning
message if other parts of the code want to issue the message.  Change
Process::PrintWarning to be a protected method - the public method
will be the PrintWarningOptimization et al.  Also, Have
Thread::FunctionOptimizationWarning shortcut out if the warnings
have been disabled so that we don't (potentially) compute parts of
the SymbolContext unnecessarily.

llvm-svn: 244436
2015-08-10 07:55:25 +00:00
Omair Javaid 2040548fcb Fix for build errors on arm-linux-gnueabi-gcc
http://reviews.llvm.org/D11256

llvm-svn: 244419
2015-08-09 19:04:41 +00:00
Chaoren Lin ea575525e1 Use lowercase for local cmake variables.
llvm-svn: 244345
2015-08-07 18:54:06 +00:00
Chaoren Lin 60852bcb06 Hide cmake variables related to static linking Android lldb-server.
llvm-svn: 244344
2015-08-07 18:54:04 +00:00
Chaoren Lin d47fb197f6 Update to D11825.
Summary:
Adding `-latomic` to `ANDROID_LINKER_FLAGS` doesn't actually work.
Adding `atomic` to `LLDB_SYSTEM_LIBS` does.

Related: D11831.

Reviewers: Andrzej, ovyalov

Subscribers: tberghammer, danalbert, srhines, lldb-commits

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

llvm-svn: 244343
2015-08-07 18:54:02 +00:00
Sagar Thakur d754890047 [LLDB][MIPS] Fix offsets of all register sets and add MSA regset and FRE=1 mode support
This change :

    - Fixes offsets of all register sets for Mips.
    - Adds MSA register set and FRE=1 mode support for FP register set.
    - Separates lldb register numbers and register infos of freebsd/mips64 from linux/mips64.
    - Re-orders the register numbers of all kinds for mips to be consistent with freebsd order of register numbers.
    - Eliminates ENABLE_128_BIT_SUPPORT and union ValueData from Scalar.cpp and uses llvm::APInt and llvm::APFloat for all integer and floating point types.

Reviewers : emaste, jaydeep, clayborg
Subscribers : emaste, mohit.bhakkad, nitesh.jain, bhushan
Differential : http://reviews.llvm.org/D10919

llvm-svn: 244308
2015-08-07 06:39:38 +00:00
Chaoren Lin 4c1ff05a70 Add -latomic to Android mips build to avoid http://b.android.com/182094.
Reviewers: ovyalov

Subscribers: tberghammer, danalbert, srhines, lldb-commits

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

llvm-svn: 244298
2015-08-06 23:53:07 +00:00
Jason Molenda 03c9cd0852 Change the warning message about optimization to be printed once
per Module instead of once per CompileUnit, and print the 
module name.  A module may have a mix of compile units built with
optimization and compile units built without optimization -- the
warning won't be printed until the user selects a stack frame of
a function that was built with optimization.  And as before, it
will only be printed once per module per debug session.

<rdar://problem/19281172> 

llvm-svn: 244281
2015-08-06 21:54:29 +00:00
Richard Smith 4cb29abcdb Update lldb's ExternalASTSources to match Clang r244161.
llvm-svn: 244194
2015-08-06 05:13:41 +00:00
Jason Molenda ef7d641617 Second part of indicating when the user is stopped in optimized code.
The first part was in r243508 -- the extent of the UI changes in that
patchset was to add "[opt]" to the frame-format when a stack frame was
built with optimized code.

In this change, when a stack frame built with optimization is selected,
a message will be printed to the async output channel --

opt1.c was compiled with optimization - stepping may behave oddly; variables may not be available.

The warning will be only be printed once per source file in a debug session.
These warnings may be disabled by

settings set target.process.optimization-warnings false

Internally, a new Process::PrintWarning() method has been added for
warnings that we want to print only once to the user.  It takes a type
of warning (currently only eWarningsOptimization) and an object
pointer (CompileUnit*) - the warning will only be printed once for a
given object pointer value.

This is a bit of a prototype of this change -  I think we will be
tweaking it more in the future.  But I wanted to land this and see
how it goes.  Advanced users will find these warnings unnecessary
noise and will quickly disable them - but anyone who maintains a 
debugger knows that debugging optimized code, without realizing it,
is a constant source of confusion and frustation for more typical
debugger users.  

I imagine there will be more of these "warn once per whatever" style
warnings that we will want to add in the future and we'll need to 
come up with a better way for enabling/disabling them.  But I'm not
srue what form that warning settings should take and I didn't want
to code up something that we regret later, so for now I just added
another process setting for this one warning.

<rdar://problem/19281172> 

llvm-svn: 244190
2015-08-06 03:27:10 +00:00
Chaoren Lin dfcecdeeb2 Static Android build doesn't need shared libs.
llvm-svn: 244073
2015-08-05 17:42:46 +00:00
Chaoren Lin d3fe8198f4 Allow sysroot and python to be specified for Android build.
llvm-svn: 244072
2015-08-05 17:42:44 +00:00
Chaoren Lin dd44c26d34 Flush stderr on dosep status update for Windows.
llvm-svn: 244069
2015-08-05 17:36:54 +00:00
Sylvestre Ledru ec3af0f94e Bug 24332 - Fix the build of lldb under GNU/Linux when using autotools
Reviewers: loladiro, jingham, emaste, zturner, brucem

Subscribers: tberghammer, danalbert, srhines, zturner, lldb-commits

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

llvm-svn: 244039
2015-08-05 12:46:53 +00:00
Tanya Lattner 0b2f37871d Update to new lists.llvm.org
llvm-svn: 244006
2015-08-05 04:02:43 +00:00
Bruce Mitchener 381b73c96b [lldb-mi] Fix non-OS X builds.
llvm-svn: 243978
2015-08-04 13:25:23 +00:00
Bruce Mitchener 2d6b2f2010 [lldb-mi] Simplify MICmnMIOutOfBandRecord implementation.
Summary:
* Remove extraneous members that were just storing temporary
  values.
* OutOfBand_e parameters don't need to be const as they are
  scalars.
* Switch from a map with CMIUtilString values to using a mapping
  function. This uses a switch statement which will generate
  a warning if a new result class is added.
* Make BuildAsyncRecord a static function rather than a private
  member function so that we can construct the result text
  correctly and avoid having extra stuff in the header.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 243975
2015-08-04 13:12:31 +00:00
Bruce Mitchener e2453afff6 [lldb-mi] Use empty arg lists instead of (void).
Summary: This brings the code more in line with the usual LLDB style. NFC.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 243967
2015-08-04 10:24:20 +00:00