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,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.212.232 with SMTP id nn8mr5249333pbc.1.1324480563994; Wed, 21 Dec 2011 07:16:03 -0800 (PST) Path: lh20ni48285pbb.0!nntp.google.com!news2.google.com!postnews.google.com!k10g2000yqk.googlegroups.com!not-for-mail From: awdorrin Newsgroups: comp.lang.ada Subject: Debugging Ada Date: Wed, 21 Dec 2011 07:14:46 -0800 (PST) Organization: http://groups.google.com Message-ID: <4b7ed906-dfbb-4f73-826e-f1c94ec320e7@k10g2000yqk.googlegroups.com> NNTP-Posting-Host: 192.35.35.34 Mime-Version: 1.0 X-Trace: posting.google.com 1324480563 22038 127.0.0.1 (21 Dec 2011 15:16:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 21 Dec 2011 15:16:03 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k10g2000yqk.googlegroups.com; posting-host=192.35.35.34; 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 Date: 2011-12-21T07:14:46-08:00 List-Id: I am having an odd problem with a multi-threaded application that is a combination of C and 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 ); Then in the package's main procedure when I try to use the LAN_CFG_FILE, sometimes the value is corrupted. I realize that something is either blowing a buffer, or there is a threading issue that is corrupting the stack, however here is my problem: 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." For example: (gdb) p LAN_CFG_FILE $7 = "/home/aldorr/config/lan.cfg" (gdb) p LAN_CFG_FILE'Address Attempt to take address of value not located in memory. (gdb) p &LAN_CFG_FILE Attempt to take address of value not located in memory. I really am not sure why the print of the variable works, but I can't determine where the variable is located... This may not be an Ada issue, but more a GDB issue - but figured any GDB forums would likely not have the Ada expertise that this forum would. -Al