summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandCompletions.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Optimizations for FileSpec.Zachary Turner2014-08-071-19/+12
| | | | llvm-svn: 215124
* unused variable, typedef requires name warning cleanupMichael Sartain2013-08-261-2/+1
| | | | llvm-svn: 189231
* MingW compilation (windows). Includes various refactoring to improve ↵Virgile Bello2013-08-231-53/+76
| | | | | | portability. llvm-svn: 189107
* <rdar://problem/14086944>Greg Clayton2013-06-071-10/+26
| | | | | | lldb doesn't autocomplete objective C class methods. The regular expression was looking for strings that started with the completion string that was passed in. For objective C class methods, this string starts with "+" which wasn't being escaped. Added many other escapes that were missing just in case. llvm-svn: 183470
* A first pass at auto completion for variables and their children. This is ↵Greg Clayton2013-05-141-0/+15
| | | | | | currently hooked up for "frame variable" only. With a little work we can also enable it for the "expression" command and also for other things. llvm-svn: 181850
* <rdar://problem/13069948>Greg Clayton2013-01-251-1/+1
| | | | | | | | | | | | 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
* Fix Linux build warnings due to redefinition of macros:Daniel Malea2012-12-051-0/+1
| | | | | | | | | - 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
* <rdar://problem/11757916>Greg Clayton2012-08-291-0/+2
| | | | | | | | | | | | Make breakpoint setting by file and line much more efficient by only looking for inlined breakpoint locations if we are setting a breakpoint in anything but a source implementation file. Implementing this complex for a many reasons. Turns out that parsing compile units lazily had some issues with respect to how we need to do things with DWARF in .o files. So the fixes in the checkin for this makes these changes: - Add a new setting called "target.inline-breakpoint-strategy" which can be set to "never", "always", or "headers". "never" will never try and set any inlined breakpoints (fastest). "always" always looks for inlined breakpoint locations (slowest, but most accurate). "headers", which is the default setting, will only look for inlined breakpoint locations if the breakpoint is set in what are consudered to be header files, which is realy defined as "not in an implementation source file". - modify the breakpoint setting by file and line to check the current "target.inline-breakpoint-strategy" setting and act accordingly - Modify compile units to be able to get their language and other info lazily. This allows us to create compile units from the debug map and not have to fill all of the details in, and then lazily discover this information as we go on debuggging. This is needed to avoid parsing all .o files when setting breakpoints in implementation only files (no inlines). Otherwise we would need to parse the .o file, the object file (mach-o in our case) and the symbol file (DWARF in the object file) just to see what the compile unit was. - modify the "SymbolFileDWARFDebugMap" to subclass lldb_private::Module so that the virtual "GetObjectFile()" and "GetSymbolVendor()" functions can be intercepted when the .o file contenst are later lazilly needed. Prior to this fix, when we first instantiated the "SymbolFileDWARFDebugMap" class, we would also make modules, object files and symbol files for every .o file in the debug map because we needed to fix up the sections in the .o files with information that is in the executable debug map. Now we lazily do this in the DebugMapModule::GetObjectFile() Cleaned up header includes a bit as well. llvm-svn: 162860
* Remove further outdated "settings" code and also implement a few missing things.Greg Clayton2012-08-221-5/+0
| | | | llvm-svn: 162376
* Reimplemented the code that backed the "settings" in lldb. There were many ↵Greg Clayton2012-08-221-9/+24
| | | | | | | | | | | | | issues with the previous implementation: - no setting auto completion - very manual and error prone way of getting/setting variables - tons of code duplication - useless instance names for processes, threads Now settings can easily be defined like option values. The new settings makes use of the "OptionValue" classes so we can re-use the option value code that we use to set settings in command options. No more instances, just "does the right thing". llvm-svn: 162366
* Extended function lookup to allow the user toSean Callanan2012-02-101-1/+2
| | | | | | | | | indicate whether inline functions are desired. This allows the expression parser, for instance, to filter out inlined functions when looking for functions it can call. llvm-svn: 150279
* Added an API to SymbolContext to hide the complexity of getting theJim Ingham2011-09-271-8/+3
| | | | | | | function name from a symbol context. Use that in CommandCompletions to get the right name. llvm-svn: 140628
* Convert lldb::ModuleSP to use an instrusive ref counted pointer.Greg Clayton2011-09-171-1/+1
| | | | | | | | | We had some cases where getting the shared pointer for a module from the global module list was causing a performance issue when debugging with DWARF in .o files. Now that the module uses intrusive ref counts, we can easily convert any pointer to a shared pointer. llvm-svn: 139983
* Switch to using the S_ISDIR and S_ISREG sys/stat.h macros inJason Molenda2011-07-081-1/+1
| | | | | | | CommandCompletions.cpp and DataBufferMemoryMap.cpp. The file type part of the st_mode struct member is not a bitmask. llvm-svn: 134669
* Symbol may not have a demangled name, use GetName to get the best name ↵Jim Ingham2011-05-181-1/+1
| | | | | | available in this case. llvm-svn: 131527
* Added auto completion for architecture names and for platforms.Greg Clayton2011-04-131-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Modified the OptionGroupOptions to be able to specify only some of the options that should be appended by using the usage_mask in the group defintions and also provided a way to remap them to a new usage mask after the copy. This allows options to be re-used and also targetted for specific option groups. Modfied the CommandArgumentType to have a new eArgTypePlatform enumeration. Taught the option parser to be able to automatically use the appropriate auto completion for a given options if nothing is explicitly specified in the option definition. So you don't have to specify it in the option definition tables. Renamed the default host platform name to "host", and the default platform hostname to be "localhost". Modified the "file" and "platform select" commands to make sure all options and args are good prior to creating a new platform. Also defer the computation of the architecture in the file command until all options are parsed and the platform has either not been specified or reset to a new value to avoid computing the arch more than once. Switch the PluginManager code over to using llvm::StringRef for string comparisons and got rid of all the AccessorXXX functions in lieu of the newer mutex + collection singleton accessors. llvm-svn: 129483
* Add FileSpec::ResolvePartialUsername, and use it in CommandCompletions to ↵Jim Ingham2011-02-081-38/+18
| | | | | | isolate pwd.h in the Host layer. llvm-svn: 125135
* Moved FileSpec into the Host layer since it will vary from host to host.Greg Clayton2011-02-081-1/+1
| | | | | | We have a common unix implementation in lldb/source/Host/common/FileSpec.cpp. llvm-svn: 125078
* Cleaned up the dynamic library open/getsymbol/close code to use abstractedGreg Clayton2011-02-081-4/+4
| | | | | | | | | | | | | flags such that symbols can be searched for within a shared library if desired. Platforms that support the RTLD_FIRST flag can still take advantage of their quicker lookups, and other platforms can still get the same fucntionality with a little extra work. Also changed LLDB_CONFIG flags over to either being defined, or not being defined to stay in line with current open source practices and to prepare for using autoconf or cmake to configure LLDB builds. llvm-svn: 125064
* Added support for targets that don't support expanding "~/" or "~USERNAME".Greg Clayton2011-02-051-7/+11
| | | | | | Patch from Kirk Beitz. llvm-svn: 124927
* Added a cleanup helper object to make sure the directory that was opened ↵Greg Clayton2011-02-011-11/+9
| | | | | | with "DIR *opendir(const char *)" is closed if it is valid with a call to "int closedir (DIR *)". llvm-svn: 124649
* Changed the SymbolFile::FindFunction() function calls to only return Greg Clayton2011-01-271-19/+8
| | | | | | | | | | | | | | | | | | lldb_private::Function objects. Previously the SymbolFileSymtab subclass would return lldb_private::Symbol objects when it was asked to find functions. The Module::FindFunctions (...) now take a boolean "bool include_symbols" so that the module can track down functions and symbols, yet functions are found by the SymbolFile plug-ins (through the SymbolVendor class), and symbols are gotten through the ObjectFile plug-ins. Fixed and issue where the DWARF parser might run into incomplete class member function defintions which would make clang mad when we tried to make certain member functions with invalid number of parameters (such as an operator= operator that had no parameters). Now we just avoid and don't complete these incomplete functions. llvm-svn: 124359
* Spelling changes applied from lldb_spelling.diffs from Bruce Mitchener.Greg Clayton2011-01-081-1/+1
| | | | | | Thanks Bruce! llvm-svn: 123083
* Fixed an issue where we were resolving paths when we should have been.Greg Clayton2010-10-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So the issue here was that we have lldb_private::FileSpec that by default was always resolving a path when using the: FileSpec::FileSpec (const char *path); and in the: void FileSpec::SetFile(const char *pathname, bool resolve = true); This isn't what we want in many many cases. One example is you have "/tmp" on your file system which is really "/private/tmp". You compile code in that directory and end up with debug info that mentions "/tmp/file.c". Then you type: (lldb) breakpoint set --file file.c --line 5 If your current working directory is "/tmp", then "file.c" would be turned into "/private/tmp/file.c" which won't match anything in the debug info. Also, it should have been just a FileSpec with no directory and a filename of "file.c" which could (and should) potentially match any instances of "file.c" in the debug info. So I removed the constructor that just takes a path: FileSpec::FileSpec (const char *path); // REMOVED You must now use the other constructor that has a "bool resolve" parameter that you must always supply: FileSpec::FileSpec (const char *path, bool resolve); I also removed the default parameter to SetFile(): void FileSpec::SetFile(const char *pathname, bool resolve); And fixed all of the code to use the right settings. llvm-svn: 116944
* This is a very large commit that completely re-does the way lldbCaroline Tice2010-09-041-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | handles user settable internal variables (the equivalent of set/show variables in gdb). In addition to the basic infrastructure (most of which is defined in UserSettingsController.{h,cpp}, there are examples of two classes that have been set up to contain user settable variables (the Debugger and Process classes). The 'settings' command has been modified to be a command-subcommand structure, and the 'set', 'show' and 'append' commands have been moved into this sub-commabnd structure. The old StateVariable class has been completely replaced by this, and the state variable dictionary has been removed from the Command Interpreter. Places that formerly accessed the state variable mechanism have been modified to access the variables in this new structure instead (checking the term-width; getting/checking the prompt; etc.) Variables are attached to classes; there are two basic "flavors" of variables that can be set: "global" variables (static/class-wide), and "instance" variables (one per instance of the class). The whole thing has been set up so that any global or instance variable can be set at any time (e.g. on start up, in your .lldbinit file), whether or not any instances actually exist (there's a whole pending and default values mechanism to help deal with that). llvm-svn: 113041
* Change "Current" as in GetCurrentThread, GetCurrentStackFrame, etc, to ↵Jim Ingham2010-08-261-3/+3
| | | | | | "Selected" i.e. GetSelectedThread. Selected makes more sense, since these are set by some user action (a selection). I didn't change "CurrentProcess" since this is always controlled by the target, and a given target can only have one process, so it really can't be selected. llvm-svn: 112221
* Merged Eli Friedman's linux build changes where he added Makefile files thatGreg Clayton2010-07-091-4/+4
| | | | | | | enabled LLVM make style building and made this compile LLDB on Mac OS X. We can now iterate on this to make the build work on both linux and macosx. llvm-svn: 108009
* Jean-Daniel Dupas patch that fixes a bad if statement with assignment.Greg Clayton2010-07-061-1/+1
| | | | llvm-svn: 107671
* Remove duplicate def'n from FileSpec.h.Jim Ingham2010-07-021-26/+53
| | | | | | Add user name completion to the file completer. llvm-svn: 107455
* Fix an obvious typo and replace deprecated bcopy(3) with memcpy(3).Benjamin Kramer2010-06-301-2/+2
| | | | llvm-svn: 107281
* Add a source file completer to the CommandCompleters.Jim Ingham2010-06-301-6/+230
| | | | | | | | Add a way for the completers to say whether the completed argument should have a space inserted after is or not. Added the file name completer to the "file" command. llvm-svn: 107247
* Very large changes that were needed in order to allow multiple connectionsGreg Clayton2010-06-231-46/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to the debugger from GUI windows. Previously there was one global debugger instance that could be accessed that had its own command interpreter and current state (current target/process/thread/frame). When a GUI debugger was attached, if it opened more than one window that each had a console window, there were issues where the last one to setup the global debugger object won and got control of the debugger. To avoid this we now create instances of the lldb_private::Debugger that each has its own state: - target list for targets the debugger instance owns - current process/thread/frame - its own command interpreter - its own input, output and error file handles to avoid conflicts - its own input reader stack So now clients should call: SBDebugger::Initialize(); // (static function) SBDebugger debugger (SBDebugger::Create()); // Use which ever file handles you wish debugger.SetErrorFileHandle (stderr, false); debugger.SetOutputFileHandle (stdout, false); debugger.SetInputFileHandle (stdin, true); // main loop SBDebugger::Terminate(); // (static function) SBDebugger::Initialize() and SBDebugger::Terminate() are ref counted to ensure nothing gets destroyed too early when multiple clients might be attached. Cleaned up the command interpreter and the CommandObject and all subclasses to take more appropriate arguments. llvm-svn: 106615
* Move Args.{cpp,h} and Options.{cpp,h} to Interpreter where they really belong.Jim Ingham2010-06-151-1/+1
| | | | llvm-svn: 106034
* Moved files around for linux build. Fixed up Xcode project toGreg Clayton2010-06-121-0/+414
refer to the new locations. llvm-svn: 105885
OpenPOWER on IntegriCloud