Skip to content
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

Error when trying to read XML file #4

Open
ignatirabo opened this issue Dec 11, 2024 · 3 comments
Open

Error when trying to read XML file #4

ignatirabo opened this issue Dec 11, 2024 · 3 comments

Comments

@ignatirabo
Copy link

I am trying to read an XML file with DecompVisor, but I get the following output.

A fatal error occurred while communicating with the decomp_dbg executable. Loading this xml file has been cancelled. A stack trace of the exception is shown below:

Traceback (most recent call last):
  File "/home/eclypsium/git/DecompVis/main.py", line 153, in _handle_set_xml_file
    self._parse_xml_file(pathlib.Path(file_name))
  File "/home/eclypsium/git/DecompVis/main.py", line 180, in _parse_xml_file
    raise ValueError(f"Did not find 'bytechunk' elements in the provided XML!")
ValueError: Did not find 'bytechunk' elements in the provided XML!

I am using Ghidra 11.2.1, and I exported the program from the Ghidra UI. Ghidra generated two files: hello_world.xml and hello_world.bytes.

I generated an ELF binary from the following code.

#include <stdio.h>
int main() {
   printf("Hello, World!");
   return 0;
}

Any help is appreciated. Thank you!

@LukeSerne
Copy link
Owner

Thanks for submitting an issue! Using the 11.2.1 release from Github, when I click "debug function decompilation" when the main function is selected, Ghidra creates only an xml file (containing a bytechunk element), so I currently cannot reproduce this.

  • What version of Ghidra are you using? Did you compile it yourself?
  • Could you share the hello_world.xml and hello_world.bytes files you're getting?

@ignatirabo
Copy link
Author

Oh I see. My mistake was exporting the program as an XML file. I did not know about "debug function decompilation". Now I am getting an XML file with bytechunk but I do not see anything being outputted by DecompVis.

image

What could be the cause?

@LukeSerne
Copy link
Owner

Not sure. From the screenshot, it seems that no xml file has been loaded.

It might be the case that you haven't set the Ghidra folder or the path to the decomp_dbg executable. Check the usage instructions in the readme for resolving this.

If that's not the issue, please describe step by step what you're doing that leads to this screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants