From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5128 invoked by alias); 19 May 2009 12:37:08 -0000 Received: (qmail 5119 invoked by uid 22791); 19 May 2009 12:37:07 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-fx0-f162.google.com (HELO mail-fx0-f162.google.com) (209.85.220.162) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 May 2009 12:36:53 +0000 Received: by fxm6 with SMTP id 6so4433704fxm.24 for ; Tue, 19 May 2009 05:36:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.117.1 with SMTP id o1mr7338faq.53.1242736610799; Tue, 19 May 2009 05:36:50 -0700 (PDT) Date: Tue, 19 May 2009 12:37:00 -0000 Message-ID: <8502af3c0905190536m326f1de9n6d3da92eb659bd42@mail.gmail.com> Subject: scan_prologue/next, misunderstanding From: Florent DEFAY To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00130.txt.bz2 Hi, I am still working on a new GDB port. I got inspiration from avr-tdep.c. I still have problems with 'next'. I set a 'printf' in the function skip_prologue and I can tell it is never used. I read the function avr_scan_prologue and avr_frame_unwind_cache. It seems like avr_frame_unwind_cache should be called by GDB after the prologue has been executed. I think that because once avr_scan_prologue has been processed, there is: _________________________________________________________________________ /* The SP was moved to the FP. This indicates that a new frame was created. Get THIS frame's FP value by unwinding it from the next frame. */ this_base = get_frame_register_unsigned (this_frame, AVR_FP_REGNUM); high_base = get_frame_register_unsigned (this_frame, AVR_FP_REGNUM+1); this_base += (high_base << 8); _________________________________________________________________________ I think this_base would not have the right value if it was processed before the end of execution of the prologue. But I set 'printf' in these functions and in my case they are used at each 'step'. Moreover, I think these functions are necessary to find the end of the prologue, so the end of the prologue cannot be known inside. Please set me straight about that. Regards. Florent