Re: sparse API

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

 



Adding the sparse mailing list.

Ryuo want to access the typedef symbol names before it get replaced
with the underneath ctype.

On Sun, Mar 30, 2014 at 12:04 AM,  <ryuo@xxxxxxxxxxxxxx> wrote:
>> I think what you want is the type before the evaluation stage.
>> You can skip the evaluation step then you will have the original type
>> with the typedef name.
>
> That may work. Would it also stop the evaluation of other things, such as
> the result of a constant expression? Also, how would I achieve this? I
> don't think I saw this anywhere in the existing API.

You just call __sparse instead of sparse() to get the list of symbol
without the evaluation stage. Yes it will skip the constant evaluation
as well.

>
>> In the current code, the type evaluation will just replace the typedef
>> with the destination type. It seems to me that you just want to skip that
>> step. Will that work for you?
>
> Possibly, but it depends on how I could do this without changing the
> default behavior.

Can you give me more back ground of why you want to do this?

One way come into mind is that, you can call __sparse first, then
tag and mark whatever typedef you want. Then call evaluate_symbol_list()
from your program to perform the evaluation stage.

If that does not work, what you really need is some kind of
hooks to get callback when the typedef replacement happens.


Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux