NASM Forum > Using NASM

Debugging Multiple Files

(1/1)

HackerWithoutACause:
For the sake of project organization I split my project into multiple files using
--- Code: ---%include "alloc.s"
--- End code ---
, but now I have the problem that I can not view the lines of assembly with GDB I am using the command
--- Code: ---nasm -f elf64 -o main.o main.s -g && ld main.o -o main && gdb main
--- End code ---
to compile the assembly. How can I get NASM and GDB to properly display the lines of assembly that it is running?

I am using NASM version 2.15.05 and GDB version 10.2.

Frank Kotler:
I am not much good at gdb.
Adding "-F dwarf" to Nasm's command line might help.
Starting with a single byte instruction - "nop" will do - may help.
Do not give ld "-s".
Good luck!

Best,
Frank


Navigation

[0] Message Index

Go to full version