Bug#429934: gnat-4.1: Incorrect type debugging information for variables in other compilation units
Package: gnat-4.1
Version: 4.1.1-22
Severity: normal
Tags: confirmed, upstream
In the test case below, GCC emits correct type information for
Debugging.A but the type information for Extenal.B is incorrect.
package External is
type External_Type is array (1 .. 4) of Float;
B : External_Type;
end External;
with External;
procedure Debugging is
A : External.External_Type;
begin
A := (1.0, 2.0, 3.0, 4.0);
External.B := A;
end Debugging;
How to reproduce:
$ gnatmake -g debugging.adb
gcc-4.1 -c -g debugging.adb
gnatbind -x debugging.ali
gnatlink debugging.ali -g
$ gnatgdb debugging
Current directory is /home/lbrenta/src/tmp/
GNU gdb 6.4 for GNAT Pro 2006 (20060522)
Copyright 2005 Free Software Foundation, Inc.
Ada Core Technologies version of GDB for GNAT Professional
[...]
(gdb) break debugging
Breakpoint 1 at 0x400d30: file debugging.adb, line 5.
(gdb) run
[...]
Breakpoint 1, debugging () at debugging.adb:5
(gdb) ptype a
type = array (1 .. 4) of <4-byte float> (correct)
(gdb) ptype external.b
type = <4-byte integer> (wrong)
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.18-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gnat-4.1 depends on:
ii gcc-4.1 4.1.1-21 The GNU C compiler
ii gnat-4.1-base 4.1.1-22 The GNU Compiler Collection (gnat
ii libc6 2.5-9 GNU C Library: Shared libraries
ii libc6-dev 2.5-9 GNU C Library: Development Librari
ii libgcc1 1:4.2-20070528-1 GCC support library
ii libgnat-4.1 4.1.1-22 Runtime library for GNU Ada applic
ii libgnatprj4.1 4.1.1-22 GNU Ada Project Manager
ii libgnatvsn4.1 4.1.1-22 GNU Ada compiler version library
gnat-4.1 recommends no packages.
-- no debconf information
Reply to: