binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

namespace abstraction for functions

Open elbiazo opened this issue 3 years ago • 2 comments

What is the feature you'd like to have? Please provide a clear and concise description of what you want.

Ability to give function namespace. For example if I name function A::B::Func , test::hello and test::world i should be able to query new api bv.find_function_by_name("hello" , namespace::test) or `bv.find_function_by_name("Func", namespace::A::B)

This will be cool because of three things

  1. When #2693 gets implemented. it would be cool to have a folder section called namespace which shows all the grouping of same namespace
  2. It gives ability for us to add some abstraction to implement class and inheritance.
  3. ability to condense name. yes im looking at you c++ image std::filesystem::__cxx11...ator<<<char, std::char_traits<char> >(std::operator<<<std::char_traits<char> >(__out: std::cout, __s: "[+] Cound't find output director…"), &var_d0)

can become alot shorter by making ui to not show std::. you get this ability now without losing info.

Is your feature request related to a problem? Whenever I reverse program language that has OOP concept (C++, Obj-C, Swift, etc), only way to find function related to that class is by searching the class in function search like Classname:: which kills a lot of workflow. Another problem is when you are trying to create plugin or workflow that has to parse vtable and things like that.

TLDR

  1. workflow on function search
  2. ability to script instead of doing something like a. search for function related to class b. string parse the function name Classname::some_func becomes Classname and some_func c. do something with it.

I feel like I a lot of that pattern during work.

Are any alternative solutions acceptable? Please provide a clear and concise description of any alternative solutions or features you've considered.

I don't think this is necessary needed. its more of pattern I see often. You can just create a parser and some kind of UI that can do this seperatly but I feel like this should be a feature in binja since OOP is everywhere :(.

elbiazo avatar Sep 22 '22 04:09 elbiazo

This is related to (might be a duplicate of?) #2637.

fuzyll avatar Sep 22 '22 13:09 fuzyll

This is related to (might be a duplicate of?) #2637.

i think this is related. i would assume if you guys would make the gui, you guys would also expose the API. This issue was created I wanted some kind of api so that i can query things using script.

elbiazo avatar Sep 22 '22 14:09 elbiazo