Commit Graph

11859 Commits

Author SHA1 Message Date
David Srbecky d515e94070 Tolerate DWARF compile unit without filename.
Summary:
The DW_AT_name attribute of compile unit is optional.
If it is missing, try to get filename from the debug_line section.
This allows the compile unit to be useful without the filename.

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

llvm-svn: 241679
2015-07-08 14:00:04 +00:00
Pavel Labath 235c8405eb Avoid going through Platform when creating a NativeProcessProtocol instance
Summary:
This commit avoids the Platform instance when spawning or attaching to a process in lldb-server.
Instead, I have the server call a (static) method of NativeProcessProtocol directly. The reason
for this is that I believe that NativeProcessProtocol should be decoupled from the Platform
(after all, it always knows which platform it is running on, unlike the rest of lldb).
Additionally, the kind of platform actions a NativeProcessProtocol instance is likely to differ
greatly from the platform actions of the lldb client, so I think the separation makes sense.

After this, the only dependency NativeProcessLinux has on PlatformLinux is the ResolveExecutable
method, which needs additional refactoring.

Reviewers: ovyalov, clayborg

Subscribers: lldb-commits

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

llvm-svn: 241672
2015-07-08 09:08:53 +00:00
Jim Ingham 22302e5995 Make command files specified to the driver actually print their
results if the -Q option is not provided.  Also took out the quietly
option from AddInitialCommand, we don't use that to set this option,
we use the override set by the -Q option.

<rdar://problem/21232087>

llvm-svn: 241652
2015-07-08 00:59:59 +00:00
Sean Callanan 007135e612 Fixed the C modules test case on Darwin by streamlining its code.
We don't need to do the fancy dance with checking whether the iterator
represents a #define -- in fact, that's the wrong thing to do.  The thing to do
is check whether the highest-priority module that did something to the module
#defined or #undefd it.  If it #defined it, then the MacroInfo* will be non-NULL
and we're good to go.

llvm-svn: 241651
2015-07-08 00:13:49 +00:00
Jim Ingham ce400d9ab4 Don't select a thread that stopped for a signal that was
not set to stop - there must be some other thread that
stopped for a more interesting reason.

<rdar://problem/19943567>

llvm-svn: 241650
2015-07-08 00:06:30 +00:00
Bruce Mitchener 4578815289 Move ProcessKDP's StringExtractor include.
This can be in the cpp file rather than the header file, so moving
it there.

Summary: Move ProcessKDP's StringExtractor include.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 241649
2015-07-07 23:59:01 +00:00
Adrian McCarthy 45c4c9b090 Windows doesn't have fork.
llvm-svn: 241640
2015-07-07 22:56:34 +00:00
Jim Ingham 763b2b26a0 Add a version of SBTarget::EvaluateExpression that doesn't require
an options (and makes an appropriate defaulted option for you.)

<rdar://problem/20639202>

llvm-svn: 241632
2015-07-07 22:12:17 +00:00
Greg Clayton a7b2690cb3 Fix debugserver build after someone moved StrintExtractor.h.
llvm-svn: 241628
2015-07-07 21:27:08 +00:00
Chaoren Lin 57fca019e4 Fix APFloat construction from 16 byte APInt.
Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 241606
2015-07-07 17:39:23 +00:00
Bruce Mitchener 28529f607c Fix StringExtractor.h issues.
Summary:
Fix StringExtractor.h issues.

