mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 15:28:30 +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
|
@ -24,9 +24,9 @@
|
|||
//
|
||||
// @return 0 on success, or -1 w/ errno
|
||||
sys_sched_yield:
|
||||
beg
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
pro
|
||||
xor %eax,%eax
|
||||
mov __hostos(%rip),%dl
|
||||
|
||||
|
@ -84,13 +84,16 @@ sys_sched_yield:
|
|||
// fails a positive or negative errno might get returned.
|
||||
#endif
|
||||
|
||||
9: leave
|
||||
9: epi
|
||||
ret
|
||||
|
||||
#elif defined(__aarch64__)
|
||||
|
||||
stp x29,x30,[sp,-32]!
|
||||
mov x29,sp
|
||||
.cfi_adjust_cfa_offset 32
|
||||
.cfi_rel_offset x29,16
|
||||
.cfi_rel_offset x30,24
|
||||
mov x3,0
|
||||
mov x2,0
|
||||
add x4,sp,16
|
||||
|
@ -101,10 +104,14 @@ sys_sched_yield:
|
|||
mov x16,#0x5d // select(0,0,0,0,&blah) for xnu
|
||||
svc 0
|
||||
ldp x29,x30,[sp],32
|
||||
.cfi_adjust_cfa_offset -32
|
||||
.cfi_restore x30
|
||||
.cfi_restore x29
|
||||
ret
|
||||
|
||||
#else
|
||||
#error "arch unsupported"
|
||||
#endif
|
||||
end
|
||||
.endfn sys_sched_yield,globl
|
||||
.previous
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue