Bookmarks and Comments
The window work in this chapter is (documented) — the build sandbox has no display. The discipline it teaches is the point, and it needs no window to state.
Analysis is not done in one sitting, and it is not done by one pass. You will understand a program in layers — this week the strings, next week the function that uses them — and everything you worked out in one session has to survive into the next. Ghidra keeps two kinds of marks for exactly that, and both live in the project, not the binary.
Comments: writing on the program
A comment is your text pinned to an address. Ghidra offers several placements, because different notes belong in different spots:
| Kind | Where it sits | Suited to |
|---|---|---|
| Plate | Above a function, as a banner | The function's summary — its job, in your words |
| Pre | Above one instruction | What the block below is about to do |
| End-of-line (EOL) | Beside one instruction | A fact about that line: a magic number explained |
| Post | Below an instruction | What just happened, established after the fact |
| Repeatable | Everywhere the address is referenced | A fact other readers need at every use |
Comments render in the Listing and (plate
comments especially) in the decompiler, so
the reader who arrives later — usually you,
in a month — meets your reasoning where the
code is. The specimen gives the shape of
good ones: at 001011b9, the comparison,
an EOL comment reading "gate opens when
this equals 102834 — see scramble" replaces
a riddle with a signpost, and a plate
comment over check_code saying "compares
scramble(attempt) with 102834; solved:
4213" closes the question for good.
Bookmarks: the trail of open questions
A bookmark is a flag at an address with a category and a note — built not for facts but for attention. The working set most analysts settle into is small: a category for questions to come back to, one for things that look wrong, one for places a colleague (or your future self) should start. Bookmarks collect in their own window, so the session's open questions are one list, not forty memories.
The discipline that makes bookmarks earn their keep: a bookmark is a promise, and it gets deleted when the question is answered — its answer becoming a comment or a rename at the same address. A program littered with stale bookmarks is a program whose map nobody trusts.
The notebook outside the tool
Two more habits, learned by everyone who does this for long:
- Keep a plain-text lab notebook beside
the project: what you tried, what the
evidence was, what you concluded, what you
still owe. Comments hold facts about
addresses; the notebook holds the story
— and it is searchable, diffable, and
readable without Ghidra. This guide's
examples/transcripts play that role for the specimen. - Write conclusions, not observations. "Calls FUN_00101169" is an observation the Listing already shows. "The 102834 comparison is the lock" is a conclusion, and conclusions are what evaporate between sessions.
Check: your marks are working when a fresh session opens the program and, within a minute, the plate comments say what is known, the bookmarks list what is not, and nothing important lives only in your head. Renames (chapter 7) say what things are; comments say what you know; bookmarks say what you still owe. All three are the analysis, as surely as the disassembly is.