{"id":17799957,"url":"https://github.com/chatziko/visualize-c-memory","last_synced_at":"2025-03-17T07:31:11.346Z","repository":{"id":48997555,"uuid":"340677149","full_name":"chatziko/visualize-c-memory","owner":"chatziko","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-30T14:31:13.000Z","size":90,"stargazers_count":26,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T09:23:34.507Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chatziko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-20T14:43:29.000Z","updated_at":"2025-03-01T09:00:31.000Z","dependencies_parsed_at":"2022-08-28T10:10:51.004Z","dependency_job_id":null,"html_url":"https://github.com/chatziko/visualize-c-memory","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chatziko%2Fvisualize-c-memory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chatziko%2Fvisualize-c-memory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chatziko%2Fvisualize-c-memory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chatziko%2Fvisualize-c-memory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chatziko","download_url":"https://codeload.github.com/chatziko/visualize-c-memory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243992173,"owners_count":20380159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-27T12:13:30.662Z","updated_at":"2025-03-17T07:31:11.051Z","avatar_url":"https://github.com/chatziko.png","language":"Python","readme":"## visualize-c-memory\n\nReal-time visualization of the memory of a C program during debugging in VSCode,\nusing [vscode-debug-visualizer](https://github.com/hediet/vscode-debug-visualizer)\nand [GDB's Python API](https://sourceware.org/gdb/current/onlinedocs/gdb/Python-API.html).\n\n\n![](demo.png)\n\n\n### To try it\n\n- Install graphviz.\n  ```\n  sudo apt install graphviz\n  ```\n\n- In VSCode, install [vscode-debug-visualizer](https://github.com/hediet/vscode-debug-visualizer).\n  ```\n  Ctrl-P / ext install hediet.debug-visualizer\n  ```\n\n- Clone this repository, open it in VSCode and start debugging (`F5`).\n\n  If the debugger doesn't start, make sure that `gdb`, `make` and VSCode's [ms-vscode.cpptools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) are installed.\n\n- Select `F1 / Debug Visualizer : New View` and\n  write `\"memory\"` (__including__ the quotes) in the visualization window\n  that opens.\n\n- A visualization of both the stack and the heap will appear, and it will\n  update as you step through the code (`F10`, `F11`, etc).\n\n- Modify [`examples/examples.c`](examples/examples.c) to try your own code.\n\nTested in Ubuntu 20.04 and Windows 10 under WSL.\nmacOS is not supported (it could be adapted, but Apple makes it\n[particularly painful](https://dev.to/jasonelwood/setup-gdb-on-macos-in-2020-489k) to use\nGDB in macOS anyway).\n\n\n### To use it in your own project\n\n- Build `visualize-c-memory.so` (by running `make` in `src`).\n- Load the `.so` and the python module in GDB by adding\n  the following to your `launch.json`:\n  ```\n\t\"environment\": [\n\t\t{\"name\":\"LD_PRELOAD\", \"value\":\"${workspaceFolder}/\u003cpath-to\u003e/visualize-c-memory.so\"},\n\t],\n  \"setupCommands\": [\n    {\n      \"text\": \"source ${workspaceFolder}/\u003cpath-to\u003e/visualize-c-memory.py\"\n    }\n  ],\n  ```\n  See [.vscode/launch.json](.vscode/launch.json) for an example.\n\n\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchatziko%2Fvisualize-c-memory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchatziko%2Fvisualize-c-memory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchatziko%2Fvisualize-c-memory/lists"}