This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/14423] New: Missing debug_line info for non-inline function call site with inline call in parameter
- From: "rdelashmit at soe dot sony dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Mar 2004 00:22:14 -0000
- Subject: [Bug debug/14423] New: Missing debug_line info for non-inline function call site with inline call in parameter
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In the case shown below, a non-inline function call which has inline function
calls in its parameter list does not generate debug_line information with gcc
3.2.3. debug_line information is generated when using gcc 2.95.3.
Compiler info, preprocessed source, and dwarfdump output follow. The debug
info does get generated by gcc 2.95.3 but not by gcc 3.2.3.
-- Compile output:
Reading specs from /home/rdelashmit/bin/gcc-3.2.3/lib/gcc-lib/i686-pc-linux-
gnu/3.2.3/specs
Configured with: ../srcdir/configure --prefix=/home/rdelashmit/bin --enable-
languages=c,c++ --disable-libgcj --with-dwarf2 :
(reconfigured) ../srcdir/configure --prefix=/home/rdelashmit/bin/gcc-3.2.3 --
enable-languages=c,c++ --disable-libgcj --with-dwarf2
Thread model: posix
gcc version 3.2.3
/home/rdelashmit/bin/gcc-3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/cpp0 -lang-
c++ -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -v -D__GNUC__=3 -
D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=3 -D__GXX_ABI_VERSION=102 -D__ELF__ -
Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -
D__unix -D__linux -Asystem=posix -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -dD -
D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -
D__tune_i686__ -D__tune_pentiumpro__ a.cpp a.ii
GNU CPP version 3.2.3 (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/home/rdelashmit/bin/gcc-3.2.3/i686-pc-linux-
gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/home/rdelashmit/bin/gcc-3.2.3/include/c++/3.2.3
/home/rdelashmit/bin/gcc-3.2.3/include/c++/3.2.3/i686-pc-linux-gnu
/home/rdelashmit/bin/gcc-3.2.3/include/c++/3.2.3/backward
/usr/local/include
/home/rdelashmit/bin/gcc-3.2.3/include
/home/rdelashmit/bin/gcc-3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include
/usr/include
End of search list.
/home/rdelashmit/bin/gcc-3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/cc1plus -
fpreprocessed a.ii -quiet -dumpbase a.cpp -g3 -O1 -version -o a.s
GNU CPP version 3.2.3 (cpplib) (i386 Linux/ELF)
GNU C++ version 3.2.3 (i686-pc-linux-gnu)
compiled by GNU C version 3.2.3.
as -V -Qy -o a-inline a.s
GNU assembler version 2.13.90.0.18 (i386-redhat-linux) using BFD version
2.13.90.0.18 20030206
-- Preprocessed file:
# 1 "a.cpp"
# 1 "<built-in>"
#define __VERSION__ "3.2.3"
#define __USER_LABEL_PREFIX__
#define __REGISTER_PREFIX__
#define __HAVE_BUILTIN_SETJMP__ 1
#define __SIZE_TYPE__ unsigned int
#define __PTRDIFF_TYPE__ int
#define __WCHAR_TYPE__ long int
#define __WINT_TYPE__ unsigned int
#define __STDC__ 1
#define __cplusplus 1
# 10 "<built-in>"
#define __GXX_WEAK__ 1
# 1 "<command line>"
#define __GNUG__ 3
# 1 "<command line>"
#define __DEPRECATED 1
# 1 "<command line>"
#define __EXCEPTIONS 1
# 1 "<command line>"
#define __GNUC__ 3
# 1 "<command line>"
#define __GNUC_MINOR__ 2
# 1 "<command line>"
#define __GNUC_PATCHLEVEL__ 3
# 1 "<command line>"
#define __GXX_ABI_VERSION 102
# 1 "<command line>"
#define __ELF__ 1
# 1 "<command line>"
#define unix 1
# 1 "<command line>"
#define __gnu_linux__ 1
# 1 "<command line>"
#define linux 1
# 1 "<command line>"
#define __ELF__ 1
# 1 "<command line>"
#define __unix__ 1
# 1 "<command line>"
#define __gnu_linux__ 1
# 1 "<command line>"
#define __linux__ 1
# 1 "<command line>"
#define __unix 1
# 1 "<command line>"
#define __linux 1
# 1 "<command line>"
#define __OPTIMIZE__ 1
# 1 "<command line>"
#define __STDC_HOSTED__ 1
# 1 "<command line>"
#define _GNU_SOURCE 1
# 1 "<command line>"
#define i386 1
# 1 "<command line>"
#define __i386 1
# 1 "<command line>"
#define __i386__ 1
# 1 "<command line>"
#define __tune_i686__ 1
# 1 "<command line>"
#define __tune_pentiumpro__ 1
# 1 "a.cpp"
static int s;
inline int inlineFunction(int a, int b)
{
s = a+b;
return a+b;
}
void nonInlineFunction(int a)
{
s = a;
}
int main(int, char**)
{
nonInlineFunction(inlineFunction(5, 6));
nonInlineFunction(inlineFunction(5, 6));
return 0;
}
-- output of dwarfdump -l on the generated object file
line number info
<source> [row,column] <pc> //<new statement or basic block
/home/rdelashmit/gcctest/a.cpp: [ 11,-1] 0 // new statement
/home/rdelashmit/gcctest/a.cpp: [ 12,-1] 0x3 // new statement
/home/rdelashmit/gcctest/a.cpp: [ 13,-1] 0xb // new statement
/home/rdelashmit/gcctest/a.cpp: [ 16,-1] 0xe // new statement
/home/rdelashmit/gcctest/a.cpp: [ 6,-1] 0x17 // new statement
/home/rdelashmit/gcctest/a.cpp: [ 5,-1] 0x21 // new statement
/home/rdelashmit/gcctest/a.cpp: [ 6,-1] 0x2d // new statement
/home/rdelashmit/gcctest/a.cpp: [ 5,-1] 0x37 // new statement
/home/rdelashmit/gcctest/a.cpp: [ 20,-1] 0x43 // new statement
/home/rdelashmit/gcctest/a.cpp: [ 20,-1] 0x4e // new statement
// end of text sequence
--
Summary: Missing debug_line info for non-inline function call
site with inline call in parameter
Product: gcc
Version: 3.2.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rdelashmit at soe dot sony dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14423