Re: New parameter in GCC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, Ian

I'm developing a mechanism in the gcov, instead of writing the file
gcda (in file gcov-io.c), it sends the information to a host via a
socket. The host generates gcda.

So I'd like to get the IP at compile time to use when sending the data
through the socket.

But from what you said, the variable is only available at compile
time, which is not my case.

> To be clear, this will give you a new variable in the compiler itself.
> It will not give you a variable in the gcov program, nor in the program
> you are compiling.  You will have to figure out some mechanism to get
> the value to the point where you need it.  It's not clear to me where
> that point is.

What kinds of mechanisms I can develop to use this variable when
sending information?

Thanks,
Harry

2011/8/3 Ian Lance Taylor <iant@xxxxxxxxxx>:
> Harry Trinta <harrytpc@xxxxxxxxx> writes:
>
>> I don't need to declare a variable to store the value which will be
>> passed in the compilation?
>>
>> for example, I created a new compilation command:
>> fip-host =
>> Joined RejectNegative Common Var (host_ip_adress)
>> Set the host ip adresses that  the gcov uses to send informations about coverage
>
> That will create a variable for you.
>
>> I do not need to declare the variable host_ip_adress somewhere?
>> How do I access the value passed in the compilation?
>
> You #include "options.h" refer to the variable host_ip_address.
>
> To be clear, this will give you a new variable in the compiler itself.
> It will not give you a variable in the gcov program, nor in the program
> you are compiling.  You will have to figure out some mechanism to get
> the value to the point where you need it.  It's not clear to me where
> that point is.
>
> Ian
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux