rizinorg / rz-ghidra

Deep ghidra decompiler and sleigh disassembler integration for rizin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix `test/db/extras/ghidra typedef` test

XVilka opened this issue · comments

[XX] /build/test/db/extras/ghidra typedef
/usr/bin/rizin -escr.utf8=0 -escr.color=0 -escr.interactive=0 -eflirt.sigdb.load.system=false -eflirt.sigdb.load.home=false -N -Qc 'aaa
to bins/types.h
s sym.Aeropause
afvs 4 bright BrightPtr
afvs 8 argc "Bright *"
afvs 12 argv "const char **"
pdg
echo --
afvs 4 bright "BrightTypedefd *"
afvs 8 argc int32_t
afvs 12 argv "const char **"
pdg
echo --
afvs 4 bright BrightTypedefdPtr
pdg
' bins/dectest32
-- stdout
--- expected
+++ actual
@@ -59,14 +59,14 @@
 }
 --
 
-void sym.Aeropause(BrightTypedefd *bright, int32_t argc, char **argv)
+void sym.Aeropause(BrightPtr bright, Bright *argc, char **argv)
 {
     Morning *pMVar1;
     int32_t iVar2;
     
     pMVar1 = (Morning *)sym.imp.malloc(8);
     bright->morning = pMVar1;
-    bright->morning->saved_argc = argc;
+    bright->morning->saved_argc = (uint32_t)argc;
     bright->morning->saved_argv = argv;
     if (bright->morning->saved_argc < 2) {
         bright->ambassador = AMBASSADOR_PURE;
@@ -119,14 +119,14 @@
 }
 --
 
-void sym.Aeropause(BrightTypedefdPtr bright, int32_t argc, char **argv)
+void sym.Aeropause(BrightPtr bright, Bright *argc, char **argv)
 {
     Morning *pMVar1;
     int32_t iVar2;
     
     pMVar1 = (Morning *)sym.imp.malloc(8);
     bright->morning = pMVar1;
-    bright->morning->saved_argc = argc;
+    bright->morning->saved_argc = (uint32_t)argc;
     bright->morning->saved_argv = argv;
     if (bright->morning->saved_argc < 2) {
         bright->ambassador = AMBASSADOR_PURE;

-- stderr
[ ] Analyze all flags starting with sym. and entry0 (aa)
[
[x] Analyze all flags starting with sym. and entry0 (aa)

[ ] Analyze function calls
[
[x] Analyze function calls
[ ] Analyze len bytes of instructions for references
[
[x] Analyze len bytes of instructions for references
[ ] Check for classes
[
[x] Check for classes
[ ] Analyze local variables and arguments
[
[x] Analyze local variables and arguments
[ ] Type matching analysis for all functions
[
[x] Type matching analysis for all functions
[ ] Applying signatures from sigdb
[
[x] Applied 0 FLIRT signatures via sigdb
[ ] Propagate noreturn information
[
[x] Propagate noreturn information
[ ] Integrate dwarf function information.
[
[x] Integrate dwarf function information.
[ ] Resolve pointers to data sections
[
[x] Resolve pointers to data sections

[x] Use -AA or aaaa to perform additional experimental analysis.