From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25938 invoked by alias); 29 Nov 2007 12:35:49 -0000 Received: (qmail 25930 invoked by uid 22791); 29 Nov 2007 12:35:49 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 29 Nov 2007 12:35:44 +0000 Received: (qmail 32243 invoked from network); 29 Nov 2007 12:35:41 -0000 Received: from unknown (HELO wind.local) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 29 Nov 2007 12:35:41 -0000 From: Vladimir Prus To: Joel Brobecker Subject: Re: Questionable breakpoint stepping code Date: Thu, 29 Nov 2007 12:35:00 -0000 User-Agent: KMail/1.9.6 Cc: Michael Snyder , gdb@sources.redhat.com References: <20071127135405.GA3820@caradoc.them.org> <20071127193243.GB3620@adacore.com> In-Reply-To: <20071127193243.GB3620@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200711291535.36950.vladimir@codesourcery.com> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00272.txt.bz2 On Tuesday 27 November 2007 22:32:43 Joel Brobecker wrote: > > I would recommend asking someone with access to HP-UX (I think Mark > > Kettenis and Joel both do) to test the patch. I don't think the error > > will trigger... > > I have been away for a week and I still a bit overwhelmed by my email > backlog that caused me to miss the patch. But if Volodya sends me the > patch again, I'll give it a whirl. Thanks Joel! Here's the patch. - Volodya * infrun.c (handle_inferior_event): If we failed to remove breakpoints, error, don't try to increment PC by hand. --- gdb/infrun.c | 19 +------------------ 1 files changed, 1 insertions(+), 18 deletions(-) diff --git a/gdb/infrun.c b/gdb/infrun.c index ad1de6b..b92d0de 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1745,24 +1745,7 @@ handle_inferior_event (struct execution_control_state *ecs) process until the child exits (well, okay, not then either :-) or execs. */ if (remove_status != 0) - { - /* FIXME! This is obviously non-portable! */ - write_pc_pid (stop_pc + 4, ecs->ptid); - /* We need to restart all the threads now, - * unles we're running in scheduler-locked mode. - * Use currently_stepping to determine whether to - * step or continue. - */ - /* FIXME MVS: is there any reason not to call resume()? */ - if (scheduler_mode == schedlock_on) - target_resume (ecs->ptid, - currently_stepping (ecs), TARGET_SIGNAL_0); - else - target_resume (RESUME_ALL, - currently_stepping (ecs), TARGET_SIGNAL_0); - prepare_to_wait (ecs); - return; - } + error (_("Cannot step over breakpoint hit in wrong thread")); else { /* Single step */ if (!ptid_equal (inferior_ptid, ecs->ptid)) -- 1.5.3.5