codefuse-ai / CodeFuse-Query

Query-Based Code Analysis Engine
Apache License 2.0
200 stars 22 forks source link

Find callers of a method 查找方法的调用方并输出调用链 #58

Closed busychen closed 3 months ago

busychen commented 3 months ago

已知方法签名a,想要查询哪些方法调用了a,一直往上查找,直到最上层方法,并输出从最上层方法到a的所有链路

ValKmjolnir commented 3 months ago

@zaqcxy updated an example for this: example/java/CallChainWithSignature.gdl

busychen commented 3 months ago

@zaqcxy updated an example for this: example/java/CallChainWithSignature.gdl

谢谢回复,如果想在callMethodName和calleeMethodName添加参数类型,类似这种callMethodName(java.lang.String)怎么修改脚本

ValKmjolnir commented 3 months ago

@zaqcxy updated an example for this: example/java/CallChainWithSignature.gdl

谢谢回复,如果想在callMethodName和calleeMethodName添加参数类型,类似这种callMethodName(java.lang.String)怎么修改脚本

你是指带参数的函数签名?如果是带参数的函数签名可以用样例里的 example/java/GetSignature.gdl 看看给的 callable 签名长啥样,然后复制下来就行

busychen commented 3 months ago

thanks for your reply 我将关闭问题