{"id":13646379,"url":"https://github.com/beacoder/call-graph","last_synced_at":"2026-02-15T15:47:04.107Z","repository":{"id":264972820,"uuid":"894787285","full_name":"beacoder/call-graph","owner":"beacoder","description":"Generate call graph for c/c++ functions","archived":false,"fork":false,"pushed_at":"2026-02-12T06:51:55.000Z","size":45153,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-12T16:14:20.668Z","etag":null,"topics":["call-graph","call-hierarchy","cpp","git-grep","gnu-global","programming-tool"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beacoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-27T01:47:04.000Z","updated_at":"2026-02-12T06:51:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"2c9b6eef-7a75-4a54-8b96-8e767b7b633d","html_url":"https://github.com/beacoder/call-graph","commit_stats":null,"previous_names":["beacoder/call-graph"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beacoder/call-graph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beacoder%2Fcall-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beacoder%2Fcall-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beacoder%2Fcall-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beacoder%2Fcall-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beacoder","download_url":"https://codeload.github.com/beacoder/call-graph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beacoder%2Fcall-graph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29482805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T15:33:17.885Z","status":"ssl_error","status_checked_at":"2026-02-15T15:32:53.698Z","response_time":118,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["call-graph","call-hierarchy","cpp","git-grep","gnu-global","programming-tool"],"created_at":"2024-08-02T01:02:54.092Z","updated_at":"2026-02-15T15:47:04.102Z","avatar_url":"https://github.com/beacoder.png","language":"Emacs Lisp","readme":"# call-graph - Generate call graph for c/c++ functions\n\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](COPYING.md)\n[![MELPA](https://melpa.org/packages/call-graph-badge.svg)](https://melpa.org/#/call-graph)\n[![MELPA Stable](https://stable.melpa.org/packages/call-graph-badge.svg)](https://stable.melpa.org/#/call-graph)\n[![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu)\n\nGenerate call graph for c/c++ functions.\n\n# Where does this library come from?\n\nHow many times do you have this feeling that\nwhy can't we have this in emacs when you see\nthe fancy function call hierarchy in \"modern\" IDEs?\nI hope one day, with this library, we won't have\nto envy those \"modern\" IDEs for this again.\n\n# Installation\n\nClone the repo, then in your Emacs init file:\n\n```lisp\n(add-to-list 'load-path \"/path/to/repo\")\n(require 'call-graph)\n(call-graph) ;; to launch it\n```\n\nOr install from [melpa](https://melpa.org/#/call-graph).\n\n## External dependency\nYou could choose either Git (default) or Global as search backend for call-graph to use.\n* `Git`\n\n`call-graph` will recursively call `git grep` to find caller of\ncurrent function and eventually build up a `call-graph` tree.\n\n* `GNU Global`\n\n`call-graph` will recursively call `Global` to find caller of\ncurrent function and eventually build up a `call-graph` tree.\n\n# Usage\n\nPlace your cursor in the c/c++ function which you want to generate\ncall-graph for and execute call-graph.\nYou could bind it to \u003ckbd\u003eC-c g\u003c/kbd\u003e.\n\n```lisp\n    (global-set-key (kbd \"C-c g\") 'call-graph)\n```\n\n# Keys\n\n```lisp\n    (define-key map (kbd \"e\") 'call-graph-widget-expand-all)\n    (define-key map (kbd \"c\") 'call-graph-widget-collapse-all)\n    (define-key map (kbd \"p\") 'widget-backward)\n    (define-key map (kbd \"n\") 'widget-forward)\n    (define-key map (kbd \"q\") 'call-graph-quit)\n    (define-key map (kbd \"+\") 'call-graph-expand)\n    (define-key map (kbd \"_\") 'call-graph-collapse)\n    (define-key map (kbd \"o\") 'call-graph-goto-file-at-point)\n    (define-key map (kbd \"d\") 'call-graph-remove-caller)\n    (define-key map (kbd \"l\") 'call-graph-select-caller-location)\n    (define-key map (kbd \"r\") 'call-graph-reset-caller-cache)\n    (define-key map (kbd \"?\") 'call-graph-help)\n    (define-key map (kbd \"\u003cRET\u003e\") 'call-graph-goto-file-at-point)\n```\n\n# Customization\n\n## Backend configuration: Git (Default)\n```\n    ;; not needed, as Git is default backend.\n    ;; (customize-set-variable 'call-graph-search-backend 'git)\n    ;; (customize-set-variable 'call-graph-path-to-git-repo \"/workspace/git/$username/repo/\")\n```\n## Backend configuration: Gnu Global\n```\n    ;; install \"GNU Global\" with universal-ctags support\n    ;; \"cd /path/to/project \u0026\u0026 gtags\"\n    (customize-set-variable 'call-graph-search-backend 'global)\n    (customize-set-variable 'call-graph-path-to-global \"/home/huming/private/gtags-6.5.7/bin/\")\n```\n## Common configuration\nSpecify the parse depth of the call-graph, \ndefault is 2, the more the depth is, the longer it takes\n```\n    (customize-set-variable 'call-graph-initial-max-depth 3)\n```\nIgnore reference which has function name but no `(...)'\n```\n    (customize-set-variable 'call-graph-ignore-invalid-reference t)\n```\nDisplay function together with its args\n```\n    (customize-set-variable 'call-graph-display-func-args t)\n```\nAvoid truncating Imenu entries\n```\n    (customize-set-variable 'imenu-max-item-length \"Unlimited\")\n```\nExclude UT/CT directories like /Dummy_SUITE/ /Dummy_Test/\n```\n    (dolist (filter '(\"grep -v \\\"Test/\\\"\"\n                    \"grep -v \\\"_SUITE/\\\"\"\n                    \"grep -v \\\"/test-src/\\\"\"\n                    \"grep -v \\\"/TestPkg/\\\"\"))\n    (add-to-list 'call-graph-search-filters filter))\n```\n## Sample configuration\n```\n(progn\n  (require 'call-graph)\n  (global-set-key (kbd \"C-c g\") #'call-graph)\n  (customize-set-variable 'imenu-max-item-length \"Unlimited\")\n  (customize-set-variable 'call-graph-display-func-args t)\n  (dolist (filter '(\"grep -v \\\"Test/\\\"\"\n                    \"grep -v \\\"Stub/\\\"\"\n                    \"grep -v \\\"_SUITE/\\\"\"\n                    \"grep -v \\\"/test-src/\\\"\"\n                    \"grep -v \\\"/TestPkg/\\\"\"\n                    \"grep -v \\\"/unittest/\\\"\"\n                    \"grep -v \\\"/test_src/\\\"\"\n                    \"grep -v \\\"/ct/\\\"\"))\n    (add-to-list 'call-graph-search-filters filter)))\n```\n# Screenshots\n\n![call-graph-demo-1.gif](img/call-graph-demo-1.gif)\n![call-graph-demo-2.gif](img/call-graph-demo-2.gif)\n\n# Limitations\n\nCurrently when parsing calling relations, header files is excluded.\nLots more need to be improved.\n\n# Features\n\n- [x] Navigate to caller file location.\n- [x] Cache searching result.\n- [x] Incremental searching.\n- [x] Manual removing wrong callers.\n- [x] Manual adding missing callers.\n- [x] Show function name and args in call-graph.\n- [x] Save cache data to survive emacs restart.\n- [x] Support multiple backends, e.g: gnu global, git.\n\n# Contributing\nYes, please do! See [CONTRIBUTING](CONTRIBUTING.md) for guidelines.\n\n# License\n\nSee [LICENSE](LICENSE). Copyright (c) 2018-2025 Huming Chen \u003cchenhuming@gmail.com\u003e\n\n# Donate\n\nIf you think that it's helpful for you, please consider paying a cup of coffee\nfor me. Thank you! :smile:\n\n\u003cimg\nsrc=\"WeChatQR.jpg\"\nalt=\"Wechat Pay\" width=\"120\"/\u003e\n\n\u003ca href=\"https://www.buymeacoffee.com/s9giES1\" target=\"_blank\"\u003e\n\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\"\nwidth=\"160\"/\u003e\n\u003c/a\u003e\n","funding_links":["https://www.buymeacoffee.com/s9giES1"],"categories":["Emacs Lisp"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeacoder%2Fcall-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeacoder%2Fcall-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeacoder%2Fcall-graph/lists"}