From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4806 invoked by alias); 24 Nov 2003 14:19:25 -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 4797 invoked from network); 24 Nov 2003 14:19:22 -0000 Received: from unknown (HELO mail86.defence-elec.de) (194.156.172.206) by sources.redhat.com with SMTP; 24 Nov 2003 14:19:22 -0000 Received: from vssrv11.defence-elec.de (unknown [10.199.101.18]) by mail86.defence-elec.de (Postfix) with SMTP id 91CCB13938 for ; Mon, 24 Nov 2003 15:19:21 +0100 (CET) Received: from mgsrv11.defence-elec.de ([10.199.101.16]) by vssrv11.defence-elec.de (NAVGW 2.5.1.2) with SMTP id M2003112415194211678 ; Mon, 24 Nov 2003 15:19:42 +0100 Received: by mgsrv11.defence-elec.de (Postfix, from userid 65534) id 9AA1E4005; Mon, 24 Nov 2003 15:19:05 +0100 (CET) Received: from rheinmetall-de.com (nspc140.defence-elec.de [141.200.143.140]) by mgsrv11.defence-elec.de (Postfix) with ESMTP id 993144009; Mon, 24 Nov 2003 15:19:03 +0100 (CET) Message-ID: <3FC2138B.5050900@rheinmetall-de.com> Date: Mon, 24 Nov 2003 14:19:00 -0000 From: Roul Oldenburger Organization: Rheinmetall Defence Electronic User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: de-de, en-us, en MIME-Version: 1.0 To: Joel Brobecker Cc: gdb@sources.redhat.com Subject: Re: debuginformation generated by GNAT References: <3FBA41DC.6050209@rheinmetall-de.com> <20031118185122.GD1319@gnat.com> <3FBCE28E.10807@rheinmetall-de.com> <20031120182051.GB1186@gnat.com> <3FBE277F.5020005@rheinmetall-de.com> <20031121194641.GC2498@gnat.com> In-Reply-To: <20031121194641.GC2498@gnat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-6.7 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_MOZILLA_UA autolearn=ham version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-SW-Source: 2003-11/txt/msg00229.txt.bz2 Thankyou Joel, indeed there is the following gen_siso_common_types__index___XDLU_0__2147483647 gen_siso_common_types__bdt_spectral_description__T76s___U /* 0x88d0b6c */; Does this variable found at the given address/offset(?) holds the upper bound? So if I say in case of such an array the actual size won't be given within the debugging output but only by reading for example this variable in order to calculate it? (sorry for the terribly long sentence) This project is not a personal one. It is part of a bigger one in the company I am working for. A bit background: The project uses several shared memories for ipc. We use a tool of our own to monitor the shared memories. The configuration files the tool needs were generated so far by seperate programs which use the shared memory specs. Because the shared memories themselves are in development the specs are changing more or less often. Due to this the programs which generate the config files have to be maintained with each change on the shared memory structures. The aim now is to find a way to generate reliable configuration information automatically. And the idea was to use the debuginformation the compiler adds to the executable. I've written a perl program that parses objdump's output and is able to reconstruct trees of structure type descriptions and writes the configuration file for our monitor tool. This was fine until I came across structure type descriptions which contain components of variable length. For the usual not-XVE case objdump delivers type designators, component names, offsets and sizes in (mostly) direct readable form. This was wasn't an impossible task to do using perl but with variable length entities it seems like more must be done. Ada simply is the language the specs are written in due to customer requirements. I am looking forward to your suggestions and opinions. Thanks Roul Joel Brobecker wrote: >>struct gen_siso_common_types__bdt_spectral_description__T77s___XA { /* >>size 4 id 1545 */ >> long int >>gen_siso_common_types__bdt_spectral_description__T76s___XDL_1; /* >>bitsize 32, bitpos 0 */ >>}; > > > this part is telling you that the lower bound is static and equal to 1. > The upper bound is dynamic and needs to be read in memory: GNAT should > generate a ___U *variable*, something like this: > > gen_siso_common_types__bdt_spectral_description__T76s___U > > BTW: Is this a personal project of yours? Could you tell us more about > what you are trying to do, and what you are using Ada for?