I am building an OS in assembly and I am using NASM for assembly. I am telling to NASM to create a binary file that I am using to debug with QEMU.
To debug easier I am using gdb with QEMU. I am giving to gdb an .elf object file that I am creating using NASM (with the same input files and just .elf output).
The NASM does not support adding breakpoints in source code and when I want to put a breakpoint I am telling it to gdb. Because I am assembling a lot of times per day the OS using a batch file. The problem is that evry time I am reassembling the OS the debug info are lost so I need to reput the breakpoints.
As you may know an OS have a lot of functions and I want to put a breakpoint at most of them so I cannot continue with this way.
So which the way to put breakpoints at an elf file?
I can for example use the gdb and at command line pass a file as stdin that contains the instructions and then exit?