From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7383 invoked by alias); 1 May 2006 16:36:38 -0000 Received: (qmail 7374 invoked by uid 22791); 1 May 2006 16:36:38 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 01 May 2006 16:36:35 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k41GaRFc016214; Mon, 1 May 2006 18:36:27 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6) with ESMTP id k41GaRCn011147; Mon, 1 May 2006 18:36:27 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6/Submit) id k41GaO8I027381; Mon, 1 May 2006 18:36:24 +0200 (CEST) Date: Mon, 01 May 2006 16:36:00 -0000 Message-Id: <200605011636.k41GaO8I027381@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: gdb-patches@sources.redhat.com In-reply-to: <20060428171154.GP17613@adacore.com> (message from Joel Brobecker on Fri, 28 Apr 2006 10:11:54 -0700) Subject: Re: [RFC/RFA/i386] pb reading insns if breakpoints still inserted References: <20060428171154.GP17613@adacore.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00003.txt.bz2 > Date: Fri, 28 Apr 2006 10:11:54 -0700 > From: Joel Brobecker > > Hello, > > following a discussion that started in: > > http://sources.redhat.com/ml/gdb-patches/2006-04/msg00345.html > > Here is a patch that fixes the problem. In summary: When we do next/step > operations, we end up parsing the top frame function prologue and > creating a frame_info with it. Unfortunately, at that point, the > breakpoints are still inserted and that causes the prologue analyzer > to misinterpret the function prologue and consequently breaks unwinding > a bit. > > The fix that has been suggested is to fix the i386 prologue analyzer > to handle inserted breakpoints. This is what the new read_insn() > function does. I've always been very bad with names, so suggestions > are more than welcome. Hmm, I'm not entirely happy with the name, and I agree with jimb that using current_frame here doesn't make sense. I was planning to look into getting rid of the prologue skipper, but that isn't really going to solve the problems. After another day of thinking I came to the conclusion that jimb is probably right about the premature deprecation of memory_read_nobpt. If we undeprecate it, you wouldn't really need your new read_insn function, since it really would be the same as memory_read_nobpt. What do the other (global) maintainers think? Mark > 2006-04-28 Joel Brobecker > > * i386-tdep.c (read_insn): New function. > (i386_follow_jump): Use read_insn to read instructions. > (i386_analyze_struct_return): Likewise. > (i386_skip_probe): Likewise. > (i386_match_insn): Likewise. > (i386_analyze_frame_setup): Likewise. > (i386_analyze_register_saves): Likewise. > (i386_skip_prologue): Likewise.