mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-05 20:22:27 +00:00
Get GDB working
Some checks failed
build / matrix_on_mode () (push) Has been cancelled
build / matrix_on_mode (optlinux) (push) Has been cancelled
build / matrix_on_mode (rel) (push) Has been cancelled
build / matrix_on_mode (tiny) (push) Has been cancelled
build / matrix_on_mode (tinylinux) (push) Has been cancelled
Some checks failed
build / matrix_on_mode () (push) Has been cancelled
build / matrix_on_mode (optlinux) (push) Has been cancelled
build / matrix_on_mode (rel) (push) Has been cancelled
build / matrix_on_mode (tiny) (push) Has been cancelled
build / matrix_on_mode (tinylinux) (push) Has been cancelled
You can now say `gdb hello.com.dbg` and it'll work perfectly.
This commit is contained in:
parent
afc986f741
commit
fbc4fcbb71
18 changed files with 230 additions and 67 deletions
|
@ -158,6 +158,60 @@
|
|||
.weak \canonical
|
||||
.endm
|
||||
|
||||
.macro beg
|
||||
.cfi_startproc
|
||||
.endm
|
||||
|
||||
.macro pro
|
||||
#if defined(__x86_64__)
|
||||
push %rbp
|
||||
.cfi_adjust_cfa_offset 8
|
||||
.cfi_rel_offset %rbp,0
|
||||
mov %rsp,%rbp
|
||||
.cfi_def_cfa_register %rbp
|
||||
#elif defined(__aarch64__)
|
||||
stp x29,x30,[sp,-16]!
|
||||
mov x29,sp
|
||||
.cfi_adjust_cfa_offset 16
|
||||
.cfi_rel_offset x29,0
|
||||
.cfi_rel_offset x30,8
|
||||
#else
|
||||
#error "unsupported architecture"
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro epi
|
||||
#if defined(__x86_64__)
|
||||
.cfi_def_cfa_register %rsp
|
||||
leave
|
||||
.cfi_adjust_cfa_offset -8
|
||||
.cfi_restore %rbp
|
||||
#elif defined(__aarch64__)
|
||||
ldp x29,x30,[sp],#16
|
||||
.cfi_adjust_cfa_offset -16
|
||||
.cfi_restore x30
|
||||
.cfi_restore x29
|
||||
#else
|
||||
#error "unsupported architecture"
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro end
|
||||
.cfi_endproc
|
||||
.endm
|
||||
|
||||
.macro cpush reg:req
|
||||
push \reg
|
||||
.cfi_adjust_cfa_offset 8
|
||||
.cfi_rel_offset \reg,0
|
||||
.endm
|
||||
|
||||
.macro cpop reg:req
|
||||
pop \reg
|
||||
.cfi_adjust_cfa_offset -8
|
||||
.cfi_restore \reg
|
||||
.endm
|
||||
|
||||
#ifdef __aarch64__
|
||||
.macro jmp dest:req
|
||||
b \dest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue