| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Data formatters now cache themselves.
This commit provides a new formatter cache mechanism. Upon resolving a formatter (summary or synthetic), LLDB remembers the resolution for later faster retrieval.
Also moved the data formatters subsystem from the core to its own group and folder for easier management, and done some code reorganization.
The ObjC runtime v1 now returns a class name if asked for the dynamic type of an object. This is required for formatters caching to work with the v1 runtime.
Lastly, this commit disposes of the old hack where ValueObjects had to remember whether they were queried for formatters with their static or dynamic type.
Now the ValueObjectDynamicValue class works well enough that we can use its dynamic value setting for the same purpose.
llvm-svn: 173728
|
|
|
|
|
|
|
|
|
|
|
|
| |
Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.
So I defined a new "lldb::offset_t" which should be used for all file offsets.
After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.
Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.
llvm-svn: 173463
|
|
|
|
|
|
|
| |
vector<bool> is specialized and the existing general summary for vectors would lie to the user.
Tackling libstdc++ and synthetic children is the following, less critical, part of this task
llvm-svn: 172671
|
|
|
|
|
|
| |
Single-character Unicode data formatters
llvm-svn: 172492
|
|
|
|
|
|
|
|
| |
AddCXXSummary in FormatManager::LoadSystemFormatters();
that function pulls in code that assumes python; can't
be used without the ifdef.
llvm-svn: 172300
|
|
|
|
|
|
| |
Making a summary for std::wstring as provided by libstdc++ along with a relevant test case
llvm-svn: 172286
|
|
|
|
|
|
|
|
|
| |
Providing a data formatter for libc++ std::wstring
In the process, refactoring the std::string data formatter to be written in C++ so that commonalities between the two can be exploited
Also, providing a new API on the ValueObject to navigate a hierarchy by index-path
Lastly, an appropriate test case is included
llvm-svn: 172282
|
|
|
|
|
|
| |
Making a data formatter for wchar_t *
llvm-svn: 172165
|
|
|
|
|
|
|
|
| |
Providing data formatters for char16_t* and char32_t* C++11-style Unicode strings
Using this chance to refactor the UTF data reader used for data formatters for added generality
Added a relevant test case
llvm-svn: 172119
|
|
|
|
|
|
| |
Adding a summary for NSError
llvm-svn: 169792
|
|
|
|
|
|
|
|
|
| |
- add new header lldb-python.h to be included before other system headers
- short term fix (eventually python dependencies must be cleaned up)
Patch by Matt Kopec!
llvm-svn: 169341
|
|
|
|
|
|
|
|
|
|
|
| |
statements instead of a switch for the size of the floating
point types; some architectures sizeof double and sizeof long
double are the same and that's invalid in a switch.
Fix the LLDB_DISABLE_PYTHON ifdef block in FormatManager::LoadObjCFormatters
so it builds on arm again.
llvm-svn: 167263
|
|
|
|
|
|
|
|
|
| |
does not automatically initialize the script interpreter in order to transfer its output file handle to it
This should delay initialization of Python until strictly necessary and speed-up debugger startup
Also, convert formatters for SEL and BOOL ObjC data-types from Python to C++, in order to reap more performance benefits from the above changes
llvm-svn: 166967
|
|
|
|
|
|
|
|
|
|
|
| |
Given our implementation of ValueObjects we could have a scenario where a ValueObject has a dynamic type of Foo* at one point, and then its dynamic type changes to Bar*
If Bar* has synthetic children enabled, by the time we figure that out, our public API is already vending SBValues wrapping a DynamicVO, instead of a SyntheticVO and there was
no trivial way for us to change the SP inside an SBValue on the fly
This checkin reimplements SBValue in terms of a wrapper, ValueImpl, that allows this substitutions on-the-fly by overriding GetSP() to do The Right Thing (TM)
As an additional bonus, GetNonSyntheticValue() now works, and we can get rid of the ForceDisableSyntheticChildren idiom in ScriptInterpreterPython
Lastly, this checkin makes sure the synthetic VOs get the correct m_value and m_data from their parents (prevented summaries from working in some cases)
llvm-svn: 166426
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
enabled after we'd found a few bugs that were caused by shadowed
local variables; the most important issue this turned up was
a common mistake of trying to obtain a mutex lock for the scope
of a code block by doing
Mutex::Locker(m_map_mutex);
This doesn't assign the lock object to a local variable; it is
a temporary that has its dtor called immediately. Instead,
Mutex::Locker locker(m_map_mutex);
does what is intended. For some reason -Wshadow happened to
highlight these as shadowed variables.
I also fixed a few obivous and easy shadowed variable issues
across the code base but there are a couple dozen more that
should be fixed when someone has a free minute.
<rdar://problem/12437585>
llvm-svn: 165269
|
|
|
|
| |
llvm-svn: 165186
|
|
|
|
|
|
| |
get FormatManager.cpp to build on no-python platforms again.
llvm-svn: 164284
|
|
|
|
|
|
| |
NSDictionary and related classes
llvm-svn: 164144
|
|
|
|
|
|
| |
building on no-Python systems again.
llvm-svn: 163961
|
|
|
|
|
|
| |
generated by running C++ code instead of Python scripts ; Adding a bunch of value-generating APIs to our private code layer ; Providing synthetic children for NSArray
llvm-svn: 163818
|
|
|
|
|
|
| |
LLDB_DISABLE_PYTHON builds
llvm-svn: 163170
|
|
|
|
|
|
| |
the Objective-C language runtime plugin expose class descriptors objects akin to the objc_runtime.py Pythonic implementation. Rewrite the data formatters for some core Cocoa classes in C++ instead of Python.
llvm-svn: 163155
|
|
|
|
|
|
| |
Jared Grubb
llvm-svn: 162680
|
|
|
|
|
|
| |
commit also changes the short names for formats so that uppercase hex can be 'X', which was previously assigned to hex float. hex float now has no short name.
llvm-svn: 161606
|
|
|
|
|
|
|
|
|
| |
suppress all non-error output from the "expression"
command.
<rdar://problem/11225150>
llvm-svn: 161502
|
|
|
|
|
|
| |
parameter name for Python summary-generating functions since it is a Python keyword.
llvm-svn: 161467
|
|
|
|
| |
llvm-svn: 160181
|
|
|
|
| |
llvm-svn: 160180
|
|
|
|
|
|
| |
NSString subclass
llvm-svn: 159389
|
|
|
|
|
|
|
|
| |
DataVisualization.h / DataVisualization.cpp / ValueObject.cpp
and
FormatManager.h / FormatManager.cpp
llvm-svn: 156886
|
|
|
|
|
|
| |
without a format specified would in certain cases crash LLDB - This has also led to refactoring the by-type accessors for the data formatter subsystem. These now belong in our internal layer, and are just invoked by the public API stratum
llvm-svn: 156429
|
|
|
|
|
|
| |
Previously, the categories were filled in but disabled by default. Tweaking test cases appropriately to keep working and do the right thing
llvm-svn: 155605
|
|
|
|
|
|
| |
an issue that was preventing Python oneliners from executing
llvm-svn: 155563
|
|
|
|
| |
llvm-svn: 153541
|
|
|
|
|
|
|
|
|
|
|
|
| |
SBValue is set up to always wrap a synthetic value when one is available.
A new setting enable-synthetic-value is provided on the target to disable this behavior.
There also is a new GetNonSyntheticValue() API call on SBValue to go back from synthetic to non-synthetic. There is no call to go from non-synthetic to synthetic.
The test suite has been changed accordingly.
Fallout from changes to type searching: an hack has to be played to make it possible to use maps that contain std::string due to the special name replacement operated by clang
Fixing a test case that was using libstdcpp instead of libc++ - caught as a consequence of said changes to type searching
llvm-svn: 153495
|
|
|
|
|
|
|
|
|
|
| |
Fixed type lookups to "do the right thing". Prior to this fix, looking up a type using "foo::bar" would result in a type list that contains all types that had "bar" as a basename unless the symbol file was able to match fully qualified names (which our DWARF parser does not).
This fix will allow type matches to be made based on the basename and then have the types that don't match filtered out. Types by name can be fully qualified, or partially qualified with the new "bool exact_match" parameter to the Module::FindTypes() method.
This fixes some issue that we discovered with dynamic type resolution as well as improves the overall type lookups in LLDB.
llvm-svn: 153482
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the feature that allowed the user to have things like:
class Base { ... };
class Derived : public Base { ... };
and have formatters defined for Base work automatically for Derived.
This feature turned out to be too expensive since it requires completing types.
This patch takes care of removing cascading (other than typedefs chain cascading), updating the test suite accordingly, and adding required Cocoa class names to keep the AppKit formatters working
llvm-svn: 153272
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
following the naming pattern
Changes to synthetic children:
- the update(self): function can now (optionally) return a value - if it returns boolean value True, ValueObjectSyntheticFilter will not clear its caches across stop-points
this should allow better performance for Python-based synthetic children when one can be sure that the child ValueObjects have not changed
- making a difference between a synthetic VO and a VO with a synthetic value: now a ValueObjectSyntheticFilter will not return itself as its own synthetic value, but will (correctly)
claim to itself be synthetic
- cleared up the internal synthetic children architecture to make a more consistent use of pointers and references instead of shared pointers when possible
- major cleanup of unnecessary #include, data and functions in ValueObjectSyntheticFilter itself
- removed the SyntheticValueType enum and replaced it with a plain boolean (to which it was equivalent in the first place)
Some clean ups to the summary generation code
Centralized the code that clears out user-visible strings and data in ValueObject
More efficient summaries for libc++ containers
llvm-svn: 153061
|
|
|
|
|
|
| |
things-went-wrong situations. Previously they would say nothing or log failures to the Python console
llvm-svn: 152673
|
|
|
|
| |
llvm-svn: 152599
|
|
|
|
|
|
|
|
|
|
|
| |
uses internally to provide summaries
This has been done for those summaries where the difference is only cosmetic (e.g. naming things as items instead of values, ...)
The LLDB output style has been preserved when it provides more information (e.g. telling the type as well as the value of an NSNumber)
Test cases have been updated to reflect the updated output style where necessary
llvm-svn: 152592
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
std::string has a summary provider
std::vector std::list and std::map have both a summary and a synthetic children provider
Given the usage of a custom namespace (std::__1::classname) for the implementation of libc++, we keep both libstdcpp and libc++ formatters enabled at the same time since that raises no conflicts and enabled for seamless transition between the two
The formatters for libc++ reside in a libcxx category, and are loaded from libcxx.py (to be found in examples/synthetic)
The formatters-stl test cases have been divided to be separate for libcxx and libstdcpp. This separation is necessary because
(a) we need different compiler flags for libc++ than for libstdcpp
(b) libc++ inlines a lot more than libstdcpp and some code changes were required to accommodate this difference
llvm-svn: 152570
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
shouldn't compile any of the XPC support code.
Update macosx/Host.mm to use that define.
Add a LLDB_DISABLE_PYTHON ifdef block around a new function in
Core/FormatManager.cpp.
<rdar://problem/10942125>
llvm-svn: 152293
|
|
|
|
|
|
|
|
| |
fixed a few potential NULL-pointer derefs in ValueObject
we have a way to provide docstrings for properties we add to the SWIG layer - a few of these properties have a docstring already, more will come in future commits
added a new bunch of properties to SBData to make it more natural and Python-like to access the data they contain
llvm-svn: 151962
|
|
|
|
|
|
| |
- having the std::vector test case deal with the fact that we now have said builtin summary
llvm-svn: 151870
|
|
|
|
|
|
|
|
| |
NSTimeZone and CFTimeZonRef
SEL and related types
CFGregorianDate
llvm-svn: 151866
|
|
|
|
|
|
|
|
|
| |
(b) fixes and improvements to the formatters for NSDate and NSString
(c) adding an introspection formatter for NSCountedSet
(d) making the Objective-C formatters test cases pass on both 64 and 32 bit
one of the test cases is marked as expected failure on i386 - support needs to be added to the LLDB core for it to pass
llvm-svn: 151826
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a) adds a Python summary provider for NSDate
b) changes the initialization for ScriptInterpreter so that we are not passing a bulk of Python-specific function pointers around
c) provides a new ScriptInterpreterObject class that allows for ref-count safe wrapping of scripting objects on the C++ side
d) contains much needed performance improvements:
1) the pointer to the Python function generating a scripted summary is now cached instead of looked up every time
2) redundant memory reads in the Python ObjC runtime wrapper are eliminated
3) summaries now use the m_summary_str in ValueObject to store their data instead of passing around ( == copying) an std::string object
e) contains other minor fixes, such as adding descriptive error messages for some cases of summary generation failure
llvm-svn: 151703
|
|
|
|
|
|
|
|
|
|
| |
classes.
The formatter for NSString is an improved version of the one previously shipped as an example, the others are new in design and implementation.
A more robust and OO-compliant Objective-C runtime wrapper is provided for runtime versions 1 and 2 on 32 and 64 bit.
The formatters are contained in a category named "AppKit", which is not enabled at startup.
llvm-svn: 151299
|
|
|
|
|
|
|
|
|
|
|
|
| |
is not available (LLDB_DISABLE_PYTHON is defined).
Change build-swig-Python.sh to emit an empty LLDBPythonWrap.cpp file if
this build is LLDB_DISABLE_PYTHON.
Change the "Copy to Xcode.app" shell script phase in the lldb.xcodeproj
to only do this copying for Mac native builds.
llvm-svn: 151035
|