Closed y0ny0ns0n closed 2 years ago
Thanks for the detailed bug report. I'll take a look! :)
tree-sitter returns a special AST node for 'this' so variable matching did not work correctly. Commit 8e6d7a3 fixes the issue.
Thanks again for the report.
Thanks!
I tried to use weggli on hexray C output and found some useful cases recently.
But I encounter a problem today and I think I need some help.
the problem is, I tried to find some function like below:
I could found above function with query below:
But, above query is using fixed member variable name so I couldn't exapand it to find another variant.
I tried following queries but none of them working as I want.
Queries with no-output
Queries with output
// ... if ( v8 >= 0 ) { if ( ((this + 932) + 112i64) ) { for ( i = 0; i < *(a2 + 10); ++i ) // <- here { // ...
int64 fastcall Func2( struct Struct2 *a1, ....) { __int64 v4; // rdi ...
v4 = (a1 + 5); v6 = a3; v7 = a2; updated = 0; for ( i = 0; i < (*(a1 + 3) + 6i64); ++i ) // <- here { ... }
./target/release/weggli -R 'thisptr=this|a1' --cpp ' $func() { for(; < ($thisptr); ) { _; } }' ~/hexray_output.cpp