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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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-7-bit Received: by 10.68.189.194 with SMTP id gk2mr5468505pbc.3.1324486048927; Wed, 21 Dec 2011 08:47:28 -0800 (PST) Path: lh20ni48524pbb.0!nntp.google.com!news2.google.com!postnews.google.com!x19g2000yqf.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Debugging Ada Date: Wed, 21 Dec 2011 08:45:43 -0800 (PST) Organization: http://groups.google.com Message-ID: <5567da15-bd12-4dee-be27-b98525ea1323@x19g2000yqf.googlegroups.com> References: <4b7ed906-dfbb-4f73-826e-f1c94ec320e7@k10g2000yqk.googlegroups.com> NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 X-Trace: posting.google.com 1324486048 12827 127.0.0.1 (21 Dec 2011 16:47:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 21 Dec 2011 16:47:28 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x19g2000yqf.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESRCNK X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.8) Gecko/20100728 Firefox/3.6.8 (.NET CLR 3.5.30729),gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Date: 2011-12-21T08:45:43-08:00 List-Id: awdorrin wrote on comp.lang.ada: > During elaboration, the Ada code is setting a constant string that it > retrieves from another package: > > LAN_CFG_FILE : constant String := SysConfig.Cfg_Filename( LAN_CFG ); [...] > When I try to get the address of LAN_CFG_FILE in GDB, so I can set a > watch, I get the response: > > "Attempt to take address of value not located in memory." It looks like the value of LAN_CFG_FILE is preelaborated, i.e. determined at compile time and hardcoded into the object file. In this case, something must be overwriting it later but still at link time, before your program runs. -- Ludovic Brenta.