-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MZ EXE loader segments get out of sync with Program Tree fragments #6277
Comments
I'm working on another DOS executable (CATS.EXE in bug report #5970) and it has the same behavior as this. It seems to be related to the CODE sections where the source is defined as empty in the memory map, e.g. CODE_3 above. This bug seems to present itself in places where CODE section where source is "mz" is followed by CODE section where source is empty. Should there be any CODE sections where source is empty in the first place? |
@haarlaj I missed the detail about the lack of blocks' source! From a quick look at the code it happens to blocks that are split and joined together as part of the adjustment process: ghidra/Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MzLoader.java Lines 293 to 302 in b82294b
So I guess it's those extra blocks whose address bounds are not in sync with the program tree list. |
This is correct. The initial Program Tree is automatically formed when the memory blocks are created. Any kind of memory block manipulation that happens later will not be automatically reflected in the Program Tree...it requires manual fix up (which we are not currently doing). |
I am going to (at some point) work on fixing this Program Tree syncing issue. In the meantime, if you just create a new Program Tree, it will reflect the current memory map. |
It worked, thank you! |
Describe the bug
Program Tree fragments start/end addresses do not reflect memory block adjustments applied by the MZ DOS EXE loader after blocks creation.
To Reproduce
Steps to reproduce the behavior:
CODE_2
block from the "Program Trees" pane.Expected behavior
Program Tree fragments start/end addresses should match the ones from the Memory Map pane and listing should allow viewing the whole block.
Screenshots
Attachments
mz_dos_blocks.zip
Environment (please complete the following information):
Additional context
You can also try to bring
CODE_3
into view, the start offset does not consider the block adjustment - see screenshot.The text was updated successfully, but these errors were encountered: