OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 #ifndef DEBUGGER_NACL_GDB_SERVER_GDB_REGISTERS_H_ | |
5 #define DEBUGGER_NACL_GDB_SERVER_GDB_REGISTERS_H_ | |
6 #include <sys/ptrace.h> | |
7 #include <sys/types.h> | |
8 #include <sys/user.h> | |
9 | |
10 #include "debugger/base/debug_blob.h" | |
11 | |
12 namespace rsp { | |
13 /// Converts from GDB RSP packet registers to linux thread user_regs_struct. | |
14 /// @param[in] gdb_regs blob with packed registers in GDB RSP format | |
15 /// @param[out] ct destination for the registers | |
16 void GdbRegistersToCONTEXT(const debug::Blob& gdb_regs, user_regs_struct* ct); | |
17 | |
18 /// Converts from linux thread user_regs_struct to GDB RSP packet registers. | |
19 /// @param[in] ct thread CONTEXT structure filled with registers content | |
20 /// @param[out] gdb_regs destination for the registers | |
21 void CONTEXTToGdbRegisters(const user_regs_struct& ct, debug::Blob* gdb_regs); | |
22 } // namespace rsp | |
23 | |
24 #endif // DEBUGGER_NACL_GDB_SERVER_GDB_REGISTERS_H_ | |
25 | |
OLD | NEW |