History log of /external/lldb/source/Target/ThreadPlanCallFunction.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
04cc48eb5cff32268a822b57f87590c9dc2643f8 04-Jun-2013 Jim Ingham <jingham@apple.com> If ThreadPlanCallFunction hasn't set its notion of the "real stop info" yet, just return the current PrivateStopInfo.

Also renamed a few more places where we were using StopReason in functions that were returning StopInfo's.

<rdar://problem/14042692>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
0086b94b7809b9fcdc77ce5bcca1e0e64bcfef76 16-May-2013 Jim Ingham <jingham@apple.com> Handle the case where there is a user breakpoint set at the location of one of our
function call exception catching breakpoints. We need to force ourselves to stop in
that case.

<rdar://problem/13903801>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182056 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
7c79a27b955432dfd3ad9439640f0af2eccf37b8 08-May-2013 Jim Ingham <jingham@apple.com> Figure out the reply to "PlanExplainsStop" once when we stop and then use the cached
value. This fixes problems, for instance, with the StepRange plans, where they know that
they explained the stop because they were at their "run to here" breakpoint, then deleted
that breakpoint, so when they got asked again, doh! I had done this for a couple of plans
in an ad hoc fashion, this just formalizes it.

Also add a "ResumeRequested" in Process so that the code in the completion handlers can
tell the ShouldStop logic they want to resume rather than just directly resuming. That allows
us to handle resuming in a more controlled fashion.

Also, SetPublicState can take a "restarted" flag, so that it doesn't drop the run lock when
the target was immediately restarted.
--This line, and those below , will be ignored--

M test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
M include/lldb/Target/ThreadList.h
M include/lldb/Target/ThreadPlanStepOut.h
M include/lldb/Target/Thread.h
M include/lldb/Target/ThreadPlanBase.h
M include/lldb/Target/ThreadPlanStepThrough.h
M include/lldb/Target/ThreadPlanStepInstruction.h
M include/lldb/Target/ThreadPlanStepInRange.h
M include/lldb/Target/ThreadPlanStepOverBreakpoint.h
M include/lldb/Target/ThreadPlanStepUntil.h
M include/lldb/Target/StopInfo.h
M include/lldb/Target/Process.h
M include/lldb/Target/ThreadPlanRunToAddress.h
M include/lldb/Target/ThreadPlan.h
M include/lldb/Target/ThreadPlanCallFunction.h
M include/lldb/Target/ThreadPlanStepOverRange.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h
M source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
M source/Target/StopInfo.cpp
M source/Target/Process.cpp
M source/Target/ThreadPlanRunToAddress.cpp
M source/Target/ThreadPlan.cpp
M source/Target/ThreadPlanCallFunction.cpp
M source/Target/ThreadPlanStepOverRange.cpp
M source/Target/ThreadList.cpp
M source/Target/ThreadPlanStepOut.cpp
M source/Target/Thread.cpp
M source/Target/ThreadPlanBase.cpp
M source/Target/ThreadPlanStepThrough.cpp
M source/Target/ThreadPlanStepInstruction.cpp
M source/Target/ThreadPlanStepInRange.cpp
M source/Target/ThreadPlanStepOverBreakpoint.cpp
M source/Target/ThreadPlanStepUntil.cpp
M lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
845970ec09b437160da1095006d74b82ef05195f 28-Mar-2013 Jim Ingham <jingham@apple.com> Return a useful error message from ValidatePlan if the expression can't be made for some reason.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
952e9dc874944fcdbbb224f3ec4fc2c859376f64 28-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13521159>

LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down.

All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
4f9103faba72fdfc4b4299d6d459bc820ee597b2 27-Feb-2013 Matt Kopec <Matt.Kopec@intel.com> Add GNU indirect function support in expressions for Linux.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
4b01c3657bc415b52284f6a0b1654642c649f5e3 14-Feb-2013 Jim Ingham <jingham@apple.com> Add a test for handling a function call that throws an exception, and make it work.

<rdar://problem/13183944>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
89e248f04ecb87d0df4a4b96158c3fac0a3e43c7 09-Feb-2013 Jim Ingham <jingham@apple.com> Reworked the way Process::RunThreadPlan and the ThreadPlanCallFunction interoperate to fix problems where
hitting auto-continue signals while running a thread plan would cause us to lose control of the debug
session.

