GNATINSPECT(1)
π GNATINSPECT β bestie's guide to querying cross-references on source code β¨
okay so. this is a page from the GNATColl manual, and we're talking about gnatinspect, a little icon that lets you interrogate your source code like it owes you money. π΅οΈββοΈ
πΈ SYNOPSIS πΈ
gnatinspect -Pproject [switches]
π¦ DESCRIPTION π¦
First things first, bestie: the reference source of information about gnatinspect β the actual GNATColl manual β should be chilling in various formats under the /usr/share/doc/libgnatcoll-doc directory. If it's not there, no biggie, just go install the libgnatcoll-doc package. π
Now, the vibe. When programmers are out here manipulating source code, they need to know where the various symbols are defined, where they're used, and likeβ¦ everything else about them. Computing all that info? It's tricky, okay, especially for languages that support overloading of subprograms. π That's the chaos.
But here's the thing: by definition, a compiler already understands the program and knows where each part comes from. It's giving main character energy fr fr. And some compilers β like GNAT and gcc β can generate extra output files that carry all this info:
.ali(that's GNAT's, no cap).gli(that's gcc's, periodt)
Then the GNATCOLL.Xref Ada library can aggregate all those files into a single sqlite database, and suddenly it's answering questions like:
- Give me the declaration for this entity π
- List all places where this entity is used
- Show all subprograms that could be called in practice at this dispatching call
- What files does this file depend on
- Show me the call graph for this applicationβ¦
Obsessed, honestly. β¨
And instead of making you access the sqlite database directly (ugh, boring), gnatinspect displays an interactive prompt that lets you perform all these various queries. So cute, so convenient.
Also, quick tip: running gnatinspect --help will display the list of commands and their syntax. You're welcome. π
lowkey if you skip --help you're just doing cardio for no reason, bestie πββοΈπ¨
π SEE ALSO π
gnatcoll_db2ada(1)π
π AUTHOR π
This manual page has been written by Nicolas Boulenguez <nicolas@debian.org> for the Debian project (and may be used by others). Slay.
okay that's the whole page, we ate and left no crumbs π this little writeup is from the GNATColl manual, dated 2014-08-07, and it lives under Debian GNU/Linux. mwah, bye bestie πβ¨π
π¦ where this page comes from
- debian bookworm: libgnatcoll-db-bin 23.0.0-4 Β· GPL-3.0-or-later WITH GCC-runtime-library exception
- debian trixie: libgnatcoll-db-bin 25.0.0-2+b1 Β· GPL-3.0-or-later WITH GCC-runtime-library exception
- ubuntu jammy: libgnatcoll-db-bin 21.0.0-6 Β· GPL-3.0-or-later WITH GCC-runtime-library exception
- ubuntu noble: libgnatcoll-db-bin 23.0.0-6build1 Β· GPL-3.0-or-later WITH GCC-runtime-library exception
- ubuntu noble: libgnatcoll-db-bin 23.0.0-6build1.1 Β· GPL-3.0-or-later WITH GCC-runtime-library exception
- ubuntu questing: libgnatcoll-db-bin 25.0.0-2build2
- ubuntu resolute: libgnatcoll-db-bin 25.0.0-2build3 Β· GPL-3.0-or-later WITH GCC-runtime-library exception
- ubuntu stonking: libgnatcoll-db-bin 25.0.0-2build4 Β· GPL-3.0-or-later WITH GCC-runtime-library exception
- Copyright (C) 2014 Nicolas Boulenguez <nicolas@debian.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms