From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18755 invoked by alias); 13 Nov 2013 10:34:35 -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 18743 invoked by uid 89); 13 Nov 2013 10:34:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_05,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Nov 2013 10:34:33 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rADAYAQS010006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 13 Nov 2013 05:34:15 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rADAU4v1025141; Wed, 13 Nov 2013 05:30:04 -0500 Message-ID: <528354AB.2000504@redhat.com> Date: Wed, 13 Nov 2013 10:34:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Mark Manning CC: Sterling Augustine , gdb@sourceware.org Subject: Re: back into the thread.... References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-11/txt/msg00059.txt.bz2 On 11/12/2013 10:54 PM, Mark Manning wrote: > > Also, the "can not access addres zero" error is totally bogus, there > is no attempted access to address zero by my code. What i believe is > happening is GDB is accessing some structure related to debug info for > the code it is about to execute and the pointer it is trying to use is > null (this is pure guesswork). > > The exact address that is in question here is 0xc000 which due to my > ye-olde C64 days is very easy to remember :). After hitting my break > point i jump to this address, i know the program counter is at this > address because i can do a dump of the disassembly from $pc but > someone somewhere is attempting to access address zero immediately > after i single step that branch (actally a mov pc, lr). "mov pc, lr" moves the contents of $lr to $pc. IOW, it's a jump. ARM has no hardware single-step support. This means that to single-step one instruction, GDB has to figure out where the instruction might land (by disassembling the instruction and being aware of the instruction set), place a breakpoint there, and then let execution continue. It just sounds like $lr is 0, and GDB is then trying to set the breakpoint there, which of course fails. That would be a bug in your code, not GDB. -- Pedro Alves