开发者

Nested struct viewer for Linux Kernel

开发者 https://www.devze.com 2022-12-18 01:55 出处:网络
I am in the process of tackling the Linux Kernel learning curve and trying to get my head round the information stored in nested struct specifically to resolve a ALSA driver issue.

I am in the process of tackling the Linux Kernel learning curve and trying to get my head round the information stored in nested struct specifically to resolve a ALSA driver issue.

Hence, I am spending a lot of my time in the source code tracing through structures that have pointers to other structures that in turn have pointers to yet other structures...by which time my head has become so full that I start to loose track of the big picture!

Can anybody point me at either a tool or a website (along the lines of the highly usful Linux Cross Reference http://lxr.linux.no/) that will allow me to, ideally graphically, expand down through the nested struct of the source code?

At the moment we are developing for an Embedded PowerPC in Eclipse CDT ver开发者_如何学Gosion 4.0 but wouldn't be opposed to switching tool chains.

Regards

KermitG


This may sound old fashion but I've found that tracing through data structures with a pencil and paper helps you reverse engineer the code better than tools that automagically do this. So, my recommendation is that you draw them yourself so that you don't have to keep it all in your head. Once you've done this your learning curve becomes a lot less steep.

Just a copy/paste of my comment, so that this question has at least 1 answer.


Or alternatively you could use something like Doxygen to generate the diagrams for you. It's worth noting a lot of the DocBook books get their structures directly from annotated code.


I am currently using Kdevelop4 (svn version) to walk through the Linux kernel. The navigation capabilities are great, but it takes a big while to parse it (just give it the directories you need, omitting all drivers you are not interested in for example) and is still a little bit crashy.

Once the stability improves and the parser can cache previously parsed data, I think this will become the most convenient way to walk through the kernel.

0

精彩评论

暂无评论...
验证码 换一张
取 消