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

You can now say `gdb hello.com.dbg` and it'll work perfectly.
This commit is contained in:
Justine Tunney 2025-03-30 15:25:20 -07:00
parent afc986f741
commit fbc4fcbb71
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
18 changed files with 230 additions and 67 deletions

View file

@ -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.