This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug ada/12574] New: print with name overloading
- From: "abo.pignard at wanadoo dot fr" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sat, 12 Mar 2011 09:20:05 +0000
- Subject: [Bug ada/12574] New: print with name overloading
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=12574
Summary: print with name overloading
Product: gdb
Version: 7.2
Status: NEW
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned@sourceware.org
ReportedBy: abo.pignard@wanadoo.fr
Created attachment 5300
--> http://sourceware.org/bugzilla/attachment.cgi?id=5300
Nested names Ada exemple.
Hello, some mismatch errors appear when printing strings with same nested
names.
Operating system: Mac OS X 10.6.5
Compiler:
$ gcc -v
Using built-in specs.
Target: x86_64-apple-darwin9.6.0
Configured with: ../src/configure --prefix=/usr/local/gnat
--with-build-time-tools=/lensk.a/gnatmail/release-gpl/build-lensk/obj
--with-gmp=/lensk.a/gnatmail/release-gpl/build-lensk/libmpfr/install
--with-mpfr=/lensk.a/gnatmail/release-gpl/build-lensk/libmpfr/install
--build=x86_64-apple-darwin9.6.0 --enable-languages=c,ada --disable-nls
--without-libiconv-prefix --disable-libmudflap --disable-libffi
--disable-libstdcxx-pch --disable-libada --enable-checking=release
--with-bugurl=URL:mailto:report@adacore.com
Thread model: posix
gcc version 4.3.6 20100603 for GNAT GPL 2010 (20100603) (GCC)
Debugger:
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".
How to repeat:
compile attached exemple with: gnatmake -g testnest.adb
Then type following instructions:
(gdb) list
30 Put_line (Inner.My_String);
31 Put_line (My_String);
32 Put_line (testnest.My_String);
33 end;
34 end Inner;
35 Put_line (s); -- line35
36 end Test3;
37
38 begin
39 Test2(My_String);
(gdb) break testnest.adb:35
Breakpoint 1 at 0x100001935: file testnest.adb, line 35.
(gdb) run
Starting program: /Users/blady/Documents/Programmation/Essais/testnest
Outer Test string
Outer Test string
Local Test String
Outer Test string
Inner Test String
Inner Test String
Really Local String
Outer Test string
Breakpoint 1, testnest.test3 (s=...) at testnest.adb:35
35 Put_line (s); -- line35
(gdb) print my_string
Multiple matches for my_string
[0] cancel
[1] my_string at testnest.adb:28
[2] my_string at testnest.adb:24
[3] my_string at testnest.adb:15
> 1
$1 = "Inner Test String["00"]["00"]"
(gdb) print my_string
Multiple matches for my_string
[0] cancel
[1] my_string at testnest.adb:28
[2] my_string at testnest.adb:24
[3] my_string at testnest.adb:15
> 2
$2 = "Local Test String"
(gdb) print my_string
Multiple matches for my_string
[0] cancel
[1] my_string at testnest.adb:28
[2] my_string at testnest.adb:24
[3] my_string at testnest.adb:15
> 3
$3 = "n terminated by a"
(gdb) cont
Continuing.
Outer Test string
Outer Test string
Hello World. Welcome to GNAT
Program exited normally.
Errors:
my_string at line 28 should be "Really Local String", gdb outputs "Inner Test
String["00"]["00"]" ?!
my_string at line 24 should be "Inner Test String", gdb outputs "Local Test
String" ?!
my_string at line 15 should be "Local Test String", gdb outputs "n terminated
by a" ???!!!
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.