From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14176 invoked by alias); 19 Sep 2013 15:53:08 -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 14165 invoked by uid 89); 19 Sep 2013 15:53:07 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Sep 2013 15:53:07 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8JFr41c006719 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 19 Sep 2013 11:53:04 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r8JFr3Zh010798; Thu, 19 Sep 2013 11:53:03 -0400 Message-ID: <523B1DDE.2060002@redhat.com> Date: Thu, 19 Sep 2013 15:53: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: Omair Javaid CC: gdb-patches@sourceware.org Subject: Re: [PATCH] testsuite/gdb.dwarf2: Fix for dw2-dos-drive failure on ARM References: <51F7DDF0.8090605@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-09/txt/msg00691.txt.bz2 Please don't top post. On 09/19/2013 04:23 PM, Omair Javaid wrote: > Thanks everyone for the feedback. > > I am getting following problem with 1byte text section in the dw2-dos-drive.exp > > (gdb) PASS: gdb.dwarf2/dw2-dos-drive.exp: set breakpoint pending off > break 'z:file.c':func > Cannot access memory at address 0x0 > > When I change this to 4bytes the problem gets fixed. That is why I > thought this could be an unaligned illegal memory access but I accept > that the above comments verify that its not a alignment issue. > > Can anyone help me figure out what could be the cause of this problem? Breakpoint instructions on ARM are 4-byte wide. It sounds like GDB is trying to read the memory at the breakpoint's address, and that fails (that error message comes from GDB, not the program). AFAICS, the test doesn't execute the compiled object's code, so GDB will try to read memory from the binary's sections. As the section is only 1 byte long, and probably no other section is allocated contiguously, that'll fail... To confirm, debug GDB under GDB, and put a break on throw_it or some such. Then work up the stack to see where that is thrown, and why. -- Pedro Alves