summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
Commit message (Collapse)AuthorAgeFilesLines
* <rdar://problem/13072285> Jason Molenda2013-01-251-1/+1
| | | | | | | | | | Change the GDBRemoteRegisterContext::AddRegister function to take its RegisterInfo argument by value instead of using a reference - it will modify the object and modifying the contents of the g_register_infos table in GDBRemoteRegisterContext.cpp can cause a crash the next time we step through it. llvm-svn: 173406
* Don't listen for EXC_RESOURCE exceptions, those should really be handled by ↵Jim Ingham2013-01-241-0/+6
| | | | | | | | the system handler. Also put in string translations for a couple of exceptions we were missing. llvm-svn: 173390
* <rdar://problem/12711206>Enrico Granata2013-01-232-5/+6
| | | | | | | | | | Extending ValueObjectDynamicValue so that it stores a TypeAndOrName instead of a TypeSP. This change allows us to reflect the notion that a ValueObject can have a dynamic type for which we have no debug information. Previously, we would coalesce that to the static type of the object, potentially losing relevant information or even getting it wrong. This fix ensures we can correctly report the class name for Cocoa objects whose types are hidden classes that we know nothing about (e.g. __NSArrayI for immutable arrays). As a side effect, our --show-types argument to frame variable no longer needs to append custom dynamic type information. llvm-svn: 173216
* Changed the register number lists for the qRegisterInfo packet response to ↵Greg Clayton2013-01-211-2/+6
| | | | | | be raw hex to match all other register reading and writing APIs. llvm-svn: 173105
* <rdar://problem/13020634>Greg Clayton2013-01-213-156/+145
| | | | | | | | | | Fixed the 32, 16, and 8 bit pseudo regs for x86_64 (real reg of "rax" which subvalues "eax", "ax", etc...) to correctly get updated when stepping. Also fixed it so actual registers can specify what other registers must be invalidated when a register is modified. Previously, only pseudo registers could invalidate other registers. Modified the LLDB qRegisterInfo extension to the GDB remote interface to support specifying the containing registers with the new "container-regs" key whose value is a comma separated list of register numbers. Also added a "invalidate-regs" key whose value is also a comma separated list of register numbers. Removed the hack GDBRemoteDynamicRegisterInfo::Addx86_64ConvenienceRegisters() function and modified "debugserver" to specify the registers correctly using the new "container-regs" and "invalidate-regs" keys. llvm-svn: 173096
* <rdar://problem/12350715>Jason Molenda2013-01-191-0/+13
| | | | | | | | | | | | | | | | Modify UnwindLLDB::SearchForSavedLocationForRegister so if the register save locations for a register mid-stack is in another register (or in the same register, indicating the reg wasn't modified in this frame), don't return that as a found location. Keep iterating down the array of frames until a concrete location/value for the register is found, or until we get to frame 0 where the reg value can be used as-is. If lldb was trying to backtrace a program that blew out its stack via recursion and the unwind instructions had some kind of this-reg-is-saved-in-that-reg instruction, lldb would revert to doing a recursive search for a concrete value and blow out its own stack. llvm-svn: 172887
* <rdar://problem/13010007>Greg Clayton2013-01-184-81/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | Added the ability for OS plug-ins to lazily populate the thread this. The python OS plug-in classes can now implement the following method: class OperatingSystemPlugin: def create_thread(self, tid, context): # Return a dictionary for a new thread to create it on demand This will add a new thread to the thread list if it doesn't already exist. The example code in lldb/examples/python/operating_system.py has been updated to show how this call us used. Cleaned up the code in PythonDataObjects.cpp/h: - renamed all classes that started with PythonData* to be Python*. - renamed PythonArray to PythonList. Cleaned up the code to use inheritance where - Centralized the code that does ref counting in the PythonObject class to a single function. - Made the "bool PythonObject::Reset(PyObject *)" function be virtual so each subclass can correctly check to ensure a PyObject is of the right type before adopting the object. - Cleaned up all APIs and added new constructors for the Python* classes to they can all construct form: - PyObject * - const PythonObject & - const lldb::ScriptInterpreterObjectSP & Cleaned up code in ScriptInterpreterPython: - Made calling python functions safer by templatizing the production of value formats. Python specifies the value formats based on built in C types (long, long long, etc), and code often uses typedefs for uint32_t, uint64_t, etc when passing arguments down to python. We will now always produce correct value formats as the templatized code will "do the right thing" all the time. - Fixed issues with the ScriptInterpreterPython::Locker where entering the session and leaving the session had a bunch of issues that could cause the "lldb" module globals lldb.debugger, lldb.target, lldb.process, lldb.thread, and lldb.frame to not be initialized. llvm-svn: 172873
* <rdar://problem/12976277>Han Ming Ong2013-01-183-5/+133
| | | | | | Swap in index ids for thread ids in GDBRemoteCommunicationClient. Besides dealing with the async logic, I have to take care of the situation when the inferior paused as well. llvm-svn: 172869
* Fixes to the code I just committed to reflectSean Callanan2013-01-151-0/+3
| | | | | | | that we now also have to ignore breakpoints when running the expression to collect isas. llvm-svn: 172575
* Modified the Objective-C runtime to fetch Objective-CSean Callanan2013-01-152-8/+364
| | | | | | | | | | | | | | | | | | | | isas and corresponding names from the underlying process in a manner much quicker than the current approach. The current approach accesses memory in the underlying process with a random-access pattern as it walks across the data structures associated with each isa. This involves a great deal of back-and-forth with debugserver, resulting in performance problems, especially with iOS targets. The new approach attempts to run an expression in the target that collects the isas and names into two large buffers, which LLDB then collects in one shot. <rdar://problem/12914539> llvm-svn: 172574
* Separated the "expr --unwind-on-error" behavior into two parts, actual ↵Jim Ingham2013-01-154-15/+32
| | | | | | | | | | | | | | | | errors (i.e. crashes) which continue to be controlled by the --unwind-on-error flag, and --ignore-breakpoint which separately controls behavior when a called function hits a breakpoint. For breakpoints, we don't unwind, we either stop, or ignore the breakpoint, which makes more sense. Also make both these behaviors globally settable through "settings set". Also handle the case where a breakpoint command calls code that ends up re-hitting the breakpoint. We were recursing and crashing. Now we just stop without calling the second command. <rdar://problem/12986644> <rdar://problem/9119325> llvm-svn: 172503
* Don't always strip the first extension from the module basename when looking ↵Greg Clayton2013-01-121-19/+37
| | | | | | for python scripts. Now we take a name like "a.b.c" and look for scripts that are "a_b_c.py", "a_b.py" and "a.py" inside the dSYM. llvm-svn: 172291
* <rdar://problem/12973809> Greg Clayton2013-01-112-79/+51
| | | | | | | | | | | | | Fixed an issue with the auto loading of script resources in debug info files. Any platform can add support for this, and on MacOSX we allow dSYM files to contain python modules that get automatically loaded when a dSYM file is associated with an executable or shared library. The modifications will now: - Let the module locate the symbol file naturally instead of using a function that only works in certain cases. This helps us to locate the script resources as long as the dSYM file can be found. - Don't try and do any of this if the script interpreter has scripting disabled. - Allow more than one scripting resource to be found in a symbol file by returning the list - Load the scripting resources when a symbol file is added via the "target symbols add" command. - Be smarter about matching the dSYM mach-o file to an existing executable in the target images by stripping extensions on the symfile basname if needed. llvm-svn: 172275
* <rdar://problem/12976225>Han Ming Ong2013-01-081-2/+16
| | | | | | Checking in the support for doing index ids reservation when given a thread id. llvm-svn: 171904
* <rdar://problem/12586010>Greg Clayton2013-01-081-1/+4
| | | | | | | | Python OS plug-ins now fetch thread registers lazily. Also changed SBCommandInterpreter::HandleCommand() to not take the API lock. The logic here is that from the command line you can execute a command that might result in another thread (like the private process thread) to execute python or run any code that can re-enter the public API. When this happens, a deadlock immediately occurs for things like "process launch" and "process attach". llvm-svn: 171901
* Fixed comment typo.Greg Clayton2013-01-081-1/+1
| | | | llvm-svn: 171900
* Add initial support to trace spawned threads in a process on Linux.Matt Kopec2013-01-089-21/+134
| | | | llvm-svn: 171864
* Implement -w flag to process launch (allow launching inferior process in ↵Daniel Malea2013-01-085-9/+53
| | | | | | | | different working directory) on Linux/FreeBSD - fixes test case TestProcessLaunch llvm-svn: 171854
* <rdar://problem/12968925>Enrico Granata2013-01-081-0/+7
| | | | | | Ensuring that the Module's FileSpec is not NULL before attempting to deref it for loading the python scripting resource llvm-svn: 171838
* Fix TestSendSignals.py on Linux. The wrong stop reason was being set when ↵Matt Kopec2013-01-081-2/+1
| | | | | | stopping for a received signal. llvm-svn: 171819
* Handle the case of unordered sequences in a DWARF line table.Andrew Kaylor2013-01-041-15/+33
| | | | llvm-svn: 171548
* Clang sometimes emits "objc_object*" rather than "id"Sean Callanan2013-01-031-39/+68
| | | | | | | | | | | for id types with protocols on them. We detect this and report "id" instead. Also added a testcase. <rdar://problem/12595644> llvm-svn: 171431
* Remember to tell the target about dyld when we resolve the address for it.Jim Ingham2012-12-221-2/+9
| | | | llvm-svn: 170975
* Made LLDB compile with LLVM top-of-tree again.Sean Callanan2012-12-212-4/+2
| | | | | | | | | The results from Clang name lookups changed to be ArrayRefs, so I had to change the way we check for the presence of a result and the way we iterate across results. llvm-svn: 170927
* Adding eStopReasonThreadExiting and fixing the handling of this state on Linux.Andrew Kaylor2012-12-201-3/+3
| | | | llvm-svn: 170800
* Clarify the comments in PlatformDarwin::LocateExecutableScriptingResourceJason Molenda2012-12-201-7/+9
| | | | | | a bit. llvm-svn: 170641
* <rdar://problem/12903081>Enrico Granata2012-12-201-2/+20
| | | | | | | When looking for the Python script to load for a given module, replace dots with underscores if there are any after stripping the extension This means that for a module named foo.devel.xyz a file named foo_devel.py will be what we try to load llvm-svn: 170633
* This patch removes the SymbolFileSymtab support Sean Callanan2012-12-195-58/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | for reporting class types from Objective-C runtime class symbols. Instead, LLDB now queries the Objective-C runtime for class types. We have also added a (minimal) Objective-C runtime type vendor for Objective-C runtime version 1, to prevent regressions when calling class methods in the V1 runtime. Other components of this fix include: - We search the Objective-C runtime in a few more places. - We enable enumeration of all members of Objective-C classes, which Clang does in certain circumstances. - SBTarget::FindFirstType and SBTarget::FindTypes now query the Objective-C runtime as needed. - I fixed several test cases. <rdar://problem/12885034> llvm-svn: 170601
* <rdar://problem/11961650> Jason Molenda2012-12-193-4/+139
| | | | | | | | | | | | | | | | | Update the debugserver "qProcessInfo" implementation to return the cpu type, cpu subtype, OS and vendor information just like qHostInfo does so lldb can create an ArchSpec based on the returned values. Add a new GetProcessArchitecture to GDBRemoteCommunicationClient akin to GetHostArchitecture. If the qProcessInfo packet is supported, GetProcessArchitecture will return the cpu type / subtype of the process -- e.g. a 32-bit user process running on a 64-bit x86_64 Mac system. Have ProcessGDBRemote set the Target's architecture based on the GetProcessArchitecture when we've completed an attach/launch/connect. llvm-svn: 170491
* Don't read the SP when getting argument values from registers in case the SP ↵Greg Clayton2012-12-181-5/+10
| | | | | | isn't available. We don't want the availability of SP to limit when we get get arguments from registers. llvm-svn: 170476
* Allow reading registers by thread ID in ProcessMonitor (Linux implementation)Daniel Malea2012-12-186-60/+86
| | | | | | | | - make FreeBSD ProcessMonitor API thread-ready Patch by Matt Kopec! llvm-svn: 170445
* Adding events when watchpoints are set or changed.Jim Ingham2012-12-184-11/+12
| | | | | | <rdar://problem/11597849> llvm-svn: 170400
* Remove unused variable.Greg Clayton2012-12-141-2/+0
| | | | llvm-svn: 170253
* Avoid possible overflow when reading inferior memory (and logging is enabled)Daniel Malea2012-12-141-4/+8
| | | | | | Patch by Matt Kopec! llvm-svn: 170242
* Change crash handling to use eStateStopped rather than eStateCrashed.Andrew Kaylor2012-12-141-1/+2
| | | | llvm-svn: 170224
* Cleaned up the UUID mismatch just printing itself whenever it wants to by ↵Greg Clayton2012-12-143-21/+24
| | | | | | allowing an optional feedback stream to be passed along when getting the symbol vendor. llvm-svn: 170174
* <rdar://problem/12878674>Greg Clayton2012-12-141-1/+0
| | | | | | Remove debug asserts. llvm-svn: 170173
* Rmoved the old LLVM disassembler based on libedis.Sean Callanan2012-12-142-634/+0
| | | | llvm-svn: 170171
* Some incorrect debug information caused LLDBSean Callanan2012-12-141-1/+37
| | | | | | | | | | | | to report a structure with an array of size 1 at the end without accounting for that array when reporting the struct's total size to Clang. LLDB now coerces such an array to size 0. <rdar://problem/12822204> llvm-svn: 170168
* Removed the == and != operators from ArchSpec, sinceSean Callanan2012-12-134-4/+4
| | | | | | | | | | | | equality can be strict or loose and we want code to explicitly choose one or the other. Also renamed the Compare function to IsEqualTo, to avoid confusion. <rdar://problem/12856749> llvm-svn: 170152
* Remove insufficient linkedit address check; the problemJason Molenda2012-12-131-1/+1
| | | | | | | | is deeper than that and avoiding the crash in this one part of code won't solve anything. I know where the real problem is now. llvm-svn: 170068
* Allow LLDB to work with dSYM files that have a DWARF compile unit with ↵Greg Clayton2012-12-123-23/+63
| | | | | | nothing else to support clang's new -gline-tables-only mode of compiling. llvm-svn: 169994
* Update comments around ABISysV_x86_64::RegisterIsCalleeSaved toJason Molenda2012-12-111-2/+17
| | | | | | | make it clear that this is the list of callee-saved registers, add reference to the ABI doc that this comes from. llvm-svn: 169807
* <rdar://problem/12842032>Greg Clayton2012-12-111-0/+15
| | | | | | Don't load __LINKEDIT segments when dynamically loading kexts. llvm-svn: 169806
* Make sure to check for DW_AT_linkage_name to get the mangled name in the ↵Greg Clayton2012-12-084-0/+12
| | | | | | DWARF along with the older DW_AT_MIPS_linkage_name attribute. llvm-svn: 169657
* Fix a few more clang (3.2) warnings on Linux:Daniel Malea2012-12-078-21/+25
| | | | | | | | | | | | | | | | | - remove unused members - add NO_PEDANTIC to selected Makefiles - fix return values (removed NULL as needed) - disable warning about four-char-constants - remove unneeded const from operator*() declaration - add missing lambda function return types - fix printf() with no format string - change sizeof to use a type name instead of variable name - fix Linux ProcessMonitor.cpp to be 32/64 bit friendly - disable warnings emitted by swig-generated C++ code Patch by Matt Kopec! llvm-svn: 169645
* More Linux warnings fixes (remove default labels as needed):Daniel Malea2012-12-0711-31/+0
| | | | | | | | - as per http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations Patch by Matt Kopec! llvm-svn: 169633
* Now that we set ThreadPlanCallFunction to private in the constructor, it is ↵Jim Ingham2012-12-071-1/+0
| | | | | | | | confusing that we set it again in client code after creating the plans. So remove those unnecessary calls. llvm-svn: 169625
* Take the Target API lock before letting the Python code start to work ↵Jim Ingham2012-12-071-0/+12
| | | | | | | | constructing threads, otherwise we will risk a lock-inversion deadlock between the thread list and the API mutex. <rdar://problem/12554049> llvm-svn: 169612
* <rdar://problem/12831670>Jason Molenda2012-12-071-1/+1
| | | | | | | | | | When using the same-device optimization for shared cache libraries, if we have an invalid load address for __LINKEDIT, don't try to read anything out of lldb's own address space. Reading it out of the remote address space will fail gracefully if we have bad addresses but reading it out of lldb's own address space will result in a crash. llvm-svn: 169582
OpenPOWER on IntegriCloud