问题
Intro. For my compilers course I have to translate some language to assembler. Now my code has a segfault, and I have hard time debugging it. Having an ability to watch variables would simplify the process a lot, but the final asm code has only registers and their derivatives.
Question. How can I create debug symbols for gdb manually? I believe I can propagate all necessary information. Will the separate file be created or will it be part of asm? In the former case how to make gdb aware of that file?
A link to some manual is enough. I've searched for one and was only able to find "gcc -g" and some questions about generating symbol files separately.
来源:https://stackoverflow.com/questions/53242650/creating-debug-symbols-for-gdb-manually