aboutsummaryrefslogtreecommitdiff
path: root/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp
blob: b95a51130ca79d86792839dfa67c8829cf62aefb (plain) (blame)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//===-- RegisterContextCorePOSIX_mips64.cpp ---------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/RegisterValue.h"
#include "lldb/Target/Thread.h"
#include "RegisterContextPOSIX.h"
#include "RegisterContextPOSIXCore_mips64.h"

using namespace lldb_private;

RegisterContextCorePOSIX_mips64::RegisterContextCorePOSIX_mips64(Thread &thread,
                                                                 RegisterInfoInterface *register_info,
                                                                 const DataExtractor &gpregset,
                                                                 const DataExtractor &fpregset)
    : RegisterContextPOSIX_mips64(thread, 0, register_info)
{
    size_t i;
    lldb::offset_t offset = 0;

    for (i = 0; i < k_num_gpr_registers_mips64; i++)
    {
        m_reg[i] = gpregset.GetU64(&offset);
    }
}

RegisterContextCorePOSIX_mips64::~RegisterContextCorePOSIX_mips64()
{
}

bool
RegisterContextCorePOSIX_mips64::ReadGPR()
{
    return true;
}

bool
RegisterContextCorePOSIX_mips64::ReadFPR()
{
    return false;
}

bool
RegisterContextCorePOSIX_mips64::WriteGPR()
{
    assert(0);
    return false;
}

bool
RegisterContextCorePOSIX_mips64::WriteFPR()
{
    assert(0);
    return false;
}

bool
RegisterContextCorePOSIX_mips64::ReadRegister(const RegisterInfo *reg_info, RegisterValue &value)
{
    int reg_num = reg_info->byte_offset / 8;
    assert(reg_num < k_num_gpr_registers_mips64);
    value = m_reg[reg_num];
    return true;
}

bool
RegisterContextCorePOSIX_mips64::ReadAllRegisterValues(lldb::DataBufferSP &data_sp)
{
    return false;
}

bool
RegisterContextCorePOSIX_mips64::WriteRegister(const RegisterInfo *reg_info, const RegisterValue &value)
{
    return false;
}

bool
RegisterContextCorePOSIX_mips64::WriteAllRegisterValues(const lldb::DataBufferSP &data_sp)
{
    return false;
}

bool
RegisterContextCorePOSIX_mips64::HardwareSingleStep(bool enable)
{
    return false;
}