Then your point of entry will be
components\fpdebug\fpdbgdisasx86.pp
ide\packages\idedebugger\assemblerdlg.pp
And the chain of units inbetween. (DebuggerIntf)
There are 2 DebuggerIntf, as I am gradually trying to move to a newer one. (the old one was when we had only one backend....)
The newer one, is the one with the interfaces.
It doesn't have anything for the asm yet. So that goes all via the old one.
There is somewhere some horrible code that retrieves ranges, merges them, and arghh.
"PrepareRange" and related.
Really bad code.
But really hard to replace, because then you need to deal with the gdb and lldb backends too....
For an idea how to add stuff, search the git log for the recent addition (in 2023) of "links" in the dissembler. (ctrl click to follow jmp and call statement)
Search the log of just the ide\packages\idedebugger\assemblerdlg.pp => that should get you the commit(s).
As for the fp debug disass.
TX86Disassembler.Disassemble disassembles into TInstruction => where the opcode is an enum.
Stringification happens in a 2nd step.
That is so the debugger can internally read code, and does not need the string. (e.g. check if there is a call statement).
Unfortunately (and that is a todo), the operands are still directly returned as strings. They should be represented as some data-structure...
That is a todo....
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40556#note_1604325987