summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibDebug/Dwarf/Expression.h
blob: f37738308989b46d3199e11c63cd055d243cdec4 (plain)
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
/*
 * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include "AK/ByteBuffer.h"
#include "AK/Types.h"

struct PtraceRegisters;

namespace Debug::Dwarf::Expression {

enum class Type {
    None,
    UnsignedIntetger,
    Register,
};

struct Value {
    Type type;
    union {
        u32 as_u32;
    } data { 0 };
};

enum class Operations : u8 {
    RegEbp = 0x75,
    FbReg = 0x91,
};

Value evaluate(ReadonlyBytes, const PtraceRegisters&);

}