如何获取给定函数的调用路径? [英] How to get the call paths to a given function?

查看:170
本文介绍了如何获取给定函数的调用路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Eclipse调试Java应用程序。



我想看到所有可能的呼叫路径导致调用特定功能 somefunc



Eclipse提供了一种获取此信息的方法? (FWIW,我正在使用Juno Service Release 1; Build id:20121004-1855。)



PS:FWIW,至少有一些电话 somefunc 由用户以交互方式进行选择的结果,所以我希望一些呼叫路径将在一个或另一个GUI事件处理程序中启动。



编辑:这是我的意思是通话。假设一些事件处理程序 a 调用函数 b ,然后 b 调用 c c 调用 d ,最后 d 调用 somefunc 。然后序列

  a  - > b  - > c  - > d  - >某些功能

是我感兴趣的通话路径之一。

解决方案

是否右键单击>>打开呼叫层次结构帮助?



和间接呼叫者在平面结构,但给你一棵树通过。


I'm using Eclipse to debug a Java app.

I'd like to see all the possible "call paths" leading to calls to a specific function somefunc.

Does Eclipse provide a way to get this information? (FWIW, I'm using Juno Service Release 1; Build id: 20121004-1855.)

PS: FWIW, at least some calls to somefunc result from choices made by the user interactively, so I expect that some of the call paths will start in one or another GUI event handler.

EDIT: this is what I mean by a "call path". Suppose that some event handler a calls function b, then b calls c, c calls d, and finally d calls somefunc. Then the sequence

a -> b -> c -> d -> somefunction

is one of the call paths I'm interested in.

解决方案

Does 'right click' >> Open Call Hierarchy help?

It does not aggregate all direct and indirect callers in a flat structure, but gives you a tree through.

这篇关于如何获取给定函数的调用路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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