I'm working on tools to use the DWARF information to do several things, such as finding holes in structures, help in finding inline functions to uninline, etc, the tools are available at this git repository: http://www.kernel.org/git/?p=linux/kernel/git/acme/pahole.git;a=summary
One of the tools is called pfunct and one of its outputs is: /* /pub/scm/linux/kernel/git/acme/net-2.6.20/kernel/sched.c:4107 */ int sched_setscheduler(struct task_struct * p, int policy, struct sched_param * param); /* inline expansions in sched_setscheduler: current_thread_info: 7 unlock_task_sighand: 5 get_current: 9 __raw_local_irq_save: 3 task_running: 6 resched_task: 11 raw_local_irq_restore: 2 raw_local_irq_restore: 8 resched_task: 13 */ [EMAIL PROTECTED] net-2.6.20]$ I.e. it searches in DW_TAG_subprogram trees for DW_TAG_inlined_subroutine entries, and uses the DW_AT_high_pc, DW_AT_low_pc and DW_AT_ranges to print the size of each inline expansion. Another tool goes thru the functions return types, parameter list, variables in all lexical blocks, inline expansions and recursively counts the references to the various tags, in the end it looks for entries that aren't referenced to help in reorganizing includes definitions, etc. In doing this I noticed that not all concrete inline instances are being emitted, such as __task_rq_lock, a inline function, used in sched_setscheduler in the above example, several other cases aren't also emitted, and this is confirmed by using elfutils's readelf as well as binutils equivalent tools. Searching for similar problems I've found the 19191 ticket, where the problem was worse, no concrete inline were being emitted, now most are being emitted, but not all, is this a know issue? More information, dumps, whatever I can do to help in fixing this problem can be provided if requested. This is my first ticket ever for gcc bugzilla, so here are more info: [EMAIL PROTECTED] net-2.6.20]$ gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: /home/acme/svn/gcc/configure --prefix=/home/acme/gcc-cvs --enable-languages=c --with-dwarf2 --enable-targets=i686-mandriva-linux-gnu --disable-nls --with-gmp=/home/acme/gcc-infrastructure --with-mpfr=/home/acme/gcc-infrastructure Thread model: posix gcc version 4.3.0 20061108 (experimental) [EMAIL PROTECTED] net-2.6.20]$ But the same problem happens at least with: [EMAIL PROTECTED] net-2.6.20]$ gcc -v Using built-in specs. Target: i586-mandriva-linux-gnu Configured with: ../configure --prefix=/usr --libexecdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --enable-languages=c,c++,ada,fortran,objc,obj-c++,java --host=i586-mandriva-linux-gnu --with-cpu=generic --with-system-zlib --enable-long-long --enable-__cxa_atexit --enable-clocale=gnu --disable-libunwind-exceptions --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --enable-gtk-cairo --enable-ssp --disable-libssp Thread model: posix gcc version 4.1.1 20060724 (prerelease) (4.1.1-3mdk) [EMAIL PROTECTED] net-2.6.20]$ I've been using Ulrich Drepper's excellent libdw DWARF library, found in the elfutils package. -- Summary: DWARF: Not all inline concrete instances are being generated Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: acme at mandriva dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29792