Ticket #6139: 0001-Implement-arch_debug_get_caller.2.patch

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

proposed patch

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

    From 3207375f531855363031e3de0fe5b9f1d84fed11 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 1/2] 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..d5d9458 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()->previous;
     283    return (void *)frame->previous->return_address;
    284284}
    285285
    286286