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/11921] New: GDB passes wrong parameter values to functions


Original bugreport:
https://bugzilla.redhat.com/show_bug.cgi?id=620269

rm -rf gdb_test_library;tar xzf gdb_test_library.tar.gz;(cd
gdb_test_library;/path/to/gdb -ex 'break MLib.Utl.Lib_Directory' -ex 'run -P
gdb_test_library' -ex 'break Osint.Find_File' -ex 'p/d Name_Enter' -ex 'p/d
Osint.Library' -ex 'call Osint.Find_File(Name_Enter, Osint.Library)'
/path/to/gnatmake)

$1 = 300001106
$2 = 1

Breakpoint 2, osint.find_file (n=300001107, t=84, attr=0x7fffffff97c0,
<attrL>=2) at /home/jkratoch/redhat/gccgit/gcc/ada/osint.adb:1155
1155	      Get_Name_String (N);
The program being debugged stopped while in a function called from GDB.
Evaluation of the expression containing the function
(osint.find_file) will be abandoned.
When the function is done executing, GDB will silently stop.
(gdb) frame
#0  osint.find_file (n=300001107, t=84, attr=0x7fffffff97c0, <attrL>=2) at
/home/jkratoch/redhat/gccgit/gcc/ada/osint.adb:1155
1155	      Get_Name_String (N);
(gdb) p Name_Enter
$3 = 300001109
(gdb) p Name_Enter
$4 = 300001110
(gdb) p Osint.Library
$5 = library
(gdb) p/d Osint.Library
$6 = 1


That is Osint.Library should have value 1 but it is passed as 84.

gnatmake DWARF by: GNU C 4.6.0 20100817 (experimental)   
GNATMAKE 4.6.0 20100817 (experimental)
GNU gdb (GDB) 7.2.50.20100817-cvs

-- 
           Summary: GDB passes wrong parameter values to functions
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: jan dot kratochvil at redhat dot com
                CC: gdb-prs at sourceware dot org
 GCC build triplet: x86_64-fedora13-linux-gnu
  GCC host triplet: x86_64-fedora14pre-linux-gnu
GCC target triplet: x86_64-fedora13-linux-gnu


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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