Skip to content

Conversation

bb010g
Copy link

@bb010g bb010g commented May 2, 2023

This also ensures proper logging (including on exception) and adds some more standard functions from glibc and msvcrt.

@nshp
Copy link
Owner

nshp commented May 2, 2023

Nice! Looking great on first glance. I'll try to do some testing tonight/tomorrow.

@nshp
Copy link
Owner

nshp commented May 8, 2023

On my machine with a linux-armv7 binary, I get:

Traceback (most recent call last):
  File "...plugins/binaryninja-printf/__init__.py", line 553, in run
    func_type, func_decl_name = bv.parse_type_string(func_decl)
  File "...python/binaryninja/binaryview.py", line 6687, in parse_type_string
    raise SyntaxError(error_str)
SyntaxError: error: string.hpp:1:66 unknown type name 'rsize_t'

I guess the plugin should either add a rsize_t typedef if it isn't already present, or fall back to regular size_t?

@alexrp
Copy link

alexrp commented May 31, 2023

I think it would be reasonable to just use size_t. AFAIK rsize_t is equivalent to that on all platforms that have those functions anyway; it only exists because the C standard says it should exist. Alternatively, could ask the BN devs if they want to support rsize_t natively in their type parser like they do for size_t, but ehh.

I think it would be good to avoid adding types to the user's BNDB if at all possible.

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.

3 participants