encounter / objdiff

A local diffing tool for decompilation projects
Apache License 2.0
124 stars 21 forks source link

View that shows which line of source asm corresponds to the line in decompiled source #134

Closed H-A-M-G-E-R closed 3 weeks ago

H-A-M-G-E-R commented 4 weeks ago

like in decomp.me, makes decomping big functions easier

encounter commented 4 weeks ago

objdiff does show source line numbers if the object was compiled with debug information (DWARFv1 .line and DWARFv2+). Does your platform use a different line number format?

encounter commented 4 weeks ago

I just glanced at the agbcc repo and saw an interesting commit: https://github.com/pret/agbcc/commit/7b2372d922b6f76eac6166b270e421ce21eb583c

Could you try using -ffix-debug-line?

H-A-M-G-E-R commented 3 weeks ago

waver.zip umm.. it's not working although the flags are -O2 -mthumb-interwork -fhex-asm -ffix-debug-line?

encounter commented 3 weeks ago

Looks like you’re missing -g3, referencing the flags from a decomp.me scratch.

H-A-M-G-E-R commented 3 weeks ago

however adding those settings would make the project nonmatching .align 2, 0 @ dont insert nops is added to the end by makefile, and it's in the debug section making them useless unless debug info is turned off the project: https://github.com/H-A-M-G-E-R/mf

encounter commented 3 weeks ago

Maybe an agbcc change could make it emit debug info without changing codegen? Or you could set up extra Makefile rules for objects built with debug info. Regardless, this is out of objdiff’s scope at this point.

H-A-M-G-E-R commented 3 weeks ago

solution: seperate makefile commands emit debug symbols for objdiff, no debug symbols when building rom