Skip to content

Commit

Permalink
[PATCH] uml: fix debug output on x86_64
Browse files Browse the repository at this point in the history
The debug-stub patch was broken on x86_64 because it thinks the frame size
there is 168 words.  In reality, it is 168 bytes, and using HOST_FRAME_SIZE,
which is expressed in consistent units across architectures, fixes this.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
cfd-36 authored and Linus Torvalds committed Jan 12, 2006
1 parent a174b30 commit 621009f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/um/kernel/skas/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ void wait_stub_done(int pid, int sig, char * fname)

if((n < 0) || !WIFSTOPPED(status) ||
(WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){
unsigned long regs[FRAME_SIZE];
unsigned long regs[HOST_FRAME_SIZE];
if(ptrace(PTRACE_GETREGS, pid, 0, regs) < 0)
printk("Failed to get registers from stub, "
"errno = %d\n", errno);
else {
int i;

printk("Stub registers -\n");
for(i = 0; i < FRAME_SIZE; i++)
for(i = 0; i < HOST_FRAME_SIZE; i++)
printk("\t%d - %lx\n", i, regs[i]);
}
panic("%s : failed to wait for SIGUSR1/SIGTRAP, "
Expand Down

0 comments on commit 621009f

Please sign in to comment.