From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25603 invoked by alias); 4 Mar 2014 04:02:10 -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 25590 invoked by uid 89); 4 Mar 2014 04:02:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Mar 2014 04:02:08 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1WKgYO-0007BF-KO from Yao_Qi@mentor.com ; Mon, 03 Mar 2014 20:02:04 -0800 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 3 Mar 2014 20:02:04 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Mon, 3 Mar 2014 20:01:25 -0800 Message-ID: <53154FB1.4020107@codesourcery.com> Date: Tue, 04 Mar 2014 04:02:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Pedro Alves CC: Subject: Re: [PATCH 1/6] PR gdb/16575: stale breakpoint instructions in the code cache References: <1393360363-5603-1-git-send-email-palves@redhat.com> <1393360363-5603-2-git-send-email-palves@redhat.com> In-Reply-To: <1393360363-5603-2-git-send-email-palves@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00059.txt.bz2 On 02/26/2014 04:32 AM, Pedro Alves wrote: > The dcache works at the raw memory level. We need to update it > whenever memory is written, no matter what kind of target memory > object was originally passed down by the caller. The issue is that > the dcache update code isn't reached when a caller explicitly writes > raw memory. Breakpoint insertion/removal is one such case -- > mem-break.c uses target_write_read_memory/target_write_raw_memory. > > The fix is to move the dcache update code from memory_xfer_partial_1 > to raw_memory_xfer_partial so that it's always reachable. I went through this patch, and it looks right to me. When I wrote code cache code, I remember that there may be something about the interaction between breakpoint and code cache, but I forgot to dig it deeper. Thanks for fixing it. -- Yao (齐尧)