<rdar://problem/12993641>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
b794020ffbd6473c59a6e98be044df50abf7fc30 15-Jan-2013 Jim Ingham <jingham@apple.com> Separated the "expr --unwind-on-error" behavior into two parts, actual 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>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
ae0f59cf7c300089bb649fbb6159299d3ea0b143 07-Dec-2012 Andrew Kaylor <andrew.kaylor@intel.com> Set ThreadPlanCallFunction to private in ConstructorSetup. This fixes a problem on Linux where 'continue' was misfiring after an expression evaluation when stopped at a breakpoint. The problem was that InferiorCallMmap was not setting its ThreadPlanCallFunction to private and so the completion of that thread plan appeared to be the stop reason and therefore the 'continue' operation failed to step over the breakpoint. The SetPrivate call is being put in ThreadPlanCallFunction rather than InferiorCallMmap to make the solution more general.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
5f35a4be95aed0e5b2cb36f7d785bcbfc67284ae 29-Nov-2012 Daniel Malea <daniel.malea@intel.com> Resolve printf formatting warnings on Linux:
- use macros from inttypes.h for format strings instead of OS-specific types

Patch from Matt Kopec!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
76b258db0611dad2f5b5ae51721a4bc0abd580ae 27-Nov-2012 Jim Ingham <jingham@apple.com> The Function calling thread plan was replacing the stored stop info too soon, causing recursive entry into the
breakpoint StopInfo's PerformAction, which is bad. Reworked this so that it is now correct.

<rdar://problem/12501259>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
5ebd51f464587ba848698fdf48429adc8bad9068 11-Sep-2012 Filipe Cabecinhas <me@filcab.net> Some more typing-related fixes.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
49ce8969d3154e1560106cfe530444c09410f217 29-Aug-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11757916>

Make breakpoint setting by file and line much more efficient by only looking for inlined breakpoint locations if we are setting a breakpoint in anything but a source implementation file. Implementing this complex for a many reasons. Turns out that parsing compile units lazily had some issues with respect to how we need to do things with DWARF in .o files. So the fixes in the checkin for this makes these changes:
- Add a new setting called "target.inline-breakpoint-strategy" which can be set to "never", "always", or "headers". "never" will never try and set any inlined breakpoints (fastest). "always" always looks for inlined breakpoint locations (slowest, but most accurate). "headers", which is the default setting, will only look for inlined breakpoint locations if the breakpoint is set in what are consudered to be header files, which is realy defined as "not in an implementation source file".
- modify the breakpoint setting by file and line to check the current "target.inline-breakpoint-strategy" setting and act accordingly
- Modify compile units to be able to get their language and other info lazily. This allows us to create compile units from the debug map and not have to fill all of the details in, and then lazily discover this information as we go on debuggging. This is needed to avoid parsing all .o files when setting breakpoints in implementation only files (no inlines). Otherwise we would need to parse the .o file, the object file (mach-o in our case) and the symbol file (DWARF in the object file) just to see what the compile unit was.
- modify the "SymbolFileDWARFDebugMap" to subclass lldb_private::Module so that the virtual "GetObjectFile()" and "GetSymbolVendor()" functions can be intercepted when the .o file contenst are later lazilly needed. Prior to this fix, when we first instantiated the "SymbolFileDWARFDebugMap" class, we would also make modules, object files and symbol files for every .o file in the debug map because we needed to fix up the sections in the .o files with information that is in the executable debug map. Now we lazily do this in the DebugMapModule::GetObjectFile()

Cleaned up header includes a bit as well.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
b386d82334b65fb984348f2027b1cb7714de993f 09-Aug-2012 Sean Callanan <scallanan@apple.com> Removed explicit NULL checks for shared pointers
and instead made us use implicit casts to bool.
This generated a warning in C++11.

<rdar://problem/11930775>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
d82bc6d623930e796d596d190399ec2450980e0f 12-May-2012 Jim Ingham <jingham@apple.com> Found one more place where the OkayToDiscard needs to be consulted.
Also changed the defaults for SBThread::Step* to not delete extant plans.
Also added some test cases to test more complex stepping scenarios.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
110b55f22f8cda703c4fb6f1c2affb8ccbef215b 11-May-2012 Jim Ingham <jingham@apple.com> Don't try to use "OkayToDiscard" to mean BOTH this plan is a user plan or not AND unwind on error.

rdar://problem/11419156


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
038fa8e30621e0e55faed3479387d811986f28b7 10-May-2012 Jim Ingham <jingham@apple.com> If the ObjC Step Through Trampoline plan causes a target crash, properly propagate the error back to
the controlling plans so that they don't lose control.

Also change "ThreadPlanStepThrough" to take the return StackID for its backstop breakpoint as an argument
to the constructor rather than having it try to figure it out itself, since it might get it wrong whereas
the caller always knows where it is coming from.

rdar://problem/11402287


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
a8d26ebe8e66077257eba6b0e0ca85636fbd1e55 14-Apr-2012 Jim Ingham <jingham@apple.com> Don't do the work in DoTakedown if the thread plan isn't valid.
Also fixed up some logging.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
1e58cef33bbfd953e2c9e7dc872c4c74e0d75352 13-Apr-2012 Jim Ingham <jingham@apple.com> Factor out a bunch of common code in the two ThreadPlanCallFunction constructors. Also add a sanity check - try reading the frame, and if we fail bag out.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
f19b0c875021c17c68a036700010754fbb73021a 13-Apr-2012 Jim Ingham <jingham@apple.com> ThreadPlanCallFunction's destructor wasn't calling DoTakedown, so if the that plan got discarded we weren't doing the takedown.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
6cbd7bcd50b2e109b247c65b5eea8abbe93abe42 10-Apr-2012 Sean Callanan <scallanan@apple.com> Set variables returned by utility functions to
not consume slots in the persistent variable
store.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
2bcbaf625afd8f521da03ddaa146e7ea7650ee38 10-Apr-2012 Jim Ingham <jingham@apple.com> Rework how master plans declare themselves. Also make "PlanIsBasePlan" not rely only on this being the bottom plan in the stack, but allow the plan to declare itself as such.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
f4124deeb9532044a38c0774ced872f2709347da 21-Feb-2012 Greg Clayton <gclayton@apple.com> Thread hardening part 3. Now lldb_private::Thread objects have std::weak_ptr
objects for the backlink to the lldb_private::Process. The issues we were
running into before was someone was holding onto a shared pointer to a
lldb_private::Thread for too long, and the lldb_private::Process parent object
would get destroyed and the lldb_private::Thread had a "Process &m_process"
member which would just treat whatever memory that used to be a Process as a
valid Process. This was mostly happening for lldb_private::StackFrame objects
that had a member like "Thread &m_thread". So this completes the internal
strong/weak changes.

Documented the ExecutionContext and ExecutionContextRef classes so that our
LLDB developers can understand when and where to use ExecutionContext and
ExecutionContextRef objects.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
016ef8886cd429f8a53bff967e601f831e409eaa 22-Dec-2011 Jim Ingham <jingham@apple.com> Improve the x86_64 return value decoder to handle most structure returns.
Switch from GetReturnValue, which was hardly ever used, to GetReturnValueObject
which is much more convenient.
Return the "return value object" as a persistent variable if requested.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
ba560cc7d03c9f7d9df81e60201c5ec75cff5232 01-Nov-2011 Jim Ingham <jingham@apple.com> Enhanced the ObjC DynamicCheckerFunction to test for "object responds to selector" as well as
"object borked"... Also made the error when the checker fails reflect this fact rather than
report a crash at 0x0.

Also a little cleanup:
- StopInfoMachException had a redundant copy of the description string.
- ThreadPlanCallFunction had a redundant copy of the thread, and had a
copy of the process that it didn't really need.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
444e35b5fdf15a25a427285650f06f1390e62c75 19-Oct-2011 Greg Clayton <gclayton@apple.com> Moved lldb::user_id_t values to be 64 bit. This was going to be needed for
process IDs, and thread IDs, but was mainly needed for for the UserID's for
Types so that DWARF with debug map can work flawlessly. With DWARF in .o files
the type ID was the DIE offset in the DWARF for the .o file which is not
unique across all .o files, so now the SymbolFileDWARFDebugMap class will
make the .o file index part (the high 32 bits) of the unique type identifier
so it can uniquely identify the types.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
574c3d63822cc7fd52bf6f6a94b6882fec4c8ce9 13-Aug-2011 Jim Ingham <jingham@apple.com> Make ValueObject::SetValueFromCString work correctly.
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
b01760c1bc2b35c1e54cd4c95bda066023f361d8 11-Aug-2011 Greg Clayton <gclayton@apple.com> Fix the broken build that happened with my last checkin.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
5beb99d65c72cd4a4f7529c4ff8cc04a1a40769d 11-Aug-2011 Greg Clayton <gclayton@apple.com> Added the ability to remove orphaned module shared pointers from a ModuleList.
This is helping us track down some extra references to ModuleSP objects that
are causing things to get kept around for too long.

