NASM - The Netwide Assembler

NASM Forum => Summer of Code Ideas => Topic started by: mayureshkathe on September 25, 2019, 08:39:28 AM

Title: Can NASM get a debugger?
Post by: mayureshkathe on September 25, 2019, 08:39:28 AM
Can the NASM distribution get a assembly language debugger too?
Searching around led me to http://ald.sourceforge.net/
Maybe the team can learn how ALD does it and build something of their own for NASM!
Title: Re: Can NASM get a debugger?
Post by: Frank Kotler on September 25, 2019, 08:24:14 PM
Hi  mayureshkathe,

Welcome to the forum.

I am only guessing, but I would guess that Nasm will not soon be seeing a "netwide" debugger. While Patrick's ALD is great for Linux and the BSDs, it won't do much for our dos/doze users who have not yet made the step up. :)

Unless you'd like to contribute something...

Best,
Frank

Title: Re: Can NASM get a debugger?
Post by: T145 on December 03, 2019, 05:21:02 AM
You can just compile your NASM programs w/ the `-g` flag, then use a debugger of your choice. I'm sure you're familiar w/ GDB, so there's a place to start.

(http://www.yolinux.com/TUTORIALS/GDB-Commands.html)
Title: Re: Can NASM get a debugger?
Post by: uncle Richard on May 10, 2020, 02:30:48 PM
I've don't try, but it's maybe better place. And even the best for you, mayureshkathe. http://dman95.github.io/SASM/english.html (http://dman95.github.io/SASM/english.html)
Title: Re: Can NASM get a debugger?
Post by: Deskman243 on May 24, 2023, 05:20:37 PM
I agree debuggers are pretty relevant to most people that program around these stages of programming. If you're programming on linux I'd suggest that the basic resources like gdb have good potential. From my understanding I did have to learn other things like file types and settings however I've gotten good use from this. On linux I run ld for linking and object files that gdb uses for assembly debugging. I've also noticed for people that use alot of .bin files that bochs is another common option. Other than that just a standard makefile and that's about how I debug code here.

This is the gdb function file I use
From prompt
sudo gdb
gdb> source -s -v gdb.config

gdb.config
Code: [Select]
define settings1
add-symbol-file boot.o 0x7c00
target remote | qemu-system-i386 -S -hda os.bin -gdb stdio
end


define build1
add-symbol-file boot.o 0x7c00 \
y
end

define build2
target remote | qemu-system-i386 -S -fda os.img -gdb stdio
end


If there's anything else you'd like details on let me know