{"id":17875082,"url":"https://github.com/tromey/gdb-helpers","last_synced_at":"2025-03-21T23:32:27.618Z","repository":{"id":21939455,"uuid":"25263911","full_name":"tromey/gdb-helpers","owner":"tromey","description":"GDB helper scripts","archived":false,"fork":false,"pushed_at":"2020-06-20T16:13:13.000Z","size":17,"stargazers_count":45,"open_issues_count":1,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-01T10:51:11.293Z","etag":null,"topics":["gdb"],"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/tromey.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":"2014-10-15T16:41:08.000Z","updated_at":"2024-11-01T15:02:42.000Z","dependencies_parsed_at":"2022-07-17T12:16:20.407Z","dependency_job_id":null,"html_url":"https://github.com/tromey/gdb-helpers","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/tromey%2Fgdb-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tromey%2Fgdb-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tromey%2Fgdb-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tromey%2Fgdb-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tromey","download_url":"https://codeload.github.com/tromey/gdb-helpers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244166743,"owners_count":20409179,"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":["gdb"],"created_at":"2024-10-28T11:13:02.587Z","updated_at":"2025-03-21T23:32:27.349Z","avatar_url":"https://github.com/tromey.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\n\nThis adds some new commands and convenience functions to gdb.  It also\nchanges some defaults to be more sensible.  I've found this useful\nwhile hacking on firefox.\n\nAlso, for Emacs users, this arranges to set `EDITOR` to `emacsclient -n`\nwhen gdb is running inside Emacs, so that the `edit` command will contact\nEmacs and not wait for the edit to be complete.  (In this case it also\nsets another environment variable so the new `ecomm` command will do\nthe right thing.)\n\n## Installing\n\nThe simplest way is to:\n\n```\nmake hack-gdbinit\n```\n\nThis will edit your `.gdbinit` to load the helpers.\n\n## New commands:\n\n* `ecomm N`.  Edit the commands for breakpoint N.  This writes the\n  commands out to a file and pops up your editor.  When you're done\n  the commands are re-applied.\n\n* `hier CLASS`.  Print the class hierarchy of a class, one line per\n  base class.\n\n* `preattach FILE`.  This is like `attach`, but it attaches to the\n  next instance of the program.  This relies on SystemTap to do its\n  magic.\n\n## New functions\n\n* `$_python(STR)`.  Evaluate `STR` as a Python expression.  This is an\n  occasionally handy shortcut to use in place of a new `gdb.Function`\n  implementation.\n\n* `$_typeof(EXP)`.  Evaluates EXP and then returns a string\n  representation of its dynamic type.  This is handy in conjunction\n  with `$_regex` (distributed with gdb) in breakpoint conditions --\n  you can easily break only when a specific sub-class is seen.\n\n* `$_upvar(NAME, LIMIT)`.  Search up for at most LIMIT frames, looking\n  for a variable named NAME (which must be a string).  If such a\n  variable is found, return its value.  Otherwise, an error results.\n\n* `$_up([N = 1])`.  Move up N frames and return 1.  This is sometimes\n  useful in conjunction with `$_var`.\n\n* `$_var(NAME)`.  Return the value of a variable named NAME in the\n  current frame.\n\n## Oddball Features:\n\n* If you put `\\E` into your `extended-prompt`, then when running gdb\n  in the shell, changes to the current location will be sent to a\n  running Emacs using `emacsclient`.  For best results you will also\n  want to `(setq server-raise-frame nil)` in Emacs.\n\n  This is useful if you have to run gdb from the shell for some\n  reason, and want see the sources, and don't want to use the TUI, and\n  gdb-gui fails due to an obscure bug on your machine.  Cough cough.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftromey%2Fgdb-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftromey%2Fgdb-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftromey%2Fgdb-helpers/lists"}