Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
elbiazo committed Mar 7, 2023
1 parent a0ecd78 commit e4e415d
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 23 deletions.
27 changes: 22 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ Calltree generator for function

## Description:

Generates call tree
Generates call tree. Alternative view for callgraph.

## Releases

* 2.0 -- Multiview Support
* 1.2 -- Bug Fixes
* 1.1 -- Refactoring
* 1.0 -- Public Release
Expand All @@ -30,23 +31,27 @@ This plugin is released under an [MIT license](./LICENSE).
When working with really big binaries with alot of xrefs, you would want to change recursive depth to smaller number or else Binary Ninja might hang.
## Description

![](images/2022-02-09-16-42-57.png)
Calltree is a plugin that generates call tree for a function. It is an alternative view for callgraph. It is a multiview plugin, so you can have multiple calltree views open at the same time.

### Default View

![](images/2023-03-06-23-31-27.png)

### Expand and Collapse tree

**Expand**

![](images/2022-02-09-16-50-03.png)
![](images/2023-03-06-23-44-02.png)

**Collapse**

![](images/2022-02-09-16-51-28.png)
![](images/2023-03-06-23-44-24.png)

**Search**

![](images/2022-02-09-16-53-33.png)

**Recursion Depth**
### Recursion Depth

**Show Only Root Level**

Expand All @@ -56,9 +61,21 @@ When working with really big binaries with alot of xrefs, you would want to chan

![](images/2022-02-09-16-59-03.png)

### Pinning and Removing Calltree View

**Pinning Calltree View**

![](images/2023-03-06-23-40-42.png)

**Pinned Calltree Name Max Length**

![](images/2023-03-06-23-46-04.png)


## Contributors

Thanks everyone that have contributed to calltree!

* galenbwill
* droogie
* bambu
Binary file added images/2023-03-06-23-30-37.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2023-03-06-23-31-27.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2023-03-06-23-40-42.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2023-03-06-23-44-02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2023-03-06-23-44-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/2023-03-06-23-46-04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 20 additions & 17 deletions init.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
QPushButton,
QSpinBox,
QHBoxLayout,
QStyle,
)
from PySide6.QtGui import QImage
from PySide6.QtGui import QImage, QIcon, QPixmap

from .calltree import CallTreeLayout, CurrentFunctionNameLayout, CalltreeWidget
from binaryninja.settings import Settings
Expand Down Expand Up @@ -55,7 +56,7 @@
{
"title" : "Pinned Name Length",
"type" : "number",
"default" : 5,
"default" : 10,
"description" : "Max length of string to display in pinned tabs",
"ignore" : ["SettingsProjectScope", "SettingsResourceScope"]
}
Expand Down Expand Up @@ -122,11 +123,10 @@ def __init__(self, name: str, frame, data):
calltree_options = QHBoxLayout()

self.pin_tab_button = QPushButton("P")
btn_size = QSize(25, 25)
btn_size = QSize(50, 25)
self.pin_tab_button.setFixedSize(btn_size)
self.pin_tab_button.clicked.connect(self.pin_current_tab)
self.remove_current_tab_button = QPushButton("R")
btn_size = QSize(25, 25)
self.remove_current_tab_button.setFixedSize(btn_size)
self.remove_current_tab_button.clicked.connect(self.remove_current_tab)

Expand All @@ -150,19 +150,22 @@ def remove_current_tab(self):
self.calltree_tab.removeTab(cur_tab_index)

def pin_current_tab(self):
pinned_calltree = CalltreeWidget()
cur_func_name = self.current_calltree.cur_func_text.toPlainText()
pinned_calltree.cur_func_text.setText(cur_func_name)

# TODO: find a way to do deepcopy instead of updating widget everytime
pinned_calltree.in_calltree.binary_view = self.binary_view
pinned_calltree.out_calltree.binary_view = self.binary_view
pinned_calltree.in_calltree.update_widget(self.cur_func)
pinned_calltree.out_calltree.update_widget(self.cur_func)
pinned_calltree.cur_func_layout.binary_view = self.binary_view

max_pinned_name_len = Settings().get_integer("calltree.pin_name_len")
self.calltree_tab.addTab(pinned_calltree, cur_func_name[:max_pinned_name_len])
if self.cur_func is not None:
pinned_calltree = CalltreeWidget()
cur_func_name = self.current_calltree.cur_func_text.toPlainText()
pinned_calltree.cur_func_text.setText(cur_func_name)

# TODO: find a way to do deepcopy instead of updating widget everytime
pinned_calltree.in_calltree.binary_view = self.binary_view
pinned_calltree.out_calltree.binary_view = self.binary_view
pinned_calltree.in_calltree.update_widget(self.cur_func)
pinned_calltree.out_calltree.update_widget(self.cur_func)
pinned_calltree.cur_func_layout.binary_view = self.binary_view

max_pinned_name_len = Settings().get_integer("calltree.pin_name_len")
self.calltree_tab.addTab(
pinned_calltree, cur_func_name[:max_pinned_name_len]
)

def notifyViewLocationChanged(self, view, location):
def extract_location_info(location):
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"api": [
"python3"
],
"description": "Generates calltree",
"description": "Generates calltree. Alternative view for callgraph",
"longdescription": "Generates calltree for current function. Alternative view for callgraph",
"license": {
"name": "MIT",
Expand Down

0 comments on commit e4e415d

Please sign in to comment.