Skip to content

fix: enable F12/Go-to-Definition into Linux kernel source - #13

Merged
GhostDog788 merged 1 commit into
devfrom
feature/show-kernel-source-definition
Jun 8, 2026
Merged

GhostDog788 merged 1 commit into
devfrom
feature/show-kernel-source-definition

Conversation

@GhostDog788

Copy link
Copy Markdown
Owner

VS Code's C/C++ extension does not index dot-prefixed folders, so the synced kernel headers and source under .kernel-cache/ were invisible to IntelliSense and Go-to-Definition (F12) on a kernel symbol resolved nowhere.

  • Rename .kernel-cache/ -> kernel-cache/ (non-hidden) and update every reference: .gitignore, c_cpp_properties.json, settings.json, Makefile, scripts/00,02,03,04, README.md, CI workflow comment.
  • settings.json: drop the empty "C_Cpp.default.configurationProvider" (an empty provider suppresses c_cpp_properties.json) and remove the cache from files.exclude (excluding it also drops it from indexing).
  • c_cpp_properties.json: add kernel-cache/current/source to browse.path and set limitSymbolsToIncludedHeaders=false so Go-to-Definition can reach function bodies defined in kernel .c files, not just the header declarations.

VS Code's C/C++ extension does not index dot-prefixed folders, so the
synced kernel headers and source under .kernel-cache/ were invisible to
IntelliSense and Go-to-Definition (F12) on a kernel symbol resolved
nowhere.

- Rename .kernel-cache/ -> kernel-cache/ (non-hidden) and update every
  reference: .gitignore, c_cpp_properties.json, settings.json, Makefile,
  scripts/00,02,03,04, README.md, CI workflow comment.
- settings.json: drop the empty "C_Cpp.default.configurationProvider"
  (an empty provider suppresses c_cpp_properties.json) and remove the
  cache from files.exclude (excluding it also drops it from indexing).
- c_cpp_properties.json: add kernel-cache/current/source to browse.path
  and set limitSymbolsToIncludedHeaders=false so Go-to-Definition can
  reach function bodies defined in kernel .c files, not just the header
  declarations.

Verified: .vscode JSON valid, scripts pass bash -n, module builds
against the renamed cache, and the DWARF prefix-map invariant still
holds (no build/intermediate/ paths leak into the .ko).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@GhostDog788
GhostDog788 merged commit 08ad124 into dev Jun 8, 2026
6 checks passed
@GhostDog788
GhostDog788 deleted the feature/show-kernel-source-definition branch June 8, 2026 20:41

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 935220cd66

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .gitignore

# Per-target synced kernel headers, source, vmlinux.
.kernel-cache/
kernel-cache/

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep ignoring the legacy cache directory

After this rename, any developer who already ran the lab has a large .kernel-cache/ tree in their checkout; removing its ignore rule makes that old synced kernel source/vmlinux appear as untracked files immediately after pulling this commit. Since the new scripts write kernel-cache/ but do not migrate or delete the legacy directory, the ignore list should keep .kernel-cache/ as a legacy ignored path alongside the new cache to avoid noisy git status and accidental staging of hundreds of MB of generated files.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant