here is the code that i used with command line GDB and DDD GUI interface for GDB
I tried setting the break points and used the right assembler options and linking options .
Thou the programm dosnt stop at the BP i advice it to stop at
char_prompt db "Please input a character: ", 0
out_msg1 db "The ASCII code of '", 0
out_msg2 db "' in binary is ", 0
query_msg db "Do you want to quit (Y/N): ", 0
BP mov AH, 80H
mov CX, 8
BP test AL, AH
shr AH, 1
cmp AL, 'Y'
I use these steps to assemble and link the programm
nasm -f elf -g -F stabs
ld -o io.o
then i start debugger as such ..
then i set the breakpoints with these commands
(gdb) break which in my case is 20 and 24 .
I have writting BP in the code above to let you know where the brek points are .
Then when i execute the program with a
the programm runs till its normal end . Thou the Debugger dosnt break at the where the breakpoints are set .
Please let me know what the proble is .. I tried doing everything by the book but it dosnt work .
Oh one thing is . That if i set the break point where i would be calling a function .
With Call it breaks there only
so if i do .
Set break points on all Functions . They break but not where i want it to .