Author Topic: Can NASM get a debugger?  (Read 21859 times)

Offline mayureshkathe

  • Jr. Member
  • *
  • Posts: 3
Can NASM get a debugger?
« 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!

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Can NASM get a debugger?
« Reply #1 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


Offline T145

  • Jr. Member
  • *
  • Posts: 12
  • Country: 00
  • Hacker, Jacker & All-Around Gobsmacker
    • CodeReview
Re: Can NASM get a debugger?
« Reply #2 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)

Offline uncle Richard

  • Jr. Member
  • *
  • Posts: 8
Re: Can NASM get a debugger?
« Reply #3 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

Offline Deskman243

  • Jr. Member
  • *
  • Posts: 49
Re: Can NASM get a debugger?
« Reply #4 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