* source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
  (#include "Utility/StringExtractor.h): Not needed, this is already
    included by ProcessKDP.h

* unittests/Utility/StringExtractorTest.cpp
  (#include "Utility/StringExtractor.h): Update include path to the
    new location.

Reviewers: labath, clayborg

Subscribers: lldb-commits

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

llvm-svn: 241596
2015-07-07 15:19:03 +00:00
Bruce Mitchener 6c971ec217 [lldb-mi] Spell resource string name correctly.
Broardcaster -> Broadcaster

Summary: [lldb-mi] Spell resource string name correctly.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 241591
2015-07-07 14:54:07 +00:00
Bruce Mitchener 1f44139a4f cmake no longer needs to deal with -std=c++11 checks.
LLVM requires and handles this now and has the correct compiler
version checks. This block of code for cmake in LLDB is no longer
needed.

Summary: cmake no longer needs to deal with -std=c++11 checks.

Reviewers: labath

Subscribers: lldb-commits

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

llvm-svn: 241590
2015-07-07 14:52:59 +00:00
Adrian McCarthy 137d7ba8b2 Fix _LocalProcess.terminate on Windows.
llvm-svn: 241589
2015-07-07 14:47:34 +00:00
Bruce Mitchener c5638f915b [lldb-mi] Fix typo in variable name.
Seperated -> Separated.

Summary: [lldb-mi] Fix typo in variable name.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 241586
2015-07-07 14:26:28 +00:00
Bruce Mitchener ae4c026765 [lldb-mi] Fix typos
llvm-svn: 241585
2015-07-07 14:04:40 +00:00
Pavel Labath be9f9c177a Enclose CLANG_USED_LIBS in --start/end-group when linking liblldb (bug #24044)
Patch by Eugene Zelenko.

llvm-svn: 241576
2015-07-07 12:24:33 +00:00
Pavel Labath df0ee89d45 LLDB standalone build: check if Clang was built independently from LLVM
This is fix for bug 23704: LLDB standalone build always include
ClangConfig.cmake even if Clang was built with LLVM (ClangConfig.cmake
doesn't exist).

Patch by: Eugene Zelenko

llvm-svn: 241575
2015-07-07 12:08:09 +00:00
Pavel Labath 066fc8b194 Fix-up ProcessKDP wrt. StringExtractor move
llvm-svn: 241574
2015-07-07 11:00:55 +00:00
Pavel Labath 67add94108 Fix build after recent clang interface changes
llvm-svn: 241573
2015-07-07 10:11:16 +00:00
Pavel Labath f805e1905c Fix cmake build after recent JSON changes
I have moved StringExtractor.h into the include/ folder so that it can be properly included by
everyone.

llvm-svn: 241572
2015-07-07 10:08:41 +00:00
Tamas Berghammer ed1fa2084c Leave OS as unspecified unknown if it isn't specified in the ELF file
This is the redone of r238623 what was reverted with the refactor
in r239148.

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

llvm-svn: 241569
2015-07-07 09:11:59 +00:00
Jason Molenda 3f661e0899 When debugserver is running on an iOS device, call
proc_set_wakemon_params() to raise the limit on the # of wakeups
per second that are acceptable before the system may send an 
EXC_RESOURCE signal to debugserver.  

<rdar://problem/19631512> 

llvm-svn: 241553
2015-07-07 04:15:43 +00:00
Jason Molenda 27467eab81 For the "ios" target add a shell script phase at the end which
removes the LLDB.framework/Resources and LLDB.framework/Swift
directories.  This isn't a deep bundle on ios builds; it is shallow.
    
<rdar://problem/16676101>

llvm-svn: 241540
2015-07-07 03:38:42 +00:00
Enrico Granata d529d04fd7 Add a summary for vector types
The summary is - quite simply - a one-line printout of the vector elements

We still need synthetic children:
a) as a source of the elements to print in the summary
b) for graphical IDEs that display structure regardless of the summary settings

rdar://5429347

llvm-svn: 241531
2015-07-07 00:20:57 +00:00
Greg Clayton 98424c4460 Make the "lldb/Utility/JSON.h" able to parse JSON into tokens with the new JSONParser class.
Change over existing code to use this new parser so StructuredData can use the tokenizer to parse JSON instead of doing it manually.

This allowed us to easily parse JSON into JSON* objects as well as into StructuredData.

llvm-svn: 241522
2015-07-06 23:40:40 +00:00
Adrian McCarthy 381dffd655 Normalize line endings.
llvm-svn: 241507
2015-07-06 20:44:08 +00:00
Chaoren Lin bfa848cfa1 Use /proc/$$/stat instead of $PPID.
Summary: $PPID is not available on old shells.

Reviewers: tberghammer, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 241486
2015-07-06 18:56:04 +00:00
Enrico Granata c1f705c229 Add a GetDisplayName() API to SBFrame, SBFunction and SBSymbol
This API is currently a no-op (in the sense that it has the same behavior as the already existing GetName()), but is meant long-term to provide a best-for-visualization version of the name of a function

It is still not hooked up to the command line 'bt' command, nor to the 'gui' mode, but I do have ideas on how to make that work going forward

rdar://21203242

llvm-svn: 241482
2015-07-06 18:28:46 +00:00
Oleksiy Vyalov 298be46e3f Add --port-file flag to lldb-platform to store port number which platform is listening.
http://reviews.llvm.org/D10886

llvm-svn: 241479
2015-07-06 18:05:19 +00:00
Adrian McCarthy 5cbef0e79f Fix step over breakpoint on Windows (which was detected by TestCreateAfterAttach.py).
llvm-svn: 241475
2015-07-06 17:42:09 +00:00
Pavel Labath 05ab2374be Fix dosep.py on windows after r240946
Summary:
On windows, global python variables are not automatically passed to child processes. This commit
makes sure the default timeout value is available to child processes by passing it directly.
I pass the whole dotest_opts value to the children, so we can use the other members as well if we
need to do it in the future.

Reviewers: amccarth

Subscribers: lldb-commits-list

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

llvm-svn: 241459
2015-07-06 15:57:52 +00:00
Bruce Mitchener 88205302c1 [lldb-mi] Use 'override' on overridden virtual methods.
Summary: [lldb-mi] Use 'override' on overridden virtual methods.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 241457
2015-07-06 15:48:55 +00:00
Bruce Mitchener 6b067074f9 [lldb-mi] Fix misc. typos in comments.
llvm-svn: 241448
2015-07-06 14:37:53 +00:00
Abhishek Aggarwal d6a62cc2fe Use both OS and Architecture to choose correct ABI
Summary:
   - In ABIMacOSX_i386.cpp:
        -- Earlier, only Triple:Arch was used to choose ABI
        -- Now, Triple:OS is also used along with Triple:Arch

   - Resolves PR-23718

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

Reviewers: jasonmolenda, clayborg

Subscribers: lldb-commits

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

llvm-svn: 241441
2015-07-06 12:49:47 +00:00
Abhishek Aggarwal 25026f52d0 Revert the patch to Test Commit Access
llvm-svn: 241438
2015-07-06 11:26:51 +00:00
Abhishek Aggarwal 9d6f541b60 Test Commit Access: Please Ignore
llvm-svn: 241437
2015-07-06 11:19:32 +00:00
Tamas Berghammer 931901e56c Make TestStopHook* remote platform compatible
llvm-svn: 241436
2015-07-06 10:46:34 +00:00
Tamas Berghammer b8d2e9e309 Fix final wait in ExprSyscallTestCase for aarch64
llvm-svn: 241435
2015-07-06 10:02:56 +00:00
Tamas Berghammer 8d53464472 Improve UnwindLLDB with better detection for unwinding failures
Previously we accepted a frame as correct result if the PC pointed
into an executable section of code. The isse with that approac is
that if we calculated PC correctly but messed up the value of CFA
then unwinding from the next fram will most likely fail.

With this change I modify the logic with keeping the requirement
for PC to point to an executable section and also check that we can
continue the unwind from the frame we calculated. If continuing from
the frame calculated with the primary unwind plan isn't working then
fall back to the fallback plan with the hope for a better frame (if
the fallback plan won't help then we acceot the frame from the
primary plan).

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

llvm-svn: 241434
2015-07-06 09:24:20 +00:00
Bruce Mitchener 0b6ba7c668 Use string::find(char) for single character strings.
Summary: Use string::find(char) for single character strings.

Reviewers: abidh, ki.stfu, clayborg

Subscribers: lldb-commits

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

llvm-svn: 241390
2015-07-04 05:16:58 +00:00
Ed Maste e164ad8dfb Remove DOS line endings from LLDBStandalone.cmake
llvm-svn: 241361
2015-07-03 16:39:17 +00:00
Bruce Mitchener e86c6fa3dc [lldb-mi] Use size_t where appropriate.
Summary:
Many places should have been using size_t rather than MIuint or
MIint. This is particularly true for code that uses std::string::find(),
std::string::rfind(), std::string::size(), and related methods.

Reviewers: abidh, ki.stfu, domipheus

Subscribers: lldb-commits

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

llvm-svn: 241360
2015-07-03 15:40:44 +00:00
Bruce Mitchener 201dec7dc2 [lldb-mi] Remove unnecessary const_cast.
Summary: Remove unnecessary const_cast.

Reviewers: abidh, ki.stfu

Subscribers: lldb-commits

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

llvm-svn: 241359
2015-07-03 15:31:32 +00:00
Bruce Mitchener 44519f8608 [lldb-mi] GetVarFormatForChar needn't pass a char by const ref.
Summary: GetVarFormatForChar needn't pass a char by const ref.

Reviewers: ki.stfu, abidh

Subscribers: lldb-commits

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

llvm-svn: 241358
2015-07-03 15:30:48 +00:00
Bruce Mitchener 53be30077f [lldb-mi] Remove unnecessary members from MICmdArgContext.
Summary:
Remove unnecessary members from MICmdArgContext.

We don't need constants for these value stored in every instance
of the class.

Reviewers: ki.stfu, abidh

Subscribers: lldb-commits

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

llvm-svn: 241357
2015-07-03 15:30:38 +00:00
Bruce Mitchener d0ee89d81a [lldb-mi] Typo fixes
Summary: Some more typo fixes in LLDB-MI.

Reviewers: ki.stfu, abidh

Subscribers: lldb-commits

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

llvm-svn: 241351
2015-07-03 14:09:56 +00:00
Bruce Mitchener 3b25b479bf Remove typedefs for MIchar, MIschar, MIuchar.
Summary:
This is a start on bringing lldb-mi more in line with the typical
LLDB coding style. This just removes the usage of the typedefs and
doesn't yet clean up any logic or other issues. (This is to keep
the review simple.)

Reviewers: abidh, ki.stfu, domipheus

Subscribers: lldb-commits

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

llvm-svn: 241349
2015-07-03 13:45:34 +00:00
Tamas Berghammer ff7fd90017 Fix aarch64 breakpoint PC offset
llvm-svn: 241347
2015-07-03 12:51:30 +00:00
Tamas Berghammer cec93c355a Fix 128bit register read and user register count on aarch64
llvm-svn: 241340
2015-07-03 11:17:07 +00:00