Enrico Granata
2809b98c0e
Reverting r220435. Jim Ingham and I discussed this for a bit, and we came up with a better command model for this feature
...
llvm-svn: 220437
2014-10-22 22:33:08 +00:00
Enrico Granata
83f231854a
Add a 'type info' command, which can be fed one or more local variables - and it will spew out the list of formatters that apply to each of those variables, if any
...
llvm-svn: 220435
2014-10-22 22:04:40 +00:00
Enrico Granata
6714a0fd09
More cleanup of the CXXFormatterFunctions header
...
llvm-svn: 220433
2014-10-22 21:47:27 +00:00
Greg Clayton
c3795409c9
Fixed name lookups for names that contain "::" but aren't actually C++ qualified C++ names.
...
To do this, I fixed the CPPLanguageRuntime::StripNamespacesFromVariableName() function to use a regular expression that correctly determines if the name passed to it is a qualfied C++ name like "a:🅱️ :c" or "b::c". The old version of this function was treating '__54-[NSUserScriptTask executeWithInterpreter:arguments::]_block_invoke' as a match with a basename of ']_block_invoke'.
Also fixed a case in the by name lookup of functions where we wouldn't look for the full name if we actually tried to call CPPLanguageRuntime::StripNamespacesFromVariableName() and got an empty basename back.
<rdar://problem/18527866>
llvm-svn: 220432
2014-10-22 21:47:13 +00:00
Greg Clayton
fa226b74d1
Re-use the GetMatchAtIndex() that uses the StringRef to avoid code duplication and properly detect when a capture is invalid and return false.
...
llvm-svn: 220431
2014-10-22 21:43:15 +00:00
Zachary Turner
b5c4971a4c
Fix CMake build broken after r220421.
...
llvm-svn: 220430
2014-10-22 21:18:29 +00:00
Enrico Granata
e85fe3a4d1
Reorganize some of the data formatters code to simplify CXXFormattersFunction.h. Also, add a synthetic child provider for libc++'s version of std::initializer_list<T>
...
llvm-svn: 220421
2014-10-22 20:34:38 +00:00
Enrico Granata
50bed5e86f
Fix a problem where summary strings could not use a synthetically generated value as part of themselves
...
llvm-svn: 220414
2014-10-22 20:14:09 +00:00
Matthew Gardiner
c928de3e8e
Added functions to the C++ API, for the benefit of non-8-bit byte architectures.
...
New functions to give client applications to tools to discover target byte sizes
for addresses prior to ReadMemory. Also added GetPlatform and ReadMemory to the
SBTarget class, since they seemed to be useful utilities to have.
Each new API has had a test case added.
http://reviews.llvm.org/D5867
llvm-svn: 220372
2014-10-22 07:22:56 +00:00
Jim Ingham
a672ecefef
The breakpoint location hit counts were getting incremented in
...
BreakpointLocation::ShouldStop. That worked but wasn't really right,
since there's nothing to guarantee that won't get called more than
once. So this change moves that responsibility to the StopInfoBreakpoint
directly, and then it uses the BreakpointSite to actually do the bumping.
Also fix a test case that was assuming if you had many threads running some
code with a breakpoint in it, the hit count when you stopped would always be
1. Many of the threads could have hit it at the same time...
<rdar://problem/18577603>
llvm-svn: 220358
2014-10-22 01:54:17 +00:00
Enrico Granata
622be238eb
Expose the type-info flags at the public API layer. These flags provide much more informational content to consumers of the LLDB API than the existing TypeClass. Part of the fix for rdar://18517593
...
llvm-svn: 220322
2014-10-21 20:52:14 +00:00
Eric Christopher
098f898fd2
Move anonymous types declared in an anonymous union to
...
outside the anonymous union as it's a language extension
we don't normally support.
llvm-svn: 220320
2014-10-21 20:39:34 +00:00
Eric Christopher
f75b0ee2ab
Remove unused variable.
...
llvm-svn: 220319
2014-10-21 20:36:17 +00:00
Eric Christopher
a2b05d0441
Fix implicit conversion of NULL constant to 'bool'.
...
llvm-svn: 220318
2014-10-21 20:35:35 +00:00
Greg Clayton
dc6224e0a3
Make the "synchronous" mode actually work without race conditions.
...
There were many issues with synchronous mode that we discovered when started to try and add a "batch" mode. There was a race condition where the event handling thread might consume events when in sync mode and other times the Process::WaitForProcessToStop() would consume them. This also led to places where the Process IO handler might or might not get popped when it needed to be.
llvm-svn: 220254
2014-10-21 01:00:42 +00:00
Sean Callanan
35e678c7e0
Don't allow the expression parser to magically
...
look through 'self' at its ivars. It produces
surprising results.
<rdar://problem/18698760>
llvm-svn: 220220
2014-10-20 18:36:58 +00:00
Zachary Turner
cb5742b828
Don't use mkstemp, as it doesn't exist on Windows.
...
Differential Revision: http://reviews.llvm.org/D5849
Reviewed by: Jason Molenda
llvm-svn: 220218
2014-10-20 17:46:56 +00:00
Zachary Turner
10687b0ea5
Remove LLDB_DEFAULT_SHELL #define, and determine this at runtime.
...
Differential Revision: http://reviews.llvm.org/D5805
Reviewed by: Greg Clayton
llvm-svn: 220217
2014-10-20 17:46:43 +00:00
Sean Callanan
5e3bdbff3f
Fixed the expression parser to handle cases where
...
GetValueForVariableExpressionPath returns NULL and
doesn't set an error.
<rdar://problem/18682916>
llvm-svn: 220070
2014-10-17 18:16:04 +00:00
Enrico Granata
0e478f5aa3
Make a general helper function on the AST context to retrieve a type by identifier in the fashion needed by data formatters
...
llvm-svn: 220059
2014-10-17 17:56:59 +00:00
Jason Molenda
8e96e6b6f2
Break out of the command word parsing loop if we hit
...
an invalid combination of words; don't accidentally
continue trying to parse the command line.
clang static analysis fixit.
llvm-svn: 220026
2014-10-17 02:10:33 +00:00
Jason Molenda
81926c3ffe
Add #if 0 around unreachable block of code to suppress warnings.
...
clang warnings.
llvm-svn: 220025
2014-10-17 01:56:57 +00:00
Jason Molenda
9bdc4e1a59
Add null-checks around getter/setter before using them.
...
clang static analyzer fixit.
llvm-svn: 220024
2014-10-17 01:55:08 +00:00
Jason Molenda
84843ed536
A << operation would be undefined for a bit-selecting
...
function because of a '1u' making it a 32-bit value
when it really needed to be a 64-bit value. Trivial to fix
once I figured out what was going on.
clang static analzyer fixit.
llvm-svn: 220022
2014-10-17 01:52:30 +00:00
Jason Molenda
5b94115d50
Remove always-true part of a conditional expression.
...
clang warning.
llvm-svn: 220018
2014-10-17 01:38:10 +00:00
Jason Molenda
61e0a3ef1f
Put #if 0 blocks around three sections of code that are intentionally
...
unreachable so we don't get warnings about them.
Completely initialize a structure instead of leaving some of its fields
potentially indeterminate (although in reality they would all be set
before use -- but the compiler warning doesn't know that).
clang warning.
llvm-svn: 220017
2014-10-17 01:36:20 +00:00
Jason Molenda
bc464ee614
Change a use of mktemp() to mkstemp() for better security.
...
We have two more uses of mktemp still in the source base
but they'll take a little more consideration.
clang static analyzer fixit.
llvm-svn: 219983
2014-10-16 23:10:03 +00:00
Jason Molenda
e5d8eaf042
Only call RemovePersistentVariable on expr_result if that shared
...
pointer contains something.
llvm-svn: 219966
2014-10-16 21:25:43 +00:00
Enrico Granata
8d9c2da2d1
Rework this code so that it does not trigger a compiler warning. NFC
...
llvm-svn: 219964
2014-10-16 21:18:58 +00:00
Jason Molenda
48c0440d97
Fix MemoryHistory plugin to check whether the plugin
...
was able to create itself before returning the shared
pointer to it.
clang warning.
llvm-svn: 219936
2014-10-16 16:59:23 +00:00
Jason Molenda
823d8f6246
Most of this function checks to see if m_process is non-null before
...
dereferencing it, except for this one section of code. Add a null
check around it.
clang static analyzer fix.
llvm-svn: 219920
2014-10-16 08:43:27 +00:00
Jason Molenda
9bc86593a2
Another logical-or vrs. bitwise-or mixup in ClangUserExpression.
...
clang unreachable code warning.
llvm-svn: 219918
2014-10-16 08:27:27 +00:00
Jason Molenda
0060a38e7b
A series of bit-flag values should be bitwise-or'ed not logical-or'ed.
...
clang unreachable code warning.
llvm-svn: 219916
2014-10-16 08:15:11 +00:00
Jason Molenda
f8a7cfad6d
Remove unreachable code.
...
llvm-svn: 219915
2014-10-16 08:08:13 +00:00
Jason Molenda
637822e3d1
Remove unreachable code.
...
llvm-svn: 219914
2014-10-16 08:07:54 +00:00
Jason Molenda
97e704b2af
Add /* DISABLES CODE */ annotation before if (0) to mark it as intentional.
...
llvm-svn: 219913
2014-10-16 08:07:20 +00:00
Jason Molenda
a68e4dcd7e
Remove unreachable code.
...
llvm-svn: 219912
2014-10-16 08:05:49 +00:00
Jason Molenda
665f12a870
Remove unreachable code.
...
llvm-svn: 219911
2014-10-16 08:05:22 +00:00
Jason Molenda
60b5da6c3c
Remove unused initialization.
...
clang static analyzer fixit.
llvm-svn: 219909
2014-10-16 07:53:46 +00:00
Jason Molenda
18f5fd3a43
Remove dead store.
...
clang static analyzer fixit.
llvm-svn: 219908
2014-10-16 07:52:17 +00:00
Jason Molenda
8b5f2cfc19
Remove dead store.
...
clang static analyzer fixit.
llvm-svn: 219907
2014-10-16 07:49:27 +00:00
Jason Molenda
1e6cf05763
Remove dead store.
...
clang static analyzer fixit.
llvm-svn: 219905
2014-10-16 07:47:37 +00:00
Jason Molenda
5cf1e237f0
Remove unused variable.
...
clang static analyzer fixit.
llvm-svn: 219904
2014-10-16 07:41:32 +00:00
Jason Molenda
275746d768
Ryan Brown's patch to handle DW_OP_call_frame_cfa addresses
...
as load addreses instead of host addresses.
http://reviews.llvm.org/D5735
llvm-svn: 219896
2014-10-16 02:56:12 +00:00
Jason Molenda
42f4c7e720
Fix accidental over-checking of args in launcherXPCService.
...
llvm-svn: 219895
2014-10-16 02:53:57 +00:00
Jason Molenda
4ecbc44f79
Fix a potential null pointer deref & a potential memory leak,
...
also reformat to conform to the usual lldb coding conventions
a little better.
clang static analyzer fixit.
llvm-svn: 219893
2014-10-16 02:08:11 +00:00
Jason Molenda
1446881254
Ensure that user_exe_path is non-NULL before derferencing.
...
We've already created a FileSpec based on this local and
this code path would never be executed if it is an invalid
FilePath - but the static analyzer doesn't know this and I
want to placate it.
clang static analyzer fixit.
llvm-svn: 219890
2014-10-16 01:42:11 +00:00
Jason Molenda
60db6e43ca
Guard against NULL derefs.
...
clang static analyzer fixits.
llvm-svn: 219889
2014-10-16 01:40:16 +00:00
Jason Molenda
d31c800ce0
Ah, accidentally committed a patch I didn't mean to.
...
llvm-svn: 219888
2014-10-16 01:27:31 +00:00
Jason Molenda
320e7b3897
It's possible for long_options[long_options_index].definition to be null
...
from the previous for() loop - check that it is non-null before trying
to deref it.
clang static analyzer fixit.
llvm-svn: 219887
2014-10-16 01:26:51 +00:00