forked from bloomberg/pystack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpycode.h
More file actions
47 lines (40 loc) · 976 Bytes
/
pycode.h
File metadata and controls
47 lines (40 loc) · 976 Bytes
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
#pragma once
#define _PYSTACK_PY_CODE_H
#include <memory>
#include <string>
#include <vector>
#include "mem.h"
#include "process.h"
#include "version.h"
namespace pystack {
struct LocationInfo
{
int lineno;
int end_lineno;
int column;
int end_column;
};
class CodeObject
{
public:
// Constructors
CodeObject(
const std::shared_ptr<const AbstractProcessManager>& manager,
remote_addr_t addr,
uintptr_t lastli);
CodeObject(std::string filename, std::string scope, LocationInfo location_info);
// Getters
std::string Filename() const;
std::string Scope() const;
const LocationInfo& Location() const;
int NArguments() const;
const std::vector<std::string>& Varnames() const;
private:
// Data members
std::string d_filename;
std::string d_scope;
LocationInfo d_location_info;
int d_narguments;
std::vector<std::string> d_varnames;
};
} // namespace pystack