public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "abo.pignard at wanadoo dot fr" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug ada/12574] New: print with name overloading
Date: Sat, 12 Mar 2011 09:20:00 -0000	[thread overview]
Message-ID: <bug-12574-4717@http.sourceware.org/bugzilla/> (raw)

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.


             reply	other threads:[~2011-03-12  9:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-12  9:20 abo.pignard at wanadoo dot fr [this message]
2022-03-17 16:36 ` [Bug ada/12574] " tromey at sourceware dot org
2022-07-01 19:14 ` abo.pignard at wanadoo dot fr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-12574-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).