blob: 409cf8c46b030fb1bfeeb07944b18fbe48929487 [file] [log] [blame]
Johnny Chen9ed5b492012-01-05 21:48:15 +00001//===-- POSIXStopInfo.cpp ---------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "POSIXStopInfo.h"
11
12using namespace lldb;
13using namespace lldb_private;
14
15
16//===----------------------------------------------------------------------===//
17// POSIXLimboStopInfo
18
19POSIXLimboStopInfo::~POSIXLimboStopInfo() { }
20
21lldb::StopReason
22POSIXLimboStopInfo::GetStopReason() const
23{
Andrew Kaylorf85defa2012-12-20 23:08:03 +000024 return lldb::eStopReasonThreadExiting;
Johnny Chen9ed5b492012-01-05 21:48:15 +000025}
26
27const char *
28POSIXLimboStopInfo::GetDescription()
29{
30 return "thread exiting";
31}
32
33bool
34POSIXLimboStopInfo::ShouldStop(Event *event_ptr)
35{
Andrew Kaylorf85defa2012-12-20 23:08:03 +000036 return false;
Johnny Chen9ed5b492012-01-05 21:48:15 +000037}
38
39bool
40POSIXLimboStopInfo::ShouldNotify(Event *event_ptr)
41{
Andrew Kaylorf85defa2012-12-20 23:08:03 +000042 return false;
Johnny Chen9ed5b492012-01-05 21:48:15 +000043}
44
45//===----------------------------------------------------------------------===//
46// POSIXCrashStopInfo
47
Ed Mastefe5a6422015-07-28 15:45:57 +000048POSIXCrashStopInfo::POSIXCrashStopInfo(FreeBSDThread &thread,
Chaoren Lin28e57422015-02-03 01:51:25 +000049 uint32_t status,
50 CrashReason reason,
51 lldb::addr_t fault_addr)
52 : POSIXStopInfo(thread, status)
53{
54 m_description = ::GetCrashReasonString(reason, fault_addr);
55}
56
Johnny Chen9ed5b492012-01-05 21:48:15 +000057POSIXCrashStopInfo::~POSIXCrashStopInfo() { }
58
59lldb::StopReason
60POSIXCrashStopInfo::GetStopReason() const
61{
62 return lldb::eStopReasonException;
63}
64
Matt Kopec650648f2013-01-08 16:30:18 +000065//===----------------------------------------------------------------------===//
66// POSIXNewThreadStopInfo
67
68POSIXNewThreadStopInfo::~POSIXNewThreadStopInfo() { }
69
70lldb::StopReason
71POSIXNewThreadStopInfo::GetStopReason() const
72{
73 return lldb::eStopReasonNone;
74}
75
76const char *
77POSIXNewThreadStopInfo::GetDescription()
78{
79 return "thread spawned";
80}
81
82bool
83POSIXNewThreadStopInfo::ShouldStop(Event *event_ptr)
84{
85 return false;
86}
87
88bool
89POSIXNewThreadStopInfo::ShouldNotify(Event *event_ptr)
90{
91 return false;
92}