mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
77 lines
1.9 KiB
C
77 lines
1.9 KiB
C
/*
|
|
* This file was adapted from the solo5/ukvm code base, initial copyright block
|
|
* follows:
|
|
*/
|
|
|
|
/*
|
|
* Copyright (c) 2015-2017 Contributors as noted in the AUTHORS file
|
|
*
|
|
* This file is part of ukvm, a unikernel monitor.
|
|
*
|
|
* Permission to use, copy, modify, and/or distribute this software
|
|
* for any purpose with or without fee is hereby granted, provided
|
|
* that the above copyright notice and this permission notice appear
|
|
* in all copies.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
|
|
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
|
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
|
|
#ifndef UHYVE_GDB_X86_64_H
|
|
#define UHYVE_GDB_X86_64_H
|
|
|
|
#include <stdint.h>
|
|
#include <inttypes.h>
|
|
|
|
/*
|
|
* X86_64
|
|
* XXX: Can't find any gdb include file with the list of registers per
|
|
* architecture (something like ia64_regs.h). The closest I can get is a
|
|
* list of the registers from gdb (debugging an ordinary x86_64 binary):
|
|
*
|
|
* (gdb) info registers
|
|
* rax 0x0 0
|
|
* rbx 0x0 0
|
|
* rcx 0x0 0
|
|
* ...
|
|
* fs 0x0 0
|
|
* gs 0x0 0
|
|
* (gdb)
|
|
*/
|
|
|
|
struct uhyve_gdb_regs {
|
|
uint64_t rax;
|
|
uint64_t rbx;
|
|
uint64_t rcx;
|
|
uint64_t rdx;
|
|
uint64_t rsi;
|
|
uint64_t rdi;
|
|
uint64_t rbp;
|
|
uint64_t rsp;
|
|
uint64_t r8;
|
|
uint64_t r9;
|
|
uint64_t r10;
|
|
uint64_t r11;
|
|
uint64_t r12;
|
|
uint64_t r13;
|
|
uint64_t r14;
|
|
uint64_t r15;
|
|
uint64_t rip;
|
|
|
|
uint32_t eflags;
|
|
uint32_t cs;
|
|
uint32_t ss;
|
|
uint32_t ds;
|
|
uint32_t es;
|
|
uint32_t fs;
|
|
uint32_t gs;
|
|
uint8_t st[8][10];
|
|
};
|
|
|
|
#endif /* UHYVE_GDB_X86_64_H */
|