如何找到在C code中的函数在VI / VIM调用者和被调用者? [英] How to find the callers and callee of a function in C code in vi/vim?

查看:489
本文介绍了如何找到在C code中的函数在VI / VIM调用者和被调用者?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道我怎么能轻易点击(或者使用一些简单的快捷键),函数名,找到所有的被叫方或打开它已被定义。大多数网站网页手册真的很难遵守或不发生打工了。说我要点击 allocuvm ,看看它已被定义?

  UINT newstk = allocuvm(pgdir,USERTOP-PGSIZE,USERTOP);


解决方案

对于这一点,用的Vim集成的的cscope 的工具;看:帮助cscope的了解更多信息。

I want to know how can I easily click (or maybe use some easy shortcuts) on a function name and find all its callee or open where it has been defined. Most of the web manuals in web are really hard to follow or don't happen to work out. Say I want to click on allocuvm and see where it has been defined?

uint newstk=allocuvm(pgdir, USERTOP-PGSIZE, USERTOP); 

解决方案

For that, Vim integrates with the cscope tool; see :help cscope for more information.

这篇关于如何找到在C code中的函数在VI / VIM调用者和被调用者?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