mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-15 23:29:56 +00:00
Add Cosmopolitan Honeybadger to README.md
This commit is contained in:
parent
d934f38c99
commit
c93a4661a3
8 changed files with 32 additions and 58 deletions
|
@ -28,7 +28,7 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/str/tpencode.internal.h"
|
||||
#include "libc/str/tpenc.h"
|
||||
#include "third_party/xed/x86.h"
|
||||
#include "tool/build/lib/case.h"
|
||||
#include "tool/build/lib/demangle.h"
|
||||
|
@ -134,12 +134,18 @@ static char *DisLineCode(struct Dis *d, char *p) {
|
|||
|
||||
static char *DisLineData(struct Dis *d, char *p, const uint8_t *b, size_t n) {
|
||||
size_t i;
|
||||
uint64_t w;
|
||||
p = DisColumn(DisAddr(d, p), p, ADDRLEN);
|
||||
p = DisColumn(DisByte(p, b, n), p, 64);
|
||||
p = HighStart(p, g_high.comment);
|
||||
*p++ = '#';
|
||||
*p++ = ' ';
|
||||
for (i = 0; i < n; ++i) p += tpencode(p, 8, bing(b[i], 0), false);
|
||||
for (i = 0; i < n; ++i) {
|
||||
w = tpenc(bing(b[i], 0));
|
||||
do {
|
||||
*p++ = w;
|
||||
} while ((w >>= 8));
|
||||
}
|
||||
p = HighEnd(p);
|
||||
*p = '\0';
|
||||
return p;
|
||||
|
|
|
@ -140,7 +140,7 @@ void LoadProgram(struct Machine *m, const char *prog, char **args, char **vars,
|
|||
size_t i, mappedsize;
|
||||
DCHECK_NOTNULL(prog);
|
||||
elf->prog = prog;
|
||||
if ((fd = open(prog, O_RDONLY)) == -1 ||
|
||||
if ((fd = open(prog, O_RDWR)) == -1 ||
|
||||
(fstat(fd, &st) == -1 || !st.st_size)) {
|
||||
fputs(prog, stderr);
|
||||
fputs(": not found\n", stderr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue