From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5978c98b23dbfa0b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.189.194 with SMTP id gk2mr5723991pbc.3.1324493127144; Wed, 21 Dec 2011 10:45:27 -0800 (PST) Path: lh20ni48831pbb.0!nntp.google.com!news2.google.com!postnews.google.com!z12g2000yqm.googlegroups.com!not-for-mail From: awdorrin Newsgroups: comp.lang.ada Subject: Re: Debugging Ada Date: Wed, 21 Dec 2011 10:43:45 -0800 (PST) Organization: http://groups.google.com Message-ID: <5f0397f0-a75c-417d-9fdd-16ea19399f27@z12g2000yqm.googlegroups.com> References: <4b7ed906-dfbb-4f73-826e-f1c94ec320e7@k10g2000yqk.googlegroups.com> <5567da15-bd12-4dee-be27-b98525ea1323@x19g2000yqf.googlegroups.com> <1fcdb3e7-6125-4cdc-9514-dd3cff2a7350@h3g2000yqa.googlegroups.com> <0892748e-8943-41e3-8843-9121838b4465@f33g2000yqh.googlegroups.com> <56da68a5-1d00-4ec7-863b-c9a2a7a64f95@l19g2000yqc.googlegroups.com> NNTP-Posting-Host: 192.91.173.42 Mime-Version: 1.0 X-Trace: posting.google.com 1324493127 20261 127.0.0.1 (21 Dec 2011 18:45:27 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 21 Dec 2011 18:45:27 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z12g2000yqm.googlegroups.com; posting-host=192.91.173.42; posting-account=YkFdLgoAAADpWnfCBA6ZXMWTz2zHNd0j User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESRCNK X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20100101 Firefox/8.0,gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2011-12-21T10:43:45-08:00 List-Id: On Dec 21, 1:06=A0pm, Simon Wright wrote: > awdorrin writes: > > I can find a location in memory where the filename is stored - but > > there does not appear to be a 'LAN_CFG_FILE' variable anywhere... > > Perhaps if you (temporarily) removed the 'constant'? GDB appears to be confused when trying to display these variables, whether the 'constant' tag is there or not. What we just tried was appending a null to the string: LAN_CFG_FILE : constant String :=3D SysConfig.Cfg_Filename( LAN_CFG ) & Ascii.Nul; When we do this, with or without the 'constant' tag, the 'lan_cfg_file' becomes a variable that can be referenced. 'p lan_cfg_file' gives: $3 =3D "" 'p &lan_cfg_file' gives: $4 =3D (access array (...) of character) 0xf2aced90 dumping the memory at that location: 'x /2s 0xf2aced90' gives: 0xf2aced90: "/home/aldorr/prog/data/config/lan1.cfg["00"]" 0xf2acedb7: "["f7}{"d0"]["la"]["ba"]["f7"]["00"]" (assuming the second line is just garbage in uninitialized memory) I'm not entirely sure why GDB is seeing this as an 'access array of characters' rather than an Ada String, but I'm guessing that is an artifact of GDB.