Skip to contentSkip to conversation

dear list

DISCUSSION gaoqiang 3 participants 3 messages Sep 4, 2010 – Sep 7, 2010

lore
Share & tools
lore

gaoqiang

author
#0 lore raw

Recently,I got some trouble reading the kernel source. There are so many macro def in the source tree and I don't know whether some one wad defined or not.

So,is there any way to just preprocessor to eliminate these macros , similiar to gcc -E ???

--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#1 lore raw
Quoted 7 lines · gaoqiang

Recently,I got some trouble reading the kernel source.  There are so many macro def in the source tree and I don't know whether some one wad defined or not.

So,is there any way to just preprocessor to eliminate these macros , similiar to gcc -E ???

pros and cons...."-E" will generate so much intermediate output that you will be drowned in source codes.

alternatively....it is better to zoom down via learning how to use ctags with "vi", and direct disassembly via "objdump" to see which macro it matches to.

http://www.yolinux.com/TUTORIALS/LinuxTutorialAdvanced_vi.html

but first u must generate the tag file with "make tags" on the kernel source first.

Quoted 7 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Signature · 7 lines
Regards,
Peter Teoh
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#2 lore raw

http://kernelnewbies.org/FAQ/KernelCrossCompilation
check the last part, I have written how to get the preprocessed output.

HTH,
Om.

Quoted 31 lines · Peter Teoh
Quoted 7 lines · gaoqiang

Recently,I got some trouble reading the kernel source.  There are so many macro def in the source tree and I don't know whether some one wad defined or not.

So,is there any way to just preprocessor to eliminate these macros , similiar to gcc -E ???

pros and cons...."-E" will generate so much intermediate output that you will be drowned in source codes.

alternatively....it is better to zoom down via learning how to use ctags with "vi", and direct disassembly via "objdump" to see which macro it matches to.

http://www.yolinux.com/TUTORIALS/LinuxTutorialAdvanced_vi.html

but first u must generate the tag file with "make tags" on the kernel source first.

Quoted 7 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Quoted 9 lines

--
Regards,
Peter Teoh
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs