All,
Reporting back was taking a little longer then I expexted ...sorry.
Anyway.
I still cannot get the debugger to break on a linenumber. If I read correctly you had more luck (or wisdom).
However the method mentioned earlier : x/10i _start does work!
Did really helps me, I was not aware of x being able to display instructions.
Then I was able to set a breakpoint on the adress that I need/want.
And now I can start debugging.
Stepping through the program with "s" was running through the program immediately, so I found that I had to use "si" (Step Instruction)
It still seams/seems silly to me that I can list a piece of a program in gdb, but can not set a break on the kines I think trhe debugger knows:
(gdb) list
1 section .data
2
3 section .text
4
5 global _start
6
7 _start:
8 mov al, 1 ; mov 1 into the al register
9
10 mov rax, 60 ; syscall for exit
(gdb) b 8
No line 8 in the current file.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb)
Anyway....I can dust off some more old assembly knowledge now.
Thanks all for you help and time.
Best Regards,
Martijn
Op maandag 4 december 2023 om 13:12:49 UTC+1 schreef Borax Man: