Fix debuginfod initialization in diagnose-crash skill - #11360
Open
LouisDeconinck wants to merge 1 commit into
Open
Fix debuginfod initialization in diagnose-crash skill#11360LouisDeconinck wants to merge 1 commit into
LouisDeconinck wants to merge 1 commit into
Conversation
gdb decides on debuginfod during startup, before -ex commands run, so -batch auto-answers the "Enable debuginfod for this session?" prompt with no. The -ex 'set debuginfod enabled on' then re-enables it too late: shared libraries still symbolize, but the crashed executable's debug info was already looked up and abandoned, leaving its frames as ??. -iex runs before the startup lookup and fetches the executable's debug info. Fixes omacom#11305
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
default/agents/skills/diagnose-crash/SKILL.mdfrom-ex 'set debuginfod enabled on'to-iex 'set debuginfod enabled on'.test/shell.d/crash-capture-test.sh, next to the existing SKILL.md content check, so a regression back to-exfails the suite.Why
-iexinstead of-exgdb asks "Enable debuginfod for this session?" during startup, before any
-excommand runs, and performs the executable's debug-info lookup at that point. Under-batchthe prompt is auto-answeredN, so the lookup is skipped and never retried. A later-ex 'set debuginfod enabled on're-enables debuginfod in time for shared-library frames, but the crashed program's own frames stay unsymbolized (??) — exactly the frames that matter.-iexruns before the startup lookup, so the executable's debug info is fetched too.Verification
Reproduced on gdb 17.1 against
debuginfod.ubuntu.comwith a fresh$HOME(cold debuginfod cache), crashing/bin/bashviakill -SEGV $$:-ex):Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]appears at startup; the debuginfod client cache afterwards contains lookups for shared libraries only —/bin/bash's build-id is never queried.-iex): no startup prompt; the executable's build-id is queried and its debug info is downloaded before the inferior runs.Also ran:
bash test/shell.d/crash-capture-test.sh— all assertions pass, including the new one.git diff --check— clean../test/shell— this file's tests pass; unrelated pre-existing environment failures on this machine (missinglua,omarchy-cmd-present, hardware-dependent probes) are unchanged.