summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectMemory.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix TestMemoryRead after r252035Tamas Berghammer2015-11-041-1/+1
| | | | llvm-svn: 252065
* Option letter o was already in use; use an uppercase E insteadEnrico Granata2015-11-041-1/+1
| | | | llvm-svn: 252035
* Add a --offset option to memory read that allows one to specify, given a ↵Enrico Granata2015-10-291-2/+14
| | | | | | type, how many sizeof(type) bytes to speak before starting to read memory llvm-svn: 251668
* Silence -Wqual-cast warnings from GCC 5.2Saleem Abdulrasool2015-10-181-4/+5
| | | | | | | | There were a number of const qualifiers being cast away which caused warnings. This cluttered the output hiding real errors. Silence them by explicit casting. NFC. llvm-svn: 250662
* Handle eFormatVectorOfFloat16Enrico Granata2015-10-161-0/+1
| | | | llvm-svn: 250581
* Resubmit: RenderScript command for printing allocation contents Ewan Crawford2015-10-161-0/+1
| | | | | | | | | Previous commit r250281 broke TestDataFormatterSmartArray.py Resolved in in this patch by adding the new enum eFormatVectorOfFloat16 to FormatManager. Differential Revision: http://reviews.llvm.org/D13730 llvm-svn: 250499
* Revert "RenderScript command for printing allocation contents"Pavel Labath2015-10-141-1/+0
| | | | | | This commit breaks TestDataFormatterSmartArray on all buildbots. llvm-svn: 250290
* Fix warning in CommandObjectMemoryTamas Berghammer2015-10-141-0/+1
| | | | llvm-svn: 250287
* commands: Use override instead of virtual.Bruce Mitchener2015-10-071-51/+46
| | | | | | | | | | | | | | | | | Summary: This removes all uses of virtual on functions where override could be used, including on destructors. It also adds override where virtual was previously missing. Reviewers: clayborg, labath Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13503 llvm-svn: 249564
* Made Target hold a map of languages to TypeSystems, and added some accessors.Sean Callanan2015-10-011-3/+7
| | | | | | | | Also added some target-level search functions so that persistent variables and symbols can be searched for without hand-iterating across the map of TypeSystems. llvm-svn: 249027
* Now persistent expression data no longer lives with the Target, but rather withSean Callanan2015-09-301-1/+1
| | | | | | | | | | the corresponding TypeSystem. This makes sense because what kind of data there is -- and how it can be looked up -- depends on the language. Functionality that is common to all type systems is factored out into PersistentExpressionState. llvm-svn: 248934
* Moved more Clang-specific parts of the expression parser into the Clang plugin.Sean Callanan2015-09-251-1/+1
| | | | | | | | | There are still a bunch of dependencies on the plug-in, but this helps to identify them. There are also a few more bits we need to move (and abstract, for example the ClangPersistentVariables). llvm-svn: 248612
* Rename clang_type_t to opaque_compiler_type_t.Bruce Mitchener2015-09-221-1/+1
| | | | | | | | | | | | | | Summary: This is no longer related to Clang and is just an opaque pointer to data for a compiler type. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13039 llvm-svn: 248288
* Final bit of type system cleanup that abstracts declaration contexts into ↵Greg Clayton2015-08-241-3/+3
| | | | | | | | | | | | | | | | | | | | lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. Create a new "lldb_private::CompilerDeclContext" class that will replace all direct uses of "clang::DeclContext" when used in compiler agnostic code, yet still allow for conversion to clang::DeclContext subclasses by clang specific code. This completes the abstraction of type parsing by removing all "clang::" references from the SymbolFileDWARF. The new "lldb_private::CompilerDeclContext" class abstracts decl contexts found in compiler type systems so they can be used in internal API calls. The TypeSystem is required to support CompilerDeclContexts with new pure virtual functions that start with "DeclContext" in the member function names. Converted all code that used lldb_private::ClangNamespaceDecl over to use the new CompilerDeclContext class and removed the ClangNamespaceDecl.cpp and ClangNamespaceDecl.h files. Removed direct use of clang APIs from SBType and now use the abstract type systems to correctly explore types. Bulk renames for things that used to return a ClangASTType which is now CompilerType: "Type::GetClangFullType()" to "Type::GetFullCompilerType()" "Type::GetClangLayoutType()" to "Type::GetLayoutCompilerType()" "Type::GetClangForwardType()" to "Type::GetForwardCompilerType()" "Value::GetClangType()" to "Value::GetCompilerType()" "Value::SetClangType (const CompilerType &)" to "Value::SetCompilerType (const CompilerType &)" "ValueObject::GetClangType ()" to "ValueObject::GetCompilerType()" many more renames that are similar. llvm-svn: 245905
* ClangASTType is now CompilerType.Greg Clayton2015-08-111-3/+3
| | | | | | This is more preparation for multiple different kinds of types from different compilers (clang, Pascal, Go, RenderScript, Swift, etc). llvm-svn: 244689
* First step in getting LLDB ready to support multiple different type systems.Greg Clayton2015-08-111-1/+2
| | | | | | | | This is the work done by Ryan Brown from http://reviews.llvm.org/D8712 that makes a TypeSystem class and abstracts types to be able to use a type system. All tests pass on MacOSX and passed on linux the last time this was submitted. llvm-svn: 244679
* Jim suggested to use eArgTypeAddressOrExpression for the addresses that ↵Enrico Granata2015-08-031-3/+3
| | | | | | 'memory find' takes llvm-svn: 243902
* Fix the memory find command such that it can actually take an expressionEnrico Granata2015-08-031-21/+11
| | | | llvm-svn: 243893
* Revert "Introduce a TypeSystem interface to support adding non-clang languages."Pavel Labath2015-06-081-2/+1
| | | | | | This seems to break expression evaluation on the linux build. llvm-svn: 239366
* Introduce a TypeSystem interface to support adding non-clang languages.Pavel Labath2015-06-081-1/+2
| | | | | | | | | | | | | Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8712 Original Author: Ryan Brown <ribrdb@google.com> llvm-svn: 239360
* Don't #include "lldb-python.h" from anywhere.Zachary Turner2015-05-291-2/+0
| | | | | | | | | | | | | Since interaction with the python interpreter is moving towards being more isolated, we won't be able to include this header from normal files anymore, all includes of it should be localized to the python library which will live under source/bindings/API/Python after a future patch. None of the files that were including this header actually depended on it anyway, so it was just a dead include in every single instance. llvm-svn: 238581
* Add support for custom commands to set flags on themselvesEnrico Granata2015-05-271-7/+7
| | | | | | | | | This works for Python commands defined via a class (implement get_flags on your class) and C++ plugin commands (which can call SBCommand::GetFlags()/SetFlags()) Flags allow features such as not letting the command run if there's no target, or if the process is not stopped, ... Commands could always check for these things themselves, but having these accessible via flags makes custom commands more consistent with built-in ones llvm-svn: 238286
* Fixed a ton of gcc compile warningsVince Harron2015-05-131-1/+1
| | | | | | | | | | Removed some unused variables, added some consts, changed some casts to const_cast. I don't think any of these changes are very controversial. Differential Revision: http://reviews.llvm.org/D9674 llvm-svn: 237218
* If memory read does not find a NULL terminator, still print whatever it ↵Enrico Granata2015-04-061-2/+10
| | | | | | | | | | gathered instead of just NOP'ing out However, remark that this is an incomplete chunk of data by still emitting the "no NULL found" warning rdar://20330073 llvm-svn: 234194
* Don't #include FormatManager.h from Debugger.hZachary Turner2015-03-031-0/+1
| | | | | | | | Debugger.h is a huge file that gets included everywhere, and FormatManager.h brings in a ton of unnecessary stuff and doesn't even use anything from it in the header. llvm-svn: 231161
* Don't #include ClangPersistentVariables.h from Process.hZachary Turner2015-03-031-0/+1
| | | | | | | Nothing from this header file was even being referenced in Process.h anyway, so it was a completely unnecessary include. llvm-svn: 231131
* Refactor OptionValue::SetValueFromCString to use llvm::StringRefPavel Labath2015-02-201-6/+6
| | | | | | | | | | Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7676 llvm-svn: 230005
* Small fix for the "memory write -i filename" command -- if the user fails to ↵Jason Molenda2015-02-031-1/+1
| | | | | | | | | | | | specify the number of bytes to write into the inferior process, the "default byte size" will be 1. In that case, we want to copy the entire file into memory. The code was looking for a default byte size of 0 to indicate that the user had not provided a specific # of bytes to copy; adjust that to 1 to match the actual default value. <rdar://problem/18074973> llvm-svn: 228067
* Preparatory infrastructural work to support dynamically determining sizes of ↵Enrico Granata2015-01-281-3/+3
| | | | | | | | | | | | ObjC types via the runtime This is necessary because the byte size of an ObjC class type is not reliably statically knowable (e.g. because superclasses sit deep in frameworks that we have no debug info for) The lack of reliable size info is a problem when trying to freeze-dry an ObjC instance (not the pointer, the pointee) This commit lays the foundation for having language runtimes help in figuring out byte sizes, and having ClangASTType ask for runtime help No feature change as no runtime actually implements the logic, and nowhere is an ExecutionContext passed in yet llvm-svn: 227274
* Moved Args::StringToXIntYZ to StringConvert::ToXIntYZVince Harron2015-01-151-6/+7
| | | | | | | | | | The refactor was motivated by some comments that Greg made http://reviews.llvm.org/D6918 and also to break a dependency cascade that caused functions linking in string->int conversion functions to pull in most of lldb llvm-svn: 226199
* Very minimal support 24-bit kalimbas. Vanilla "memory read" for data sectionsMatthew Gardiner2014-09-291-4/+14
| | | | | | | | | | | works, as do breakpoints, run and pause, display zeroth frame. See http://reviews.llvm.org/D5503 for a fuller description of the changes in this commit. llvm-svn: 218596
* Correct copied error messageEd Maste2014-09-061-1/+1
| | | | | | Patch by Remco Verhoef. llvm-svn: 217312
* ASan malloc/free history threadsKuba Brecka2014-09-041-0/+93
| | | | | | Reviewed at http://reviews.llvm.org/D4596 llvm-svn: 217116
* Reapply typo fix.Bruce Mitchener2014-07-101-1/+1
| | | | | | This was lost in the re-merging of command validation changes. llvm-svn: 212721
* Revert "Fix broken tests due to new error output."Zachary Turner2014-07-091-10/+10
| | | | | | | This reverts commit ec7c94f8e6860968d384b578e5564a9c55c80b4a and re-enables OptionValidators. llvm-svn: 212627
* Fix typos.Bruce Mitchener2014-07-081-1/+1
| | | | llvm-svn: 212553
* Fix broken tests due to new error output.Todd Fiala2014-07-081-10/+10
| | | | | | | | | | | This reverses out the options validators changes. We'll get these back in once the changes to the output can be resolved. Restores broken tests on FreeBSD, Linux, MacOSX. Changes reverted: r212500, r212317, r212290. llvm-svn: 212543
* Adds the notion of an OptionValidator.Zachary Turner2014-07-031-10/+10
| | | | | | | | | | | | | | | | | | The purpose of the OptionValidator is to determine, based on some arbitrary set of conditions, whether or not a command option is valid for a given debugger state. An example of this might be to selectively disable or enable certain command options that don't apply to a particular platform. This patch contains no functional change, and does not actually make use of an OptionValidator for any purpose yet. A follow-up patch will begin to add the logic and users of OptionValidator. Reviewed by: Greg Clayton, Jim Ingham Differential Revision: http://reviews.llvm.org/D4369 llvm-svn: 212290
* Remove %zx in printf (only GCC supports it, not MSVC).Virgile Bello2014-03-081-1/+1
| | | | llvm-svn: 203349
* "size_t" isn't always 64 bit, it is 32 bit on 32 bit systems. All printf ↵Greg Clayton2014-03-031-8/+8
| | | | | | | | style statements that were assuming size_t were 64 bit were changed, and they were also changed to display them as unsigned values as "size_t" isn't signed. If you print anything with 'size_t', please cast it to "uint64_t" in the printf and use PRIu64 or PRIx64. llvm-svn: 202738
* Fix Windows build using portable types for formatting the log outputsDeepak Panickal2014-03-031-8/+8
| | | | llvm-svn: 202723
* Minor improvement to the "memory find" commandEnrico Granata2013-11-131-16/+18
| | | | | | | | | | Remove the --do-read option, and always provide a small dump of memory at each match spot Add a --dump-offset (-o) option, to specify a byte offset from which to start dumping relative to the matching address The real solution is to actually provide the format options found on "memory read" and use those as the key to actually printing memory upon each find That, however, requires a little refactoring work, so put this in for now until I get a chance to do the required shuffling around of moving parts llvm-svn: 194600
* Small typos in previous commitEnrico Granata2013-11-131-3/+3
| | | | llvm-svn: 194546
* <rdar://problem/14322677>Enrico Granata2013-11-131-5/+308
| | | | | | | | | Implement a "memory find" command for LLDB This is still fairly rough around the edges but works well enough for simple scenarios where a chunk of text or a number are to be found within a certain range of memory, as in mem find `buffer` `buffer+0x1000` -s "me" -c 5 -r llvm-svn: 194544
* Roll back the changes I made in r193907 which created a new FrameJason Molenda2013-11-041-2/+2
| | | | | | | | | | pure virtual base class and made StackFrame a subclass of that. As I started to build on top of that arrangement today, I found that it wasn't working out like I intended. Instead I'll try sticking with the single StackFrame class -- there's too much code duplication to make a more complicated class hierarchy sensible I think. llvm-svn: 193983
* Add a new base class, Frame. It is a pure virtual function whichJason Molenda2013-11-021-2/+2
| | | | | | | | | | | | | | | | | | | | | defines a protocol that all subclasses will implement. StackFrame is currently the only subclass and the methods that Frame vends are nearly identical to StackFrame's old methods. Update all callers to use Frame*/Frame& instead of pointers to StackFrames. This is almost entirely a mechanical change that touches a lot of the code base so I'm committing it alone. No new functionality is added with this patch, no new subclasses of Frame exist yet. I'll probably need to tweak some of the separation, possibly moving some of StackFrame's methods up in to Frame, but this is a good starting point. <rdar://problem/15314068> llvm-svn: 193907
* Fix the format warnings.Sylvestre Ledru2013-10-311-7/+7
| | | | | | | | | | In almost all cases, the misuse is about "%lu" being used instead of the correct "%zu" (even though these are compatible on 64-bit platforms in practice). There are even a couple of cases where "%ld" (ie., signed int) is used instead of "%zu", and one where "%lu" is used instead of "%" PRIu64. Fixes bug #17551. Patch by "/dev/humancontroller" llvm-svn: 193832
* <rdar://problem/15296388>Enrico Granata2013-10-291-9/+21
| | | | | | | | | | Fix a crasher that would occur if one tried to read memory as characters of some size != 1, e.g. x -f c -s 10 buffer This commit tries to do the right thing and uses the byte-size as the number of elements, unless both are specified and the number of elements is != 1 In this latter case (e.g. x -f c -s 10 -c 3 buffer) one could multiply the two and read 30 characters, but it seems a stretch in mind reading. llvm-svn: 193659
* <rdar://problem/14393032>Enrico Granata2013-09-301-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DumpValueObject() 2.0 This checkin restores pre-Xcode5 functionality to the "po" (expr -O) command: - expr now has a new --description-verbosity (-v) argument, which takes either compact or full as a value (-v is the same as -vfull) When the full mode is on, "po" will show the extended output with type name, persistent variable name and value, as in (lldb) expr -O -v -- foo (id) $0 = 0x000000010010baf0 { 1 = 2; 2 = 3; } When -v is omitted, or -vcompact is passed, the Xcode5-style output will be shown, as in (lldb) expr -O -- foo { 1 = 2; 2 = 3; } - for a non-ObjectiveC object, LLDB will still try to retrieve a summary and/or value to display (lldb) po 5 5 -v also works in this mode (lldb) expr -O -vfull -- 5 (int) $4 = 5 On top of that, this is a major refactoring of the ValueObject printing code. The functionality is now factored into a ValueObjectPrinter class for easier maintenance in the future DumpValueObject() was turned into an instance method ValueObject::Dump() which simply calls through to the printer code, Dump_Impl has been removed Test case to follow llvm-svn: 191694
* Add OptionParser.hVirgile Bello2013-09-051-6/+6
| | | | llvm-svn: 190063
OpenPOWER on IntegriCloud