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

Fix tests #344

Merged
merged 1 commit into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/db/extras/asm_ghidra
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,9 @@ EXPECT=<<EOF
0x80001008 lui t0, 0x8003
0x8000100c addiu t0, t0, -0x3b50
0x80001010 lui t1, 0x8015
0x80001014 str.e0:
0x80001014 0x80001019 invalid
0x8000101a sll zero, a1, 0x0
0x8000101e invalid
0x80001014 addiu t1, t1, 0x6530
0x80001018 beq t0, t1, 0x80001030
0x8000101c nop
0x80001020 addiu t0, t0, 0x4
0x80001024 sltu at, t0, t1
0x80001028 pc:
Expand Down Expand Up @@ -236,6 +235,7 @@ EXPECT=<<EOF
0x800010b8 sw zero, 0x0(at)
0x800010bc bgtz v0, 0x800010b8
0x800010c0 addi v0, v0, -0x1
0x800010c4 mfc0 v0, wired
EOF
CMDS=<<EOF
pdga
Expand Down Expand Up @@ -538,8 +538,8 @@ EXPECT=<<EOF
0x00011828 ldub [l3+0xc4],g1
0x0001182c cmp g1,0x0
0x00011830 bpne,pn %icc,0x11898
0x00011834 sethi %hi(0x4a000),l2
0x00011838 sethi %hi(0x4a000),l1
0x00011834 sethi %hi(segment.LOAD1),l2
0x00011838 sethi %hi(segment.LOAD1),l1
0x0001183c or l2,0x8,l2
0x00011840 or l1,0xc,l1
0x00011844 sub l1,l2,l1
Expand Down
63 changes: 38 additions & 25 deletions test/db/extras/ghidra
Original file line number Diff line number Diff line change
Expand Up @@ -1903,14 +1903,14 @@ NAME=aeropause64-sp (many features combined without bp)
FILE=bins/dectest64-sp
EXPECT=<<EOF

// WARNING: [rz-ghidra] Detected overlap for variable var_14h
// WARNING: [rz-ghidra] Removing arg arg_14h because it doesn't fit into ProtoModel

void sym.Aeropause(Bright *bright, int32_t argc, char **argv)
{
int32_t iVar1;
Morning *pMVar2;
int64_t var_20h;
int32_t var_14h;
void **var_10h;

pMVar2 = (Morning *)sym.imp.malloc(0x10);
Expand Down Expand Up @@ -1989,6 +1989,7 @@ RUN


NAME=typedef
BROKEN=1
FILE=bins/dectest32
EXPECT=<<EOF

Expand Down Expand Up @@ -3174,14 +3175,17 @@ true

// WARNING: Variable defined which should be unmapped: var_10h
// WARNING: Variable defined which should be unmapped: var_8h
// WARNING: [rz-ghidra] Failed to get address for var argc
// WARNING: [rz-ghidra] Failed to get address for var argv
// WARNING: [rz-ghidra] Detected overlap for variable var_14h
// WARNING: [rz-ghidra] Detected overlap for variable var_2ch

undefined8 entry0(int64_t arg1, int64_t arg2)
int64_t dbg.main(void)
{
undefined4 uVar1;
undefined8 uVar2;
undefined8 uVar3;
int64_t iVar2;
int64_t arg1;
int64_t arg2;
int64_t var_50h;
int64_t var_48h;
int64_t var_40h;
Expand All @@ -3191,30 +3195,36 @@ undefined8 entry0(int64_t arg1, int64_t arg2)
int64_t var_10h;
int64_t var_8h;

uVar2 = fcn.100003d9c();
uVar1 = (**(code **)0x100008188)(sym._a);
arg1 = fcn.100003d9c();
iVar2 = arg1;
arg1._0_4_ = (*fcns[1])(&a);
uVar1 = (undefined4)arg1;
section.1.__TEXT.__stubs("");
uVar3 = fcn.100003d84(sym.class_Test);
fcn.100003da8(uVar3, "methodWithoutArgs");
fcn.100003da8(uVar3, "methodWithOneArg:", 0x7b);
fcn.100003da8(uVar3, "methodWithTwoArgs:secondArg:", 0x539, uVar1);
fcn.100003da8(uVar3, "methodWithReturn");
arg1 = fcn.100003d84(sym.class_Test);
fcn.100003da8(arg1, "methodWithoutArgs");
fcn.100003da8(arg1, "methodWithOneArg:", 0x7b);
fcn.100003da8(arg1, "methodWithTwoArgs:secondArg:", 0x539, uVar1);
fcn.100003da8(arg1, "methodWithReturn");
section.1.__TEXT.__stubs("");
fcn.100003d90(uVar2);
return 0;
fcn.100003d90(iVar2);
arg1 = 0;
return arg1;
}
------------ without propagation

// WARNING: Variable defined which should be unmapped: var_10h
// WARNING: Variable defined which should be unmapped: var_8h
// WARNING: [rz-ghidra] Failed to get address for var argc
// WARNING: [rz-ghidra] Failed to get address for var argv
// WARNING: [rz-ghidra] Detected overlap for variable var_14h
// WARNING: [rz-ghidra] Detected overlap for variable var_2ch

undefined8 entry0(int64_t arg1, int64_t arg2)
int64_t dbg.main(void)
{
undefined4 uVar1;
undefined8 uVar2;
undefined8 uVar3;
int64_t iVar2;
int64_t arg1;
int64_t arg2;
int64_t var_50h;
int64_t var_48h;
int64_t var_40h;
Expand All @@ -3224,17 +3234,20 @@ undefined8 entry0(int64_t arg1, int64_t arg2)
int64_t var_10h;
int64_t var_8h;

uVar2 = fcn.100003d9c();
uVar1 = (**(code **)0x100008188)(sym._a);
arg1 = fcn.100003d9c();
iVar2 = arg1;
arg1._0_4_ = (*fcns[1])(&a);
uVar1 = (undefined4)arg1;
section.1.__TEXT.__stubs("");
uVar3 = fcn.100003d84(*(undefined8 *)0x100008110);
fcn.100003da8(uVar3, *(undefined8 *)0x1000080f0);
fcn.100003da8(uVar3, *(undefined8 *)0x1000080f8, 0x7b);
fcn.100003da8(uVar3, *(undefined8 *)0x100008100, 0x539, uVar1);
fcn.100003da8(uVar3, *(undefined8 *)0x100008108);
arg1 = fcn.100003d84(*(undefined8 *)0x100008110);
fcn.100003da8(arg1, *(undefined8 *)0x1000080f0);
fcn.100003da8(arg1, *(undefined8 *)0x1000080f8, 0x7b);
fcn.100003da8(arg1, *(undefined8 *)0x100008100, 0x539, uVar1);
fcn.100003da8(arg1, *(undefined8 *)0x100008108);
section.1.__TEXT.__stubs("");
fcn.100003d90(uVar2);
return 0;
fcn.100003d90(iVar2);
arg1 = 0;
return arg1;
}
EOF
RUN
Expand Down
Loading