| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
the system
handler. Also put in string translations for a couple of exceptions we were missing.
llvm-svn: 173390
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
be raw hex to match all other register reading and writing APIs.
llvm-svn: 173105
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
that we now also have to ignore breakpoints
when running the expression to collect isas.
llvm-svn: 172575
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Checking in the support for doing index ids reservation when given a thread id.
llvm-svn: 171904
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 171900
|
|
|
|
| |
llvm-svn: 171864
|
|
|
|
|
|
|
|
| |
different working directory) on Linux/FreeBSD
- fixes test case TestProcessLaunch
llvm-svn: 171854
|
|
|
|
|
|
| |
Ensuring that the Module's FileSpec is not NULL before attempting to deref it for loading the python scripting resource
llvm-svn: 171838
|
|
|
|
|
|
| |
stopping for a received signal.
llvm-svn: 171819
|
|
|
|
| |
llvm-svn: 171548
|
|
|
|
|
|
|
|
|
|
|
| |
for id types with protocols on them. We detect this
and report "id" instead.
Also added a testcase.
<rdar://problem/12595644>
llvm-svn: 171431
|
|
|
|
| |
llvm-svn: 170975
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 170800
|
|
|
|
|
|
| |
a bit.
llvm-svn: 170641
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
isn't available. We don't want the availability of SP to limit when we get get arguments from registers.
llvm-svn: 170476
|
|
|
|
|
|
|
|
| |
- make FreeBSD ProcessMonitor API thread-ready
Patch by Matt Kopec!
llvm-svn: 170445
|
|
|
|
|
|
| |
<rdar://problem/11597849>
llvm-svn: 170400
|
|
|
|
| |
llvm-svn: 170253
|
|
|
|
|
|
| |
Patch by Matt Kopec!
llvm-svn: 170242
|
|
|
|
| |
llvm-svn: 170224
|
|
|
|
|
|
| |
allowing an optional feedback stream to be passed along when getting the symbol vendor.
llvm-svn: 170174
|
|
|
|
|
|
| |
Remove debug asserts.
llvm-svn: 170173
|
|
|
|
| |
llvm-svn: 170171
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
nothing else to support clang's new -gline-tables-only mode of compiling.
llvm-svn: 169994
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Don't load __LINKEDIT segments when dynamically loading kexts.
llvm-svn: 169806
|
|
|
|
|
|
| |
DWARF along with the older DW_AT_MIPS_linkage_name attribute.
llvm-svn: 169657
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
| |
confusing that we set it
again in client code after creating the plans. So remove those unnecessary calls.
llvm-svn: 169625
|
|
|
|
|
|
|
|
| |
constructing threads, otherwise we will risk a lock-inversion deadlock between the thread list and the API mutex.
<rdar://problem/12554049>
llvm-svn: 169612
|
|
|
|
|
|
|
|
|
|
| |
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
|