From 7716aef138e8029357a7b3dc6a73b41f4de4b0ad Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Tue, 2 Apr 2013 14:00:27 -0700 Subject: Uploaded native crash dumps do not include memory contents Also fixed the LOG() macro to actually write to the log again, tracking the change in _LOG() argument semantics. Bug 8322568 Change-Id: I79330c85c26d3ffb734315b6d0f2c0bb80bd234a --- debuggerd/x86/machine.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'debuggerd/x86') diff --git a/debuggerd/x86/machine.c b/debuggerd/x86/machine.c index 01da5fe..af79092 100644 --- a/debuggerd/x86/machine.c +++ b/debuggerd/x86/machine.c @@ -38,21 +38,21 @@ void dump_memory_and_code(const ptrace_context_t* context __attribute((unused)), void dump_registers(const ptrace_context_t* context __attribute((unused)), log_t* log, pid_t tid, bool at_fault) { struct pt_regs_x86 r; - bool only_in_tombstone = !at_fault; + int scopeFlags = (at_fault ? SCOPE_AT_FAULT : 0); if(ptrace(PTRACE_GETREGS, tid, 0, &r)) { - _LOG(log, only_in_tombstone, "cannot get registers: %s\n", strerror(errno)); + _LOG(log, scopeFlags, "cannot get registers: %s\n", strerror(errno)); return; } //if there is no stack, no print just like arm if(!r.ebp) return; - _LOG(log, only_in_tombstone, " eax %08x ebx %08x ecx %08x edx %08x\n", + _LOG(log, scopeFlags, " eax %08x ebx %08x ecx %08x edx %08x\n", r.eax, r.ebx, r.ecx, r.edx); - _LOG(log, only_in_tombstone, " esi %08x edi %08x\n", + _LOG(log, scopeFlags, " esi %08x edi %08x\n", r.esi, r.edi); - _LOG(log, only_in_tombstone, " xcs %08x xds %08x xes %08x xfs %08x xss %08x\n", + _LOG(log, scopeFlags, " xcs %08x xds %08x xes %08x xfs %08x xss %08x\n", r.xcs, r.xds, r.xes, r.xfs, r.xss); - _LOG(log, only_in_tombstone, " eip %08x ebp %08x esp %08x flags %08x\n", + _LOG(log, scopeFlags, " eip %08x ebp %08x esp %08x flags %08x\n", r.eip, r.ebp, r.esp, r.eflags); } -- cgit v1.1