Added a module pointer accessor to target and change a lot of code to use
it where it would be more efficient.

"taret delete" can now specify "--clean=1" which will cleanup the global module
list for any orphaned module in the shared module cache which can save memory
and also help track down module reference leaks like we have now.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
9d56ba96d520710c55874132d44a64de1257d2fa 10-Aug-2011 Johnny Chen <johnny.chen@apple.com> Check log shared pointer before using it.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
4c3fb4b50a87e6e08987096d7edacc26545f58dc 19-Jul-2011 Enrico Granata <granata.enrico@gmail.com> The implementation of categories is now synchronization safe
Code cleanup:
- The Format Manager implementation is now split between two files: FormatClasses.{h|cpp} where the
actual formatter classes (ValueFormat, SummaryFormat, ...) are implemented and
FormatManager.{h|cpp} where the infrastructure classes (FormatNavigator, FormatManager, ...)
are contained. The wrapper code always remains in Debugger.{h|cpp}
- Several leftover fields, methods and comments from previous design choices have been removed
type category subcommands (enable, disable, delete) now can take a list of category names as input
- for type category enable, saying "enable A B C" is the same as saying
enable C
enable B
enable A
(the ordering is relevant in enabling categories, and it is expected that a user typing
enable A B C wants to look into category A, then into B, then into C and not the other
way round)
- for the other two commands, the order is not really relevant (however, the same inverted ordering
is used for consistency)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
abb53e5708c9d880441017a6d7d89172fc233e3e 03-Jun-2011 Peter Collingbourne <peter@pcc.me.uk> Fix some order-of-initialisation warnings

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
628cead3b4ae3d709d10389a3ab026e808dffa9b 19-May-2011 Greg Clayton <gclayton@apple.com> Fixed a crasher that was happened when a log shared pointer wasn't valid.

Fixed ThreadPlanCallFunction::ReportRegisterState(...) to only dump when
verbose logging is enabled and fixed the function to use the new
RegisterValue method of reading registers.

Fixed the GDB remote client to not send a continue packet after receiving
stdout or stderr from the inferior process.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
2370a97fe5bea6fa9d82f40bb34d37d3d3bda317 17-May-2011 Jim Ingham <jingham@apple.com> Fix the error message when an expression evaluation is interrupted by a crash/breakpoint hit to
give the reason for the interrupt. Also make sure it we don't want to unwind from the evaluation
we print something if it is interrupted.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
2f085c6ca2895663687dca704589478ff040b849 15-May-2011 Greg Clayton <gclayton@apple.com> Added the ability to get the return value from a ThreadPlanCallFunction
thread plan. In order to get the return value, you can call:

void
ThreadPlanCallFunction::RequestReturnValue (lldb::ValueSP &return_value_sp);

This registers a shared pointer to a return value that will get filled in if
everything goes well. After the thread plan is run the return value will be
extracted for you.

Added an ifdef to be able to switch between the LLVM MCJIT and the standand JIT.
We currently have the standard JIT selected because we have some work to do to
get the MCJIT fuctioning properly.

Added the ability to call functions with 6 argument in the x86_64 ABI.

Added the ability for GDBRemoteCommunicationClient to detect if the allocate
and deallocate memory packets are supported and to not call allocate memory
("_M") or deallocate ("_m") if we find they aren't supported.

Modified the ProcessGDBRemote::DoAllocateMemory(...) and ProcessGDBRemote::DoDeallocateMemory(...)
to be able to deal with the allocate and deallocate memory packets not being
supported. If they are not supported, ProcessGDBRemote will switch to calling
"mmap" and "munmap" to allocate and deallocate memory instead using our
trivial function call support.

Modified the "void ProcessGDBRemote::DidLaunchOrAttach()" to correctly ignore
the qHostInfo triple information if any was specified in the target. Currently
if the target only specifies an architecture when creating the target:

(lldb) target create --arch i386 a.out

Then the vendor, os and environemnt will be adopted by the target.

If the target was created with any triple that specifies more than the arch:

(lldb) target create --arch i386-unknown-unknown a.out

Then the target will maintain its triple and not adopt any new values. This
can be used to help force bare board debugging where the dynamic loader for
static files will get used and users can then use "target modules load ..."
to set addressses for any files that are desired.

Added back some convenience functions to the lldb_private::RegisterContext class
for writing registers with unsigned values. Also made all RegisterContext
constructors explicit to make sure we know when an integer is being converted
to a RegisterValue.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
989816b9505219cd67ce044d655c54ac86ecf64b 14-May-2011 Greg Clayton <gclayton@apple.com> Expand the ABI prepare trivial function call to allow 6 simple args.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
61d4f7adb6936a6d406dd5b20452d0843e538d76 12-May-2011 Greg Clayton <gclayton@apple.com> Cleaned up the ABI::PrepareTrivialCall() function to take three argument
pointers:

virtual bool
PrepareTrivialCall (Thread &thread,
lldb::addr_t sp,
lldb::addr_t functionAddress,
lldb::addr_t returnAddress,
lldb::addr_t *arg1_ptr,
lldb::addr_t *arg2_ptr,
lldb::addr_t *arg3_ptr) const = 0;

Prior to this it was:

virtual bool
PrepareTrivialCall (Thread &thread,
lldb::addr_t sp,
lldb::addr_t functionAddress,
lldb::addr_t returnAddress,
lldb::addr_t arg,
lldb::addr_t *this_arg,
lldb::addr_t *cmd_arg) const = 0;

This was because the function that called this slowly added more features to
be able to call a C++ member function that might have a "this" pointer, and
then later added "self + cmd" support for objective C. Cleaning this code up
and the code that calls it makes it easier to implement the functions for
new targets.

The MacOSX_arm::PrepareTrivialCall() is now filled in and ready for testing.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
75906e4ec98af3717e415727a8d663a4e246bb4f 11-May-2011 Greg Clayton <gclayton@apple.com> Moved all code from ArchDefaultUnwindPlan and ArchVolatileRegs into their
respective ABI plugins as they were plug-ins that supplied ABI specfic info.

Also hookep up the UnwindAssemblyInstEmulation so that it can generate the
unwind plans for ARM.

Changed the way ABI plug-ins are handed out when you get an instance from
the plug-in manager. They used to return pointers that would be mananged
individually by each client that requested them, but now they are handed out
as shared pointers since there is no state in the ABI objects, they can be
shared.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
0ddf806dd9e71637846bf0ad46e1b2df7d02cbce 10-May-2011 Sean Callanan <scallanan@apple.com> Fixed a bug in which expression-local variables were
treated as being permanently resident in target
memory. In fact, since the expression's stack frame
is deleted and potentially re-used after the
expression completes, the variables need to be treated
as being freeze-dried.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
2877594f4442cfc4d0ed2abd30af6b8027a84fc1 08-Mar-2011 Jim Ingham <jingham@apple.com> Add a method "GetEntryPoint" to the ObjectFile class, and implement it on MachO & ELF - though the ELF implementation is probably a little weak. Then use this method in place of directly looking for "start" in the ThreadPlanCallFunction constructor to find the stopping point for our function evaluation.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127194 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
78108e67d0f6e7a63ee7b0a98b45f283dfd0c42a 26-Jan-2011 Jim Ingham <jingham@apple.com> Make sure that if a CallFunction thread plan crashes while running in the "run to address" mode, and it
is an auto-discard thread plan, the plan stack unwinds properly.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
2f6267ff7af90c14fe08fd88bac6a63a02069033 22-Jan-2011 Jim Ingham <jingham@apple.com> Centralize the register reporting (might want to move this function to Thread).
Make sure DoTakedown gets called only once by adding a dedicated m_takedown_done bool.
Add a little more useful logging.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
15dcb7ca49b8d8f46910cf085b4c249aac5317fa 20-Jan-2011 Jim Ingham <jingham@apple.com> Back up both the register AND the stop state when calling functions.
Set the thread state to "bland" before calling functions so they don't
inherit the pending signals and die.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
6c9662e0e5840b557fcd4bd990620e106e4a18e2 18-Jan-2011 Jim Ingham <jingham@apple.com> In ThreadPlanCallFunction, do the Takedown right when the thread plan gets popped. When the function call is discarded (e.g. when it crashes and discard_on_error is true) the plan gets discarded. You need to make sure that the stack gets restored right then, and not wait till you start again and the thread plan stack is cleared.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
08d7d3ae16110aa68ed40c161eac8571aeb94cd9 06-Jan-2011 Greg Clayton <gclayton@apple.com> Fixed issues with RegisterContext classes and the subclasses. There was
an issue with the way the UnwindLLDB was handing out RegisterContexts: it
was making shared pointers to register contexts and then handing out just
the pointers (which would get put into shared pointers in the thread and
stack frame classes) and cause double free issues. MallocScribble helped to
find these issues after I did some other cleanup. To help avoid any
RegisterContext issue in the future, all code that deals with them now
returns shared pointers to the register contexts so we don't end up with
multiple deletions. Also now that the RegisterContext class doesn't require
a stack frame, we patched a memory leak where a StackFrame object was being
created and leaked.

