rizinorg / rizin

UNIX-like reverse engineering framework and command-line toolset.
https://rizin.re
GNU Lesser General Public License v3.0
2.51k stars 341 forks source link

Pic18 call instructions not detected #4520

Closed karliss closed 3 weeks ago

karliss commented 1 month ago

Work environment

Questions Answers
OS/arch/bits (mandatory) Linux Arch x86_64
File format of the file you reverse (mandatory) .hex
Architecture/bits of the file (mandatory) PIC18
rizin -v full output, not truncated (mandatory) rizin 0.7.3 @ linux-x86-64

Expected behavior

Call instructions produce an xref to target instruction. Call instructions are used to for detecting function starts

Actual behavior

No xrefs for call instructions. Only one function found in the file.

Steps to reproduce the behavior

Additional Logs, screenshots, source code, configuration dump, ...

image

Drag and drop zip archives containing the Additional info here, don't use external services or link.

karliss commented 1 month ago

Need to retest with rizin dev. image

XVilka commented 1 month ago

Looks like we don't have function-level analysis tests for PIC, just see test/db/analysis/pic - we should extend the testing as well, not only the RzIL.

karliss commented 1 month ago

Retested with rizin 0.8.0 @ linux-x86-64 7b91fb69c2e805645de3e89da28532932908f699 . Same thing. If I understand things correctly, doesn't seem like pic18_analysis sets anything for call instruction beside the instruction type.

The steps I did: