From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22658 invoked by alias); 15 Oct 2004 17:50:07 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 22618 invoked from network); 15 Oct 2004 17:50:04 -0000 Received: from unknown (HELO walton.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org with SMTP; 15 Oct 2004 17:50:04 -0000 Received: from elgar.sibelius.xs4all.nl (elgar.sibelius.xs4all.nl [192.168.0.2]) by walton.sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id i9FHnxdH028527; Fri, 15 Oct 2004 19:49:59 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (localhost [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6) with ESMTP id i9FHnxZO000756; Fri, 15 Oct 2004 19:49:59 +0200 (CEST) (envelope-from kettenis@elgar.sibelius.xs4all.nl) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6/Submit) id i9FHnwnD000753; Fri, 15 Oct 2004 19:49:58 +0200 (CEST) Date: Fri, 15 Oct 2004 18:42:00 -0000 Message-Id: <200410151749.i9FHnwnD000753@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: ashishm@linsyssoft.com CC: gdb@sources.redhat.com In-reply-to: <416FC732.2020609@linsyssoft.com> (message from ashish mittal on Fri, 15 Oct 2004 18:18:50 +0530) Subject: Re: Possible improvement to i386 function prologue analysis. References: <416FC732.2020609@linsyssoft.com> X-SW-Source: 2004-10/txt/msg00330.txt.bz2 Date: Fri, 15 Oct 2004 18:18:50 +0530 From: ashish mittal Hi, 0807a380 : 807a380: 55 push %ebp 807a381: 31 c0 xor %eax,%eax 807a383: 89 e5 mov %esp,%ebp 807a385: 57 push %edi 807a386: 31 d2 xor %edx,%edx 807a388: 31 c9 xor %ecx,%ecx 807a38a: 56 push %esi 807a38b: 53 push %ebx 807a38c: 81 ec 4c 01 00 00 sub $0x14c,%esp In the above instance, the function "i386_analyze_register_saves()", which takes care of populating the frame cache, will fail after reading the first register %edi. Hi Ashish, Thanks for your mail. I agree with you analysis. There's even a KFAILing test in the testsuite for a very similar problem. Please suggest if it would be worthwhile to work on a similar check for special instructions within the for loop in i386_analyze_register_saves(). This will enable it to continue reading saved registers over such occurances. It's not as important as getting the stack frame setup right (which is why the code in i386_analyze_frame_setup is there), but it would certainly be nice to have it. There a slight complication though. The prologue analyzing stuff is also used for implementing i386_skip_prologue(). Now i386_skip_prologue() shouldn't dwell too far into the function. Skipping the instructions we're talking about here might just do that. I could work on a possible patch if you agree. That'd be great. Mark