LLDB mainline
ExceptionRecord.h
Go to the documentation of this file.
1//===-- ExceptionRecord.h ---------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef liblldb_Plugins_Process_Windows_ExceptionRecord_H_
10#define liblldb_Plugins_Process_Windows_ExceptionRecord_H_
11
12#include "lldb/lldb-forward.h"
13#include "lldb/lldb-types.h"
14#include "llvm/ADT/ArrayRef.h"
15#include "llvm/Support/raw_ostream.h"
16
17#include <memory>
18#include <vector>
19
20struct _EXCEPTION_RECORD;
21typedef struct _EXCEPTION_RECORD EXCEPTION_RECORD;
22
23struct _MINIDUMP_EXCEPTION;
24typedef struct _MINIDUMP_EXCEPTION MINIDUMP_EXCEPTION;
25
26namespace lldb_private {
27
28// ExceptionRecord
29//
30// ExceptionRecord defines an interface which allows implementors to receive
31// notification of events that happen in a debugged process.
33public:
34 ExceptionRecord(const EXCEPTION_RECORD &record, lldb::tid_t thread_id);
35
36 // MINIDUMP_EXCEPTIONs are almost identical to EXCEPTION_RECORDs.
37 ExceptionRecord(const MINIDUMP_EXCEPTION &record, lldb::tid_t thread_id);
38
39 virtual ~ExceptionRecord() = default;
40
41 unsigned long GetExceptionValue() const { return m_code; }
42 bool IsContinuable() const { return m_continuable; }
44
46
47 llvm::ArrayRef<uint64_t> GetExceptionArguments() const { return m_arguments; }
48
49 void Dump(llvm::raw_ostream &stream) const;
50
51private:
52 unsigned long m_code;
56 std::vector<uint64_t> m_arguments;
57};
58}
59
60#endif
struct _EXCEPTION_RECORD EXCEPTION_RECORD
struct _MINIDUMP_EXCEPTION MINIDUMP_EXCEPTION
lldb::tid_t GetThreadID() const
void Dump(llvm::raw_ostream &stream) const
ExceptionRecord(const EXCEPTION_RECORD &record, lldb::tid_t thread_id)
std::vector< uint64_t > m_arguments
unsigned long GetExceptionValue() const
llvm::ArrayRef< uint64_t > GetExceptionArguments() const
virtual ~ExceptionRecord()=default
lldb::addr_t GetExceptionAddress() const
A class that represents a running process on the host machine.
uint64_t addr_t
Definition lldb-types.h:80
uint64_t tid_t
Definition lldb-types.h:84