From 9ed5b49c45ba377cffbc5d0d893b5437f50228af Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Thu, 5 Jan 2012 21:48:15 +0000 Subject: Fix incomplete commit of http://llvm.org/viewvc/llvm-project?rev=147609&view=rev: This patch combines common code from Linux and FreeBSD into a new POSIX platform. It also contains fixes for 64bit FreeBSD. The patch is based on changes by Mark Peek and "K. Macy" in their github repo located at https://github.com/fbsd/lldb. llvm-svn: 147613 --- .../source/Plugins/Process/POSIX/POSIXStopInfo.cpp | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 lldb/source/Plugins/Process/POSIX/POSIXStopInfo.cpp (limited to 'lldb/source/Plugins/Process/POSIX/POSIXStopInfo.cpp') diff --git a/lldb/source/Plugins/Process/POSIX/POSIXStopInfo.cpp b/lldb/source/Plugins/Process/POSIX/POSIXStopInfo.cpp new file mode 100644 index 00000000000..79f0a58115b --- /dev/null +++ b/lldb/source/Plugins/Process/POSIX/POSIXStopInfo.cpp @@ -0,0 +1,60 @@ +//===-- POSIXStopInfo.cpp ---------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "POSIXStopInfo.h" + +using namespace lldb; +using namespace lldb_private; + + +//===----------------------------------------------------------------------===// +// POSIXLimboStopInfo + +POSIXLimboStopInfo::~POSIXLimboStopInfo() { } + +lldb::StopReason +POSIXLimboStopInfo::GetStopReason() const +{ + return lldb::eStopReasonTrace; +} + +const char * +POSIXLimboStopInfo::GetDescription() +{ + return "thread exiting"; +} + +bool +POSIXLimboStopInfo::ShouldStop(Event *event_ptr) +{ + return true; +} + +bool +POSIXLimboStopInfo::ShouldNotify(Event *event_ptr) +{ + return true; +} + +//===----------------------------------------------------------------------===// +// POSIXCrashStopInfo + +POSIXCrashStopInfo::~POSIXCrashStopInfo() { } + +lldb::StopReason +POSIXCrashStopInfo::GetStopReason() const +{ + return lldb::eStopReasonException; +} + +const char * +POSIXCrashStopInfo::GetDescription() +{ + return ProcessMessage::GetCrashReasonString(m_crash_reason); +} -- cgit v1.2.3