flat assembler
Message board for the users of flat assembler.
Index
> Linux > fas -> dwarf2? |
Author |
|
redsock 08 Nov 2014, 06:31
I use fasm + gdb constantly, and have found that so long as I use public symbols and framepointers, it is a breeze (and works as you'd expect/want).
Code: format ELF64 public crashycrashy crashycrashy: push rbp mov rbp, rsp ; framepointers to make gdb happy xor eax, eax mov dword [rax], 0 leave ; restore stackframe ret public _start _start: push rbp mov rbp, rsp ; framepointers to make gdb happy call crashycrashy mov eax, 60 ; exit xor edi, edi ; return code syscall compile/link with: fasm example.asm && ld -o example example.o seems better than going to DWARF2 imo Cheers |
|||
08 Nov 2014, 06:31 |
|
litwr 08 Nov 2014, 10:11
Thank you. However this way can't satisfy me. I want to use b, l, d, ... - commands which are only available if the symbolic information is provided... I use gdb to work with C/C++ and want to use the same ways with Assembler.
|
|||
08 Nov 2014, 10:11 |
|
Endre 08 Nov 2014, 16:01
Dwarf format is rather complex. You might want to take a look at stabs format which is simpler and gdb knows it. The other option is using another assembler as e.g. (g)as, yasm, nasm, etc. On Linux I use exclusively (g)as which is always available and knows everything I need. (g)as has the advantage that you can easily use the C preprocessor. There are some examples here and here. And you can use the mentioned gdb commands.
|
|||
08 Nov 2014, 16:01 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.