Skip to content

Commit

Permalink
Fix 32-bit build
Browse files Browse the repository at this point in the history
  • Loading branch information
dd86k committed Mar 10, 2024
1 parent a3d970b commit 9b6e7a0
Show file tree
Hide file tree
Showing 6 changed files with 191 additions and 218 deletions.
2 changes: 1 addition & 1 deletion app/dump/elf.d
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ LNEWNHDR:
return;

void *note = void;
if (adbg_object_offsetl(o, &note, noffset, nleft)) {
if (adbg_object_offsetl(o, &note, noffset, cast(size_t)nleft)) {
print_string("warning", "Elf64_Phdr::p_offset points outside of file bounds");
return;
}
Expand Down
6 changes: 3 additions & 3 deletions app/shell.d
Original file line number Diff line number Diff line change
Expand Up @@ -789,12 +789,12 @@ int command_regs(int argc, const(char) **argv) {
const(char) *rselect = argc >= 2 ? argv[1] : null;
bool found;
for (size_t i; i < registers.count; ++i, ++reg) {
bool show = rselect == null || strcmp(rselect, reg.name) == 0;
bool show = rselect == null || strcmp(rselect, reg.info.name) == 0;
if (show == false) continue;
char[20] normal = void, hexdec = void;
adbg_register_format(normal.ptr, 20, reg, FORMAT_DEC);
adbg_register_format(hexdec.ptr, 20, reg, FORMAT_HEXPADDED);
printf("%-8s 0x%8s %s\n", reg.name, hexdec.ptr, normal.ptr);
printf("%-8s 0x%8s %s\n", reg.info.name, hexdec.ptr, normal.ptr);
found = true;
}
if (rselect && found == false) {
Expand Down Expand Up @@ -876,7 +876,7 @@ int command_maps(int argc, const(char) **argv) {
default: t = '?';
}

with (map) printf("%16zx %10lld %c %.4s %s\n",
with (map) printf("%16zx %10zd %c %.4s %s\n",
cast(size_t)base, size, t, perms.ptr, name.ptr);
}

Expand Down
Loading

0 comments on commit 9b6e7a0

Please sign in to comment.