summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
* Added support for loading and unloading shared libraries. This was done byGreg Clayton2010-11-049-15/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding support into lldb_private::Process: virtual uint32_t lldb_private::Process::LoadImage (const FileSpec &image_spec, Error &error); virtual Error lldb_private::Process::UnloadImage (uint32_t image_token); There is a default implementation that should work for both linux and MacOSX. This ability has also been exported through the SBProcess API: uint32_t lldb::SBProcess::LoadImage (lldb::SBFileSpec &image_spec, lldb::SBError &error); lldb::SBError lldb::SBProcess::UnloadImage (uint32_t image_token); Modified the DynamicLoader plug-in interface to require it to be able to tell us if it is currently possible to load/unload a shared library: virtual lldb_private::Error DynamicLoader::CanLoadImage () = 0; This way the dynamic loader plug-ins are allows to veto whether we can currently load a shared library since the dynamic loader might know if it is currenlty loading/unloading shared libraries. It might also know about the current host system and know where to check to make sure runtime or malloc locks are currently being held. Modified the expression parser to have ClangUserExpression::Evaluate() be the one that causes the dynamic checkers to be loaded instead of other code that shouldn't have to worry about it. llvm-svn: 118227
* Re-enabled LLDB's pointer checkers, and moved theSean Callanan2010-11-044-65/+59
| | | | | | | implementation of the Objective-C object checkers into the Objective-C language runtime. llvm-svn: 118226
* Handle the case where no eh_frame section is present.Jason Molenda2010-11-047-67/+98
| | | | | | | | | | | | | RegisterContextLLDB holds a reference to the SymbolContext in the vector of Cursors that UnwindLLDB maintains. Switch UnwindLLDB to hold a vector of shared pointers of Cursors so this reference doesn't become invalid. Correctly falling back from the "fast" UnwindPlan to the "full" UnwindPlan when additional registers need to be retrieved. llvm-svn: 118218
* Factored the code that implements breakpoints onSean Callanan2010-11-035-102/+212
| | | | | | | | exceptions for different languages out of ThreadPlanCallFunction and put it into the appropriate language runtimes. llvm-svn: 118200
* Modified ThreadPlanCallFunction to perform theSean Callanan2010-11-032-18/+67
| | | | | | | | exception checks at the right time, and modified ClangFunction so that it doesn't misinterpret the stop as a timeout stop. llvm-svn: 118189
* Fixed shared library unloads when the unloaded library doesn't come offGreg Clayton2010-11-034-114/+36
| | | | | | | | | | | | | | | | | | | the end of the list. We had an issue in the MacOSX dynamic loader where if we had shlibs: 1 - a.out 2 - a.dylib 3 - b.dylib And then a.dylib got unloaded, we would unload b.dylib due to the assumption that only shared libraries could come off the end of the list. We now properly search and find which ones get loaded. Added a new internal logging category for the "lldb" log channel named "dyld". This should allow all dynamic loaders to use this as a generic log channel so we can track shared library loads and unloads in the logs without having to have each plug-in make up its own logging channel. llvm-svn: 118147
* Modified the thread plan that calls functions toSean Callanan2010-11-031-4/+93
| | | | | | | | set breakpoints at the different locations where an exception could be thrown, so that exceptions thrown by expressions are properly caught. llvm-svn: 118142
* Fixed a bug where we left a definition hangingSean Callanan2010-11-021-0/+3
| | | | | | | for a global variable that we had replaced with a reference to a slot in the input array. llvm-svn: 118123
* Fixed a bug that was confusing the code generatorSean Callanan2010-11-021-6/+2
| | | | | | | on i386 platforms, leading to crashes on simple expressions. llvm-svn: 118114
* Fixed a case where children of pointers or references that had had multipleGreg Clayton2010-11-021-4/+1
| | | | | | children always incorrectly displayed the child at offset zero. llvm-svn: 118070
* Fix error message when attempting to generate invalid alias.Caroline Tice2010-11-021-14/+3
| | | | llvm-svn: 118036
* Fixed a missing newline when you type "apropos somethingthatdoesnotexist".Greg Clayton2010-11-021-1/+1
| | | | llvm-svn: 118033
* Fix problem where "process detach" was not working properly. TheCaroline Tice2010-11-021-0/+1
| | | | | | | | | | ptrace thread update that was replying to the SIGSTOP was also causing the process to not really be sigstop'd any more so then the call to ptrace detach was failing, and when debugserver exited the attached process was being killed. Now the ptrace thread update does not disturb the sigstop state of the thread, so the detach works properly. llvm-svn: 118018
* Fixed cases where we were translating "long long" types to use the "long"Greg Clayton2010-11-021-39/+27
| | | | | | | types when they are the same size. The new code will use the correct type now when converting DWARF built-in types into clang types. llvm-svn: 118003
* Fixed the default file and line breakpoints to include inlined breakpoints.Greg Clayton2010-11-022-4/+4
| | | | llvm-svn: 118002
* Fixed our overly verbose stop reasons which by default included the threadGreg Clayton2010-11-021-2/+9
| | | | | | | name and thread queue. Users can modify the thread-format strings to add these back if needed. llvm-svn: 118000
* Print better error messages when memory reads fail when displaying variableGreg Clayton2010-11-023-24/+47
| | | | | | | | | values. Always show the variable types for the top level items when dumping program variables. llvm-svn: 117999
* Improved logging and cleaned up a redundant returnSean Callanan2010-11-011-5/+22
| | | | | | | | | statement. Now when ClangExpressionDeclMap returns a variable for a name, it pretty-prints that variable to the log instead of printing a (fairly useless) NamedDecl pointer. llvm-svn: 117972
* Fixed globals not showing up for any but the first compile unit due to a Greg Clayton2010-11-011-3/+7
| | | | | | | mismatch: I was using the compile unit user ID (the compile unit offset in the DWARF) as the compile unit index. llvm-svn: 117948
* Print notes for expressions as well as errorsSean Callanan2010-11-011-1/+6
| | | | | | and warnings. llvm-svn: 117947
* Fixed StackFrame::GetVariableList to add globalSean Callanan2010-11-011-12/+17
| | | | | | | variables to the list of found variables if they have not yet been added. llvm-svn: 117896
* Fixed an include so case sensitive builders can build.Greg Clayton2010-10-311-1/+1
| | | | llvm-svn: 117864
* Cleaned up the API logging a lot more to reduce redundant information and Greg Clayton2010-10-3132-567/+575
| | | | | | | | | keep the file size a bit smaller. Exposed SBValue::GetExpressionPath() so SBValue users can get an expression path for their values. llvm-svn: 117851
* Fixed the copy constructor for SBThread.Greg Clayton2010-10-301-2/+3
| | | | llvm-svn: 117825
* Improved API logging.Greg Clayton2010-10-3018-575/+561
| | | | llvm-svn: 117772
* Added a hack that allows expressions to ignoreSean Callanan2010-10-301-0/+6
| | | | | | | | | Objective-C member accessibility restrictions. Ultimately Clang should have a flag that ignores accessibility for Objective-C like it has one for C++. llvm-svn: 117768
* Using proper Objective-C types doesn't seem toSean Callanan2010-10-301-9/+0
| | | | | | make the sky fall. llvm-svn: 117767
* These two casts are up casts, no need to use dynamic_cast.Johnny Chen2010-10-292-2/+2
| | | | llvm-svn: 117725
* Update arguments & help information for "log disable" command.Caroline Tice2010-10-291-5/+13
| | | | llvm-svn: 117717
* Missed a file in my last commit.Caroline Tice2010-10-291-0/+2
| | | | llvm-svn: 117716
* Add the ability to disable individual log categories, ratherCaroline Tice2010-10-2928-44/+260
| | | | | | | | | than just the entire log channel. Add checks, where appropriate, to make sure a log channel/category has not been disabled before attempting to write to it. llvm-svn: 117715
* Overloading is not broken any more. No need forSean Callanan2010-10-291-8/+0
| | | | | | an #ifndef. llvm-svn: 117706
* ClangUserExpression ctor should not crash if given a null expr_prefix char*.Johnny Chen2010-10-291-2/+2
| | | | llvm-svn: 117700
* The r117616 check in broken these two test cases:Johnny Chen2010-10-291-1/+7
| | | | | | | | | | | | | | 1. FoundationDisassembleTestCase.test_simple_disasm_with_dsym; and 2. FoundationDisassembleTestCase.test_simple_disasm_with_dwarf the reason being the test was issuing 'disassemble' command to disassemble the current frame function when stopped. The 'disassemble' command worked previously but it was a result of bad option specification. Fix the disassemble command so that it will require 'disassemble -f' for disassembly of the current frame function. llvm-svn: 117688
* Updated LLVM to latest version as of 10/28 atSean Callanan2010-10-292-3/+6
| | | | | | 7pm, and made minor integration fixes. llvm-svn: 117680
* Modified the lldb_private::TypeList to use a std::multimap for quicker lookupGreg Clayton2010-10-2915-434/+227
| | | | | | | | | | by type ID (the most common type of type lookup). Changed the API logging a bit to always show the objects in the OBJECT(POINTER) format so it will be easy to locate all instances of an object or references to it when looking at logs. llvm-svn: 117641
* Added a user-settable variable, 'target.expr-prefix',Sean Callanan2010-10-295-19/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which holds the name of a file whose contents are prefixed to each expression. For example, if the file ~/lldb.prefix.header contains: typedef unsigned short my_type; then you can do this: (lldb) settings set target.expr-prefix '~/lldb.prefix.header' (lldb) expr sizeof(my_type) (unsigned long) $0 = 2 When the variable is changed, the corresponding file is loaded and its contents are fetched into a string that is stored along with the target. This string is then passed to each expression and inserted into it during parsing, like this: typedef unsigned short my_type; void $__lldb_expr(void *$__lldb_arg) { sizeof(my_type); } llvm-svn: 117627
* Add alias information, including aliased command options & Caroline Tice2010-10-282-0/+11
| | | | | | arguments, to help text for alias commands. llvm-svn: 117617
* Comment out uninmplemented command option (-f) for disassembleCaroline Tice2010-10-281-1/+1
| | | | | | command. llvm-svn: 117616
* Remove references to particular Python version (use the system defaultCaroline Tice2010-10-282-5/+4
| | | | | | | | | | version); change include statements to use Python.h in the Python framework on Mac OS X systems; leave it using regular Python.h on other systems. Note: I think this *ought* to work properly on Linux systems, but I don't have a system to test it on... llvm-svn: 117612
* Explicatory comment for folks that may not beSean Callanan2010-10-281-0/+1
| | | | | | | familiar with the ownership relationships involving Diagnostic. llvm-svn: 117573
* Logging fixes. Added a simple class to handleSean Callanan2010-10-281-2/+25
| | | | | | | | logging for type importing, making errors much easier to diagnose. Also removed some Objective-C related logging. llvm-svn: 117568
* Check in an initial implementation of the "breakpoint clear" command, whose ↵Johnny Chen2010-10-287-12/+287
| | | | | | | | | | | | | | | | | | | | purpose is clear the breakpoint associated with the (filename, line_number) combo when an arrow is pointing to a source position using Emacs Grand Unified Debugger library to interact with lldb. The current implmentation is insufficient in that it only asks the breakpoint whether it is associated with a breakpoint resolver with FileLine type and whether it matches the (filename, line_number) combo. There are other breakpoint resolver types whose breakpoint locations can potentially match the (filename, line_number) combo. The BreakpointResolver, BreakpointResolverName, BreakpointResolverAddress, and BreakpointResolverFileLine classes have extra static classof methods to support LLVM style type inquiry through isa, cast, and dyn_cast. The Breakpoint class has an API method bool GetMatchingFileLine(...) which is invoked from CommandObjectBreak.cpp to implement the "breakpoint clear" command. llvm-svn: 117562
* Add warning if no actual locations were resolved when attemptingCaroline Tice2010-10-281-0/+11
| | | | | | to set a breakpoint. llvm-svn: 117555
* Fixed the "frame variable -G NAME" that would print globalGreg Clayton2010-10-282-9/+10
| | | | | | | | variables by name. It was accidentally getting all the globals for the compile unit that contained the global variable named NAME. llvm-svn: 117516
* Replace unnecessary dynamic_cast with static_cast.Jim Ingham2010-10-271-1/+1
| | | | llvm-svn: 117503
* Make SBFrame::GetDescription a little more descriptive.Caroline Tice2010-10-271-1/+5
| | | | llvm-svn: 117497
* Fix bugs attempting to write to API log after it has beenCaroline Tice2010-10-272-1/+4
| | | | | | disabled. llvm-svn: 117493
* Flush the prompts immediately in the breakpoint command input readers, to make Caroline Tice2010-10-272-0/+14
| | | | | | sure they come out at the correct times. llvm-svn: 117470
* Don't include the ":" character when building the selector identifiersGreg Clayton2010-10-271-5/+5
| | | | | | when making objective C classes from the DWARF. llvm-svn: 117438
OpenPOWER on IntegriCloud