From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7618 invoked by alias); 12 Mar 2011 09:20:11 -0000 Received: (qmail 7561 invoked by uid 22791); 12 Mar 2011 09:20:11 -0000 X-SWARE-Spam-Status: No, hits=-50.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,HK_OBFDOM,SARE_URI_EQUALS,TW_BF,TW_CX,TW_DC X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 12 Mar 2011 09:20:06 +0000 From: "abo.pignard at wanadoo dot fr" To: gdb-prs@sourceware.org Subject: [Bug ada/12574] New: print with name overloading X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: ada X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: abo.pignard at wanadoo dot fr X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sat, 12 Mar 2011 09:20:00 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2011-q1/txt/msg00195.txt.bz2 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 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.