From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17736 invoked by alias); 22 Nov 2007 00:49:40 -0000 Received: (qmail 17728 invoked by uid 22791); 22 Nov 2007 00:49:40 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate6.de.ibm.com (HELO mtagate6.de.ibm.com) (195.212.29.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 22 Nov 2007 00:49:26 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate6.de.ibm.com (8.13.8/8.13.8) with ESMTP id lAM0nNJ1144476 for ; Thu, 22 Nov 2007 00:49:23 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id lAM0nMjs2580528 for ; Thu, 22 Nov 2007 01:49:22 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id lAM0nMc1005077 for ; Thu, 22 Nov 2007 01:49:22 +0100 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id lAM0nMuF005074; Thu, 22 Nov 2007 01:49:22 +0100 Message-Id: <200711220049.lAM0nMuF005074@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Thu, 22 Nov 2007 01:49:22 +0100 Subject: Re: [RFA] Stop infrun from tracking breakpoint insertion status. To: vladimir@codesourcery.com (Vladimir Prus) Date: Thu, 22 Nov 2007 00:49:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sources.redhat.com In-Reply-To: <200711202348.45105.vladimir@codesourcery.com> from "Vladimir Prus" at Nov 20, 2007 11:48:44 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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-11/txt/msg00404.txt.bz2 Vladimir Prus wrote: > The use of breakpoints_meant_to_be_inserted in handle_inferiour_event, > for the TARGET_WAITKIND_LOADED, did not matter because > TARGET_WAITKIND_LOADED is used by just a few targets. > And even if remote.c can use it, it does not do when > using gdbserver, which makes it hard to test. Hmmm, if it helps, I could run a test on AIX, which does use TARGET_WAITKIND_LOADED. In any case, at this point breakpoints *must* be inserted -- the very next thing the code does is to call resume (0, TARGET_SIGNAL_0); so if breakpoints were not inserted, we'd just run the inferior to completion now. So I think the check is not necessary, and we should simply unconditionally insert breakpoints at this point. > The reason that use in keep_going does not break anything is that > the intention of the code is to insert breakpoints, unless either > they are already inserted, or ecs->another_trap is non-zero. However, > insert_bp_location will immediately return if breakpoint location > is already inserted. Therefore, the "already inserted" check is > not necessary at all, and I removed it. OK, agreed. > As for the use in insert_step_resume_breakpoint_at_sal, I must admit > I've got lost in the code again -- I don't know how previous version > of the patch did not cause any problems. I think this is because calls to insert_step_resume_breakpoint_at_sal are always followed by calls to keep_going -- and due to the behaviour you described above, with your old patch keep_going would always insert the step-resume breakpoint anyway. In fact, I think with the change to keep_going to always insert all breakpoints there is no need for insert_step_resume_breakpoint_at_sal to call insert_breakpoints at all anymore. This should probably best be removed. If I've counted correctly, with the changes I've described we've completely eliminated the need for breakpoints_meant_to_be_inserted. Would you mind updating your patch accordingly? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com