Re: how to expand linux kernel macro in kernel source code/kernel module(outside)

2015-10-07 Thread Vishal Thanki
You may want to try following. That will expand all the macros in
kernel/cpu.c file.

# make kernel/cpu.i


You may try with your required files.


Vishal


On Tue, Oct 6, 2015 at 9:17 PM, Manavendra Nath Manav 
wrote:

>
> On Tue 6 Oct, 2015 18:34 慕冬亮  wrote:
>
> Recently I was learning doubly linked list in kernel, there are many
> macro in linux/fs.h, like list_add, list_del,list_for_each,list_entry,
> container_of.
>
> I know we can use "gcc -E" to expand the macro, but how do we expand
> the macro in kernel source code / kernel module?
>
> - mudongliang
>
> 
>
>
>
> A quick look at cscope and ctags will solve your problem.
>
> -- manav
>
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: how to expand linux kernel macro in kernel source code/kernel module(outside)

2015-10-06 Thread Manavendra Nath Manav
On Tue 6 Oct, 2015 18:34 慕冬亮  wrote:

Recently I was learning doubly linked list in kernel, there are many
macro in linux/fs.h, like list_add, list_del,list_for_each,list_entry,
container_of.

I know we can use "gcc -E" to expand the macro, but how do we expand
the macro in kernel source code / kernel module?

- mudongliang





A quick look at cscope and ctags will solve your problem.

-- manav
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


how to expand linux kernel macro in kernel source code/kernel module(outside)

2015-10-06 Thread 慕冬亮
Recently I was learning doubly linked list in kernel, there are many
macro in linux/fs.h, like list_add, list_del,list_for_each,list_entry,
container_of.

I know we can use "gcc -E" to expand the macro, but how do we expand
the macro in kernel source code / kernel module?

- mudongliang

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies