Commit Graph

6659 Commits

Author SHA1 Message Date
Enrico Granata 6eca3559d6 Hardening the vector iterator synthetic child(ren) provider against item-not-in-cluster asserts
llvm-svn: 178265
2013-03-28 18:50:54 +00:00
Greg Clayton ca5ce187fa Be sure to take the mutex when the destructor is called in case other threads are using these lists and those other threads have the mutex locked.
llvm-svn: 178262
2013-03-28 18:41:44 +00:00
Greg Clayton ac358da589 <rdar://problem/13527167>
Partial fix for the above radar.

Call ThreadList::Clear() in the ThreadList destructor so if any other threads currently have the thread list mutex, we won't destroy the list for them while they are using it. ThreadList::Clear() takes the mutex and clears the thread list contents.

llvm-svn: 178257
2013-03-28 18:33:53 +00:00
Ashok Thirumurthi 4f5f39ac4c Introduces extended register sets whose availability can vary with the target processor.
- Includes a stub for AVX support in the x86-64 register context and a failing test for register sets that are unavailable.

Thanks to Greg Clayton for his review feedback.

llvm-svn: 178252
2013-03-28 17:27:40 +00:00
Daniel Malea da0a326702 Fix makefile build by linking needed library 'irreader'
llvm-svn: 178251
2013-03-28 17:08:09 +00:00
Ashok Thirumurthi 0118635979 Fix the Linux build issues introduced by r178191.
- All Linux logging channels now use a single global instance of lldb_private::Log, to handle the case of logging during process tear down.
- Also removed a single use of LogSP in FreeBSD and fixed a typo in a comment while reading through ProcessKDPLog.

Reviewed by Daniel Malea.

llvm-svn: 178242
2013-03-28 16:02:31 +00:00
Jason Molenda d37a8a9e2e Debugserver fix for launching iOS apps who are named "com.apple.something"
- the ".app" would be treated as the app bundle final characters
and the SpringBoard launch would fail.
<rdar://problem/13258935> 

llvm-svn: 178209
2013-03-28 01:48:21 +00:00
Enrico Granata 198125a8ff <rdar://problem/13412986>
Holding the Python lock while we call the Python C API to post-process objects returned from the OS plugins
This should avoid issues where some Python objects get invalidated while we are in the middle of processing them and we end up with an invalid Python state and a crash

llvm-svn: 178206
2013-03-28 00:27:30 +00:00
Jim Ingham 5cb9a184e0 Protect against the case where the current inlined depth is wrong, and leads us to think we can't even get the
frame at index 0.  We should ALWAYS be able to get that.

<rdar://problem/13497571>

llvm-svn: 178205
2013-03-28 00:13:30 +00:00
Jim Ingham 23460c369c Use the error from ValidatePlan.
llvm-svn: 178204
2013-03-28 00:08:00 +00:00
Jim Ingham bafdb8d977 The other half of the checkin to produce better error messages when the ThreadPlanCallFunction isn't valid.
llvm-svn: 178203
2013-03-28 00:07:20 +00:00
Jim Ingham 7d7931de4a RunThreadPlan should make sure the plan passed in is valid before running it.
<rdar://problem/13485541>

llvm-svn: 178202
2013-03-28 00:05:34 +00:00
Jim Ingham ea06f3bf4c Return a useful error message from ValidatePlan if the expression can't be made for some reason.
llvm-svn: 178201
2013-03-28 00:04:05 +00:00
Enrico Granata 8cd208e39c This test case was not doing the right thing with libc++ being used and was generating spurious over-completion warning flags
llvm-svn: 178192
2013-03-27 23:08:54 +00:00
Greg Clayton 5160ce5c72 <rdar://problem/13521159>
LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down.

All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down.

llvm-svn: 178191
2013-03-27 23:08:40 +00:00
Enrico Granata 360cc3188d Implementing the notion of externally-acquirable ScriptInterpreter lock
With this notion, if parties outside the ScriptInterpreter itself need to acquire a lock on script APIs, they can do so by a pattern like this:

{
auto lock = interpeter->AcquireInterpreterLock();
// do whatever you need to do...
} // lock will automatically be released here

This might be useful for classes that use the Python convenience objects (e.g. PythonDictionary) to ensure they keep the underlying interpreter in a safe and controlled condition while they call through the C API functions
Of course, the ScriptInterpreter still manages its internal locking correctly when necessary :-)

llvm-svn: 178189
2013-03-27 22:38:11 +00:00
Ashok Thirumurthi 762fbd0f95 test commit
- modified a comment

llvm-svn: 178178
2013-03-27 21:09:30 +00:00
Greg Clayton a6b0774d32 <rdar://problem/13327940>
Cleaned up some paths.

llvm-svn: 178177
2013-03-27 20:53:12 +00:00
Greg Clayton ff267c7fa0 Added a source file needed for clang to compile in the lldb_perf_clang test.
llvm-svn: 178176
2013-03-27 20:13:09 +00:00
Greg Clayton f81f751722 <rdar://problem/13327940>
Enhance automated testing to include evaluating function calls.

llvm-svn: 178175
2013-03-27 20:12:14 +00:00
Jim Ingham 551262d7c0 Fix a typo in help string.
llvm-svn: 178154
2013-03-27 17:36:54 +00:00
Sean Callanan 44bc657efe Fixed a problem where inline assembly errors caused
LLDB to crash.

<rdar://problem/13497915>

llvm-svn: 178115
2013-03-27 03:09:55 +00:00
Greg Clayton d00294483e Don't use a "uintptr_t" for the metadata key, use a "void *". This removes all of the casts that were being used and cleans the code up a bit. Also added the ability to dump the metadata.
llvm-svn: 178113
2013-03-27 01:48:02 +00:00
Greg Clayton 84912d7e6c Prune more stuff out of the build and source folders after building clang.
llvm-svn: 178112
2013-03-27 01:46:51 +00:00
Greg Clayton 2d7d09231e Cleaned up how LLDB.framework was being linked to and also how the target dependencies.
llvm-svn: 178085
2013-03-26 22:52:20 +00:00
Enrico Granata b65b3030b6 <rdar://problem/13339196>
The algorithm to access an item in a __NSArrayM was not reacting properly to deletions
The fix is to use a smarter formula that accounts for items shifting and the resulting notion of offsets in the table

llvm-svn: 178076
2013-03-26 21:44:13 +00:00
Enrico Granata 3f617d25d6 <rdar://problem/13246939>
Make format uint64_t[] actually work as designed

llvm-svn: 178072
2013-03-26 21:13:57 +00:00
Greg Clayton 365fe21947 Add a way to dump a ClangASTType to stdout for debugging purposes.
llvm-svn: 178071
2013-03-26 21:01:37 +00:00
Greg Clayton ba752b9bfd Trim the output build folder a bit to it isn't so large.
llvm-svn: 178070
2013-03-26 21:00:56 +00:00
Greg Clayton 2d95f35748 A few more tweaks to the python perf tests. Now there is a MemoryMeasurement.
llvm-svn: 178069
2013-03-26 21:00:29 +00:00
Greg Clayton 00ec049050 Clean up logging a bit to not log when a command pipe is opened when “lldb object” logging is on.
llvm-svn: 178068
2013-03-26 20:53:56 +00:00
Enrico Granata 7c0788b2d9 Data formatters cleanup:
- Making an error message more consistent
- Ensuring the element size is not zero before using it in a modulus
- Properly using target settings to cap the std::list element count
- Removing spurious element size calculations that were unused
- Removing spurious capping in std::map

llvm-svn: 178057
2013-03-26 18:55:08 +00:00
Greg Clayton bb1beaa220 Don't crash when we have an element size of zero.
llvm-svn: 178056
2013-03-26 18:42:13 +00:00
Jim Ingham a89be91f2e That wasn't a typo, if the short letter option is from a non-obvious source, I capitolize it in the help as an aid to memory.
llvm-svn: 178052
2013-03-26 18:29:03 +00:00
Enrico Granata 9fb5ab558b Our commands that end up displaying a ValueObject as part of their workflow use OptionGroupValueObjectDisplay as their currency for deciding the final representation
ValueObjects themselves use DumpValueObjectOptions as the currency for the same purpose

The code to convert between these two units was replicated (to varying degrees of correctness) in several spots in the code
This checkin provides one and only one (and hopefully correct :-) entry point for this conversion

llvm-svn: 178044
2013-03-26 18:04:53 +00:00
Jim Ingham cfed3cf33c Change the stepping test to output "total time" for the step as well.
llvm-svn: 178043
2013-03-26 18:04:40 +00:00
Sean Callanan bce7c77d85 Fixed a typo.
llvm-svn: 178039
2013-03-26 17:45:02 +00:00
Greg Clayton 6c75d19ba0 Remove FunctionProfiler and ProfileObjectiveC action classes as they are not used.
llvm-svn: 178035
2013-03-26 16:47:22 +00:00
Greg Clayton a9a7d9d5da <rdar://problem/13502196>
We have the tag when figuring out the fully qualified name, append a suitable name for other types of tags when no name is available.

llvm-svn: 177966
2013-03-26 01:51:59 +00:00
Greg Clayton 855958caef <rdar://problem/13502196>
Functions in "(anonymous namespace)" was causing LLDB to crash when trying to complete a type and it would also cause functions arguments to appear in wrong place in frame display when showing function arguments.

llvm-svn: 177965
2013-03-26 01:45:43 +00:00
Jim Ingham 08f5fa7a6e Make the stepping perf test case actually work.
llvm-svn: 177964
2013-03-26 01:43:36 +00:00
Enrico Granata 2f59302ce8 <rdar://problem/13221060>
Make register read and write accept $<regname> as valid.
This allows:
(lldb) reg read rbx
     rbx = 0x0000000000000000
(lldb) reg read $rbx
     rbx = 0x0000000000000000
(lldb) reg write $rbx 1
(lldb) reg read $rbx
     rbx = 0x0000000000000001

to function correctly

It is not done at the RegisterContext level because we should keep the internal API clean of this user-friendly behavior and name registers appropriately.
If this ends up being needed in more places we can reconsider.

llvm-svn: 177961
2013-03-26 01:27:04 +00:00
Enrico Granata c540f57ffc Checking that the wrong syntax does not give a correct summary after clearing the error messages here
llvm-svn: 177949
2013-03-26 00:24:27 +00:00
Greg Clayton 4d8ad55c78 Modified patch from Prabhat Verma to enable loading core files through the SBTarget API.
llvm-svn: 177932
2013-03-25 22:40:51 +00:00
Greg Clayton fe736e889e Fix the buildbot so a LLDB test doesn't fail looking for "<invalid usage of pointer value as object>".
llvm-svn: 177926
2013-03-25 22:04:11 +00:00
Greg Clayton 5088c48686 <rdar://problem/13498879>
C String summary is emitting "<invalid usage of pointer value as object>" for bad pointers. Now it doesn't emit anything.

llvm-svn: 177913
2013-03-25 21:06:13 +00:00
Han Ming Ong 6f7237d1f1 <rdar://problem/13498504>
Don't hard code vm page size in profiling code

llvm-svn: 177907
2013-03-25 20:44:40 +00:00
Han Ming Ong fbd8de83db <rdar://problem/13404009>
Only get the attach_info's user ID if the supplied user info is invalid.

llvm-svn: 177900
2013-03-25 20:11:18 +00:00
Enrico Granata c2a58d73ce <rdar://problem/13365424>
Ensure that option -Y also works for expression as it does for frame variable
Also, if the user passes an explicit format specifier when printing a variable, override the summary's decision to hide the value.

This is required for scenarios like this to work:
(lldb) p/x c
(Class) $0 = 0x0000000100adb7f8 NSObject

Previously this would say:
(lldb) p/x c
(Class) $0 = NSObject

ignoring the explicit format specifier

llvm-svn: 177893
2013-03-25 19:46:48 +00:00
Enrico Granata ac9df2d1a6 <rdar://problem/13434476>
Making value objects properly iterable in constructs of the form
[ x for x in value_with_children ]

This would previously cause an endless loop because lacking a proper iterator object, Python will keep calling __getitem__() with increasing values of the index until it gets an IndexError
since SBValue::GetValueForExpressionPath() supports synthetic array members, no array index will ever really cause an IndexError to be raised, hence the endless iteration

class value_iter is an implementation of __iter__() that provides a terminating iterator over a value

llvm-svn: 177885
2013-03-25 18:53:07 +00:00