From 08f2fdac375616edbdd04a0e66524d516ddf496b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 3 Feb 2008 18:04:25 +0000 Subject: [PATCH] * "call" now sets some useful debugger variables, like _argX for all arguments, and _frame for the stack frame. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23849 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/x86/arch_debug.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/system/kernel/arch/x86/arch_debug.cpp b/src/system/kernel/arch/x86/arch_debug.cpp index 41e0269e66..e5463dc7e2 100644 --- a/src/system/kernel/arch/x86/arch_debug.cpp +++ b/src/system/kernel/arch/x86/arch_debug.cpp @@ -9,6 +9,7 @@ #include +#include #include #include @@ -376,10 +377,17 @@ print_call(struct thread *thread, addr_t eip, addr_t ebp, addr_t nextEbp, kprintf("%#lx", *arg); if (*arg > -0x10000 && *arg < 0x10000) kprintf(" (%ld)", *arg); + + char name[8]; + snprintf(name, sizeof(name), "_arg%ld", i + 1); + set_debug_variable(name, *(uint32 *)arg); + arg++; } kprintf(")\n"); + + set_debug_variable("_frame", nextEbp); }