summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/CommandInterpreter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Converted the lldb_private::Process over to use the intrusiveGreg Clayton2011-09-221-16/+21
| | | | | | | | | | | | | | | | | | | | shared pointers. Changed the ExecutionContext over to use shared pointers for the target, process, thread and frame since these objects can easily go away at any time and any object that was holding onto an ExecutionContext was running the risk of using a bad object. Now that the shared pointers for target, process, thread and frame are just a single pointer (they all use the instrusive shared pointers) the execution context is much safer and still the same size. Made the shared pointers in the the ExecutionContext class protected and made accessors for all of the various ways to get at the pointers, references, and shared pointers. llvm-svn: 140298
* Don't skip the application specific ~/.lldbinit file when the programGreg Clayton2011-09-111-27/+34
| | | | | | | | | | | | | | | | | | | name is "lldb". So currently when you startup any application and you have not specified that you would like to skip loading init files through the API or from "lldb" options, then LLDB will try and load: "~/.lldbinit-%s" where %s the basename of your program "~/.lldbinit" Then LLDB will load any program specified on the command line and then source the "./.llbinit" file for any temporary debug session specific commands. I want this feature because I have thread and frame formats that do ANSI color codes that I only want to load when running in a terminal which is when I am running the "lldb" command line program. llvm-svn: 139476
* Adding two new options to the 'help' command:Enrico Granata2011-09-091-1/+1
| | | | | | | | | | | --show-aliases (-a) shows aliases for commands, as well as built-in commands --hide-user-defined (-u) hides user defined commands by default 'help' without arguments does not show aliases anymore. to see them, add --show-aliases to have only built-in commands appear, use 'help --hide-user-defined' ; there is currently no way to hide built-in commands from the help output 'help command' is not changed by this commit, and help is shown even if command is an alias and -a is not specified llvm-svn: 139377
* Make ThreadList::GetSelectedThread() select and return the 0th thread if ↵Johnny Chen2011-08-251-7/+0
| | | | | | | | there's no currently selected thread. And update the call sites accordingly. llvm-svn: 138577
* Include lldb/commands as a valid logging type in theJason Molenda2011-08-251-1/+4
| | | | | | | | | | | | 'log list' output. Remove an extraneous \n from one of the lldb/commands log line. Add an lldb/commands log indicating whether the command was successful or not. llvm-svn: 138530
* Changes to Python commands:Enrico Granata2011-08-161-12/+39
| | | | | | | | | | | | - They now have an SBCommandReturnObject instead of an SBStream as third argument - The class CommandObjectPythonFunction has been merged into CommandObjectCommands.cpp - The command to manage them is now: command script with subcommands add, list, delete, clear command alias is returned to its previous functionality - Python commands are now part of an user dictionary, instead of being seen as aliases llvm-svn: 137785
* One-line fix for a possible spurious truncation warningEnrico Granata2011-08-151-1/+2
| | | | llvm-svn: 137640
* Make ValueObject::SetValueFromCString work correctly.Jim Ingham2011-08-121-2/+29
| | | | | | | | | | | | | | | | 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
* Added "command history" command to dump the command history.Jim Ingham2011-07-121-2/+100
| | | | | | | | | | | | | | | | | Also made: (lldb) !<NUM> (lldb) !-<NUM> (lldb) !! work with the history. For added benefit: (lldb) !<NUM><TAB> will insert the command at position <NUM> in the history into the command line to be edited. This is only partial, I still need to sync up editline's history list with the one kept by the interpreter. llvm-svn: 134955
* named summaries:Enrico Granata2011-07-121-1/+1
| | | | | | | | | | | | - a new --name option for "type summary add" lets you give a name to a summary - a new --summary option for "frame variable" lets you bind a named summary to one or more variables ${var%s} now works for printing the value of 0-terminated CStrings type format test case now tests for cascading - this is disabled on GCC because GCC may end up stripping typedef chains, basically breaking cascading new design for the FormatNavigator class new template class CleanUp2 meant to support cleanup routines with 1 additional parameter beyond resource handle llvm-svn: 134943
* new detailed descriptions for type summary add and type format addEnrico Granata2011-07-071-0/+43
| | | | | | | some changes to the help system code for better display of long help text -p and -r flags now also work for type format add llvm-svn: 134574
* Fix header pathsPeter Collingbourne2011-06-231-1/+1
| | | | llvm-svn: 133755
* Committing type format code for Enrico Granata.Greg Clayton2011-06-231-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a new top level command named "type". Currently this command implements three commands: type format add <format> <typename1> [<typename2> ...] type format delete <typename1> [<typename2> ...] type format list [<typename1> [<typename2>] ...] This allows you to specify the default format that will be used to display types when you use "frame variable" or "expression", or the SBValue classes. Examples: // Format uint*_t as hex type format add x uint16_t uint32_t uint64_t // Format intptr_t as a pointer type format add p intptr_t The format characters are the same as "printf" for the most part with many additions. These format character specifiers are also used in many other commands ("frame variable" for one). The current list of format characters include: a - char buffer b - binary B - boolean c - char C - printable char d - signed decimal e - float f - float g - float i - signed decimal I - complex integer o - octal O - OSType p - pointer s - c-string u - unsigned decimal x - hex X - complex float y - bytes Y - bytes with ASCII llvm-svn: 133728
* Add 'batch_mode' to CommandInterpreter. Modify InputReaders toCaroline Tice2011-06-161-1/+2
| | | | | | | | | | not write output (prompts, instructions,etc.) if the CommandInterpreter is in batch_mode. Also, finish updating InputReaders to write to the asynchronous stream, rather than using the Debugger's output file directly. llvm-svn: 133162
* Add ability to recognize/handle quotes around commandsCaroline Tice2011-05-111-14/+61
| | | | | | (e.g. '"target" create' works as well as 'target create'). llvm-svn: 131185
* Replace calls to HandleCommand in lldb core with more appropriateCaroline Tice2011-05-061-26/+158
| | | | | | | direct function calls. As part of this, collect code that processes arguments & options for aliases into a single function. llvm-svn: 131020
* Added new OptionGroup classes for UInt64, UUID, File and Boolean values.Greg Clayton2011-05-031-2/+2
| | | | | | | | | | | | | | | | | | | | | Removed the "image" command and moved it to "target modules". Added an alias for "image" to "target modules". Added some new target commands to be able to add and load modules to a target: (lldb) target modules add <path> (lldb) target modules load [--file <path>] [--slide <offset>] [<sect-name> <sect-load-addr> ...] So you can load individual sections without running a target: (lldb) target modules load --file /usr/lib/libSystem.B.dylib __TEXT 0x7fccc80000 __DATA 0x1234000000 Or you can rigidly slide an entire shared library: (lldb) target modules load --file /usr/lib/libSystem.B.dylib --slid 0x7fccc80000 This should improve bare board debugging when symbol files need to be slid around manually. llvm-svn: 130796
* This patch captures and serializes all output being written by theCaroline Tice2011-05-021-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | command line driver, including the lldb prompt being output by editline, the asynchronous process output & error messages, and asynchronous messages written by target stop-hooks. As part of this it introduces a new Stream class, StreamAsynchronousIO. A StreamAsynchronousIO object is created with a broadcaster, who will eventually broadcast the stream's data for a listener to handle, and an event type indicating what type of event the broadcaster will broadcast. When the Write method is called on a StreamAsynchronousIO object, the data is appended to an internal string. When the Flush method is called on a StreamAsynchronousIO object, it broadcasts it's data string and clears the string. Anything in lldb-core that needs to generate asynchronous output for the end-user should use the StreamAsynchronousIO objects. I have also added a new notification type for InputReaders, to let them know that a asynchronous output has been written. This is to allow the input readers to, for example, refresh their prompts and lines, if desired. I added the case statements to all the input readers to catch this notification, but I haven't added any code for handling them yet (except to the IOChannel input reader). llvm-svn: 130721
* Erase from a string instead of using substr when you don't really need to.Greg Clayton2011-04-221-1/+1
| | | | llvm-svn: 130013
* Fixed some more 'commands' to 'command' change.Johnny Chen2011-04-211-2/+2
| | | | llvm-svn: 129897
* Added the ability for users to create new regex commands.Greg Clayton2011-04-201-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | To do this currently, it must be done in multi-line mode: (lldb) commands regex --help "Help text for command" --syntax "syntax for command" <cmd-name> Any example that would use "f" for "finish" when there are no arguments, and "f <num>" to do a "frame select <num>" would be: (lldb) commands regex f Enter multiple regular expressions in the form s/find/replace/ then terminate with an empty line: s/^$/finish/ s/([0-9]+)/frame select %1/ (lldb) f 11 frame select 12 ... (lldb) f finish ... Also added the string version of the OptionValue as OptionValueString. llvm-svn: 129855
* Centralized a lot of the status information for processes,Greg Clayton2011-04-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | threads, and stack frame down in the lldb_private::Process, lldb_private::Thread, lldb_private::StackFrameList and the lldb_private::StackFrame classes. We had some command line commands that had duplicate versions of the process status output ("thread list" and "process status" for example). Removed the "file" command and placed it where it should have been: "target create". Made an alias for "file" to "target create" so we stay compatible with GDB commands. We can now have multple usable targets in lldb at the same time. This is nice for comparing two runs of a program or debugging more than one binary at the same time. The new command is "target select <target-idx>" and also to see a list of the current targets you can use the new "target list" command. The flow in a debug session can be: (lldb) target create /path/to/exe/a.out (lldb) breakpoint set --name main (lldb) run ... hit breakpoint (lldb) target create /bin/ls (lldb) run /tmp Process 36001 exited with status = 0 (0x00000000) (lldb) target list Current targets: target #0: /tmp/args/a.out ( arch=x86_64-apple-darwin, platform=localhost, pid=35999, state=stopped ) * target #1: /bin/ls ( arch=x86_64-apple-darwin, platform=localhost, pid=36001, state=exited ) (lldb) target select 0 Current targets: * target #0: /tmp/args/a.out ( arch=x86_64-apple-darwin, platform=localhost, pid=35999, state=stopped ) target #1: /bin/ls ( arch=x86_64-apple-darwin, platform=localhost, pid=36001, state=exited ) (lldb) bt * thread #1: tid = 0x2d03, 0x0000000100000b9a a.out`main + 42 at main.c:16, stop reason = breakpoint 1.1 frame #0: 0x0000000100000b9a a.out`main + 42 at main.c:16 frame #1: 0x0000000100000b64 a.out`start + 52 Above we created a target for "a.out" and ran and hit a breakpoint at "main". Then we created a new target for /bin/ls and ran it. Then we listed the targest and selected our original "a.out" program, so we showed two concurent debug sessions going on at the same time. llvm-svn: 129695
* Moved the execution context that was in the Debugger intoGreg Clayton2011-04-121-15/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the CommandInterpreter where it was always being used. Make sure that Modules can track their object file offsets correctly to allow opening of sub object files (like the "__commpage" on darwin). Modified the Platforms to be able to launch processes. The first part of this move is the platform soon will become the entity that launches your program and when it does, it uses a new ProcessLaunchInfo class which encapsulates all process launching settings. This simplifies the internal APIs needed for launching. I want to slowly phase out process launching from the process classes, so for now we can still launch just as we used to, but eventually the platform is the object that should do the launching. Modified the Host::LaunchProcess in the MacOSX Host.mm to correctly be able to launch processes with all of the new eLaunchFlag settings. Modified any code that was manually launching processes to use the Host::LaunchProcess functions. Fixed an issue where lldb_private::Args had implicitly defined copy constructors that could do the wrong thing. This has now been fixed by adding an appropriate copy constructor and assignment operator. Make sure we don't add empty ModuleSP entries to a module list. Fixed the commpage module creation on MacOSX, but we still need to train the MacOSX dynamic loader to not get rid of it when it doesn't have an entry in the all image infos. Abstracted many more calls from in ProcessGDBRemote down into the GDBRemoteCommunicationClient subclass to make the classes cleaner and more efficient. Fixed the default iOS ARM register context to be correct and also added support for targets that don't support the qThreadStopInfo packet by selecting the current thread (only if needed) and then sending a stop reply packet. Debugserver can now start up with a --unix-socket (-u for short) and can then bind to port zero and send the port it bound to to a listening process on the other end. This allows the GDB remote platform to spawn new GDB server instances (debugserver) to allow platform debugging. llvm-svn: 129351
* Fixed the LLDB build so that we can have private types, private enums andGreg Clayton2011-03-241-1/+1
| | | | | | | | public types and public enums. This was done to keep the SWIG stuff from parsing all sorts of enums and types that weren't needed, and allows us to abstract our API better. llvm-svn: 128239
* Switch the "print" alias to "expression --".Jim Ingham2011-03-241-1/+1
| | | | llvm-svn: 128224
* Add "up" and "down" aliases.Jim Ingham2011-03-221-0/+33
| | | | llvm-svn: 128066
* Added more platform support. There are now some new commands:Greg Clayton2011-03-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platform status -- gets status information for the selected platform platform create <platform-name> -- creates a new instance of a remote platform platform list -- list all available platforms platform select -- select a platform instance as the current platform (not working yet) When using "platform create" it will create a remote platform and make it the selected platform. For instances for iPhone OS debugging on Mac OS X one can do: (lldb) platform create remote-ios --sdk-version=4.0 Remote platform: iOS platform SDK version: 4.0 SDK path: "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0" Not connected to a remote device. (lldb) file ~/Documents/a.out Current executable set to '~/Documents/a.out' (armv6). (lldb) image list [ 0] /Volumes/work/gclayton/Documents/devb/attach/a.out [ 1] /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/dyld [ 2] /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0/Symbols/usr/lib/libSystem.B.dylib Note that this is all happening prior to running _or_ connecting to a remote platform. Once connected to a remote platform the OS version might change which means we will need to update our dependecies. Also once we run, we will need to match up the actualy binaries with the actualy UUID's to files in the SDK, or download and cache them locally. This is just the start of the remote platforms, but this modification is the first iteration in getting the platforms really doing something. llvm-svn: 127934
* CommandInterpreter::HandleCommands should take its commands as a "const ↵Jim Ingham2011-03-111-3/+1
| | | | | | | | StringList &" since it doesn't modify it... Also, don't turn on the immediate output in the temporary result, or you'll get doubled output. llvm-svn: 127452
* Don't limit StreamTee to just two streams. It now can containGreg Clayton2011-02-201-25/+24
| | | | | | | | | | | | | | | | | | | | | | | | | N streams by making the stream a vector of stream shared pointers that is protected by a mutex. Streams can be get/set by index which allows indexes to be defined as stream indentifiers. If a stream is set at index 3 and there are now streams in the collection, then empty stream objects are inserted to ensure that stream at index 3 has a valid stream. There is also an append method that allows a stream to be pushed onto the stack. This will allow our streams to be very flexible in where the output goes. Modified the CommandReturnObject to use the new StreamTee functionality. This class now defines two StreamTee indexes: 0 for the stream string stream, and 1 for the immediate stream. This is used both on the output and error streams. Added the ability to get argument types as strings or as descriptions. This is exported through the SBCommandInterpreter API to allow external access. Modified the Driver class to use the newly exported argument names from SBCommandInterpreter::GetArgumentTypeAsCString(). llvm-svn: 126067
* - Changed all the places where CommandObjectReturn was exporting a ↵Jim Ingham2011-02-191-2/+4
| | | | | | | | | | | | | | | | StreamString to just exporting a Stream, and then added GetOutputData & GetErrorData to get the accumulated data. - Added a StreamTee that will tee output to two provided lldb::StreamSP's. - Made the CommandObjectReturn use this so you can Tee the results immediately to the debuggers output file, as well as saving up the results to return when the command is done executing. - HandleCommands now uses this so that if you have a set of commands that continue the target you will see the commands come out as they are processed. - The Driver now uses this to output the command results as you go, which makes the interface more reactive seeming. llvm-svn: 126015
* Added new target instance settings for execution settings:Greg Clayton2011-02-181-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Targets can now specify some additional parameters for when we debug executables that can help with plug-in selection: target.execution-level = auto | user | kernel target.execution-mode = auto | dynamic | static target.execution-os-type = auto | none | halted | live On some systems, the binaries that are created are the same wether you use them to debug a kernel, or a user space program. Many times inspecting an object file can reveal what an executable should be. For these cases we can now be a little more complete by specifying wether to detect all of these things automatically (inspect the main executable file and select a plug-in accordingly), or manually to force the selection of certain plug-ins. To do this we now allow the specficifation of wether one is debugging a user space program (target.execution-level = user) or a kernel program (target.execution-level = kernel). We can also specify if we want to debug a program where shared libraries are dynamically loaded using a DynamicLoader plug-in (target.execution-mode = dynamic), or wether we will treat all symbol files as already linked at the correct address (target.execution-mode = static). We can also specify if the inferior we are debugging is being debugged on a bare board (target.execution-os-type = none), or debugging an OS where we have a JTAG or other direct connection to the inferior stops the entire OS (target.execution-os-type = halted), or if we are debugging a program on something that has live debug services (target.execution-os-type = live). For the "target.execution-os-type = halted" mode, we will need to create ProcessHelper plug-ins that allow us to extract the process/thread and other OS information by reading/writing memory. This should allow LLDB to be used for a wide variety of debugging tasks and handle them all correctly. llvm-svn: 125815
* Factor all the code that does "Execute a list of lldb command interpreter ↵Jim Ingham2011-02-181-21/+189
| | | | | | commands" into a single function in the Interpreter, and then use that in all the places that used to do this by hand. llvm-svn: 125807
* Use Host::File in lldb_private::StreamFile and other places to cleanup hostGreg Clayton2011-02-091-16/+18
| | | | | | layer a bit more. llvm-svn: 125149
* Make sure the confirmation input reader calls fflush after writing its output.Caroline Tice2011-02-021-0/+7
| | | | | | (<rdar://problem/8946573>) llvm-svn: 124711
* Endian patch from Kirk Beitz that allows better cross platform building.Greg Clayton2011-02-011-0/+1
| | | | llvm-svn: 124643
* A few of the issue I have been trying to track down and fix have been due toGreg Clayton2011-01-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the way LLDB lazily gets complete definitions for types within the debug info. When we run across a class/struct/union definition in the DWARF, we will only parse the full definition if we need to. This works fine for top level types that are assigned directly to variables and arguments, but when we have a variable with a class, lets say "A" for this example, that has a member: "B *m_b". Initially we don't need to hunt down a definition for this class unless we are ever asked to do something with it ("expr m_b->getDecl()" for example). With my previous approach to lazy type completion, we would be able to take a "A *a" and get a complete type for it, but we wouldn't be able to then do an "a->m_b->getDecl()" unless we always expanded all types within a class prior to handing out the type. Expanding everything is very costly and it would be great if there were a better way. A few months ago I worked with the llvm/clang folks to have the ExternalASTSource class be able to complete classes if there weren't completed yet: class ExternalASTSource { .... virtual void CompleteType (clang::TagDecl *Tag); virtual void CompleteType (clang::ObjCInterfaceDecl *Class); }; This was great, because we can now have the class that is producing the AST (SymbolFileDWARF and SymbolFileDWARFDebugMap) sign up as external AST sources and the object that creates the forward declaration types can now also complete them anywhere within the clang type system. This patch makes a few major changes: - lldb_private::Module classes now own the AST context. Previously the TypeList objects did. - The DWARF parsers now sign up as an external AST sources so they can complete types. - All of the pure clang type system wrapper code we have in LLDB (ClangASTContext, ClangASTType, and more) can now be iterating through children of any type, and if a class/union/struct type (clang::RecordType or ObjC interface) is found that is incomplete, we can ask the AST to get the definition. - The SymbolFileDWARFDebugMap class now will create and use a single AST that all child SymbolFileDWARF classes will share (much like what happens when we have a complete linked DWARF for an executable). We will need to modify some of the ClangUserExpression code to take more advantage of this completion ability in the near future. Meanwhile we should be better off now that we can be accessing any children of variables through pointers and always be able to resolve the clang type if needed. llvm-svn: 123613
* Split up the Python script interpreter code to allow multiple script ↵Caroline Tice2011-01-141-8/+19
| | | | | | | | | | | interpreter objects to exist within the same process (one script interpreter object per debugger object). The python script interpreter objects are all using the same global Python script interpreter; they use separate dictionaries to keep their data separate, and mutex's to prevent any object attempting to use the global Python interpreter when another object is already using it. llvm-svn: 123415
* Spelling changes applied from lldb_spelling.diffs from Bruce Mitchener.Greg Clayton2011-01-081-1/+1
| | | | | | Thanks Bruce! llvm-svn: 123083
* Add a simple command: 'version' to the command interpreter, and an accompanyingJohnny Chen2010-12-231-0/+2
| | | | | | test case test_help_version(). llvm-svn: 122515
* Fix the completion of "fr " and the like.Jim Ingham2010-12-141-0/+17
| | | | llvm-svn: 121785
* Fix small bugs:Caroline Tice2010-12-141-2/+42
| | | | | | | | | | | - Make sure cmd_obj & cmd_obj_sp contain a valid objects before attempting to dereference, in CommandObjectCommandsAlias::Execute and CommandInterpreter::HandleCommand. - Modify CommandInterpreter::GetCommandSPExact to properly handle multi-word command inputs. llvm-svn: 121779
* Fix bug where using incomplete strings for command names causesCaroline Tice2010-12-111-1/+10
| | | | | | | lldb to crash (because of attempt to look for full names when full names were not used). llvm-svn: 121607
* Modify HandleCommand to not do any argument processing until it has ↵Caroline Tice2010-12-091-155/+323
| | | | | | | | | | | | | | | | determined whether or not the command should take raw input, then handle & dispatch the arguments appropriately. Also change the 'alias' command to be a command that takes raw input. This is necessary to allow aliases to be created for other commands that take raw input and might want to include raw input in the alias itself. Fix a bug in the aliasing mechanism when creating aliases for commands with 3-or-more words. Raw input should now be properly handled by all the command and alias mechanisms. llvm-svn: 121423
* - Fix alias-building & resolving to properly handle optional arguments for ↵Caroline Tice2010-12-071-17/+124
| | | | | | | | | | | | | | | | | | command options. - Add logging for command resolution ('log enable lldb commands') - Fix alias resolution to properly handle commands that take raw input (resolve the alias, but don't muck up the raw arguments). Net result: Among other things, 'expr' command can now take strings with escaped characters and not have the command handling & alias resolution code muck up the escaped characters. E.g. 'expr printf ("\n\n\tHello there!")' should now work properly. Not working yet: Creating aliases with raw input for commands that take raw input. Working on that. e.g. 'command alias print_hi expr printf ("\n\tHi!")' does not work yet. llvm-svn: 121171
* Add the ability to catch and do the right thing with Interrupts (often ↵Caroline Tice2010-11-191-0/+6
| | | | | | | | control-c) and end-of-file (often control-d). llvm-svn: 119837
* Modified lldb_private::SymboleFile to be able to override where its TypeListGreg Clayton2010-11-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | comes from by using a virtual function to provide it from the Module's SymbolVendor by default. This allows the DWARF parser, when being used to parse DWARF in .o files with a parent DWARF + debug map parser, to get its type list from the DWARF + debug map parser so when we go and find full definitions for types (that might come from other .o files), we can use the type list from the debug map parser. Otherwise we ended up mixing clang types from one .o file (say a const pointer to a forward declaration "class A") with the a full type from another .o file. This causes expression parsing, when copying the clang types from those parsed by the DWARF parser into the expression AST, to fail -- for good reason. Now all types are created in the same list. Also added host support for crash description strings that can be set before doing a piece of work. On MacOSX, this ties in with CrashReporter support that allows a string to be dispalyed when the app crashes and allows LLDB.framework to print a description string in the crash log. Right now this is hookup up the the CommandInterpreter::HandleCommand() where each command notes that it is about to be executed, so if we crash while trying to do this command, we should be able to see the command that caused LLDB to exit. For all other platforms, this is a nop. llvm-svn: 118672
* Added a top level Timer to the interpreter execute command. Also added an ↵Jim Ingham2010-11-041-0/+2
| | | | | | | | | | option to pass the depth to "log timer enable". That allows you to time just command execution with: log timer enable 1 <command> log timer dump llvm-svn: 118267
* Cleaned up the API logging a lot more to reduce redundant information and Greg Clayton2010-10-311-2/+5
| | | | | | | | | keep the file size a bit smaller. Exposed SBValue::GetExpressionPath() so SBValue users can get an expression path for their values. llvm-svn: 117851
* Changed "run" to alias "process launch --".Jim Ingham2010-10-221-4/+7
| | | | | | Added "po" alias for "expression -o --" llvm-svn: 117125
* Fixed an issue where we were resolving paths when we should have been.Greg Clayton2010-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud