1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

VSCodeのCall Hierachy機能を使ってみる

Posted at

image.png

Extensionの説明

The extension generates C call hierarchy with your GTAGS. It is recommended to use it with the extension C/C++ GNU Global.

Features
This extension provides a call hierachy for C code.

Data based on GNU Global.
Register to VS Code native "Show Call Hierachy" command.
Compatible with other extension using GTAGS.
Requirements
You need to ensure glboal are installed on your device.

You have to first generate GTAGS, GPATH and GRTAGS via gtags command.

Usage
Prepare your Gtag database via gtags command.
Right click the function you want to trace and click "Show Call Hierarchy".
Trace the callers in "References" pane.
機能
この拡張機能は、Cコードのコール階層を提供します。

データはGNU Globalに基づいています。
VS Codeネイティブの "Show Call Hierachy "コマンドに登録。
GTAGSを使用する他のエクステンションと互換性があります。
必要条件
お使いのデバイスにglboalがインストールされていることを確認する必要があります。

gtagsコマンドでGTAGS、GPATH、GRTAGSを生成する必要があります。

使用方法
gtagsコマンドでGtagデータベースを準備します。
トレースしたい関数を右クリックし、"Show Call Hierarchy "をクリックします。
References "ペインで呼び出し元をトレースする。

Requirement

glboalのインストール

参照: https://qiita.com/miyagaw61/items/b0603517d6a37b59bc14

sudo apt install exuberant-ctags -y

globalはソースのみしか配布されていない
https://ftp.gnu.org/pub/gnu/global/ からソースをダウンロード&自分でビルド
ビルド方法はINSTALLに書かれていた。

(base) mozaki@yoshitsune:~/000_DUSTBOX/global-6.6.12$ ./configure
(base) mozaki@yoshitsune:~/000_DUSTBOX/global-6.6.12$ make
(base) mozaki@yoshitsune:~/000_DUSTBOX/global-6.6.12$ sudo make install

globalの使い方
https://twinbird-htn.hatenablog.com/entry/2015/12/03/002153

  • Usage
    • Prepare your Gtag database via gtags command. (Requirementと同じ??)
    • Right click the function you want to trace and click "Show Call Hierarchy".
    • Trace the callers in "References" pane.
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?