This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/9499] print statement does not print access type correctly


http://sourceware.org/bugzilla/show_bug.cgi?id=9499

abo.pignard at wanadoo dot fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |abo.pignard at wanadoo dot
                   |                            |fr

--- Comment #1 from abo.pignard at wanadoo dot fr 2011-03-12 09:02:56 UTC ---
Hello.
Seems to be ok with GDB 7.2 on MacOSX 10.6.5:

$ gdb adatest
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin10.5.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/Users/blady/Documents/Programmation/Essais/adatest...done.
(gdb) l
9        The_String : String (1..Max_Length) := (Others => ' ');
10      end record;
11    
12      type BString is access Rec;
13    
14      procedure Free is new Unchecked_Deallocation (Rec,  
15                                                    BString);
16    
17      tmpStr : constant String := "This is a test.";
18      myStr  : BString := Null;
(gdb) 
19    
20    begin
21      myStr := new Rec (50);
22      myStr.The_String (1..tmpStr'Length) := tmpStr;
23      myStr.The_Length := tmpStr'Length;
24      Text_IO.Put_Line(myStr.The_String (1..myStr.The_Length));
25      Free (myStr);
26    end adatest;
(gdb) br 24
Breakpoint 1 at 0x100001998: file adatest.adb, line 24.
(gdb) run
Starting program: /Users/blady/Documents/Programmation/Essais/adatest 

Breakpoint 1, adatest () at adatest.adb:24
24      Text_IO.Put_Line(myStr.The_String (1..myStr.The_Length));
(gdb) print mystr
$1 = (access adatest.rec) 0x100100080
(gdb) print mystr.all
$2 = (max_length => 50, the_length => 15, 
  the_string => "This is a test.", ' ' <repeats 35 times>)
(gdb) print mystr.the_string
$3 = "This is a test.", ' ' <repeats 35 times>
(gdb) cont
Continuing.
This is a test.

Program exited normally.
(gdb) 

HTH, Pascal.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]