Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 4,637 of 4,675    |
|    Martijn Bos to All    |
|    Debugger problems    |
|    30 Nov 23 01:00:11    |
      From: martijnm.bos@gmail.com              All,       It has been 30+ years since I played around with some assembly.       Just for learning purposes I'm doing some more playing :-)              First some information :       The system I'm on:       [martijn@fedora asm]$ uname -a       Linux fedora 6.2.15-100.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 11 16:51:53       UTC 2023 x86_64 x86_64 x86_64 GNU/Linux       [martijn@fedora asm]$              Then for completeness also the program (for this particular problem I do not       think it's that relevant :-) ):       [martijn@fedora asm]$ cat een.asm       section .data              section .text              global _start              _start:        mov al, 1 ; mov 1 into the al register        add al, 1 ; add one to the al register               mov rax, 60 ; syscall for exit        mov rdi, 0 ; Return code        syscall       [martijn@fedora asm]$                     Then I compile, link and run the progrm:       [martijn@fedora asm]$ nasm -f elf64 -gdwarf een.asm       [martijn@fedora asm]$ ld -m elf_x86_64 -o een een.o       [martijn@fedora asm]$ ./een       [martijn@fedora asm]$              So far so good (I think):              But I want to see what is actually happening, so I want to see it in my       debugger :              [martijn@fedora asm]$ gdb een       GNU gdb (GDB) Fedora 12.1-2.fc36       ....       ....       For help, type "help".       Type "apropos word" to search for commands related to "word"...       Reading symbols from een...       (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 add al, 1 ; add one to the al register       (gdb) break 8       No line 8 in the current file.       Make breakpoint pending on future shared library load? (y or [n]) n       (gdb)                     As you can see I can not set a breakpoint. And that's my problem.       Whitout breakpoints I can not step through my program.              Does anyone have any pointers/tips/trics on how to resolve this issue.              (I know myself...I probably oversee the obvious...do not hesitate to point       that out)              Best Regards,       Martijn Bos              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca