mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-20 12:30:09 +00:00
Issue new Blinkenlights release
This commit is contained in:
parent
94afa982c3
commit
c42dbe0e9e
2 changed files with 6 additions and 5 deletions
|
@ -230,7 +230,7 @@ relegated void __oncrash(int sig, struct siginfo *si, ucontext_t *ctx) {
|
||||||
int gdbpid, err;
|
int gdbpid, err;
|
||||||
static bool once;
|
static bool once;
|
||||||
err = errno;
|
err = errno;
|
||||||
if (once) abort();
|
if (once) _exit(119);
|
||||||
once = true;
|
once = true;
|
||||||
/* TODO(jart): Needs translation for ucontext_t and possibly siginfo_t. */
|
/* TODO(jart): Needs translation for ucontext_t and possibly siginfo_t. */
|
||||||
if (IsFreebsd() || IsOpenbsd()) ctx = NULL;
|
if (IsFreebsd() || IsOpenbsd()) ctx = NULL;
|
||||||
|
|
|
@ -17,10 +17,12 @@
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
#include "libc/calls/calls.h"
|
#include "libc/calls/calls.h"
|
||||||
|
#include "libc/calls/internal.h"
|
||||||
#include "libc/calls/struct/stat.h"
|
#include "libc/calls/struct/stat.h"
|
||||||
#include "libc/elf/elf.h"
|
#include "libc/elf/elf.h"
|
||||||
#include "libc/log/check.h"
|
#include "libc/log/check.h"
|
||||||
#include "libc/runtime/gc.h"
|
#include "libc/runtime/gc.h"
|
||||||
|
#include "libc/stdio/stdio.h"
|
||||||
#include "libc/sysv/consts/map.h"
|
#include "libc/sysv/consts/map.h"
|
||||||
#include "libc/sysv/consts/o.h"
|
#include "libc/sysv/consts/o.h"
|
||||||
#include "libc/sysv/consts/prot.h"
|
#include "libc/sysv/consts/prot.h"
|
||||||
|
@ -35,15 +37,14 @@ void LoadDebugSymbols(struct Elf *elf) {
|
||||||
const char *path;
|
const char *path;
|
||||||
if (elf->ehdr && GetElfSymbolTable(elf->ehdr, elf->size, &n) && n) return;
|
if (elf->ehdr && GetElfSymbolTable(elf->ehdr, elf->size, &n) && n) return;
|
||||||
DCHECK_NOTNULL(elf->prog);
|
DCHECK_NOTNULL(elf->prog);
|
||||||
fprintf(stderr, "HI %s\n", elf->prog);
|
if ((fd = open(xstrcat(elf->prog, ".dbg"), O_RDONLY)) != -1) {
|
||||||
if ((fd = open(gc(xstrcat(elf->prog, ".dbg")), O_RDONLY)) != -1 ||
|
|
||||||
(fd = open(elf->prog, O_RDONLY)) != -1) {
|
|
||||||
if (fstat(fd, &st) != -1 &&
|
if (fstat(fd, &st) != -1 &&
|
||||||
(elfmap = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0)) !=
|
(elfmap = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0)) !=
|
||||||
MAP_FAILED) {
|
MAP_FAILED) {
|
||||||
elf->ehdr = elfmap;
|
elf->ehdr = elfmap;
|
||||||
elf->size = st.st_size;
|
elf->size = st.st_size;
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
fprintf(stderr, "got here\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue