From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15954 invoked by alias); 7 Sep 2012 13:44:14 -0000 Received: (qmail 15943 invoked by uid 22791); 7 Sep 2012 13:44:13 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TW_XF X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 07 Sep 2012 13:44:00 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1T9yql-0002YG-QN from Luis_Gustavo@mentor.com ; Fri, 07 Sep 2012 06:43:59 -0700 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 7 Sep 2012 06:43:59 -0700 Received: from [0.0.0.0] ([172.16.63.104]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 7 Sep 2012 06:43:58 -0700 Message-ID: <5049FA17.1000605@mentor.com> Date: Fri, 07 Sep 2012 13:44:00 -0000 From: Luis Gustavo Reply-To: "Gustavo, Luis" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Lightning/1.0b2 Thunderbird/3.1.20 MIME-Version: 1.0 To: Stefan Puiu CC: gdb@sourceware.org Subject: Re: how to see DAR (data access register) on ppc using gdb 7.0.1 on Linux? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2012-09/txt/msg00012.txt.bz2 On 09/07/2012 10:26 AM, Stefan Puiu wrote: > Hi, > > I'm trying to debug a crash on our embedded Linux platform using: > > # gdb --version > > warning: Can not parse XML syscalls information; XML support was > disabled at compile time. > GNU gdb (GDB) 7.0.1 > Copyright (C) 2009 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "powerpc-750-linux-gnu". > > I was trying to see the PPC registers after a crash: > > (gdb) info registers > r0 0x1034875e 271877982 > r1 0x7fffed30 2147478832 > r2 0xfd7f7a0 265811872 > [...] > pc 0xf18d718 0xf18d718 > msr 0xd032 53298 > cr 0x80000848 2147485768 > lr 0xf18d6f8 0xf18d6f8 > ctr 0xf235d90 253975952 > xer 0x20000000 536870912 > orig_r3 0x26 38 > trap 0x300 768 > > I noticed that the DAR (data access register) is not present here - > I'm trying to see the memory address whose access caused the crash. I > only see the trap register, which confirms that there was an invalid > memory access, but that's it as far as I can tell. > > I know the contents of the DAR are printed in case of kernel crashes > (in oops dumps), is there a way to view the register from gdb? 'info > register dar' doesn't work... > > Thanks in advance, > Stefan. > Such a register is not made visible to GDB by the kernel, so you won't be able to see it through GDB. Luis