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,3cbef66f8e2b7fa3 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.glorb.com!feeder.erje.net!news.doubleslash.org!open-news-network.org!news.teledata-fn.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 19 Feb 2009 15:30:26 +0100 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How to print string, record variable while debugging with GDB using GPS References: <1b69a7f1-49f4-4bae-9c9c-94286309b13d@b8g2000pre.googlegroups.com> In-Reply-To: <1b69a7f1-49f4-4bae-9c9c-94286309b13d@b8g2000pre.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <499d6d02$0$31879$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 19 Feb 2009 15:30:26 CET NNTP-Posting-Host: b0f3112e.newsspool3.arcor-online.net X-Trace: DXC=^OZZYD_e2g]Fm0Y?OE@2^XMcF=Q^Z^V3X4Fo<]lROoRQ^YC2XCjHcbYL9LV2A9OikU;9OJDO8_SKVNSZ1n^B98iZA9V5HOaULlX X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:4671 Date: 2009-02-19T15:30:26+01:00 List-Id: Paruthi schrieb: > Hi, > > Can any one please help me how to print the value of the variable > which is of a string type, instance of a record..etc while debugging > with GDB using Ada code. For simple string I get the value in ascii > value. Is there any way where I get the actual string value instead of > ASCII value. Did you use the GDB provided with your Ada environement? (gdb) list 1 procedure test is 2 x: string(1..10); 3 begin 4 x := "ABCDEFGHIJ"; 5 x(1) := x(2); 6 end; (gdb) display x 4: x = "["00"]["00"]["00"]["00"]["00"]["00"]["00"]["00"]&["1d"]" (gdb) n 5 x(1) := x(2); 4: x = "ABCDEFGHIJ" (gdb) n 6 end; 4: x = "BBCDEFGHIJ" (gdb)