From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16897 invoked by alias); 10 Dec 2007 18:54:19 -0000 Received: (qmail 16888 invoked by uid 22791); 10 Dec 2007 18:54:18 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 10 Dec 2007 18:54:14 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.1/8.14.0) with ESMTP id lBAIs9uJ024836; Mon, 10 Dec 2007 19:54:09 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1/Submit) id lBAIs91J031646; Mon, 10 Dec 2007 19:54:09 +0100 (CET) Date: Tue, 11 Dec 2007 10:44:00 -0000 Message-Id: <200712101854.lBAIs91J031646@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: muller@ics.u-strasbg.fr CC: gdb-patches@sourceware.org In-reply-to: <000001c83b4a$573b4560$05b1d020$@u-strasbg.fr> (muller@ics.u-strasbg.fr) Subject: Re: [RFC] Enhance backtrace for microsoft system DLL calls References: <000001c83b4a$573b4560$05b1d020$@u-strasbg.fr> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00158.txt.bz2 > From: "Pierre Muller" > Date: Mon, 10 Dec 2007 17:33:05 +0100 > > The main question is whether this patch is acceptable > for gdb as it is in a i386 common file, while > it most probably only applies to MS operating system. I have no problem with adding this to the generic i386, but I'd prefer to put this code in a seperate function called i386_skip_nops(CORE_ADDR pc); And call that function from i386_analyze_prologue(), instead of adding this code to i386_analyze_frame_setup(). > Pierre Muller > > ChangeLog entry: > > 2007-12-10 Pierre Muller > > * i386-tdep.c (i386_analyze_frame_setup): Ignore `mov %edi,%edi' > instruction > used at entry of some operating system calls. > > > > > Index: gdb/i386-tdep.c > =================================================================== > RCS file: /cvs/src/src/gdb/i386-tdep.c,v > retrieving revision 1.246 > diff -u -p -r1.246 i386-tdep.c > --- gdb/i386-tdep.c 6 Dec 2007 16:32:59 -0000 1.246 > +++ gdb/i386-tdep.c 10 Dec 2007 16:22:21 -0000 > @@ -650,6 +650,17 @@ i386_analyze_frame_setup (CORE_ADDR pc, > > read_memory_nobpt (pc, &op, 1); > > + if (op == 0x8b) /* Ignore no-op instruction `mov %edi, %edi' */ > + { > + read_memory_nobpt (pc + 1, &op, 1); > + if (op == 0xff) > + { > + pc += 2; > + read_memory_nobpt (pc, &op, 1); > + } > + else > + op = 0x8b; > + } > if (op == 0x55) /* pushl %ebp */ > { > /* Take into account that we've executed the `pushl %ebp' that > > >