On Sat, Sep 4, 2021 at 11:53 AM duilio foschi via lazarus < [email protected]> wrote:
> I followed Bart's suggestion and added the -al switch to the fpc.cfg file. > > This was probably the right move, as - after a new compile - I could see > the wanted .s file beside the regular EXE. > > I uploaded the .s file here: > https://mega.nz/file/rlpyHa7b#fx0LYTjapmUdFRkzVGCCzFFogqYuEu7UvYQ5HtilLks > > I opened the new .s file with a text editor and had a new surprising > result: the instruction > > i:=cmbYear.ItemIndex+2005; > > is nowhere to be found. > The assembler file you posted is for the .lpr file only. The -al option generates the assembler files per compilation unit, before the project gets linked. Also it doesn't show the machine code (this resides in the compiled object file), which seems to be what you want to inspect/modify. The easiest way to see both the machine code, the disassembled code and the Pascal code from inside Lazarus is to place a breakpoint on the line of interest, run until you hit that breakpoint, then switch to the Assembler view. An alternative is to use a tool such as objdump or dumpbin to disassemble the executable file. There are options to include source code lines in the output if available as debug information.
-- _______________________________________________ lazarus mailing list [email protected] https://lists.lazarus-ide.org/listinfo/lazarus
