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

Do not use removed Rizin APIs #3309

Merged
merged 2 commits into from
Mar 3, 2024
Merged

Do not use removed Rizin APIs #3309

merged 2 commits into from
Mar 3, 2024

Conversation

XVilka
Copy link
Member

@XVilka XVilka commented Mar 1, 2024

Your checklist for this pull request

Detailed description

Fixes the following errors:

 31.76 /root/cutter/src/core/Cutter.cpp: In member function ‘bool CutterCore::existsFileInfo()’:
#9 31.76 /root/cutter/src/core/Cutter.cpp:1380:29: error: ‘rz_bin_get_info’ was not declared in this scope; did you mean ‘rz_bp_get_in’?
#9 31.76  1380 |     const RzBinInfo *info = rz_bin_get_info(core->bin);
#9 31.76       |                             ^~~~~~~~~~~~~~~
#9 31.76       |                             rz_bp_get_in
#9 31.76 /root/cutter/src/core/Cutter.cpp: In member function ‘QList<SymbolDescription> CutterCore::getAllSymbols()’:
#9 31.76 /root/cutter/src/core/Cutter.cpp:3182:54: error: cannot convert ‘const RzPVector*’ {aka ‘const rz_pvector_t*’} to ‘const RzList*’ {aka ‘const rz_list_t*’} in initialization
#9 31.76  3182 |     const RzList *entries = rz_bin_object_get_entries(bf->o);
#9 31.76       |                             ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
#9 31.76       |                                                      |
#9 31.76       |                                                      const RzPVector* {aka const rz_pvector_t*}
#9 31.76 /root/cutter/src/core/Cutter.cpp: In member function ‘QList<EntrypointDescription> CutterCore::getAllEntrypoint()’:
#9 31.76 /root/cutter/src/core/Cutter.cpp:3499:54: error: cannot convert ‘const RzPVector*’ {aka ‘const rz_pvector_t*’} to ‘const RzList*’ {aka ‘const rz_list_t*’} in initialization
#9 31.76  3499 |     const RzList *entries = rz_bin_object_get_entries(bf->o);
#9 31.76       |                             ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
#9 31.76       |                                                      |
#9 31.76       |                                                      const RzPVector* {aka const rz_pvector_t*}

Test plan (required)

CI is green

Closing issues

Related to rizinorg/rz-ghidra#346

@XVilka XVilka force-pushed the fix-rizin-dev branch 3 times, most recently from 85e4819 to 33a0f19 Compare March 1, 2024 13:49
@XVilka
Copy link
Member Author

XVilka commented Mar 2, 2024

The only remaining error is the rz-ghidra one:

/Users/runner/work/cutter/cutter/build/dist/rz-ghidra-prefix/src/rz-ghidra/src/ArchMap.cpp:142:20: error: use of undeclared identifier 'rz_bin_get_info'; did you mean 'rz_bin_get_size'?
        RzBinInfo *info = rz_bin_get_info(core->bin);
                          ^~~~~~~~~~~~~~~
                          rz_bin_get_size
/Users/runner/work/cutter/cutter/build/_CPack_Packages/Darwin/Bundle/Cutter-git-2024-03-01-b9e8c4853adb895f93e12c75d5da31d4b1628270-macOS-x86_64/Cutter.app/Contents/Resources/include/librz/rz_bin.h:860:13: note: 'rz_bin_get_size' declared here
RZ_API ut64 rz_bin_get_size(RzBin *bin);
            ^
/Users/runner/work/cutter/cutter/build/dist/rz-ghidra-prefix/src/rz-ghidra/src/ArchMap.cpp:142:13: error: cannot initialize a variable of type 'RzBinInfo *' (aka 'rz_bin_info_t *') with an rvalue of type 'unsigned long long'
        RzBinInfo *info = rz_bin_get_info(core->bin);
                   ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

rizinorg/rz-ghidra#346

@XVilka XVilka requested review from wargio, karliss and ret2libc March 2, 2024 02:55
@XVilka XVilka changed the title Do not use removed rz_bin_get_info() API Do not use removed Rizin APIs Mar 2, 2024
@XVilka XVilka merged commit 171c0da into dev Mar 3, 2024
7 of 10 checks passed
@XVilka XVilka deleted the fix-rizin-dev branch March 3, 2024 05:51
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

Successfully merging this pull request may close these issues.

2 participants