Ticket #6139: 0001-Implement-arch_debug_get_caller.patch

File 0001-Implement-arch_debug_get_caller.patch, 860 bytes (added by andreasf, 14 years ago)

proposed patch

  • src/system/kernel/arch/ppc/arch_debug.cpp

    From 0ea3d9ff06aacc88d7bb6f98c82dd598cf373d34 Mon Sep 17 00:00:00 2001
    From: Andreas Faerber <andreas.faerber@web.de>
    Date: Sat, 5 Jun 2010 21:34:32 +0200
    Subject: [PATCH] Implement arch_debug_get_caller
    
    ---
     src/system/kernel/arch/ppc/arch_debug.cpp |    4 ++--
     1 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/system/kernel/arch/ppc/arch_debug.cpp b/src/system/kernel/arch/ppc/arch_debug.cpp
    index f62ac29..2c0eab7 100644
    a b arch_debug_contains_call(struct thread *thread, const char *symbol,  
    279279void *
    280280arch_debug_get_caller(void)
    281281{
    282     // TODO: implement me
    283     return (void *)&arch_debug_get_caller;
     282    struct stack_frame *frame = get_current_stack_frame();
     283    return (void *)frame->previous->return_address;
    284284}
    285285
    286286