Made the RegisterContext class not have a pointer to a StackFrame object as
one register context class can be used for N inlined stack frames so there is
not a 1 - 1 mapping. Updates the ExecutionContextScope part of the
RegisterContext class to never return a stack frame to indicate this when it
is asked to recreate the execution context. Now register contexts point to the
concrete frame using a concrete frame index. Concrete frames are all of the
frames that are actually formed on the stack of a thread. These concrete frames
can be turned into one or more user visible frames due to inlining. Each
inlined stack frame has the exact same register context (shared via shared
pointers) as any parent inlined stack frames all the way up to the concrete
frame itself.

So now the stack frames and the register contexts should behave much better.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
3aa7da5cb3327792415de44405e0896c6bdc305b 13-Dec-2010 Sean Callanan <scallanan@apple.com> Added support for generating expressions that have
access to the members of the Objective-C self object.

The approach we take is to generate the method as a
@category on top of the self object, and to pass the
"self" pointer to it. (_cmd is currently NULL.)

Most changes are in ClangExpressionDeclMap, but the
change that adds support to the ABIs to pass _cmd
touches a fair amount of code.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
48685687640e88515cd17b6fa613d13e180558d6 12-Nov-2010 Sean Callanan <scallanan@apple.com> Excised a version of the low-level function calling
logic that supported calling functions with arbitrary
arguments. We use ClangFunction for this, and the
low-level logic is only required to support one or two
pointer arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
745ac7a5826fe7c392007941a4046bfb1a8dff81 11-Nov-2010 Jim Ingham <jingham@apple.com> Add ThreadPlanTracer class to allow instruction step tracing of execution.
Also changed eSetVarTypeBool to eSetVarTypeBoolean to make it consistent with eArgTypeBoolean.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
6dff827fc7b73b0d1850a76b99f01448c4b98e50 08-Nov-2010 Sean Callanan <scallanan@apple.com> Added more logging so we see the register state
when a function starts and ends, and also the
disassembly for anything that is a client of
ClangExpressionParser after it has been JIT
compiled.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
e005f2ce03c489ebde9110678a29cbfe8488d5b4 06-Nov-2010 Greg Clayton <gclayton@apple.com> Modified all logging calls to hand out shared pointers to make sure we
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
14a97ff7ccb8d40fee3c6ff136a2c602819174dd 04-Nov-2010 Sean Callanan <scallanan@apple.com> Re-enabled LLDB's pointer checkers, and moved the
implementation of the Objective-C object checkers
into the Objective-C language runtime.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
29756d452be39535ded2cff50d9db4df46fe6400 03-Nov-2010 Sean Callanan <scallanan@apple.com> Factored the code that implements breakpoints on
exceptions for different languages out of
ThreadPlanCallFunction and put it into the
appropriate language runtimes.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
94fb5432f10882f8917acb7849abdba7c61277ac 03-Nov-2010 Sean Callanan <scallanan@apple.com> Modified ThreadPlanCallFunction to perform the
exception checks at the right time, and modified
ClangFunction so that it doesn't misinterpret the
stop as a timeout stop.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
07f3d8d674350e5efc7f762f18c82c8c6f2abb10 03-Nov-2010 Sean Callanan <scallanan@apple.com> Modified the thread plan that calls functions to
set breakpoints at the different locations where
an exception could be thrown, so that exceptions
thrown by expressions are properly caught.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
c2c6f7781b6721e73ccf5ed842d00906ae27f191 26-Oct-2010 Sean Callanan <scallanan@apple.com> Fixed a problem where function calls on i386 weren't
being generated correctly.

