Issue new Blinkenlights release

This commit is contained in:
Justine Tunney 2021-02-27 22:35:50 -08:00
parent 94afa982c3
commit c42dbe0e9e
2 changed files with 6 additions and 5 deletions

View file

@ -230,7 +230,7 @@ relegated void __oncrash(int sig, struct siginfo *si, ucontext_t *ctx) {
int gdbpid, err;
static bool once;
err = errno;
if (once) abort();
if (once) _exit(119);
once = true;
/* TODO(jart): Needs translation for ucontext_t and possibly siginfo_t. */
if (IsFreebsd() || IsOpenbsd()) ctx = NULL;

View file

@ -17,10 +17,12 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/calls/calls.h"
#include "libc/calls/internal.h"
#include "libc/calls/struct/stat.h"
#include "libc/elf/elf.h"
#include "libc/log/check.h"
#include "libc/runtime/gc.h"
#include "libc/stdio/stdio.h"
#include "libc/sysv/consts/map.h"
#include "libc/sysv/consts/o.h"
#include "libc/sysv/consts/prot.h"
@ -35,15 +37,14 @@ void LoadDebugSymbols(struct Elf *elf) {
const char *path;
if (elf->ehdr && GetElfSymbolTable(elf->ehdr, elf->size, &n) && n) return;
DCHECK_NOTNULL(elf->prog);
fprintf(stderr, "HI %s\n", elf->prog);
if ((fd = open(gc(xstrcat(elf->prog, ".dbg")), O_RDONLY)) != -1 ||
(fd = open(elf->prog, O_RDONLY)) != -1) {
if ((fd = open(xstrcat(elf->prog, ".dbg"), O_RDONLY)) != -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) {
elf->ehdr = elfmap;
elf->size = st.st_size;
}
close(fd);
}
fprintf(stderr, "got here\n");
}