From: Lluis M. <ll...@se...> - 2003-04-08 15:48:21
|
Hi Phil, You are right, the binutils version that was installed was the one from Slackware 8.1, my fault. I recompiled the binutils package (binutils-2.12.90.0.9) with the patch you provided and now oprofpp and objdump work fine. Thanks for your help, Lluis . -----Mensaje original----- De: Philippe Elie [mailto:ph...@wa...] Enviado el: martes, 08 de abril de 2003 16:35 Para: Lluis Mora Hidalgo CC: opr...@li... Asunto: Re: oprofpp crash Lluis Mora Hidalgo wrote: > Hi all, > > I have found that oprofpp crashes on my system when trying to get > information on a binary with debugging information. I have been > searching the mailing list archives but found no reference to this > particular problem, so I am hoping you might help find out what is > happening. > > oprofpp output is OK when the program is not compiled with the debugging > switch, but crashes when run on a program compiled with debugging. Here > is the output from GDB: > > Program received signal SIGSEGV, Segmentation fault. > 0x080685d7 in {anonymous}::interesting_symbol (sym=0x8097f10) at > op_bfd.cpp:113 > 113 if (!(sym->section->flags & SEC_CODE)) > It seems that the pointer at "sym->section" is invalid, so I guess it > might be a problem with my installation of libbfd. > > I have run it on a few test programs, and it always crashes at the same > point, so I would say it has nothing to do with the program being > "profiled". > > I am running oprofile on a stock Slackware 8.0 system (i386), with are you sure it isn't a slack 8.1 ? I run slack 8.1 and get exactly this compiler binutils version (but a 2.4.20) > oprofile 0.5.2 (oprofile 0.4 crashes in exactly the same way), GCC is > 2.95.3 and libbfd is libbfd-2.11.90.0.19. Kernel version is 2.2.20. try this: $ objdump --debugging /lib/ld-linux.so.2 if objdump hang you are subject to this bug: http://sources.redhat.com/ml/binutils/2001-12/msg00372.html it describe a hang but looking the code I'll be not surprised if it also allow your behavior. I posted in past the attached patch to cure this problem. I'm interrested to know if after applying patch/rebuilding/installing binutils you see always the hang and the crash. (patch must be applied in binutils-2.12.90.0.9/binutils sub-dir) > Is there a "recommended" version of libbfd for oprofile? Does anybody > have any recommendation on installing a particular version of > libbfd/libiberty? If what I suspect is right it's a compiler problem but patching binutils seems an easier fix you. I run this binutils version with my patch applied and never get this problem. If this patch don't work can you send me a binary and its associated sample file privately + the exact command line you use with oprofpp and have you recompiled some part of your slack with non-default CFLAGS ? I'll track this problem since someone with another distro ran into the same problem and I was unable to track it. regards, Phil |