From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52623 invoked by alias); 13 Jan 2016 03:32:39 -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 52586 invoked by uid 89); 13 Jan 2016 03:32:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=1234, liaison, Hx-languages-length:948, distinguish X-HELO: smtp-out6.electric.net Received: from smtp-out6.electric.net (HELO smtp-out6.electric.net) (192.162.217.189) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 13 Jan 2016 03:32:37 +0000 Received: from 1aJCAk-00040F-Tb by out6b.electric.net with emc1-ok (Exim 4.85) (envelope-from ) id 1aJCAk-00040c-UX for gdb@sourceware.org; Tue, 12 Jan 2016 19:32:34 -0800 Received: by emcmailer; Tue, 12 Jan 2016 19:32:34 -0800 Received: from [188.39.184.226] (helo=GLAEXCH1.ftdi.local) by out6b.electric.net with esmtps (TLSv1:AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1aJCAk-00040F-Tb for gdb@sourceware.org; Tue, 12 Jan 2016 19:32:34 -0800 Received: from GLAEXCH3.ftdi.local ([172.16.0.161]) by glaexch1 ([172.16.0.121]) with mapi id 14.01.0438.000; Wed, 13 Jan 2016 03:32:34 +0000 From: James Bowman To: "gdb@sourceware.org" Subject: Harvard architecture and gdb Date: Wed, 13 Jan 2016 03:32:00 -0000 Message-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Outbound-IP: 188.39.184.226 X-Env-From: james.bowman@ftdichip.com X-PolicySMART: 3094660 X-SW-Source: 2016-01/txt/msg00009.txt.bz2 I am maintainer for a Harvard architecture target, FT32. FT32 has two address spaces, flash and RAM. They both occupy addresses star= ting at address 0. This is similar to AVR. We use a __flash__ modifier to s= pecify address space 1. But I am struggling to understand how to describe the architecture to gdb. = In particular FT32 uses address spaces to distinguish between pointers to R= AM and flash. But gdb only seems to actually care about address spaces for = *pointers*. When gcc writes the debug info for a plain object, it does not = emit the DW_AT_address_class field; nor does gdb handle DW_AT_address_class= for non-pointer types. So I am at a loss to understand how these two vari= ables would be distinguished by gdb: int ram_var =3D 1234; __flash__ const int flash_var =3D 1234; I suspect I have misunderstood something fundamental. Does anyone have any = suggestions? Thanks. -- James Bowman FTDI Open Source Liaison