From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60918 invoked by alias); 27 Jul 2016 21:41:52 -0000 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 Received: (qmail 60905 invoked by uid 89); 27 Jul 2016 21:41:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=U*gdb, gdbsourcewareorg, sk:gdbsou, gdb@sourceware.org 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 27 Jul 2016 21:41:41 +0000 Received: from svr-orw-fem-05.mgc.mentorg.com ([147.34.97.43]) by relay1.mentorg.com with esmtp id 1bSWaB-0006fi-VZ from Don_Breazeal@mentor.com ; Wed, 27 Jul 2016 14:41:39 -0700 Received: from NA-MBX-02.mgc.mentorg.com ([169.254.2.153]) by SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) with mapi id 14.03.0224.002; Wed, 27 Jul 2016 14:41:39 -0700 From: "Breazeal, Don" To: Alexandru-Adrian Oltean , "gdb@sourceware.org" Subject: RE: hbreak reads memory Date: Wed, 27 Jul 2016 21:41:00 -0000 Message-ID: References: In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2016-07/txt/msg00035.txt.bz2 Adrian, I think this is due to some function prologue analysis. You might try sett= ing the breakpoint on an address, e.g. instead of 'hbreak foo' use 'hbreak = *foo'. The breakpoint should then be on the address of the entry point to = the function and the memory accesses may be reduced or eliminated. You might also try 'set trust-readonly-sections' and/or set mem inaccessibl= e-by-default. Those may or may not help. --Don > -----Original Message----- > From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On > Behalf Of Alexandru-Adrian Oltean > Sent: Tuesday, July 26, 2016 11:29 PM > To: gdb@sourceware.org > Subject: hbreak reads memory >=20 > Hi everyone, >=20 > I noticed that setting a hardware break using hbreak will trigger a > memory access at the address where the breakpoint is supposed to be > installed. Can someone explain why is that memory access needed? I'm > thinking that we might be in a situation where that memory area is not > yet initialized/accessible (maybe MMU not configured yet) and the > access corrupts the debugged target. >=20 > Thanks, > Adrian