From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24031 invoked by alias); 12 Mar 2003 17:53:19 -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 23994 invoked from network); 12 Mar 2003 17:53:13 -0000 Received: from unknown (HELO apollo.seawaynetworks.com) (216.209.86.50) by 172.16.49.205 with SMTP; 12 Mar 2003 17:53:13 -0000 Received: from camelot-019.seawaynetworks.com (camelot-019 [10.10.1.19]) by apollo.seawaynetworks.com (8.12.8/8.12.8) with ESMTP id h2CHrC5g001559 for ; Wed, 12 Mar 2003 12:53:12 -0500 (EST) Received: (from ashfield@localhost) by camelot-019.seawaynetworks.com (8.11.6/8.11.6) id h2CHrHV02515 for gdb@sources.redhat.com; Wed, 12 Mar 2003 12:53:17 -0500 X-Authentication-Warning: camelot-019.seawaynetworks.com: ashfield set sender to ashfield@seawaynetworks.com using -f Date: Wed, 12 Mar 2003 17:53:00 -0000 From: Bruce Ashfield To: gdb@sources.redhat.com Subject: Accessing variables in .sdata Message-ID: <20030312175317.GA2464@seawaynetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.25i X-SW-Source: 2003-03/txt/msg00185.txt.bz2 Hi all, I've been trying to characterize the types of variables I can't access when using a linker script during the construction of our bootable image. The linker script in question is a slightly modified one from ppcboot and I can't see any fundamental problems with the script. I've been dumping the map file during the link and comparing the one that the linker internally generates to the one that results from our supplied linker map. I'm seeing a different location for the .text,.bss,.data segments and some other ordering differences, but again nothing fundamentally wrong. But my problem persists. If I use a linker script and try to print the value of a variable in a .sdata I'm presented with the gdb error "Cannot access memory at address 0x...". Where address 0xABCD.. is no where near where the map file says that section and variable should be found. It's like gdb is missing the offset of the sections. I've also tried using add-symbol-file to force gdb to recognize the start address for the various sections, but at best I see the error address moving around. I've been told from people around the office that if they load the symbol file multiple times the error address changes and they can breakpoint functions, but not usually inside a function. I've been searching the mailing lists and the problem described in: http://mail.gnu.org/archive/html/bug-gdb/2001-02/msg00015.html Sounds very similar, but I've been wrong before. Any ideas ? Bruce -- Bruce Ashfield | "Thou shalt not follow the NULL pointer, for | chaos and madness await thee at its end." | - unknown