Skip to content

Commit

Permalink
Add deprecation notices
Browse files Browse the repository at this point in the history
  • Loading branch information
ElykDeer committed Jul 10, 2023
1 parent 272360a commit 123c598
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
# DWARF Import (v1.2.0)
# DWARF Import (Deprecated) (v1.2.1)
Author: **Vector 35 Inc**

_Imports DWARF Info from ELFs_

## Description:

This loads DWARF info from an ELF and propagates function names, arguments, and type info
This plugin is deprecated.

### Analysis Without DWARF info:
![](./images/standard_analysis.png)

### Analysis With DWARF info:
![](./images/DWARF_applied.png)
Please use our new DWARF Import plugin, which is shipped with the product by default: https://github.com/Vector35/binaryninja-api/issues/3206#issuecomment-1629342753


## Minimum Version
Expand Down
8 changes: 5 additions & 3 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from binaryninja import BackgroundTaskThread
from binaryninja.binaryview import BinaryReader
from binaryninja.log import log_error, log_warn
from binaryninja.log import log_error, log_warn, log_alert
from binaryninja.interaction import OpenFileNameField, get_form_input
from binaryninja.plugin import PluginCommand
from .bridge import BinjaBridge
Expand Down Expand Up @@ -52,6 +52,7 @@ def run(self):


def load_symbols(bv):
log_alert("This plugin is deprecated. While it will still work, we suggest that you uninstall this plugin and use our new one. See this plugin's readme.md for details.")
try:
if bv.query_metadata("dwarf_info_applied") == 1:
log_warn("DWARF Debug Info has already been applied to this binary view")
Expand All @@ -62,6 +63,7 @@ def load_symbols(bv):


def load_symbols_from_file(bv):
log_alert("This plugin is deprecated. While it will still work, we suggest that you uninstall this plugin and use our new one. See this plugin's readme.md for details.")
try:
if bv.query_metadata("dwarf_info_applied") == 1:
log_warn("DWARF Debug Info has already been applied to this binary view")
Expand Down Expand Up @@ -95,5 +97,5 @@ def is_valid(bv):
return raw and elf and ELFFile(reader).has_dwarf_info()


PluginCommand.register("DWARF Import\\Load DWARF Symbols", "Load DWARF Symbols from the current file", load_symbols, is_valid)
PluginCommand.register("DWARF Import\\Load DWARF Symbols From File", "Load DWARF Symbols from another file", load_symbols_from_file, lambda bv: True)
PluginCommand.register("DWARF Import (Deprecated)\\Load DWARF Symbols", "Load DWARF Symbols from the current file", load_symbols, is_valid)
PluginCommand.register("DWARF Import (Deprecated)\\Load DWARF Symbols From File", "Load DWARF Symbols from another file", load_symbols_from_file, lambda bv: True)
Binary file removed images/DWARF_applied.png
Binary file not shown.
Binary file removed images/standard_analysis.png
Binary file not shown.
6 changes: 3 additions & 3 deletions plugin.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"pluginmetadataversion": 2,
"name": "DWARF Import",
"name": "DWARF Import (Deprecated)",
"type": [
"core"
],
"api": [
"python3"
],
"description": "Imports DWARF Info from ELFs",
"longdescription": "This loads DWARF info from an ELF and propagates function names, arguments, and type info\n\n### Analysis Without DWARF info:\n![](./images/standard_analysis.png)\n\n### Analysis With DWARF info:\n![](./images/DWARF_applied.png)\n",
"longdescription": "This plugin is deprecated. Please use our new DWARF Import plugin, which is shipped with the product by default: https://github.com/Vector35/binaryninja-api/issues/3206#issuecomment-1629342753",
"license": {
"name": "MIT",
"text": "Copyright (c) 2020-2022 Vector 35 Inc\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
Expand All @@ -28,7 +28,7 @@
"pyelftools==0.27"
]
},
"version": "1.2.0",
"version": "1.2.1",
"author": "Vector 35 Inc",
"minimumbinaryninjaversion": 3000
}

0 comments on commit 123c598

Please sign in to comment.