1
1
from PySide2 import QtCore
2
2
from PySide2 .QtCore import Qt
3
3
from PySide2 .QtWidgets import QApplication , QHBoxLayout , QVBoxLayout , QLabel , QWidget , QPushButton , QLineEdit
4
+ from PySide2 .QtGui import QDesktopServices
4
5
from binaryninja .plugin import PluginCommand
5
6
from binaryninja import Endianness , HighlightStandardColor , execute_on_main_thread , execute_on_main_thread_and_wait , LowLevelILOperation , BinaryReader
6
7
from binaryninja .settings import Settings
10
11
from . import binjaplug
11
12
import datetime
12
13
import traceback
14
+ import os
15
+ import pathlib
13
16
14
17
class DebuggerUI :
15
18
def __init__ (self , state ):
@@ -599,6 +602,11 @@ def valid_control_step_return(bv):
599
602
# Load plugin commands and actions
600
603
#------------------------------------------------------------------------------
601
604
605
+ def helpDocs (context ):
606
+ docPath = os .path .join (os .path .dirname (__file__ ), "Documentation" )
607
+ URLPath = pathlib .Path (os .path .join (docPath , "Manual.html" )).as_uri ()
608
+ QDesktopServices .openUrl (URLPath )
609
+
602
610
def initialize_ui ():
603
611
widget .register_dockwidget (BreakpointsWidget .DebugBreakpointsWidget , "Debugger Breakpoints" , Qt .BottomDockWidgetArea , Qt .Horizontal , False )
604
612
widget .register_dockwidget (RegistersWidget .DebugRegistersWidget , "Debugger Registers" , Qt .RightDockWidgetArea , Qt .Vertical , False )
@@ -610,6 +618,7 @@ def initialize_ui():
610
618
PluginCommand .register_for_address ("Debugger\\ Toggle Breakpoint" , "sets/clears breakpoint at right-clicked address" , cb_bp_toggle , is_valid = valid_bp_toggle )
611
619
612
620
PluginCommand .register ("Debugger\\ Process\\ Run" , "Start new debugging session" , cb_process_run , is_valid = valid_process_run )
621
+ PluginCommand .register ("Debugger\\ User Documentation" , "Open Debugger Documentation" , helpDocs , is_valid = valid_process_run )
613
622
PluginCommand .register ("Debugger\\ Process\\ Restart" , "Restart debugging session" , cb_process_restart , is_valid = valid_process_restart )
614
623
PluginCommand .register ("Debugger\\ Process\\ Quit" , "Terminate debugged process and end session" , cb_process_quit , is_valid = valid_process_quit )
615
624
# PluginCommand.register("Debugger\\Process\\Attach", "Attach to running process", cb_process_attach, is_valid=valid_process_attach)
0 commit comments