From 18ddd420925fa7e61dd7775af6f024589556f779 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 14 Nov 2013 17:06:46 -0800 Subject: Remove x86 debuggerd dependencies on non-uapi headers and corkscrew. Also remove a hack that claims to be "just like ARM", but which was different from the ARM and MIPS behavior. Change-Id: I9b16da9a56430998ded27d304ce52c7cc8bfedfc --- debuggerd/x86/machine.c | 20 ++++++-------------- 1 file 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 #include -#include - -#include - #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); } -- cgit v1.1