I''m working on a kernel module, and would like to include type data for debugging. Following the notes at http://blogs.sun.com/roller/page/jmcp/20051222 ctfconvert gives me ERROR: ctfconvert: die 77280: struct has no members: No such file or directory for some files. CTFCONVERT_DEBUG_LEVEL=1 gives: DEBUG: DWARF version: 2 DEBUG: DWARF emitter: GNU C 3.4.3 (csl-sol210-3_4-20050802) DEBUG: CU name: efrm.c ERROR: ctfconvert: die 77280: struct has no members: No such file or directory and level 10 finishes up with: ... DEBUG: die 77217: mem 77225: creating member DEBUG: die 77217: got mloff 0 DEBUG: die 77217: mem 77225: created name (off 0 sz 17) DEBUG: die 77217: mem 77240: creating member DEBUG: die 77217: got mloff 11 DEBUG: die 77217: mem 77240: created confirmed_on_last_poll (off 136 sz 8) DEBUG: die 77255: create_one DEBUG: die 77255: creating typedef DEBUG: die 77280: create_one DEBUG: die 77280: creating struct (anon) ERROR: ctfconvert: die 77280: struct has no members: No such file or directory What am I doing wrong? - Jeremy
Jeremy Harris wrote:> I''m working on a kernel module, and would like to include type > data for debugging. Following the notes at > http://blogs.sun.com/roller/page/jmcp/20051222 > ctfconvert gives me > > ERROR: ctfconvert: die 77280: struct has no members: No such file or > directory > > for some files. > > CTFCONVERT_DEBUG_LEVEL=1 gives: > > DEBUG: DWARF version: 2 > DEBUG: DWARF emitter: GNU C 3.4.3 (csl-sol210-3_4-20050802) > DEBUG: CU name: efrm.c > ERROR: ctfconvert: die 77280: struct has no members: No such file or > directoryHi Jeremy, I''m glad somebody''s using my blog entry :) For the file efrm.c, can you compile it with maximum warnings turned on and get no warnings (let alone errors) to your terminal? Can you try compiling that same file with SUNWspro cc as well? Incidentally, if I look in usr/src/Makefile.master I see this stanza: # # Flags used to build in debug mode for ctf generation. Bugs in the Devpro # compilers currently prevent us from building with cc-emitted DWARF. # CTF_FLAGS_sparc = -g -Wc,-Qiselect-T1 $(C99MODE) $(CNOGLOBAL) $(CDWARFSTR) CTF_FLAGS_i386 = -g $(C99MODE) $(CNOGLOBAL) $(CDWARFSTR) CTF_FLAGS = $(CTF_FLAGS_$(MACH)) ------ note the comment and the inclusion of CNOGLOBAL and CDWARFSTR. # When -g is used, the compiler globalizes static objects # (gives them a unique prefix). Disable that. CNOGLOBAL= -W0,-noglobal # Normally, gcc uses indirect DWARF strings to save space. However, # this causes relocations that ctfconvert cannot handle. Disable this. CDWARFSTR= -_gcc=-fno-dwarf2-indirect-strings # Sometimes we want all symbols and types in debugging information even # if they aren''t used. CALLSYMS= -W0,-xdbggen=no%usedonly Perhaps you should add those to your gcc command line and retry? best regards, James C. McPherson -- Solaris Datapath Engineering Data Management Group Sun Microsystems
On Mon, Jan 30, 2006 at 11:09:19AM +0000, Jeremy Harris wrote:> ERROR: ctfconvert: die 77280: struct has no members: No such file or > directoryThis sounds like 6338238 DWARF parser can''t handle anon struct/union Can you send me the input files privately? thanks, john
Jeremy Harris wrote:> I''m working on a kernel module, and would like to include type > data for debugging. Following the notes at > http://blogs.sun.com/roller/page/jmcp/20051222 > ctfconvert gives me > > ERROR: ctfconvert: die 77280: struct has no members: No such file or > directoryThanks to John Levon, the problem is resolved. It results from a structure definition having no elements (yes, I know. It''s ifdeffed for multiple target OS compilations) - so the workaround is to add a dummy element. Thanks also to everyone else who responded. - Jeremy
On Mon, Jan 30, 2006 at 03:04:05PM +0000, Jeremy Harris wrote:> It results from a structure definition having no elements (yes, I know. > It''s ifdeffed for multiple target OS compilations) - so the workaround > is to add a dummy element.For anyone interested, this is now bug 6378723. regards, john