From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3365 invoked by alias); 7 Oct 2005 12:56:02 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 3282 invoked by uid 22791); 7 Oct 2005 12:55:58 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 07 Oct 2005 12:55:58 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1ENrlU-0004wq-0B; Fri, 07 Oct 2005 08:55:56 -0400 Date: Fri, 07 Oct 2005 12:56:00 -0000 From: Daniel Jacobowitz To: #HE XUZHOU# Cc: gdb@sources.redhat.com Subject: Re: Problem on JTAG debug for ARM920T when mmu/cache is turned on Message-ID: <20051007125555.GA19002@nevyn.them.org> Mail-Followup-To: #HE XUZHOU# , gdb@sources.redhat.com References: <052033A55521254893A4E2041957E1D0013393C3@mail03.student.main.ntu.edu.sg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <052033A55521254893A4E2041957E1D0013393C3@mail03.student.main.ntu.edu.sg> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-10/txt/msg00040.txt.bz2 On Fri, Oct 07, 2005 at 01:26:02PM +0800, #HE XUZHOU# wrote: > I am writing a program for JTAG debug. My target board is ARM920T. I found a single stepping problem when the MMU/CACHE is turn on. If the cache is turn on, single stepping doesn't work. If the cache is turn off, single stepping then works well.I guess this is casued by data/instruction cache. So, I am wandering what I should handle the MMU/CACHE when ARM920T enters debug state with mmu/cache is turned on? I have TWO questions and hope I can get some suggestions here. Thank you! > > 1. Should I turn off the MMU after ARM920T enter debug state and turn > it on before ARM920T is restarted? 2. Should I turn off the cache > after ARM920T enter debug state and turn it on before ARM920T is > restarted? Or just flush the cahce? This depends on your target and debug stub; it is a problem with your stub. You probably want to flush the cache when writing to memory, which includes for single step breakpoints. -- Daniel Jacobowitz CodeSourcery, LLC