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,c4f703f0b0ac81b7 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Debugger difference between GPS 2008/2009 and 2010 Date: Sat, 04 Dec 2010 22:12:57 +0000 Organization: A noiseless patient Spider Message-ID: References: <4cf513fe$0$390$703f8584@news.kpn.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx03.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="12211"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/oBPb7KXUZiaUwFvu4feAUw+rXf93QaJE=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:oEKMRJnvjL0kfsl3OrFaAFXiOSc= sha1:VNlxe+6yJ+f5Fwpe51jiqt/TEwI= Xref: g2news2.google.com comp.lang.ada:16777 Date: 2010-12-04T22:12:57+00:00 List-Id: "ldries46" writes: > While debugging an ADA program in GPS I observed a rather annoying > difference between the older versions of 2008 and 2009 versus the > version of 2010. In the program I'm trying to create I do use a lot of > Unbounded Strings. Trying to display these strings in the older > versions I could use 'Debug' / 'Display "name"' which gave me a box > with four elements, next, previous, reference and last. The first two > are for internal use, the last presents the number of characters in > the string and reference gave a pointer to the string (in > blue). Clicking on that pointer revealed the stringunder the name of > reference.all . In GPS 2010 reference.all always presents a message > "unknown variable", however the unbounded string in the program itself > can be correctly used. > May be I used a wrong setting but I cannot find which, can anybody > help me. Same behaviour here on Mac OS X. With this program with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; procedure Ubs is S : Unbounded_String; begin for J in 1 .. 10 loop S := S & "j"; end loop; end Ubs; and setting a break on line 6, using GPS 'Debug > Print S' I get this in the debugger console window: (gdb) print S $3 = ( prev => 0x0, next => 0x0, reference => 0x1001000a0 ) If *in the debugger console window* I type this (gdb) p s.reference $4 = (access ada.strings.unbounded.shared_string) 0x1001000a0 and then this (gdb) p s.reference.all $5 = ( max_length => 20, counter => 1, last => 2, data => "j" ) So you can get there, just not as easily as you would have hoped or as you used to. The same behaviour occurs with GNAT GPL 2009, so the situation is that GDB used to have (may still have!) special circuitry for dealing with Unbounded_String as it was in GNAT GPL 2009, but doesn't for 2010.