Also added a messy way to single-step through expressions
that I will improve soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
988ddbcdc1a7f362968a1e3bfcd7fda39e7345ee 26-Oct-2010 Jim Ingham <jingham@apple.com> The call function thread plan should allow internal breakpoints to continue on. Also made stopping
in mid-expression evaluation when we hit a breakpoint/signal work.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
1af4e79959e941568390b867fb14cfedc7d6919f 20-Oct-2010 Sean Callanan <scallanan@apple.com> Removed a bit of dead code. Thanks to Eric
Christopher for pointing it out.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
ba8547d98b305f7eec3fa24ddbe9a633ffe2f8f2 20-Oct-2010 Sean Callanan <scallanan@apple.com> Expressions now claim responsibility for all stops
that occur while they run. This means that they
clean up after themselves even when they crash.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
3c9c5eb466869ede185e879d14a47335fb43194d 21-Sep-2010 Sean Callanan <scallanan@apple.com> Removed the hacky "#define this ___clang_this" handler
for C++ classes. Replaced it with a less hacky approach:

- If an expression is defined in the context of a
method of class A, then that expression is wrapped as
___clang_class::___clang_expr(void*) { ... }
instead of ___clang_expr(void*) { ... }.

- ___clang_class is resolved as the type of the target
of the "this" pointer in the method the expression
is defined in.

- When reporting the type of ___clang_class, a method
with the signature ___clang_expr(void*) is added to
that class, so that Clang doesn't complain about a
method being defined without a corresponding
declaration.

- Whenever the expression gets called, "this" gets
looked up, type-checked, and then passed in as the
first argument.

This required the following changes:

- The ABIs were changed to support passing of the "this"
pointer as part of trivial calls.

- ThreadPlanCallFunction and ClangFunction were changed
to support passing of an optional "this" pointer.

- ClangUserExpression was extended to perform the
wrapping described above.

- ClangASTSource was changed to revert the changes
required by the hack.

- ClangExpressionParser, IRForTarget, and
ClangExpressionDeclMap were changed to handle
different manglings of ___clang_expr flexibly. This
meant no longer searching for a function called
___clang_expr, but rather looking for a function whose
name *contains* ___clang_expr.

- ClangExpressionParser and ClangExpressionDeclMap now
remember whether "this" is required, and know how to
look it up as necessary.

A few inheritance bugs remain, and I'm trying to resolve
these. But it is now possible to use "this" as well as
refer implicitly to member variables, when in the proper
context.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
eea264007bc5fb42c8f3239726a9d28ae42e1b7b 15-Sep-2010 Greg Clayton <gclayton@apple.com> Moved the section load list up into the target so we can use the target
to symbolicate things without the need for a valid process subclass.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
f5857a002d1e0c5fe29b8af9f9e2fe4fac0298d8 31-Jul-2010 Sean Callanan <scallanan@apple.com> Added support for rewriting objc_msgSend so we can
call Objective-C methods from expressions. Also added
some more logging to the function-calling thread plan
so that we can see the registers when a function
finishes.

Also documented things maybe a bit better.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
36a08102b10e39274b291e03a959016ff017694a 16-Jul-2010 Benjamin Kramer <benny.kra@googlemail.com> Fix constructor initialization order. Patch by Bill Lynch.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
5a47e8bcc7277dc3683f2af2aeb9717184e8360c 19-Jun-2010 Jim Ingham <jingham@apple.com> Two changes in this checkin. Added a ThreadPlanKind so that I can do some reasoning based on the kind of thread plan
without having to use RTTI.
Removed the ThreadPlanContinue and replaced with a ShouldAutoContinue query that serves the same purpose. Having to push
another plan to assert that if there's no other indication the target should continue when this plan is popped was flakey
and error prone. This method is more stable, and fixed problems we were having with thread specific breakpoints.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp
24943d2ee8bfaa7cf5893e4709143924157a5c1e 08-Jun-2010 Chris Lattner <sabre@nondot.org> Initial checkin of lldb code from internal Apple repo.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Target/ThreadPlanCallFunction.cpp