diff options
author | Elliott Hughes <enh@google.com> | 2013-11-14 21:50:56 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-11-14 21:50:56 -0800 |
commit | bf8e9342daa8b148e6d94d98122c9bc2a429b04f (patch) | |
tree | 943d9eb2b70db1fd5dcf9f786ce03ab924bcfb25 | |
parent | d97a34af49f6beafc21d5f459ea62b499544f9f3 (diff) | |
parent | 3fa14a53e70cd55df031646fe3735a6fde37deb8 (diff) | |
download | system_core-bf8e9342daa8b148e6d94d98122c9bc2a429b04f.zip system_core-bf8e9342daa8b148e6d94d98122c9bc2a429b04f.tar.gz system_core-bf8e9342daa8b148e6d94d98122c9bc2a429b04f.tar.bz2 |
am 3fa14a53: Merge "Remove x86 debuggerd dependencies on non-uapi headers and corkscrew."
* commit '3fa14a53e70cd55df031646fe3735a6fde37deb8':
Remove x86 debuggerd dependencies on non-uapi headers and corkscrew.
-rw-r--r-- | debuggerd/x86/machine.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/debuggerd/x86/machine.c b/debuggerd/x86/machine.c index e00208d..db44b11 100644 --- a/debuggerd/x86/machine.c +++ b/debuggerd/x86/machine.c @@ -1,5 +1,4 @@ -/* system/debuggerd/debuggerd.c -** +/* ** Copyright 2006, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,10 +23,6 @@ #include <sys/types.h> #include <sys/ptrace.h> -#include <corkscrew/ptrace.h> - -#include <linux/user.h> - #include "../utility.h" #include "../machine.h" @@ -35,20 +30,17 @@ void dump_memory_and_code(log_t* log, pid_t tid, int scope_flags) { } void dump_registers(log_t* log, pid_t tid, int scope_flags) { - struct pt_regs_x86 r; - if(ptrace(PTRACE_GETREGS, tid, 0, &r)) { + struct pt_regs r; + if (ptrace(PTRACE_GETREGS, tid, 0, &r) == -1) { _LOG(log, scope_flags, "cannot get registers: %s\n", strerror(errno)); return; } - //if there is no stack, no print just like arm - if(!r.ebp) - return; - _LOG(log, scope_flags, " eax %08x ebx %08x ecx %08x edx %08x\n", + _LOG(log, scope_flags, " eax %08lx ebx %08lx ecx %08lx edx %08lx\n", r.eax, r.ebx, r.ecx, r.edx); - _LOG(log, scope_flags, " esi %08x edi %08x\n", + _LOG(log, scope_flags, " esi %08lx edi %08lx\n", r.esi, r.edi); _LOG(log, scope_flags, " xcs %08x xds %08x xes %08x xfs %08x xss %08x\n", r.xcs, r.xds, r.xes, r.xfs, r.xss); - _LOG(log, scope_flags, " eip %08x ebp %08x esp %08x flags %08x\n", + _LOG(log, scope_flags, " eip %08lx ebp %08lx esp %08lx flags %08lx\n", r.eip, r.ebp, r.esp, r.eflags); } |