Verified Commit a08a1a73 authored by jD91mZM2's avatar jD91mZM2

Fix target-desc.xml

parent 098d1f16
......@@ -67,6 +67,11 @@ dependencies = [
"termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "f80"
version = "0.1.0"
source = "git+https://gitlab.redox-os.org/redox-os/f80.git?rev=d8de286#d8de286afe27934c6ac002153e1610f100853ef9"
[[package]]
name = "gdb-remote-protocol"
version = "0.1.0"
......@@ -85,7 +90,9 @@ dependencies = [
name = "gdbserver"
version = "0.1.0"
dependencies = [
"byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"f80 0.1.0 (git+https://gitlab.redox-os.org/redox-os/f80.git?rev=d8de286)",
"gdb-remote-protocol 0.1.0",
"libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -462,6 +469,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
"checksum clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129"
"checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
"checksum f80 0.1.0 (git+https://gitlab.redox-os.org/redox-os/f80.git?rev=d8de286)" = "<none>"
"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
"checksum hermit-abi 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "b9586eedd4ce6b3c498bc3b4dd92fc9f11166aa908a914071953768066c67909"
"checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
......
......@@ -10,6 +10,8 @@ structopt = "0.3.15"
memchr = "2.3.3"
env_logger = "0.7.1"
log = "0.4.8"
byteorder = "1.3.4"
f80 = { git = "https://gitlab.redox-os.org/redox-os/f80.git", rev = "d8de286" }
[target.'cfg(target_os = "linux")'.dependencies]
libc = "0.2.71"
......
......@@ -236,11 +236,7 @@ impl super::Target for Os {
registers.xmm13 = Some(float.xmm_space[13] as _);
registers.xmm14 = Some(float.xmm_space[14] as _);
registers.xmm15 = Some(float.xmm_space[15] as _);
registers.mxcsr = Some(float.mxcsr);
registers.fs_base = Some(int.fs_base as _);
registers.gs_base = Some(int.gs_base as _);
registers.orig_rax = Some(int.orig_rax as _);
Ok(registers)
}
......@@ -320,11 +316,7 @@ impl super::Target for Os {
.xmm15
.map(|r| r as _)
.unwrap_or(float.xmm_space[15]);
float.mxcsr = registers.mxcsr.unwrap_or(float.mxcsr);
int.fs_base = registers.fs_base.map(|r| r as _).unwrap_or(int.fs_base);
int.gs_base = registers.gs_base.map(|r| r as _).unwrap_or(int.gs_base);
int.orig_rax = registers.orig_rax.map(|r| r as _).unwrap_or(int.orig_rax);
unsafe {
e!(libc::ptrace(libc::PTRACE_SETREGS, self.pid, 0, &int));
......
......@@ -247,12 +247,7 @@ impl super::Target for Os {
registers.xmm13 = Some(float.xmm_space[13] as _);
registers.xmm14 = Some(float.xmm_space[14] as _);
registers.xmm15 = Some(float.xmm_space[15] as _);
registers.mxcsr = Some(float.mxcsr);
// registers.fs_base = Some(int.fs_base as _);
// registers.gs_base = Some(int.gs_base as _);
registers.orig_rax = Some(int.rax as _);
Ok(registers)
}
......@@ -331,11 +326,7 @@ impl super::Target for Os {
.xmm15
.map(|r| r as _)
.unwrap_or(float.xmm_space[15]);
float.mxcsr = registers.mxcsr.unwrap_or(float.mxcsr);
// int.fs_base = registers.fs_base.map(|r| r as _).unwrap_or(int.fs_base);
// int.gs_base = registers.gs_base.map(|r| r as _).unwrap_or(int.gs_base);
int.rax = registers.orig_rax.map(|r| r as _).unwrap_or(int.rax);
let mut tracer = self.tracer.borrow_mut();
e!(tracer.regs.set_int(&strace::IntRegisters(int)));
......
This diff is collapsed.
<?xml version="1.0"?>
<!DOCTYPE target SYSTEM "gdb-target.dtd">
<!-- See https://sourceware.org/gdb/onlinedocs/gdb/Target-Description-Format.html#Target-Description-Format -->
<!-- Also https://sourceware.org/gdb/onlinedocs/gdb/i386-Features.html#i386-Features -->
<target version="1.0">
<architecture>i386:x86-64</architecture>
<!-- Gotten from gnu-binutils/gdb/regformats/i386/amd64-linux.dat -->
<reg name="rax" bitsize="64" save-restore="no" type="int" group="general" />
<reg name="rax" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="rbx" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="rcx" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="rdx" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="rsi" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="rdi" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="rbp" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="rsp" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="r8" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="r9" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="r10" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="r11" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="r12" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="r13" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="r14" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="r15" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="rip" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="eflags" bitsize="32" save-restore="yes" type="int" group="general" />
<reg name="cs" bitsize="32" save-restore="yes" type="int" group="general" />
<reg name="ss" bitsize="32" save-restore="yes" type="int" group="general" />
<reg name="ds" bitsize="32" save-restore="yes" type="int" group="general" />
<reg name="es" bitsize="32" save-restore="yes" type="int" group="general" />
<reg name="fs" bitsize="32" save-restore="yes" type="int" group="general" />
<reg name="gs" bitsize="32" save-restore="yes" type="int" group="general" />
<reg name="st0" bitsize="80" save-restore="yes" type="float" group="general" />
<reg name="st1" bitsize="80" save-restore="yes" type="float" group="general" />
<reg name="st2" bitsize="80" save-restore="yes" type="float" group="general" />
<reg name="st3" bitsize="80" save-restore="yes" type="float" group="general" />
<reg name="st4" bitsize="80" save-restore="yes" type="float" group="general" />
<reg name="st5" bitsize="80" save-restore="yes" type="float" group="general" />
<reg name="st6" bitsize="80" save-restore="yes" type="float" group="general" />
<reg name="st7" bitsize="80" save-restore="yes" type="float" group="general" />
<reg name="fctrl" bitsize="32" save-restore="yes" type="float" group="general" />
<reg name="fstat" bitsize="32" save-restore="yes" type="float" group="general" />
<reg name="ftag" bitsize="32" save-restore="yes" type="float" group="general" />
<reg name="fiseg" bitsize="32" save-restore="yes" type="float" group="general" />
<reg name="fioff" bitsize="32" save-restore="yes" type="float" group="general" />
<reg name="foseg" bitsize="32" save-restore="yes" type="float" group="general" />
<reg name="fooff" bitsize="32" save-restore="yes" type="float" group="general" />
<reg name="fop" bitsize="32" save-restore="yes" type="float" group="general" />
<reg name="xmm0" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="xmm1" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="xmm2" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="xmm3" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="xmm4" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="xmm5" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="xmm6" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="xmm7" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="xmm8" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="xmm9" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="xmm10" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="xmm11" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="xmm12" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="xmm13" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="xmm14" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="xmm15" bitsize="128" save-restore="yes" type="float" group="general" />
<reg name="mxcsr" bitsize="32" save-restore="yes" type="float" group="general" />
<reg name="orig_rax" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="fs_base" bitsize="64" save-restore="yes" type="int" group="general" />
<reg name="gs_base" bitsize="64" save-restore="yes" type="int" group="general" />
<feature name="org.gnu.gdb.i386.core">
<reg name="rax" bitsize="64" group="general" />
<reg name="rbx" bitsize="64" group="general" />
<reg name="rcx" bitsize="64" group="general" />
<reg name="rdx" bitsize="64" group="general" />
<reg name="rsi" bitsize="64" group="general" />
<reg name="rdi" bitsize="64" group="general" />
<reg name="rbp" bitsize="64" group="general" />
<reg name="rsp" bitsize="64" group="general" />
<reg name="r8" bitsize="64" group="general" />
<reg name="r9" bitsize="64" group="general" />
<reg name="r10" bitsize="64" group="general" />
<reg name="r11" bitsize="64" group="general" />
<reg name="r12" bitsize="64" group="general" />
<reg name="r13" bitsize="64" group="general" />
<reg name="r14" bitsize="64" group="general" />
<reg name="r15" bitsize="64" group="general" />
<reg name="rip" bitsize="64" group="general" />
<reg name="eflags" bitsize="32" group="general" />
<reg name="cs" bitsize="32" group="general" />
<reg name="ss" bitsize="32" group="general" />
<reg name="ds" bitsize="32" group="general" />
<reg name="es" bitsize="32" group="general" />
<reg name="fs" bitsize="32" group="general" />
<reg name="gs" bitsize="32" group="general" />
<reg name="st0" bitsize="80" type="float" group="float" />
<reg name="st1" bitsize="80" type="float" group="float" />
<reg name="st2" bitsize="80" type="float" group="float" />
<reg name="st3" bitsize="80" type="float" group="float" />
<reg name="st4" bitsize="80" type="float" group="float" />
<reg name="st5" bitsize="80" type="float" group="float" />
<reg name="st6" bitsize="80" type="float" group="float" />
<reg name="st7" bitsize="80" type="float" group="float" />
<reg name="fctrl" bitsize="32" type="float" group="float" />
<reg name="fstat" bitsize="32" type="float" group="float" />
<reg name="ftag" bitsize="32" type="float" group="float" />
<reg name="fiseg" bitsize="32" type="float" group="float" />
<reg name="fioff" bitsize="32" type="float" group="float" />
<reg name="foseg" bitsize="32" type="float" group="float" />
<reg name="fooff" bitsize="32" type="float" group="float" />
<reg name="fop" bitsize="32" type="float" group="float" />
</feature>
<feature name="org.gnu.gdb.i386.sse">
<reg name="xmm0" bitsize="128" type="float" group="float" />
<reg name="xmm1" bitsize="128" type="float" group="float" />
<reg name="xmm2" bitsize="128" type="float" group="float" />
<reg name="xmm3" bitsize="128" type="float" group="float" />
<reg name="xmm4" bitsize="128" type="float" group="float" />
<reg name="xmm5" bitsize="128" type="float" group="float" />
<reg name="xmm6" bitsize="128" type="float" group="float" />
<reg name="xmm7" bitsize="128" type="float" group="float" />
<reg name="xmm8" bitsize="128" type="float" group="float" />
<reg name="xmm9" bitsize="128" type="float" group="float" />
<reg name="xmm10" bitsize="128" type="float" group="float" />
<reg name="xmm11" bitsize="128" type="float" group="float" />
<reg name="xmm12" bitsize="128" type="float" group="float" />
<reg name="xmm13" bitsize="128" type="float" group="float" />
<reg name="xmm14" bitsize="128" type="float" group="float" />
<reg name="xmm15" bitsize="128" type="float" group="float" />
<reg name="mxcsr" bitsize="32" type="float" group="float" />
</feature>
</target>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment