summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
Commit message (Collapse)AuthorAgeFilesLines
...
* Added the ability for DWARF locations to use the ABI plug-ins to resolveGreg Clayton2011-09-021-125/+125
| | | | | | | | register names when dumping variable locations and location lists. Also did some cleanup where "int" types were being used for "lldb::RegisterKind" values. llvm-svn: 138988
* Forgot to write out the NULL terminator when putting C string value intoGreg Clayton2011-09-011-1/+1
| | | | | | | | a data using DataEncoder. Added DataEncoder to the lldb-forward.h file. llvm-svn: 138950
* Added a DataEncoder class for the new IR evaluation expression parser so itGreg Clayton2011-09-011-0/+361
| | | | | | can reserve a block of memory and store stuff into it. llvm-svn: 138949
* Micro-optimization: Update the shift amount only when needed.Johnny Chen2011-08-261-1/+1
| | | | llvm-svn: 138678
* Make ThreadList::GetSelectedThread() select and return the 0th thread if ↵Johnny Chen2011-08-251-2/+0
| | | | | | | | there's no currently selected thread. And update the call sites accordingly. llvm-svn: 138577
* Initializes (uint64_t)buf variable, patch by Filipe Cabecinhas!Johnny Chen2011-08-251-1/+1
| | | | llvm-svn: 138565
* Improved the user-friendliness of errors shown by the summary feature in ↵Enrico Granata2011-08-233-4/+20
| | | | | | | | | | | | certain areas Renamed format "signed decimal" to be "decimal". "unsigned decimal" remains unchanged: - the name "signed decimal" was interfering with symbol %S (use summary) in summary strings. because of the way summary strings are implemented, this did not really lead to a bug, but simply to performing more steps than necessary to display a summary. this is fixed. Documentation improvements (more on synthetic children, some information on filters). This is still a WIP. llvm-svn: 138384
* Additional code cleanups ; Short option name for --python-script in type ↵Enrico Granata2011-08-234-34/+257
| | | | | | summary add moved from -s to -o (this is a preliminary step in moving the short option for --summary-string from -f to -s) ; Accordingly updated the test suite llvm-svn: 138315
* Separated FormatNavigator and FormatManager in two different files ; moved ↵Enrico Granata2011-08-222-67/+67
| | | | | | FormatCategoryItem enum out of FormatManager.h as a debugger-wide lldb_private enum ; minor style cleanups llvm-svn: 138307
* More cleanups ; Separated implementation of FormatManager from class ↵Enrico Granata2011-08-223-184/+260
| | | | | | DataVisualization as a front-end by using separate .h/.cpp files - Final aim is to break up FormatManager.h/cpp into several separate files llvm-svn: 138279
* Code cleanup and refactoring (round 4):Enrico Granata2011-08-221-23/+17
| | | | | | | | | - FormatCategories now are directly mapped by ConstString objects instead of going through const char* -> ConstString -> const char* - FormatCategory callback does not pass category name anymore. This is not necessary because FormatCategory objects themselves hold their name as a member variable llvm-svn: 138254
* - Support for Python namespaces:Enrico Granata2011-08-221-3/+3
| | | | | | | | | | | If you have a Python module foo, in order to use its contained objects in LLDB you do not need to use 'from foo import *'. You can use 'import foo', and then refer to items in foo as 'foo.bar', and LLDB will know how to resolve bar as a member of foo. Accordingly, GNU libstdc++ formatters have been moved from the global namespace to gnu_libstdcpp and a few test cases are also updated to reflect the new convention. Python docs suggest using a plain 'import' en lieu of 'from-import'. llvm-svn: 138244
* Added a new plug-in type: lldb_private::OperatingSystem. The operating system Greg Clayton2011-08-224-14/+117
| | | | | | | | | | | | | | | | | | | | plug-ins are add on plug-ins for the lldb_private::Process class that can add thread contexts that are read from memory. It is common in kernels to have a lot of threads that are not currently executing on any cores (JTAG debugging also follows this sort of thing) and are context switched out whose state is stored in memory data structures. Clients can now subclass the OperatingSystem plug-ins and then make sure their Create functions correcltly only enable themselves when the right binary/target triple are being debugged. The operating system plug-ins get a chance to attach themselves to processes just after launching or attaching and are given a lldb_private::Process object pointer which can be inspected to see if the main executable, target triple, or any shared libraries match a case where the OS plug-in should be used. Currently the OS plug-ins can create new threads, define the register contexts for these threads (which can all be different if desired), and populate and manage the thread info (stop reason, registers in the register context) as the debug session goes on. llvm-svn: 138228
* Fixed an issue where even if the communication object had Clear() called onGreg Clayton2011-08-191-1/+2
| | | | | | it, it could try and call through to an installed callback. llvm-svn: 138146
* - Now using ${var} as the summary for an aggregate type will produce ↵Enrico Granata2011-08-194-13/+168
| | | | | | | | | | | | | | | | "name-of-type @ object-location" instead of giving an error e.g. you may get "foo_class @ 0x123456" when typing "type summary add -f ${var} foo_class" - Added a new special formatting token %T for summaries. This shows the type of the object. Using it, the new "type @ location" summary could be manually generated by writing ${var%T} @ ${var%L} - Bits and pieces required to support "frame variable array[n-m]" The feature is not enabled yet because some additional design and support code is required, but the basics are getting there - Fixed a potential issue where a ValueObjectSyntheticFilter was not holding on to its SyntheticChildrenSP Because of the way VOSF are being built now, this has never been an actual issue, but it is still sensible for a VOSF to hold on to the SyntheticChildrenSP as well as to its FrontEnd llvm-svn: 138080
* Third round of code cleanups:Enrico Granata2011-08-191-117/+8
| | | | | | | | | | | - reorganizing the PTS (Partial Template Specializations) in FormatManager.h - applied a patch by Filipe Cabecinhas to make LLDB compile with GCC Functional changes: - fixed an issue where command type summary add for type "struct Foo" would not match any types. currently, "struct" will be stripped off and type "Foo" will be matched. similar behavior occurs for class, enum and union specifiers. llvm-svn: 138020
* Second round of code cleanups:Enrico Granata2011-08-183-44/+251
| | | | | | | | | | | | | | | - reorganizing classes layout to have public part first Typedefs that we want to keep private, but must be defined for some public code to work correctly are an exception - avoiding methods in the form T foo() { code; } all on one-line - moving method implementations from .h to .cpp whenever feasible Templatized code is an exception and so are very small methods - generally, adhering to coding conventions followed project-wide Functional changes: - fixed an issue where using ${var} in a summary for an aggregate, and then displaying a pointer-to-aggregate would lead to no summary being displayed The issue was not a major one because all ${var} was meant to do in that context was display an error for invalid use of pointer Accordingly fixed test cases and added a new test case llvm-svn: 137944
* First round of code cleanups:Enrico Granata2011-08-174-306/+327
| | | | | | | | | | | | | | | | | | - all instances of "vobj" have been renamed to "valobj" - class Debugger::Formatting has been renamed to DataVisualization (defined in FormatManager.h/cpp) The interface to this class has not changed - FormatCategory now uses ConstString's as keys to the navigators instead of repeatedly casting from ConstString to const char* and back all the time Next step is making the same happen for categories themselves - category gnu-libstdc++ is defined in the constructor for a FormatManager The source code for it is defined in gnu_libstdcpp.py, drawn from examples/synthetic at compile time All references to previous 'osxcpp' name have been removed from both code and file names Functional changes: - the name of the option to use a summary string for 'type summary add' has changed from the previous --format-string to the new --summary-string. It is expected that the short option will change from -f to -s, and -s for --python-script will become -o llvm-svn: 137886
* New category "gnu-libstdc++" provides summary for std::string and synthetic ↵Enrico Granata2011-08-171-0/+68
| | | | | | | | | | children for types std::map, std::list and std::vector The category is enabled by default. If you run into issues with it, disable it and the previous behavior of LLDB is restored ** This is a temporary solution. The general solution to having formatters pulled in at startup should involve going through the Platform. Fixed an issue in type synthetic list where a category with synthetic providers in it was not shown if all the providers were regex-based llvm-svn: 137850
* Fixed register value objects to be able to return their values as unsignedGreg Clayton2011-08-161-0/+9
| | | | | | and signed integers. llvm-svn: 137710
* Allow for a cpu subtype of 4 to still be recognized as an x86_64Jason Molenda2011-08-161-0/+1
| | | | | | | processor; we may get this subtype ("CPU_SUBTYPE_X86_ARCH1") back when starting a kdp session. llvm-svn: 137701
* Fixed an issue where a variable that was a pointer whoseGreg Clayton2011-08-161-3/+4
| | | | | | | location was in a register would not be able to dereference children when displaying "*var" or the derefence of the variable. llvm-svn: 137695
* Removed debug printf that was left in.Greg Clayton2011-08-151-1/+0
| | | | llvm-svn: 137630
* Patch from Matt Johnson that cleans up usage of APIntGreg Clayton2011-08-151-3/+2
| | | | | | | to keep GCC 4.5.2 happy and also to not use a deprecated llvm API. llvm-svn: 137605
* Added the ability to use llvm::APInt class to viewGreg Clayton2011-08-151-0/+96
| | | | | | | | any integers that are larger than a 8 bytes. We can now display signed decimal, unsigned decimal, octal, and binary (we could already view hex before this fix). llvm-svn: 137602
* Bumped Xcode project versions for lldb-72 and debugserver-143.Greg Clayton2011-08-131-0/+1
| | | | llvm-svn: 137547
* Make ValueObject::SetValueFromCString work correctly.Jim Ingham2011-08-123-86/+93
| | | | | | | | | | | | | | | | Also change the SourceInitFile to look for .lldb-<APPNAME> and source that preferentially if it exists. Also made the breakpoint site report its address as well as its breakpoint number when it gets hit and can't find any the associated locations (usually because the breakpoint got disabled or deleted programmatically between the time it was hit and reported.) Changed ThreadPlanCallFunction to initialize the ivar m_func in the initializers of the constructor, rather than waiting to initialize till later on in the function. Fixed a bug where if you make an SBError and the ask it Success, it returns false. Fixed ValueObject::ResolveValue so that it resolves a temporary value, rather than overwriting the one in the value object. llvm-svn: 137536
* Fixed an incorrect static analyzer fix.Greg Clayton2011-08-121-1/+1
| | | | llvm-svn: 137534
* We were leaking a stack frame in StackFrameList in Thread.cpp which couldGreg Clayton2011-08-124-25/+165
| | | | | | | | | | cause extra shared pointer references to one or more modules to be leaked. This would cause many object files to stay around the life of LLDB, so after a recompile and rexecution, we would keep adding more and more memory. After fixing the leak, we found many cases where leaked stack frames were still being used and causing crashes in the test suite. These are now all resolved. llvm-svn: 137516
* Added an error message when the user tries to add a filter when a synthetic ↵Enrico Granata2011-08-122-4/+18
| | | | | | | | provider for the same type is already defined in the same category The converse is also true: an error is shown when the user tries to add a synthetic provider to a category that already has a filter for the same type llvm-svn: 137493
* Giving a warning to the user the first time children are truncated by the ↵Enrico Granata2011-08-121-0/+4
| | | | | | new cap setting llvm-svn: 137462
* *Some more optimizations in usage of ConstStringEnrico Granata2011-08-123-3/+62
| | | | | | | | | | | | *New setting target.max-children-count gives an upper-bound to the number of child objects that will be displayed at each depth-level This might be a breaking change in some scenarios. To override the new limit you can use the --show-all-children (-A) option to frame variable or increase the limit in your lldbinit file *Command "type synthetic" has been split in two: - "type synthetic" now only handles Python synthetic children providers - the new command "type filter" handles filters Because filters and synthetic providers are both ways to replace the children of a ValueObject, only one can be effective at any given time. llvm-svn: 137416
* Fix a logic error caught by the static analyzer.Johnny Chen2011-08-121-1/+1
| | | | llvm-svn: 137407
* Fix 'Undefined or garbage value returned to caller' (static analyzer).Johnny Chen2011-08-111-1/+1
| | | | llvm-svn: 137374
* Fix a logic error caught by the static analyzer.Johnny Chen2011-08-111-1/+1
| | | | llvm-svn: 137334
* Fix a logic error caught by the static analyzer.Johnny Chen2011-08-111-1/+1
| | | | llvm-svn: 137328
* Fixed an issue where a pointer's address was being logged instead of its valueEnrico Granata2011-08-112-9/+45
| | | | | | | | | | | | | Access to synthetic children by name: if your object has a synthetic child named foo you can now type frame variable object.foo (or ->foo if you have a pointer) and that will print the value of the synthetic child (if your object has an actual child named foo, the actual child prevails!) this behavior should also work in summaries, and you should be able to use ${var.foo} and ${svar.foo} interchangeably (but using svar.foo will mask an actual child named foo) llvm-svn: 137314
* Fix the broken build that happened with my last checkin.Greg Clayton2011-08-111-2/+2
| | | | llvm-svn: 137300
* Added the ability to remove orphaned module shared pointers from a ModuleList.Greg Clayton2011-08-113-6/+34
| | | | | | | | | | | | | | This is helping us track down some extra references to ModuleSP objects that are causing things to get kept around for too long. Added a module pointer accessor to target and change a lot of code to use it where it would be more efficient. "taret delete" can now specify "--clean=1" which will cleanup the global module list for any orphaned module in the shared module cache which can save memory and also help track down module reference leaks like we have now. llvm-svn: 137294
* While tracking down memory consumption issue a few things were needed: the Greg Clayton2011-08-106-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ability to dump more information about modules in "target modules list". We can now dump the shared pointer reference count for modules, the pointer to the module itself (in case performance tools can help track down who has references to said pointer), and the modification time. Added "target delete [target-idx ...]" to be able to delete targets when they are no longer needed. This will help track down memory usage issues and help to resolve when module ref counts keep getting incremented. If the command gets no arguments, the currently selected target will be deleted. If any arguments are given, they must all be valid target indexes (use the "target list" command to get the current target indexes). Took care of a bunch of "no newline at end of file" warnings. TimeValue objects can now dump their time to a lldb_private::Stream object. Modified the "target modules list --global" command to not error out if there are no targets since it doesn't require a target. Fixed an issue in the MacOSX DYLD dynamic loader plug-in where if a shared library was updated on disk, we would keep using the older one, even if it was updated. Don't allow the ModuleList::GetSharedModule(...) to return an empty module. Previously we could specify a valid path on disc to a module, and specify an architecture that wasn't contained in that module and get a shared pointer to a module that wouldn't be able to return an object file or a symbol file. We now make sure an object file can be extracted prior to adding the shared pointer to the module to get added to the shared list. llvm-svn: 137196
* Move the handling of breakpoint conditions from the Private event loop to ↵Jim Ingham2011-08-091-18/+35
| | | | | | | | | | | the StopInfoBreakpoint::DoActions, which happens as the event is removed. Also use the return value of asynchronous breakpoint callbacks, they get checked before, and override the breakpoint conditions. Added ProcessModInfo class, to unify "stop_id generation" and "memory modification generation", and use where needed. llvm-svn: 137102
* Basic support for reading synthetic children by index:Enrico Granata2011-08-091-7/+59
| | | | | | | | | | | if your datatype provides synthetic children, "frame variable object[index]" should now do the right thing in cases where the above syntax would have been rejected before, i.e. object is not a pointer nor an array (frame variable ignores potential overload of []) object is a pointer to an Objective-C class (which cannot be dereferenced) expression will still run operator[] if available and complain if it cannot do so synthetic children by name do not work yet llvm-svn: 137097
* Added a "--global" option to the "target modules list"Greg Clayton2011-08-091-0/+54
| | | | | | | | | command that allows us to see all modules that exist and their corresponding global shared pointer count. This will help us track down memory issues when modules aren't being removed and cleaned up from the module list. llvm-svn: 137078
* fixed a potential memory leak ; small improvement in the formatters lookup ↵Enrico Granata2011-08-041-5/+4
| | | | | | algorithm llvm-svn: 136945
* New formatting symbol %# can be used in summary strings to get the "count of ↵Enrico Granata2011-08-044-14/+71
| | | | | | | | | | | | children" of a variable - accordingly, the test cases for the synthetic providers for the std:: containers have been edited to use ${svar%#} instead of ${svar.len} to print out the count of elements ; the .len synthetic child has been removed from the synthetic providers The synthetic children providers for the std:: containers now return None when asked for children indexes >= num_children() Basic code to support filter names based on regular expressions (WIP) llvm-svn: 136862
* APIs to GetValueAsSigned/Unsigned() in SBValue now also accept an SBError ↵Enrico Granata2011-08-041-6/+11
| | | | | | | | | parameter to give more info about any problem The synthetic children providers now use the new (safer) APIs to get the values of objects As a side effect, fixed an issue in ValueObject where ResolveValue() was not always updating the value before reading it llvm-svn: 136861
* testing for a previous issue where formats in summaries where not enforced ↵Enrico Granata2011-08-031-1/+0
| | | | | | in all cases ; removed an unused local variable llvm-svn: 136785
* Fixed an issue where the KVO swizzled type would be returned as the dynamic ↵Enrico Granata2011-08-032-9/+12
| | | | | | | | | | type instead of the actual user-level type - see the test case in lang/objc/objc-dynamic-value for an example Objective-C dynamic type lookup now works for every Objective-C type - previously, true dynamic lookup was only performed for type id llvm-svn: 136763
* Add method Module::IsLoadedInTarget, and then in the MacOS X dynamic loader, ↵Jim Ingham2011-08-031-0/+23
| | | | | | | | | after we have initialized our shared library state, discard all the modules that didn't make it into the running process. llvm-svn: 136755
* bug fix in SBValue::CreateValueFromAddress() where using the resulting VO as ↵Enrico Granata2011-08-023-6/+7
| | | | | | a pointer would crash LLDB ; minor improvements in dynamic formatters lookup llvm-svn: 136743
OpenPOWER on IntegriCloud