gmon.out not generated

Khem Raj kraj@mvista.com
Wed Feb 21 12:18:00 GMT 2007


Couple of things, what is the version of glibc on your target is it same 
as the one you compiled your toolchain with.

is the kernel version same of the kernel headers you compiled your 
toolchain against and of that you are running on

and may be you can check if you have *_p versions of libraries.

-Khem

Karthika said the following on 2/20/2007 8:18 PM:
> Helloo,
>
> I want to build an ARM-linux cross compiler using GNU
> tools.My OS is GNU/Linux and my processor is i386. I
> have followed the steps given in the link below.
>
>        http://www.schnozzle.org/~coldwell/toolchain/
>
> Now, I have built an arm-linux cross compiler on my
> i386, Linux host. I have cross compiled an
> application. It is used to decode an MP3 bit stream.
> The decoder used is LIBMAD. The application is
> "madlld". I have cross compiled using the -pg option .
>
>      I could execute the "a.out" file  on an i.MX 21
> board. Also, I could decode the mp3 bit streams
> successfully. But, there was no "gmon.out" file
> generated. In order to see what went wrong I ran
> strace like this :-
>
>     strace ./a.out -e trace=gmon.out
>
>        The following messages were printed
> ....................
>    
>
>       
> # strace ./a.out -e trace=gmon.out 01:56 | "..., 123)
> = 123xpired) @
> execve("./a.out", ["./a.out", "-e", "trace=gmon.out"],
> [/* 11 vars */]) = 0\30;\7\0\30   = 0       = ? (mask
> now []) 
> = 0x419320
> brk
> -
> munmap(0x422ea
> brk(0)                                  =
> 0xa5cbc\364;\7\0\242\0\0\0", 12}, {"\1", 1},
> {"\300A\7ON
> brk(0xc6cbc)                            = 0xc6cbc     
>         = ? (mask now
> 0
> old_mmap(NULL, 4096, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0
> x40000000
> write(1, "\n", 1)                       = 1
> write(1, " File pointer =679848 \n", 23 File pointer
> =679848) = 23
> open("target", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
> write(1, " Successfully opened src & dst f"..., 38
> Successfully opened src & dst files) = 38
> write(2, "./a.out: invalid option -- e\n", 29./a.out:
> invalid option -- e) = 29
> write(2, "usage: a.out [-p] [-a <amp/atten"...,
> 239usage: a.out [-p] [-a <amp/at
> ten>]
>         -a      Sets an amplification or attenuation
> factor expressed
>                 in dB. The factor bounds are
> [-Inf,18.061800].
>         -p      Requests that the output samples be
> filtered as if
>                 transmitted through a telephone
> switch.
> ) = 239
> munmap(0x40000000, 4096)                = 0
> io_submit(0x1, 0, 0xfbad2a87)           = -1 ENOSYS
> (Function not implemented)
> _exit(1)                                = ?
> #
>
>        As we can see ,there is no "gmon.out" file
> generated. Why is it so? I have  return( ) statement
> in my main ( ) . Also, what does the error "io_submit"
> mean? Why did it return  -1? 
>
> There is a Linux OS on the i.MX 21 board. I could
> connect to it through a hyper terminal. I have
> executed "a.out" through this hyper terminal. It is in
> this terminal I am expecting the gmon.out file. I
> should take back this gmon.out to my host and run
> "gprof" there to get the profile data. So, the problem
> is that gmon.out is not generated in the terminal
> itself.
>
>            Any help will be appreciated.
>
>     Thanks and regards,
>        Karthika.
>
>
> 		
> __________________________________________________________
> Yahoo! India Answers: Share what you know. Learn something new
> http://in.answers.yahoo.com/
>
> --
> For unsubscribe information see http://sourceware.org/lists.html#faq
>
>   

-- 
Khem Raj <kraj@mvista.com>
MontaVista Software Inc.


--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list