From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92940 invoked by alias); 15 Apr 2016 11:59:49 -0000 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 Received: (qmail 92927 invoked by uid 89); 15 Apr 2016 11:59:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:687 X-HELO: mail-pf0-f173.google.com Received: from mail-pf0-f173.google.com (HELO mail-pf0-f173.google.com) (209.85.192.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 15 Apr 2016 11:59:38 +0000 Received: by mail-pf0-f173.google.com with SMTP id n1so56441925pfn.2 for ; Fri, 15 Apr 2016 04:59:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=otvte7I2CPWKNpPo1RYy8DeboCN3HC87JG8XwZfFR64=; b=YVtRJqaoSV/nCqwXRGGYC3OwadCDBRr17ujJAaVaaApZGrpCNcY24W/DHzUYraDIRH uJNZ7RfPJdvvd+u3AllHsz+VbGFfVWBJcL2FQZyXtCFDA+qZplXQUJ/OQNXehDJaBisl e9W/YMGPRKBwRpKDjkn/nfuC9IEMBMQ/yjnTL1P15z8Pzw5iEEybsShVLWL875xI9kWl jkkl+BGC3I7SdxYKlZyLPrFwxT2Zo1Mp43N0A8VAv0InINGWkYo/728RmgPOwNGyKGhz jbw3adTndDmrLzGvngoy6MvL8rFEqlfnznKHeu7yNd5Td54y0h9QH+1cTGdvUEdMQ2MV dK2g== X-Gm-Message-State: AOPr4FX14IEWtAxAzeFU4hDtG/CwpEEiMg1P6LgLyH1uAHmaXmp1k8uxxH6JxYO3OZ7o2g== X-Received: by 10.98.14.2 with SMTP id w2mr28788297pfi.35.1460721576326; Fri, 15 Apr 2016 04:59:36 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id z13sm64429891pfi.5.2016.04.15.04.59.33 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 15 Apr 2016 04:59:35 -0700 (PDT) From: Yao Qi To: Luis Machado Cc: Yao Qi , , Kevin Buettner , Subject: Re: [PATCH 0/8] Break at each iteration for breakpoints placed on a while statement References: <20150818235334.1afb0c85@pinnacle.lan> <86zit9nzac.fsf@gmail.com> <570FC5BB.6060103@codesourcery.com> Date: Fri, 15 Apr 2016 11:59:00 -0000 In-Reply-To: <570FC5BB.6060103@codesourcery.com> (Luis Machado's message of "Thu, 14 Apr 2016 11:30:51 -0500") Message-ID: <86zisvkrqg.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00348.txt.bz2 Luis Machado writes: > Thinking about the series, isn't this problem related to the compiler > optimizing things and/or presenting an imprecise addr/line information > as opposed to GDB doing the wrong thing. I think the address/line information is correct, and compiler does nothing wrong in this case. The first instruction of for loop is=20 branch/jmp, which is correctly mapped to the right line. GDB should insert breakpoint at the place which can be hit in every iteration of loop on that line, rather than the first instruction of the loop (or line). --=20 Yao (=E9=BD=90=E5=B0=A7)