Two minor fixes (#287)

* Change to -funsigned-char in makefile

* Change ROM/RAM to VROM/VRAM in sym_info.py

* Format

* Make the EnBigPo vectors shorter by removing `,`s
This commit is contained in:
EllipticEllipsis 2021-09-21 23:09:14 +01:00 committed by GitHub
parent 5b9a825cad
commit 367e500d02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -70,7 +70,7 @@ OBJDUMP := $(MIPS_BINUTILS_PREFIX)objdump
# Check code syntax with host compiler
CHECK_WARNINGS := -Wall -Wextra -Wno-format-security -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-variable -Wno-missing-braces -Wno-int-conversion -Wno-unused-but-set-variable -Wno-unused-label
CC_CHECK := gcc -fno-builtin -fsyntax-only -fsigned-char -std=gnu90 -D _LANGUAGE_C -D NON_MATCHING -Iinclude -Isrc -Iassets -Ibuild -include stdarg.h $(CHECK_WARNINGS)
CC_CHECK := gcc -fno-builtin -fsyntax-only -funsigned-char -std=gnu90 -D _LANGUAGE_C -D NON_MATCHING -Iinclude -Isrc -Iassets -Ibuild -include stdarg.h $(CHECK_WARNINGS)
CPP := cpp
ELF2ROM := tools/buildtools/elf2rom

View File

@ -10,7 +10,7 @@ parser.add_argument(
"name",
type=str,
default="",
help="symbol name or ROM/RAM address to lookup"
help="symbol name or VROM/VRAM address to lookup"
)
parser.add_argument(
"-e",
@ -73,10 +73,10 @@ def search_address(target_addr):
continue
if rom == target_addr or (is_ram and ram == target_addr):
return f"{sym} (RAM 0x{ram:X}, ROM 0x{rom:X}, {cur_file})"
return f"{sym} (VRAM 0x{ram:X}, VROM 0x{rom:X}, {cur_file})"
if rom > target_addr or (is_ram and ram > target_addr):
offset = target_addr - prev_ram if is_ram else target_addr - prev_rom
return f"at 0x{offset:X} bytes inside {prev_sym} (RAM 0x{prev_ram:X}, ROM 0x{prev_rom:X}, {prev_file})"
return f"at 0x{offset:X} bytes inside {prev_sym} (VRAM 0x{prev_ram:X}, VROM 0x{prev_rom:X}, {prev_file})"
prev_ram = ram
prev_rom = rom
@ -134,6 +134,6 @@ except ValueError:
sym_rom = sym_info[0]
sym_file = sym_info[1]
sym_ram = sym_info[2]
print(f"Symbol {args.name} (RAM: 0x{sym_ram:08X}, ROM: 0x{sym_rom:06X}, {sym_file})")
print(f"Symbol {args.name} (VRAM: 0x{sym_ram:08X}, VROM: 0x{sym_rom:06X}, {sym_file})")
else:
print(f"Symbol {args.name} not found in map file {mymap}")