Segmentation Fault with "-pg"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Segmentation Fault with "-pg"



I have posted this query long back as well, I need some help or
pointers atleast to any known version of glibc-2.5 or higher which
have worked with "-pg" for ARM GNU Linux.



Hi,

I am using arm tool chain 2007q3,

I downloaded tool chain from codesourcery, I am having Linux kernel version
2.6.22.
If I compile any application with "-pg" profiling enabled, I get a
segmentation fault.


I downloaded the tool chain source and did some changes to script given with
source. For build I had to remove arm-stub, csl-docbook and couple of other
tar balls being used in script. Finally I was able to build too chain I
added "-enable-profile" in configure inputs to glibc (which I believe were
enabled in release build as well).

Please let me know if any one of you were able to use profiling of
application to generate gmon.out on ARM boards (ARM 11). If there is some
support to be enabled with kernel build.  Any help/comments are highly
appreciated.

I am adding a log section before seg fault:
.
.
.
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\0J\1\000"..., 512) =
512
fstat64(3, {st_mode=S_IFREG|0755, st_size=7668560, ...}) = 0
mmap2(NULL, 1180068, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0x40025000
mprotect(0x40138000, 32768, PROT_NONE)  = 0
mmap2(0x40140000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x113) = 0x40140000
mmap2(0x40143000, 8612, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40143000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x4001d000
syscall_983045(0x4001d100, 0x4001e000, 0x4001d858, 0x4001d7d8, 0x40024050,
0x40024000, 0, 0xf0005, 0x50, 0xffff51d0, 0x1, 0xbeafeb74, 0, 0xbeafe878,
0x40010b98, 0x40001fb8, 0x20000010, 0x4001d100, 0, 0, 0xda7c, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0) = 0
mprotect(0x40140000, 8192, PROT_READ)   = 0
mprotect(0x40023000, 4096, PROT_READ)   = 0
brk(0)                                  = 0x11000
brk(0x32000)                            = 0x32000
rt_sigaction(SIGPROF, {0x400e61a0, ~[], SA_RESTART|0x4000000}, {SIG_DFL}, 8)
= 0
setitimer(ITIMER_PROF, {it_interval={0, 10000}, it_value={0, 10000}},
{it_interval={0, 0}, it_value={0, 0}}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++


Thanks & Regards,
Sudhanshu