From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28160 invoked by alias); 18 Mar 2010 15:40:34 -0000 Received: (qmail 28152 invoked by uid 22791); 18 Mar 2010 15:40:33 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 18 Mar 2010 15:40:29 +0000 Received: from hpaq7.eem.corp.google.com (hpaq7.eem.corp.google.com [10.3.21.7]) by smtp-out.google.com with ESMTP id o2IFeQA3012682 for ; Thu, 18 Mar 2010 08:40:26 -0700 Received: from wwf26 (wwf26.prod.google.com [10.241.242.90]) by hpaq7.eem.corp.google.com with ESMTP id o2IFePKd025750 for ; Thu, 18 Mar 2010 16:40:25 +0100 Received: by wwf26 with SMTP id 26so237803wwf.15 for ; Thu, 18 Mar 2010 08:40:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.85.2 with SMTP id t2mr1475786wee.172.1268926825000; Thu, 18 Mar 2010 08:40:25 -0700 (PDT) In-Reply-To: <20100318133334.GA7732@caradoc.them.org> References: <11611.203.63.255.139.1268879984.squirrel@webmail5.pair.com> <20100318133334.GA7732@caradoc.them.org> Date: Thu, 18 Mar 2010 15:40:00 -0000 Message-ID: Subject: Re: Getting pissed off by gdb. Please help with stepping in. From: Doug Evans To: temp@sourceboost.com, gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes 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: 2010-03/txt/msg00135.txt.bz2 On Thu, Mar 18, 2010 at 6:33 AM, Daniel Jacobowitz w= rote: > here's the previous block: > > =A0if ((stop_pc =3D=3D stop_pc_sal.pc) > =A0 =A0 =A0&& (ecs->event_thread->current_line !=3D stop_pc_sal.line > =A0 =A0 =A0 =A0 =A0|| ecs->event_thread->current_symtab !=3D stop_pc_sal.= symtab)) > =A0 =A0{ > =A0 =A0 =A0/* We are at the start of a different line. =A0So stop. =A0Not= e that > =A0 =A0 =A0 =A0 we don't stop if we step into the middle of a different l= ine. > =A0 =A0 =A0 =A0 That is said to make things like for (;;) statements work > =A0 =A0 =A0 =A0 better. =A0*/ > > IOW, if we are at a line boundary, we stop stepping. =A0If we've ended > up in the middle of a line, we keep going. =A0This prevents us from > ending up in a weird state where we show the line containing the > function call, but the function has already been called. =A0I think it'd > be even more confusing. > > This is a difference between stepping out of a function and finishing. I realize one can *have* that difference. However, I've rarely (if ever) *wanted* that difference. But that's just *my* preference, YMMV :-).