mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-26 22:38: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
|
@ -32,8 +32,8 @@
|
|||
// @param rdx is environ
|
||||
// @param rcx is auxv
|
||||
// @noreturn
|
||||
cosmo: push %rbp
|
||||
mov %rsp,%rbp
|
||||
cosmo: beg
|
||||
pro
|
||||
mov %edi,%r12d
|
||||
mov %rsi,%r13
|
||||
mov %rdx,%r14
|
||||
|
@ -104,7 +104,10 @@ cosmo: push %rbp
|
|||
je 2f
|
||||
push %rax
|
||||
push %rax
|
||||
call .Largs
|
||||
mov %r12d,%edi
|
||||
mov %r13,%rsi
|
||||
mov %r14,%rdx
|
||||
mov %r15,%rcx
|
||||
call *(%rax)
|
||||
pop %rax
|
||||
pop %rax
|
||||
|
@ -112,17 +115,15 @@ cosmo: push %rbp
|
|||
jmp 1b
|
||||
|
||||
// call main()
|
||||
2: call .Largs
|
||||
2: mov %r12d,%edi
|
||||
mov %r13,%rsi
|
||||
mov %r14,%rdx
|
||||
mov %r15,%rcx
|
||||
.weak main
|
||||
call main
|
||||
xchg %eax,%edi
|
||||
call exit
|
||||
|
||||
.Largs: mov %r12d,%edi
|
||||
mov %r13,%rsi
|
||||
mov %r14,%rdx
|
||||
mov %r15,%rcx
|
||||
ret
|
||||
end
|
||||
.endfn cosmo,weak
|
||||
|
||||
// Enables Thread Local Storage.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue