hello, can someone help me understand what is going on?
are the -p and -pg options supposed to work? -------------------------------------------------------------------- # gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20061011 (Red Hat 4.1.1-30) -------------------------------------------------------------------- the C fragment (from menu.c of mplayer) #define BUF_MIN 128 #define BUF_MAX BUF_STEP*1024 int menu_init(char* cfg_file) { char* buffer = NULL; int bl = BUF_STEP, br = 0; int f, fd; #ifndef HAVE_FREETYPE if(vo_font == NULL) return 0; #endif -------------------------------------------------------------------- # cc -c -I. -I.. -Wdeclaration-after-statement -march=pentium2 -mtune=pentium2 -pipe -ffast-math -ggdb -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/X11R6/include -pthread -I/usr/include/kde/artsc -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -o menu.o menu.c -save-temps cc: warning: -pipe ignored because -save-temps specified cc: warning: -pipe ignored because -save-temps specified # objdump -S -D menu.o -G -C -t -x | less 000003a5 <menu_init>: /// This will build the menu_defs list from the cfg file #define BUF_STEP 1024 #define BUF_MIN 128 #define BUF_MAX BUF_STEP*1024 int menu_init(char* cfg_file) { 3a5: 55 push %ebp 3a6: 89 e5 mov %esp,%ebp 3a8: 83 ec 38 sub $0x38,%esp char* buffer = NULL; 3ab: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) int bl = BUF_STEP, br = 0; 3b2: c7 45 ec 00 04 00 00 movl $0x400,0xffffffec(%ebp) 3b9: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) int f, fd; #ifndef HAVE_FREETYPE if(vo_font == NULL) return 0; #endif -------------------------------------------------------------------- now repeat above with extra "-p" flag # cc -c -I. -I.. -Wdeclaration-after-statement -march=pentium2 -mtune=pentium2 -pipe -ffast-math -ggdb -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/X11R6/include -pthread -I/usr/include/kde/artsc -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -o menu.o menu.c -save-temps -p cc: warning: -pipe ignored because -save-temps specified cc: warning: -pipe ignored because -save-temps specified # objdump -S -D menu.o -G -C -t -x | less /// This will build the menu_defs list from the cfg file #define BUF_STEP 1024 #define BUF_MIN 128 #define BUF_MAX BUF_STEP*1024 int menu_init(char* cfg_file) { 3aa: 55 push %ebp 3ab: 89 e5 mov %esp,%ebp 3ad: 83 ec 38 sub $0x38,%esp 3b0: e8 00 00 00 00 call 3b5 <menu_init+0xb> 3b1: R_386_PC32 .bss char* buffer = NULL; 3b5: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) int bl = BUF_STEP, br = 0; 3bc: c7 45 ec 00 04 00 00 movl $0x400,0xffffffec(%ebp) 3c3: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) int f, fd; #ifndef HAVE_FREETYPE if(vo_font == NULL) return 0; #endif now WTF is the line 3b0 ??? ideas? -------------------------------------------------------------------- -- Adam Sulmicki http://www.eax.com The Supreme Headquarters of the 32 bit registers