How do I organize my binary parser’s code?
I’m building a Mach-O 64 bit binary parser for a reverse engineering tool, ghidra style.
I want the program to output where we are in readable human language, using byte references. Let me show you an example:
how it currently is
Here, LC_SEGMENT_64 is on the side of each line where it starts, i know this because the LC_SEGMENT_64 identifier is 0x19. But if i do this to every single possible option it’s going to get messy. How do I implement this in a good way, without using 50 thousand if-else statements?
how i want it to be