From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 894 invoked by alias); 29 Apr 2004 16:24:23 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 886 invoked from network); 29 Apr 2004 16:24:22 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.77.109) by sources.redhat.com with SMTP; 29 Apr 2004 16:24:22 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i3TGO7Xp000339; Thu, 29 Apr 2004 18:24:07 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i3TGO7YB003465; Thu, 29 Apr 2004 18:24:07 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id i3TGO7PP003462; Thu, 29 Apr 2004 18:24:07 +0200 (CEST) Date: Thu, 29 Apr 2004 16:24:00 -0000 Message-Id: <200404291624.i3TGO7PP003462@elgar.kettenis.dyndns.org> From: Mark Kettenis To: guitton@act-europe.fr CC: gdb-patches@sources.redhat.com In-reply-to: <20040427163725.GA7319@act-europe.fr> (message from Jerome Guitton on Tue, 27 Apr 2004 18:37:25 +0200) Subject: Re: [RFA] x86 - jump instruction after the prologue References: <20040419173249.GA22201@act-europe.fr> <20040427163725.GA7319@act-europe.fr> X-SW-Source: 2004-04/txt/msg00681.txt.bz2 Date: Tue, 27 Apr 2004 18:37:25 +0200 From: Jerome Guitton Ping? Still waiting for approval... Sorry about that. I've reviewed your patch. I've tweaked the comment a bit and checked in the attached. Thanks, Mark Index: ChangeLog from Jerome Guitton Mark Kettenis * i386-tdep.c (i386_skip_prologue): follow the last jump only if the function begins with a branch instruction. Index: i386-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/i386-tdep.c,v retrieving revision 1.188 diff -u -p -r1.188 i386-tdep.c --- i386-tdep.c 29 Apr 2004 16:13:21 -0000 1.188 +++ i386-tdep.c 29 Apr 2004 16:20:47 -0000 @@ -750,7 +750,13 @@ i386_skip_prologue (CORE_ADDR start_pc) } } - return i386_follow_jump (pc); + /* If the function starts with a branch (to startup code at the end) + the last instruction should bring us back to the first + instruction of the real code. */ + if (i386_follow_jump (start_pc) != start_pc) + pc = i386_follow_jump (pc); + + return pc; } /* This function is 64-bit safe. */