2010-11-05 02:30:59 +08:00
|
|
|
//===-- AppleObjCRuntime.h ----------------------------------------*- C++ -*-===//
|
2010-09-23 10:01:19 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2010-11-05 02:30:59 +08:00
|
|
|
#ifndef liblldb_AppleObjCRuntime_h_
|
|
|
|
#define liblldb_AppleObjCRuntime_h_
|
2010-09-23 10:01:19 +08:00
|
|
|
|
|
|
|
// C Includes
|
|
|
|
// C++ Includes
|
|
|
|
// Other libraries and framework includes
|
|
|
|
// Project includes
|
|
|
|
#include "lldb/lldb-private.h"
|
|
|
|
#include "lldb/Target/LanguageRuntime.h"
|
|
|
|
#include "lldb/Target/ObjCLanguageRuntime.h"
|
2010-09-28 09:25:32 +08:00
|
|
|
#include "lldb/Core/ValueObject.h"
|
|
|
|
#include "AppleObjCTrampolineHandler.h"
|
|
|
|
#include "AppleThreadPlanStepThroughObjCTrampoline.h"
|
2010-09-23 10:01:19 +08:00
|
|
|
|
|
|
|
namespace lldb_private {
|
|
|
|
|
2010-11-05 02:30:59 +08:00
|
|
|
class AppleObjCRuntime :
|
2010-09-28 09:25:32 +08:00
|
|
|
public lldb_private::ObjCLanguageRuntime
|
|
|
|
{
|
|
|
|
public:
|
2010-11-05 02:30:59 +08:00
|
|
|
|
|
|
|
~AppleObjCRuntime() { }
|
2010-09-28 09:25:32 +08:00
|
|
|
|
|
|
|
// These are generic runtime functions:
|
2010-09-30 08:54:27 +08:00
|
|
|
virtual bool
|
|
|
|
GetObjectDescription (Stream &str, Value &value, ExecutionContextScope *exe_scope);
|
|
|
|
|
2010-09-28 09:25:32 +08:00
|
|
|
virtual bool
|
2011-04-01 07:01:21 +08:00
|
|
|
GetObjectDescription (Stream &str, ValueObject &object);
|
2010-09-28 09:25:32 +08:00
|
|
|
|
|
|
|
virtual lldb::ValueObjectSP
|
2011-04-01 07:01:21 +08:00
|
|
|
GetDynamicValue (lldb::ValueObjectSP in_value);
|
2010-09-28 09:25:32 +08:00
|
|
|
|
|
|
|
// These are the ObjC specific functions.
|
2010-11-05 02:30:59 +08:00
|
|
|
|
2010-09-28 09:25:32 +08:00
|
|
|
virtual bool
|
|
|
|
IsModuleObjCLibrary (const lldb::ModuleSP &module_sp);
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
ReadObjCLibrary (const lldb::ModuleSP &module_sp);
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
HasReadObjCLibrary ()
|
2010-09-23 10:01:19 +08:00
|
|
|
{
|
2010-09-28 09:25:32 +08:00
|
|
|
return m_read_objc_library;
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual lldb::ThreadPlanSP
|
|
|
|
GetStepThroughTrampolinePlan (Thread &thread, bool stop_others);
|
|
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
// Static Functions
|
|
|
|
//------------------------------------------------------------------
|
2010-11-05 02:30:59 +08:00
|
|
|
// Note there is no CreateInstance, Initialize & Terminate functions here, because
|
|
|
|
// you can't make an instance of this generic runtime.
|
2010-09-28 09:25:32 +08:00
|
|
|
|
2010-11-05 02:30:59 +08:00
|
|
|
protected:
|
|
|
|
static bool
|
|
|
|
AppleIsModuleObjCLibrary (const lldb::ModuleSP &module_sp);
|
|
|
|
|
2011-03-25 05:19:54 +08:00
|
|
|
static enum ObjCRuntimeVersions
|
2010-11-05 08:57:06 +08:00
|
|
|
GetObjCVersion (Process *process, ModuleSP &objc_module_sp);
|
2010-11-05 02:30:59 +08:00
|
|
|
|
2010-09-28 09:25:32 +08:00
|
|
|
//------------------------------------------------------------------
|
|
|
|
// PluginInterface protocol
|
|
|
|
//------------------------------------------------------------------
|
2010-11-05 02:30:59 +08:00
|
|
|
public:
|
2011-03-09 06:40:15 +08:00
|
|
|
|
2010-11-04 06:19:38 +08:00
|
|
|
virtual void
|
|
|
|
ClearExceptionBreakpoints ();
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
ExceptionBreakpointsExplainStop (lldb::StopInfoSP stop_reason);
|
2010-09-28 09:25:32 +08:00
|
|
|
protected:
|
|
|
|
Address *
|
|
|
|
GetPrintForDebuggerAddr();
|
|
|
|
|
|
|
|
std::auto_ptr<Address> m_PrintForDebugger_addr;
|
|
|
|
bool m_read_objc_library;
|
|
|
|
std::auto_ptr<lldb_private::AppleObjCTrampolineHandler> m_objc_trampoline_handler_ap;
|
2010-11-04 06:19:38 +08:00
|
|
|
lldb::BreakpointSP m_objc_exception_bp_sp;
|
2010-09-28 09:25:32 +08:00
|
|
|
|
2010-11-05 02:30:59 +08:00
|
|
|
AppleObjCRuntime(Process *process) :
|
2010-09-28 09:25:32 +08:00
|
|
|
lldb_private::ObjCLanguageRuntime(process),
|
|
|
|
m_read_objc_library (false),
|
|
|
|
m_objc_trampoline_handler_ap(NULL)
|
|
|
|
{ } // Call CreateInstance instead.
|
|
|
|
};
|
2010-09-23 10:01:19 +08:00
|
|
|
|
|
|
|
} // namespace lldb_private
|
|
|
|
|
2010-11-05 02:30:59 +08:00
|
|
|
#endif // liblldb_AppleObjCRuntime_h_
|