summaryrefslogtreecommitdiffstats
path: root/lldb/source
Commit message (Collapse)AuthorAgeFilesLines
* Refactor UnwindLLDB so it doesn't populate the entire stack unlessJason Molenda2010-11-092-79/+111
| | | | | | | | | | | | | the frame count is requested or each frame is individually requested. In practice this doesn't seem to help anything because we have functions like StackFrameList::GetNumFrames() which is going to request each frame anyway. And classes like ThreadPlanStepRange and ThreadPlanStepOverRange get the stack depth in their ctor forcing a full stack walk. But at least UnwindLLDB will delay doing a full walk if it can. llvm-svn: 118477
* Fix thinko in UnwindTable.cpp where it wouldn't provde a Jason Molenda2010-11-093-9/+10
| | | | | | | | | | FuncUnwinders object if the eh_frame section was missing from an objfile. Worked fine on x86_64 but on i386 where eh_frame is unusual, that resulted in the arch default UnwindPlan being used all the time instead of picking up an assembly profile based unwindplan. llvm-svn: 118467
* Minor comment fix.Johnny Chen2010-11-081-1/+1
| | | | llvm-svn: 118450
* Cleaned up the pseudo terminal code in ProcessGDBRemote as it was spawningGreg Clayton2010-11-083-50/+34
| | | | | | | | | | | | | | a pseudo terminal even when the process being attached to. Fixed a possible crasher in the in: bool ClangASTContext::IsAggregateType (clang_type_t clang_type); It seems that if you pass in a record decl, enum decl, or objc class decl and ask it if it is an aggregate type, clang will crash. llvm-svn: 118404
* Added more logging so we see the register stateSean Callanan2010-11-083-18/+56
| | | | | | | | | when a function starts and ends, and also the disassembly for anything that is a client of ClangExpressionParser after it has been JIT compiled. llvm-svn: 118401
* Fixed an issue where if you try and run something in a TTY that isn'tGreg Clayton2010-11-081-2/+6
| | | | | | | | the same architecture as a default program, the attach architecture auto detection would change the architecture to the architecture of the darwin-debug (which was always x86_64) and hose up your debug session. llvm-svn: 118399
* Fixed some type parsing that was causing types to thing they were forwardGreg Clayton2010-11-081-27/+56
| | | | | | declarations when they should have been. llvm-svn: 118393
* Made variable resolution more robust by handlingSean Callanan2010-11-081-25/+27
| | | | | | | | | every external variable reference in the module, and returning a clean error (instead of letting LLVM issue a fatal error) if the variable could not be resolved. llvm-svn: 118388
* Fixed FileSpec's operator == to deal with equivalent paths such as "/tmp/a.c"Greg Clayton2010-11-082-11/+74
| | | | | | | | | | | | | | and "/private/tmp/a.c". This was done by adding a "mutable bool m_is_resolved;" member to FileSpec and then modifying the equal operator to check if the filenames are equal, and if they are, then check the directories. If they are not equal, then both paths are checked to see if they have been resolved. If they have been resolved, we resolve the paths in temporary FileSpec objects and set each of the m_is_resolved bools to try (for lhs and rhs) if the paths match what is contained in the path. This allows us to do more intelligent compares without having to resolve all paths found in the debug info (which can quickly get costly if the files are on remote NFS mounts). llvm-svn: 118387
* Modified the DWARF parser for both the single DWARF file and for the caseGreg Clayton2010-11-074-42/+110
| | | | | | | | | | | where the DWARF is in the .o files so they can track down the actual type for a forward declaration. This was working before for just DWARF files, but not for DWARF in .o files where the actual definition was in another .o file. Modified the main thread name in the driver to be more consistent with the other LLDB thread names. llvm-svn: 118383
* Modified all logging calls to hand out shared pointers to make sure weGreg Clayton2010-11-0694-554/+575
| | | | | | | | | | | don't crash if we disable logging when some code already has a copy of the logger. Prior to this fix, logs were handed out as pointers and if they were held onto while a log got disabled, then it could cause a crash. Now all logs are handed out as shared pointers so this problem shouldn't happen anymore. We are also using our new shared pointers that put the shared pointer count and the object into the same allocation for a tad better performance. llvm-svn: 118319
* Fixed a bug where variables in the source operandsSean Callanan2010-11-061-1/+2
| | | | | | | of store statements were not being marked for resolution. llvm-svn: 118316
* Added copy constructors and assignment operators to all lldb::SB* classesGreg Clayton2010-11-0521-96/+390
| | | | | | so we don't end up with weak exports with some compilers. llvm-svn: 118312
* If debugserver is running on the local machine, pass it aCaroline Tice2010-11-051-15/+16
| | | | | | | | pseudoterminal to pass to the inferior for the inferior's I/O (to allow direct writing, rather than passing all the I/O around via packets). llvm-svn: 118308
* Fix the infinite recursion crash reported by Antoine Missout:Johnny Chen2010-11-051-0/+5
| | | | | | rdar://problem/8557095 lldb disas crashed (from lldb developer) llvm-svn: 118299
* Added the equivalent of gdb's "unwind-on-signal" to the expression command, ↵Jim Ingham2010-11-0510-27/+108
| | | | | | and a parameter to control it in ClangUserExpression, and on down to ClangFunction. llvm-svn: 118290
* Don't need both LIBLLDB_LOG_DYNAMIC_LOADER and LIBLLDB_LOG_SHLIB. Go with ↵Jim Ingham2010-11-051-2/+0
| | | | | | the former. llvm-svn: 118283
* Don't need both LIBLLDB_LOG_DYNAMIC_LOADER and LIBLLDB_LOG_SHLIB. Go with ↵Jim Ingham2010-11-051-3/+3
| | | | | | the former. llvm-svn: 118282
* Fixed error handling when the utility functionsSean Callanan2010-11-056-37/+89
| | | | | | | | | | | that check pointer validity fail to parse. Now lldb does not crash in that case. Also added support for checking Objective-C class validity in the Version 1 runtime as well as Version 2 runtimes with varying levels of available debug support. llvm-svn: 118271
* Handle stepping through ObjC vtable trampoline code.Jim Ingham2010-11-055-45/+567
| | | | llvm-svn: 118270
* Added a setting to "log timer" so you can see the incremental timings as well:Jim Ingham2010-11-042-2/+19
| | | | | | log timer increment true/false llvm-svn: 118268
* 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
* Added a top level Timer to the interpreter execute command. Also added an ↵Jim Ingham2010-11-041-1/+19
| | | | | | | | | | 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: 118266
* Use the new native unwinder by default.Jason Molenda2010-11-041-1/+1
| | | | llvm-svn: 118264
* Add a ObjC V1 runtime, and a generic AppleObjCRuntime plugin.Jim Ingham2010-11-0412-137/+750
| | | | | | Also move the Checker creation into the Apple Runtime code. llvm-svn: 118255
* Revert last checkin to DisassemblerLLVM.cpp; that was some temporaryJason Molenda2010-11-041-5/+0
| | | | | | debug printfs that got left behind by accident. llvm-svn: 118244
* Add #ifdef to easily switch between the current libunwind-remote based unwinder Jason Molenda2010-11-041-0/+9
| | | | | | | or the native unwinder (UnwindLLDB). I'll make the native unwinder the default once I check in with everyone tomorrow. llvm-svn: 118243
* Revert last checking to ThreadGDBRemote.cpp; I accidentally checkedJason Molenda2010-11-041-3/+1
| | | | | | that in along with some cleanup work with the native unwinder code. llvm-svn: 118242
* Revert last checking to CommandObjectDisassemble.cpp; that wasJason Molenda2010-11-041-48/+1
| | | | | | | some diagnostic test code I was using while debugging the native unwinder and didn't mean to check in. llvm-svn: 118241
* Built the native unwinder with all the warnings c++-4.2 could muster;Jason Molenda2010-11-049-20/+81
| | | | | | | | | fixed them. Added DISALLOW_COPY_AND_ASSIGN to classes that should not be bitwise copied. Added default initializers for member variables that weren't being initialized in the ctor. Fixed a few shadowed local variable mistakes. llvm-svn: 118240
* 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
OpenPOWER on IntegriCloud