radareorg / r2ghidra

Native Ghidra Decompiler for r2

Home Page:https://www.radare.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pdg gives not c-style format

weaver9651 opened this issue · comments

Description

Please describe what are you missing or wanting to be improved

Hello. I am using r2ghidra after I installed r2 from source and r2ghidra from r2pm -ci r2ghidra.
When I type pdg in r2, it shows us not c-style source code rather similar to xml or something.
I have searched it but I could not find how to change the output format.

Provide images, ascii-art, test files and anything that may help us understand your request

<function>
<funcproto><return_type>void</return_type> main(void)</funcproto>

{
    <vardecl symref="0x400001000000001d">uint uVar1</vardecl>;
    <vardecl symref="0x400001000000001e">code cVar2</vardecl>;
    <vardecl symref="0x400001000000001f">int32_t iVar3</vardecl>;

// ...
commented

Same issue here. I'm on the latest release versions of r2 and ghidra.

i can repro

Found and fixed 😄the regression was introduced in 700c2b0

actually that looks to me like an useful option to add instead of having a compile time define for debugging.