-
-
Notifications
You must be signed in to change notification settings - Fork 338
/
DebugReportGenerator.h
63 lines (48 loc) · 1.49 KB
/
DebugReportGenerator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
* Copyright 2012, Rene Gollent, rene@gollent.com.
* Distributed under the terms of the MIT License.
*/
#ifndef DEBUG_REPORT_GENERATOR_H
#define DEBUG_GENERATOR_H
#include <Looper.h>
#include "Team.h"
class entry_ref;
class Architecture;
class BString;
class StackFrame;
class Team;
class Thread;
class Value;
class ValueNode;
class ValueNodeChild;
class ValueNodeManager;
class DebugReportGenerator : public BLooper, public Team::Listener {
public:
DebugReportGenerator(::Team* team);
~DebugReportGenerator();
status_t Init();
static DebugReportGenerator* Create(::Team* team);
virtual void MessageReceived(BMessage* message);
virtual void ThreadStackTraceChanged(
const Team::ThreadEvent& event);
private:
status_t _GenerateReport(const entry_ref& outputPath);
status_t _GenerateReportHeader(BString& output);
status_t _DumpLoadedImages(BString& output);
status_t _DumpRunningThreads(BString& output);
status_t _DumpDebuggedThreadInfo(BString& output,
::Thread* thread);
status_t _DumpValueNode(BString& output,
StackFrame* frame, ValueNodeChild* child,
bool recurse = true);
status_t _ResolveLocationIfNeeded(ValueNodeChild* child,
StackFrame* frame);
status_t _ResolveValueIfNeeded(ValueNode* node,
StackFrame* frame);
private:
::Team* fTeam;
Architecture* fArchitecture;
sem_id fTeamDataSem;
ValueNodeManager* fNodeManager;
};
#endif // DEBUG_REPORT_GENERATOR_H