diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 000000000..de7528dae --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,45 @@ +name: Cutter Documentation + +on: + push: + branches: [ main ] + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: sudo apt-get install doxygen + - name: Build docs + run: | + cd docs + doxygen + + - name: Checkout deploy target + if: ${{ github.event_name == 'push' }} + uses: actions/checkout@v2 + with: + repository: 'karliss/github-integration-test' # TODO: replace with radareorg/cutter.re + path: 'deploy-checkout' + ref: master + ssh-key: ${{ secrets.DOC_UPLOAD_SSH_KEY }} + + - name: Copy files + if: ${{ github.event_name == 'push' }} + run: | + rm -r deploy-checkout/doc/api/latest/* || true + mkdir -p deploy-checkout/doc/api/latest + cp -r cos/doxygen-out/html/* deploy-checkout/doc/api/latest + - name: Commit and push + if: ${{ github.event_name == 'push' }} + uses: EndBug/add-and-commit@a988073222b8bd50f3ecfca9c0ab7dfbf0d08ceb # v4.4.0 + with: + cwd: deploy-checkout + message: ${{ format('Upate docs from {0}@{1}', github.repository, github.sha) }} + force: false + ref: master + add: docs \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 3f954a267..8efcb1765 100644 --- a/.travis.yml +++ b/.travis.yml @@ -90,42 +90,6 @@ matrix: brewfile: scripts/Brewfile update: true # updating brew to get slightly newer meson, 0.54 doesn't work on macOS. - - name: Documentation + Deploy - os: linux - cache: ~ - addons: - apt: - packages: - - doxygen - - libgraphviz-dev - before_install: - - pyenv global 3.7 - - pip3 install -U sphinx - - pip3 install -U breathe - - pip3 install -U sphinx-rtd-theme - - pip3 install -U recommonmark - install: ~ - before_script: ~ - after_success: ~ - script: - - cd docs - - make html - before_deploy: - - cd "$TRAVIS_BUILD_DIR" - - openssl aes-256-cbc -K $encrypted_bd0ed4c1fd75_key -iv $encrypted_bd0ed4c1fd75_iv -in scripts/deploy_docs_rsa.enc -out scripts/deploy_docs_rsa -d - - chmod 600 scripts/deploy_docs_rsa - - export GIT_SSH_COMMAND="/usr/bin/ssh -i $TRAVIS_BUILD_DIR/scripts/deploy_docs_rsa" - - git config --global user.name "Travis CI" - - git config --global user.email "travis@travis-ci.com" - deploy: - skip_cleanup: true - provider: script - script: bash scripts/deploy_docs.sh - on: - repo: radareorg/cutter - branch: master - - sudo: required dist: bionic diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 28f6d2567..8a6eac6ef 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ Please follow our contribution guidelines: https://cutter.re/docs/contributing.h ## Contributing to the documentation -The documentation is something important for newcomers. As of today the documentation can be found [here](https://cutter.re/docs/) and it stands in the [docs](https://github.com/radareorg/cutter/tree/master/docs) folder. +The documentation is something important for newcomers. As of today the documentation can be read [here](https://cutter.re/docs/) and it's source code stands in the [cutter-docs](https://github.com/radareorg/cutter-docs) repository. The API Reference is automatically generated from the source code, so it is strongly advised to document your code. Check issues marked as "Documentation" on our issues [list](https://github.com/radareorg/cutter/issues?q=is%3Aissue+is%3Aopen+label%3ADocumentation). diff --git a/docs/.gitignore b/docs/.gitignore index 229ea2ac1..0b9b30122 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,4 +1 @@ /doxygen-out -/build -/source/api -/source/_build diff --git a/docs/Doxyfile b/docs/Doxyfile index 5761f58e8..fd596693f 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -170,7 +170,7 @@ FULL_PATH_NAMES = YES # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = +STRIP_FROM_PATH = .. # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -1983,7 +1983,7 @@ MAN_LINKS = NO # captures the structure of the code including all documentation. # The default value is: NO. -GENERATE_XML = YES +GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of diff --git a/docs/Makefile b/docs/Makefile index 0e09e29c2..ece9c02f5 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,30 +1,7 @@ -# Minimal makefile for Sphinx documentation -# +.PHONY: doxygen-out -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile +doxygen-out: Makefile Doxyfile doxygen - python3 apidoc.py - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -quick: - @$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) clean: rm -fr doxygen-out - rm -fr source/api - rm -fr build - @$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) diff --git a/docs/apidoc.py b/docs/apidoc.py deleted file mode 100644 index d0b674229..000000000 --- a/docs/apidoc.py +++ /dev/null @@ -1,136 +0,0 @@ -# -*- coding: utf-8 -*- -import os -import sys -import errno -import xml.etree.ElementTree - - -ALLOWED_TYPES = ['class', 'interface', 'struct', 'union'] - - -def write_file(name, text, destdir): - """Write the output file for module/package .""" - fname = os.path.join(destdir, '%s.%s' % (name, 'rst')) - - if not os.path.exists(os.path.dirname(fname)): - try: - os.makedirs(os.path.dirname(fname)) - except OSError as exc: # Guard against race condition - if exc.errno != errno.EEXIST: - raise - try: - with open(fname, 'r') as target: - orig = target.read() - if orig == text: - return - except FileNotFoundError: - # Don't mind if it isn't there - pass - - with open(fname, 'w') as target: - target.write(text) - - -def format_heading(level, text): - """Create a heading of [1, 2 or 3 supported].""" - underlining = ['=', '-', '~', ][level - 1] * len(text) - return '%s\n%s\n\n' % (text, underlining) - - -def format_directive(package_type, package, project = None): - """Create the breathe directive and add the options.""" - directive = '.. doxygen%s:: %s\n' % (package_type, package) - if project: - directive += ' :project: %s\n' % project - return directive - - -def create_package_file(package, package_type, package_id, package_folder, rootpath, destdir): - """Build the text of the file and write the file.""" - text = format_heading(1, '%s' % (package)) - text += format_directive(package_type, package) - - xmlfile = os.path.join(rootpath, package_id + '.xml') - f = xml.etree.ElementTree.parse(os.path.join(xmlfile)) - - write_file(os.path.join(package_folder, package_id), text, destdir) - - -def create_modules_toc_file(key, value, destdir): - """Create the module's index.""" - text = format_heading(1, '%s' % value) - text += '.. toctree::\n' - text += ' :glob:\n\n' - text += ' %s/*\n' % key - - write_file('%slist' % key, text, destdir) - - -def get_compound_folder(rootpath, compound): - fxml = xml.etree.ElementTree.parse(os.path.join(rootpath, compound.get('refid')) + '.xml') - loc = fxml.getroot()[0].find('location') - dirname = os.path.basename(os.path.split(loc.get('file'))[0]) - return dirname - - -def recurse_tree(rootpath, destdir): - """ - Look for every file in the directory tree and create the corresponding - ReST files. - """ - index = xml.etree.ElementTree.parse(os.path.join(rootpath, 'index.xml')) - - for compound in index.getroot(): - if compound.get('kind') not in ALLOWED_TYPES: - continue - create_package_file(compound.findtext('name'), compound.get('kind'), - compound.get('refid'), get_compound_folder(rootpath, compound), - rootpath, destdir) - -def get_folders_tree(rootpath): - tmp = [] - - # Retrieve the subfolders indexes - for root, _, files in os.walk(rootpath): - for xmlfile in files: - if not xmlfile.startswith('dir_'): - continue - tmp.append(xmlfile) - - # Iterate on them - dirs = [] - for xmlfile in tmp: - data = xml.etree.ElementTree.parse(os.path.join(rootpath, xmlfile)) - if not data: - continue - for compound in data.getroot(): - name = compound.findtext('compoundname') - dirs.append(name) - - return dirs - - -def main(): - rootpath = './doxygen-out/xml' - destdir = './source/api' - - if not os.path.exists(destdir): - os.makedirs(destdir) - - dirs = sorted(get_folders_tree(rootpath)) - source_root = dirs[0] - source_dirs = dirs[1:] - out_dirs = [os.path.basename(d) for d in dirs] - - # TODO Handle only one level subfolders - for key in out_dirs: - ddir = os.path.join(destdir, key) - if not os.path.exists(ddir): - os.makedirs(ddir) - create_modules_toc_file(key, key.capitalize(), destdir) - recurse_tree(rootpath, destdir) - - -# So program can be started with "python -m breathe.apidoc ..." -if __name__ == "__main__": - main() diff --git a/docs/cutter_theme/layout.html b/docs/cutter_theme/layout.html deleted file mode 100644 index 470cf6623..000000000 --- a/docs/cutter_theme/layout.html +++ /dev/null @@ -1,51 +0,0 @@ -{% extends 'basic/layout.html' %} -{% block extrahead %} - - - - -{% endblock %} - -{# https://www.sphinx-doc.org/en/master/templating.html #} - -{% block relbar1 %}{% if pagename != 'index' %}{{ relbar() }}{% endif %}{% endblock %} - -{% block relbar2 %} -{% endblock %} - -{% block header %} - {% if pagename == 'index' %}
{% endif %} -{% endblock %} - -{% block sidebar1 %} -{% endblock %} - -{% block sidebar2 %} - {%- if render_sidebar %} - - {%- endif %} -{% endblock %} - -{% block footer %} - {{ super() }} - {% if pagename == 'index' %}
{% endif %} -{% endblock %} diff --git a/docs/cutter_theme/static/admonitions.css b/docs/cutter_theme/static/admonitions.css deleted file mode 100644 index 0a8ed2fcc..000000000 --- a/docs/cutter_theme/static/admonitions.css +++ /dev/null @@ -1,106 +0,0 @@ -/* Admonition styles */ -div.admonition { - padding: 8px 35px 8px 0px; - margin-bottom: 20px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - border: 1px solid ; - color: #3a87ad; - background-color: #d9edf7; - border-color: #bce8f1; - - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - } - - div.admonition p { - margin: 0.5em 1em 0.5em 1em; - padding: 0; - } - - div.admonition pre { - margin: 0.4em 1em 0.4em 1em; - } - - div.admonition p.admonition-title { - margin: 0; - padding: 0.1em 0 0.1em 0.5em; - font-weight: bold; - } - - div.admonition ul, div.admonition ol { - margin: 0.1em 0.5em 0.5em 3em; - padding: 0; - } - - /* -- danger, error -- */ - div.danger, - div.error { - color: #b94a48; - background-color: #f2dede; - border-color: #eed3d7; - } - - - /* -- warning, caution, attention -- */ - div.warning, - div.caution, - div.attention { - color: #c09853; - background-color: #fcf8e3; - border: 1px solid #fbeed5; - } - - /* -- note, important -- */ - div.note, - div.important { - color: #468847; - background-color: #dff0d8; - border-color: #d6e9c6; - } - - /* -- hint, tip -- */ - div.hint, - div.tip { - color: #3a87ad; - background-color: #d9edf7; - border-color: #bce8f1; - } - - div.danger p.admonition-title:before, - div.error p.admonition-title:before, - div.warning p.admonition-title:before, - div.caution p.admonition-title:before, - div.attention p.admonition-title:before, - div.important p.admonition-title:before, - div.note p.admonition-title:before, - div.hint p.admonition-title:before, - div.tip p.admonition-title:before - { - display: inline-block; - font-family: FontAwesome; - font-style: normal; - font-weight: normal; - line-height: 1; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - } - - div.danger p.admonition-title:before, - div.error p.admonition-title:before { - content: "\f06a\00a0"; - } - div.warning p.admonition-title:before, - div.caution p.admonition-title:before, - div.attention p.admonition-title:before { - content: "\f071\00a0"; - } - div.important p.admonition-title:before, - div.note p.admonition-title:before { - content: "\f05a\00a0"; - } - div.hint p.admonition-title:before, - div.tip p.admonition-title:before { - content: "\f0eb\00a0"; - } - \ No newline at end of file diff --git a/docs/cutter_theme/static/cutter.css_t b/docs/cutter_theme/static/cutter.css_t deleted file mode 100644 index f58677710..000000000 --- a/docs/cutter_theme/static/cutter.css_t +++ /dev/null @@ -1,492 +0,0 @@ -/* - * cutter.css_t - * based on flasky.css_t by Armin Ronacher - * ~~~~~~~~~~~~ - * - */ - -{% set page_width = '1300px' %} -{% set sidebar_width = '220px' %} - -@import url('https://fonts.googleapis.com/css?family=Poppins&display=swap'); -@import url('https://fonts.googleapis.com/css?family=Inconsolata&display=swap'); -@import url('basic.css'); - -/* -- page layout ---------------------------------------------------------- */ - -body { - font-family: "Poppins", sans-serif; - font-size: 16px; - background-color: white; - color: #0d1b33; - margin: 0; - padding: 0; -} - -div.document { - width: {{ page_width }}; - margin: 30px auto 0 auto; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 {{ sidebar_width }}; -} - -div.sphinxsidebar { - width: {{ sidebar_width }}; -} - -hr { - border: 1px solid #b1b4b6; -} - -div.body { - background-color: #fff; - color: #3e4349; - padding: 0 30px 0 30px; -} - -img.floatingflask { - padding: 0 0 10px 10px; - float: right; -} - -div.footer { - width: {{ page_width }}; - margin: 20px auto 30px auto; - font-size: 14px; - color: #888; - text-align: right; -} - -div.footer a { - color: #888; -} - -div.sphinxsidebar a { - color: #444; - text-decoration: none; - border-bottom: 1px solid #999; -} - -div.sphinxsidebar a:hover { - color: #216ae6; - border-bottom: 1px solid #999; -} - -div.sphinxsidebar { - font-size: 14px; - line-height: 1.5; -} - -div.sphinxsidebarwrapper { - padding: 18px 10px; -} - -div.sphinxsidebarwrapper p.logo { - padding: 0 0 20px 0; - margin: 0; - text-align: center; -} - -div.sphinxsidebar h3, -div.sphinxsidebar h4 { - font-family: Content-font, Roboto, sans-serif; - color: #444; - font-size: 18px; - font-weight: normal; - margin: 0 0 5px 0; - padding: 0; -} - -div.sphinxsidebar h4 { - font-size: 20px; -} - -div.sphinxsidebar h3 a { - color: #444; -} - -div.sphinxsidebar p.logo a, -div.sphinxsidebar h3 a, -div.sphinxsidebar p.logo a:hover, -div.sphinxsidebar h3 a:hover { - border: none; -} - -div.sphinxsidebar p { - color: #555; - margin: 10px 0; -} - -div.sphinxsidebar ul { - margin: 10px 0; - padding: 0; - color: #000; -} - -div.sphinxsidebar input { - border: 1px solid #ccc; - font-family: Content-font, Roboto, sans-serif; - font-size: 1em; -} - -/* -- body styles ---------------------------------------------------------- */ - -a { - color: #004b6b; - text-decoration: underline; -} - -a:hover { - color: #6d4100; - text-decoration: underline; -} - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - color: #041e49; - font-family: Content-font, Roboto, sans-serif; - font-weight: 400; - margin: 30px 0 10px 0; - padding: 0; -} - -{% if theme_index_logo %} -div.indexwrapper h1 { - text-indent: -999999px; - background: url({{ theme_index_logo }}) no-repeat center center; - height: {{ theme_index_logo_height }}; -} -{% endif %} -div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } -div.body h2 { font-size: 180%; } -div.body h3 { font-size: 150%; } -div.body h4 { font-size: 130%; } -div.body h5 { font-size: 100%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: #216ae6; - padding: 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - color: #041e49; -} - -div.body p, div.body dd, div.body li { - line-height: 1.4; -} - -dt:target, .highlight { - background: #faf3e8; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -img.screenshot { -} - -img.screenshot { - -moz-box-shadow: 2px 2px 4px #eee; - -webkit-box-shadow: 2px 2px 4px #eee; - box-shadow: 2px 2px 4px #eee; -} - -table.docutils { - border: 1px solid #888; - -moz-box-shadow: 2px 2px 4px #eee; - -webkit-box-shadow: 2px 2px 4px #eee; - box-shadow: 2px 2px 4px #eee; -} - -table.docutils td, table.docutils th { - border: 1px solid #888; - padding: 0.25em 0.7em; -} - -table.field-list, table.footnote { - border: none; - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -table.footnote { - margin: 15px 0; - width: 100%; - border: 1px solid #eee; - background: #fdfdfd; - font-size: 0.9em; -} - -table.footnote + table.footnote { - margin-top: -15px; - border-top: none; -} - -table.field-list th { - padding: 0 0.8em 0 0; -} - -table.field-list td { - padding: 0; -} - -table.footnote td.label { - width: 0; - padding: 0.3em 0 0.3em 0.5em; -} - -table.footnote td { - padding: 0.3em 0.5em; -} - -dl { - margin: 0; - padding: 0; -} - -dl dd { - margin-left: 30px; -} - -blockquote { - margin: 0 0 0 30px; - padding: 0; -} - -ul, ol { - margin: 10px 0 10px 30px; - padding: 0; -} - -pre { - background: #fafafa; - padding: 7px 30px; - margin: 15px -30px; - line-height: 1.3; - font-family: 'Inconsolata', monospace; -} - -span.pre { - color: #e83e8c; - word-break: break-word; - font-family: SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace; -} - -dl pre, blockquote pre, li pre { - margin-left: -60px; - padding-left: 60px; -} - -dl dl pre { - margin-left: -90px; - padding-left: 90px; -} - -a.reference { - color: #216ae6; - text-decoration: none; -} - -a.reference:hover { - color: #216ae6; - border-bottom: 1px solid; -} - -a.footnote-reference { - color: #216ae6; - text-decoration: none; - font-size: 0.7em; - vertical-align: top; - border-bottom: 1px solid; -} - -a.footnote-reference:hover { - color: #216ae6; - border-bottom: 1px solid; -} - -/* Notes box */ -.admonition { - border-radius: 5px; -} - -.admonition.note { - color: #0c5460; - background-color: #d1ecf1; - border-color: #bee5eb; -} - -/* API Reference */ - -.rst-content dl:not(.docutils) dt { -} - -code.descname { - font-size: 14px; -} - -.sig-paren { - font-size: 14px; -} - -@media screen and (max-width: 1050px) { - body { - margin: 0; - padding: 20px 30px; - } - - div.documentwrapper { - float: none; - background: white; - margin: 0; - } - - div.sphinxsidebar { - display: block; - float: none; - width: 102.5%; - margin: 50px -30px 0; - padding: 10px 30px; - background: #333; - color: white; - } - - div.sphinxsidebarwrapper { - padding: 0; - } - - div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, - div.sphinxsidebar h3 a { - color: white; - } - - div.sphinxsidebar a { - color: #aaa; - } - - div.sphinxsidebar p.logo { - display: none; - } - - div.document { - width: 100%; - margin: 0; - } - - div.related { - display: block; - margin: 0; - padding: 10px 0 20px 0; - } - - div.related ul, - div.related ul li { - margin: 0; - padding: 0; - } - - div.bodywrapper { - margin: 0; - } - - div.body { - min-height: 0; - padding: 0; - } - - .rtd_doc_footer { - display: none; - } - - div.footer { - width: auto; - margin: 0 -30px -20px; - padding: 10px 30px 20px; - background: #333; - } - - ul { - margin-left: 0; - } -} -/* Kbd Style */ - -kbd { - font-family: Consolas, "Lucida Console", monospace; - display: inline-block; - border-radius: 3px; - padding: 0px 4px; - box-shadow: 1px 1px 1px #777; - margin: 2px; - font-size: small; - vertical-align: text-bottom; - background: #eee; - font-weight: 500; - color: #555; - cursor: pointer; - font-variant: small-caps; - font-weight: 600; - letter-spacing: 0.5px; - letter-spacing: 1px; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -kbd:hover, -kbd:hover * { - color: black; - box-shadow: 1px 1px 1px #333; -} - -kbd:active, -kbd:active * { - color: black; - box-shadow: 1px 1px 0px #ddd inset; -} - -kbd kbd { - padding: 0px; - margin: 0 1px; - box-shadow: 0px 0px 0px black; - vertical-align: baseline; - background: none; -} - -kbd kbd:hover { - box-shadow: 0px 0px 0px black; -} - -kbd:active kbd { - box-shadow: 0px 0px 0px black; - background: none; -} diff --git a/docs/cutter_theme/static/cutter.js b/docs/cutter_theme/static/cutter.js deleted file mode 100644 index 4135261ff..000000000 --- a/docs/cutter_theme/static/cutter.js +++ /dev/null @@ -1,5 +0,0 @@ - -// Make sure that external links are opened in new tabs -$(document).ready(function() { - $("a[href^='http']").attr('target','_blank'); -}); \ No newline at end of file diff --git a/docs/cutter_theme/theme.conf b/docs/cutter_theme/theme.conf deleted file mode 100644 index 240512809..000000000 --- a/docs/cutter_theme/theme.conf +++ /dev/null @@ -1,11 +0,0 @@ -[theme] -inherit = basic -stylesheet = cutter.css -pygments_style = flasky - -[options] -index_logo = -index_logo_height = 120px -touch_icon = -github_fork = -github_ribbon_color = darkblue_121621 diff --git a/docs/source/api.rst b/docs/source/api.rst deleted file mode 100644 index 20cd4f6e8..000000000 --- a/docs/source/api.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. _api: - -API Reference -============== - -.. toctree:: - :glob: - - api/* diff --git a/docs/source/building.rst b/docs/source/building.rst deleted file mode 100644 index a57e2bda7..000000000 --- a/docs/source/building.rst +++ /dev/null @@ -1,357 +0,0 @@ -Building -======== - -.. note:: - - If you just want to use the latest Release version of Cutter, please note - that we provide pre-compiled binaries for Windows, Linux and macOS on - our `release page. `_ - -Getting the Source ------------------- - -Make sure you've ``git`` installed in your system (`Installation guide `_) and do the following: - -.. code-block:: sh - - git clone --recurse-submodules https://github.com/radareorg/cutter - - -This will clone the Cutter source and it's dependencies(radare2, etc.) -under **cutter** and you should see the following dir structure: - -.. code-block:: sh - - cutter/-| - |-docs/ # Cutter Documentation - |-radare2/ # radare2 submodule - |-src/ # Cutter Source Code - -Following sections assume that **cutter** is your working dir. (if not, do ``cd cutter``) - -Building on Linux ------------------ - -Requirements -~~~~~~~~~~~~ - -On Linux, you will need: - -* build-essential -* cmake -* meson -* libzip-dev -* libzlib-dev -* qt5 -* qt5-svg -* pkgconf -* curl* -* python-setuptools* -* KSyntaxHighlighter** -* graphviz** - - `*` Recommended while building with ``make``/``Cmake``. - - `**` Optional. If present, these add extra features to Cutter. See `CMake Building Options`_. - -On Debian-based Linux distributions, all of these essential packages can be installed with this single command: - -:: - - sudo apt install build-essential cmake meson libzip-dev zlib1g-dev qt5-default libqt5svg5-dev qttools5-dev qttools5-dev-tools - -.. note:: - For Ubuntu 18.04 and lower, ``meson`` should be installed with ``pip install --upgrade --user meson``. - -On Arch-based Linux distributions: - -:: - - sudo pacman -Syu --needed base-devel cmake meson qt5-base qt5-svg qt5-tools - -Building Steps -~~~~~~~~~~~~~~ - -The recommended way to build Cutter on Linux is by using CMake. Simply invoke CMake to build Cutter and its dependency radare2. - -.. code:: sh - - mkdir build && cd build - cmake -DCUTTER_USE_BUNDLED_RADARE2=ON ../src - cmake --build . - -If your operating system has a newer version of CMake (> v3.12) you can use this cleaner solution: - -.. code:: sh - - cmake -S src -B build -DCUTTER_USE_BUNDLED_RADARE2=ON - cmake --build build - -.. note:: -If you want to use Cutter with another version of radare2 you can omit ``-DCUTTER_USE_BUNDLED_RADARE2=ON``. Note that using a version of radare2 which isn't the version Cutter is using can cause issues and the compilation might fail. - -.. note:: - - If you are interested in building Cutter with support for Python plugins, - Syntax Highlighting, Crash Reporting and more, - please look at the full list of `CMake Building Options`_. - - -After the build process is complete, you should have the ``Cutter`` executable in the **build** dir. -You can now execute Cutter like this: - -.. code:: sh - - ./build/Cutter - - -Building on Windows -------------------- - -Requirements -~~~~~~~~~~~~ - -Cutter works on Windows 7 or newer. -To compile Cutter it is necessary to have the following installed: - -* A version of Visual Studio (2015, 2017 and 2019 are supported) -* CMake -* Qt - -Recommended Way -~~~~~~~~~~~~~~~ - -To build Cutter on Windows machines using CMake, -you will have to make sure that the executables are available -in your ``%PATH%`` environment variable. - -Note that the paths below may vary depending on your version of Qt and Visual Studio. - -.. code:: batch - - set CMAKE_PREFIX_PATH=c:\Qt\qt-5.6.2-msvc2013-x86\5.6\msvc2013\lib\cmake - cd src - mkdir build - cd build - cmake-gui .. - -Click ``Configure`` and select your version of Visual Studio from the list, -for example ``Visual Studio 14 2015``. -After the configuration is done, click ``Generate`` and you can open -``Cutter.sln`` to compile the code as usual. - - -Building with Meson -~~~~~~~~~~~~~~~~~~~ - -There is another way to compile Cutter on Windows if the one above does -not work or does not suit your needs. - -Additional requirements: - -- Ninja build system -- Meson build system - -Download and unpack -`Ninja `__ to the Cutter -source root directory (ie. **cutter** - working dir). - -Note that in the below steps, the paths may vary depending on your version of Qt and Visual Studio. - -Environment settings (example for x64 version): - -.. code:: batch - - :: Export MSVC variables - CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 - :: Add qmake to PATH - SET "PATH=C:\Qt\5.10.1\msvc2015_64\bin;%PATH%" - :: Add Python to PATH - SET "PATH=C:\Program Files\Python36;%PATH%" - -Install Meson: - -.. code:: batch - - python -m pip install meson - -To compile Cutter, run: - -.. code:: batch - - CALL prepare_r2.bat - CALL build.bat - - --------------- - -Building with Qmake -------------------- - -Using QtCreator -~~~~~~~~~~~~~~~ - -One standard way is to simply load the project inside QtCreator. -To do so, open QtCreator and on the welcome screen click on "Open Project", -and finally select the ``cutter/src/Cutter.pro`` file. -QtCreator will then allow you to directly edit the source code and build the project. - -.. note:: - - On **Windows**, for the ``.pro`` file to be compiled successfully, it is required - to run ``prepare_r2.bat`` beforehand. - -Compiling on Linux / macOS -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The easiest way, but not the one we recommend, is to simply run ``./build.sh`` from the root directory, -and let the magic happen. The script will use ``qmake`` to build Cutter. -The ``build.sh`` script is meant to be deprecated and will be deleted in the future. - -If you want to manually use qmake, follow these steps: - -.. code:: sh - - mkdir build; cd build - qmake ../src/Cutter.pro - make - cd .. - -Additional Steps for macOS -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -On macOS you will also have to copy the launcher bash script: - -.. code:: sh - - mv Cutter.app/Contents/MacOS/Cutter Cutter.app/Contents/MacOS/Cutter.bin - cp ../src/macos/Cutter Cutter.app/Contents/MacOS/Cutter && chmod +x Cutter.app/Contents/MacOS/Cutter - - --------------- - -CMake Building Options ----------------------- - -Note that there are some major building options available: - -* ``CUTTER_USE_BUNDLED_RADARE2`` automatically compile Radare2 from submodule. -* ``CUTTER_ENABLE_PYTHON`` compile with Python support. -* ``CUTTER_ENABLE_PYTHON_BINDINGS`` automatically generate Python Bindings with Shiboken2, required for Python plugins! -* ``CUTTER_ENABLE_KSYNTAXHIGHLIGHTING`` use KSyntaxHighlighting for code highlighting. -* ``CUTTER_ENABLE_GRAPHVIZ`` enable Graphviz for graph layouts. -* ``CUTTER_ENABLE_CRASH_REPORTS`` is used to compile Cutter with crash handling system enabled (Breakpad). - -These options can be enabled or disabled from the command line arguments passed to CMake. -For example, to build Cutter with support for Python plugins, you can run this command: - -:: - - cmake -B build -DCUTTER_ENABLE_PYTHON=ON -DCUTTER_ENABLE_PYTHON_BINDINGS=ON - -Or if one wants to explicitly disable an option: - -:: - - cmake -B build -DCUTTER_ENABLE_PYTHON=OFF - - --------------- - -Compiling Cutter with Breakpad Support --------------------------------------- - -If you want to build Cutter with crash handling system, you will want to first prepare Breakpad. -For this, simply run one of the scripts (according to your OS) from root Cutter directory: - -.. code:: sh - - source scripts/prepare_breakpad_linux.sh # Linux - source scripts/prepare_breakpad_macos.sh # MacOS - scripts/prepare_breakpad.bat # Windows - -Then if you are building on Linux you want to change ``PKG_CONFIG_PATH`` environment variable -so it contains ``$CUSTOM_BREAKPAD_PREFIX/lib/pkgconfig``. For this simply run - -.. code:: sh - - export PKG_CONFIG_PATH="$CUSTOM_BREAKPAD_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" - - --------------- - -Troubleshooting ---------------- - -* **Cmake can't find Qt** - - Cmake: qt development package not found - -Depending on how Qt installed (Distribution packages or using the Qt -installer application), CMake may not be able to find it by itself if it -is not in a common place. If that is the case, double-check that the -correct Qt version is installed. Locate its prefix (a directory -containing bin/, lib/, include/, etc.) and specify it to CMake using -``CMAKE_PREFIX_PATH`` in the above process, e.g.: - -:: - - rm CMakeCache.txt # the cache may be polluted with unwanted libraries found before - cmake -DCMAKE_PREFIX_PATH=/opt/Qt/5.9.1/gcc_64 .. - -* **Radare2's libr_*.so cannot be found when running Cutter** - - ./Cutter: error while loading shared libraries: libr_lang.so: cannot open shared object file: No such file or directory - -The exact r2 .so file that cannot be found may vary. On some systems, the linker by default uses RUNPATH instead of RPATH which is incompatible with the way r2 is currently compiled. It results in some of the r2 libraries not being found when running cutter. You can verify if this is the problem by running `ldd ./Cutter`. If all the r2 libraries are missing you have a different problem. -The workaround is to either add the `--disable-new-dtags` linker flag when compiling Cutter or add the r2 installation path to LD_LIBRARY_PATH environment variable. - -:: - - cmake -DCMAKE_EXE_LINKER_FLAGS="-Wl,--disable-new-dtags" .. - -* **r_*.h: No such file or directory** - - r_util/r_annotated_code.h: No such file or directory - -If you face an error where some header file starting with ``r_`` is missing, you should check the **radare2** submodule and -make sure it is in sync with upstream **Cutter** repo. Simply run: - -:: - - git submodule update --init --recursive - -* **r_core development package not found** - -If you installed radare2 and still encounter this error, it could be that your -``PATH`` environment variable is set improperly (doesn’t contain -``/usr/local/bin``). You can fix this by adding the radare2 installation dir to -your ``PATH`` variable. - -macOS specific solutions: - -On macOS, that can also be, for example, due to ``Qt Creator.app`` -being copied over to ``/Applications``. To fix this, append -``:/usr/local/bin`` to the ``PATH`` variable within the *Build -Environment* section in Qt Creator. See the screenshot below should you -encounter any problems. - -You can also try: - -- ``PKG_CONFIG_PATH=$HOME/bin/prefix/radare2/lib/pkgconfig qmake`` -- ``PKG_CONFIG_PATH=$HOME/cutter/radare2/pkgcfg qmake`` (for a newer - version and if the radare2 submodule is being built and used) - -.. image:: images/cutter_path_settings.png - -You can also install radare2 into ``/usr/lib/pkgconfig/`` and then -add a variable ``PKG_CONFIG_PATH`` with the value ``/usr/lib/pkgconfig/``. - -* **macOS libjpeg error** - -On macOS, Qt5 apps fail to build on QtCreator if you have the ``libjpeg`` -installed with brew. Run this command to work around the issue: - -:: - - sudo mv /usr/local/lib/libjpeg.dylib /usr/local/lib/libjpeg.dylib.not-found diff --git a/docs/source/conf.py b/docs/source/conf.py deleted file mode 100644 index bbf27a78b..000000000 --- a/docs/source/conf.py +++ /dev/null @@ -1,201 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Configuration file for the Sphinx documentation builder. -# -# This file does only contain a selection of the most common options. For a -# full list see the documentation: -# http://www.sphinx-doc.org/en/master/config - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - - -# -- Project information ----------------------------------------------------- - -project = 'Cutter' -copyright = '2020, The Cutter Developers' -author = 'The Cutter Developers' - -# The short X.Y version -version = '1.11' -# The full version, including alpha/beta/rc tags -release = '1.11.0' - - -# -- General configuration --------------------------------------------------- - -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'breathe', - 'recommonmark', - 'sphinx.ext.autosectionlabel' -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = '.rst' -source_suffix = { - '.rst': 'restructuredtext', - '.md': 'markdown', -} - -# The master toctree document. -master_doc = 'index' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = ['_build'] - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'rainbow_dash' - - -autosectionlabel_prefix_document = True -autosectionlabel_maxdepth = 2 - -# -- Options for Breathe ----------------------------------------------------- - -breathe_projects = { 'cutter': '../doxygen-out/xml' } -breathe_default_project = 'cutter' -breathe_default_members = ('members', 'undoc-members') - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = 'cutter_theme' -html_theme_path = ['..'] -html_logo = '../../src/img/cutter.ico' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# -# html_theme_options = {} - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -# html_static_path = ['static'] - -html_js_files = [ - 'cutter.js', -] - -html_css_files = [ - 'cutter.css', - 'admonitions.css' -] - -# Custom sidebar templates, must be a dictionary that maps document names -# to template names. -# -# The default sidebars (for documents that don't match any pattern) are -# defined by theme itself. Builtin themes are using these templates by -# Default: html_sidebars = { -# '**': ['globaltoc.html', 'sourcelink.html', 'searchbox.html'], -# 'using/windows': ['windowssidebar.html', 'searchbox.html'], -# } -html_sidebars = { - '**': ['globaltoc.html', 'searchbox.html'], -} - -# -- Options for HTMLHelp output --------------------------------------------- - -# Output file base name for HTML help builder. -htmlhelp_basename = 'CutterDoc' - - -# -- Options for LaTeX output ------------------------------------------------ - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # - # 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # - # 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # - # 'preamble': '', - - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'Cutter.tex', 'Cutter Documentation', - 'The Cutter Developers', 'manual'), -] - - -# -- Options for manual page output ------------------------------------------ - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'cutter', 'Cutter Documentation', - [author], 1) -] - - -# -- Options for Texinfo output ---------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'Cutter', 'Cutter Documentation', - author, 'Cutter', 'One line description of project.', - 'Miscellaneous'), -] - - -# -- Options for Epub output ------------------------------------------------- - -# Bibliographic Dublin Core info. -epub_title = project - -# The unique identifier of the text. This can be a ISBN number -# or the project homepage. -# -# epub_identifier = '' - -# A unique identification for the text. -# -# epub_uid = '' - -# A list of files that should not be packed into the epub file. -epub_exclude_files = ['search.html'] diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst deleted file mode 100644 index 52c0564c8..000000000 --- a/docs/source/contributing.rst +++ /dev/null @@ -1,29 +0,0 @@ -Contributing to Cutter -======================= - -So you like Cutter and want to get involved? Great! This part of the documentation will help and guide you through everything you need to know when contributing to Cutter. Welcome, we're delighted to see you! - -.. tip:: - **Need help?** Our community strives to be friendly, open, and accessible for new contributors. If you have any difficulties getting involved or finding answers to you questions, please `come and ask your questions on our Telegram or IRC groups `_. - - We know that set up to work on Cutter and finding issues that are a good fit for your skills can be a challenge. We're always looking for ways to improve this process: making Cutter more open, accessible, and easier to participate with. If you're having any trouble following this documentation or hit a barrier you can't get around, please contact us. - -.. rubric:: How do you want to help? - -.. raw:: html - - Code - Documentation - Plugins - Translations - ---------- - -.. toctree:: - :maxdepth: 2 - :titlesonly: - - contributing/code - contributing/docs - contributing/translations/getting-started - contributing/plugins/getting-started diff --git a/docs/source/contributing/code.rst b/docs/source/contributing/code.rst deleted file mode 100644 index b5336b325..000000000 --- a/docs/source/contributing/code.rst +++ /dev/null @@ -1,14 +0,0 @@ -Developer Documentation -======================= - -.. note:: - New to Cutter development? Check out our :doc:`tutorial for new developers `. - -.. toctree:: - :maxdepth: 2 - :glob: - - Getting Started - code/development-guidelines - code/ide-setup - code/* diff --git a/docs/source/contributing/code/crash-handling-system.rst b/docs/source/contributing/code/crash-handling-system.rst deleted file mode 100644 index 98004b148..000000000 --- a/docs/source/contributing/code/crash-handling-system.rst +++ /dev/null @@ -1,32 +0,0 @@ -Crash Handling System -===================== - -Cutter uses `Breakpad `__ as a backend -for crash handling. - -Crash Handling System is disabled by default to not interfere with developers while debugging. -To enable this system, set the ``CUTTER_ENABLE_CRASH_REPORTS`` build option. - -Solution Description --------------------- - -There are only 2 source files: - -* ``CrashHandler.h`` -* ``CrashHandler.cpp`` - -And the API is very simple: One function, ``initCrashHandler()``, enables the Crash Handling System if -``CUTTER_ENABLE_CRASH_REPORTS`` is true, otherwise it does nothing. - -As soon as a signal is raised, ``crashHandler(int signum)`` is called with the signal's code as an argument. -This function first writes a crash dump to the operating system's temporary directory to catch core and -memory state as it was at the moment of the crash. - -Then the crash dialog is shown: - -.. image :: /images/crash-dialog.png - -If the user chooses to create a crash dump, the prepared dump is moved to the directory specified by the user. -And then the success dialog is shown: - -.. image :: /images/success-dump-dialog.png diff --git a/docs/source/contributing/code/development-guidelines.rst b/docs/source/contributing/code/development-guidelines.rst deleted file mode 100644 index 6e2ee9c03..000000000 --- a/docs/source/contributing/code/development-guidelines.rst +++ /dev/null @@ -1,266 +0,0 @@ - -Cutter Development Guidelines -=============================== - -.. note:: - New to Cutter development? Check out our :doc:`tutorial for new developers `. - - -Common Usage --------------- - -CutterCore Class -~~~~~~~~~~~~~~~~ - -This is the main class where every link with r2 is made. It is *unique* -across the whole process. To access it, simply call ``Core()``. - -Example: - -.. code:: cpp - - Core()->getOffset(); - -Calling a radare2 Command -~~~~~~~~~~~~~~~~~~~~~~~~~ - -There are multiple ways to call a radare2 command: - -- ``CutterCore::cmdj()`` - To be used with json commands like ``cmdj("agj")`` or ``cmdj("aflj")``. - This is the command we used to fetch structured data from radare2. - -- ``CutterCore::cmdRaw()`` - Executes a single radare2 command - without going through radare2 shell functionality like output redirects, grep, and multiple command parsing. - -The command then returns its output. This should be used when a command doesn't have output or the output should be handled as-is. If possible, using the JSON variation with ``cmdj`` is always preferred. - -- ``CutterCore::cmdRawAt(,
)`` - Executes a single radare2 command in a given address and returns the output. This helps avoiding weird strings concatenation like ``cmd("ph " + hash + " @ " + QString::num(address))``. - -- ``CutterCore::cmd()`` - *(Discouraged)* Only use it when ``cmdj`` or ``cmdRaw`` cannot be used. This is used for complex commands using concatenation of several commands (``px 5; pd 7; afl;``), for grepping (``pd 5~call``). for commands inside commands (``?e `afn.```) and so on. - This is also used when the output is complex and is not parsed correctly in ``cmdRaw``. - Make sure to carefully sanitize user-controlled variables that are passed to the command, to avoid unexpected command injections. - -Generally, if one needs to retrieve information from a radare2 command, it -is preferred to use the JSON API. - -Example: - -.. code:: cpp - - QJsonArray array = Core()->cmdj("pdj 1 @ main").array(); - -Seek the Current File -~~~~~~~~~~~~~~~~~~~~~ - -To modify radare2 seek use ``CutterCore::seek(const RVA offset)``. This -is important because it will emit a -``CutterCore::seekChanged(RVA offset)`` signal. Never ever call -``cmd("s offset")``; - -Example: - -.. code:: cpp - - Core()->seek(0x00C0FFEE); - -.. note:: - - Cutter also supports a silent seek which doesn't trigger the ``seekChanged`` event and doesn't add new entries to the seek history. - - -Creating a Widget -~~~~~~~~~~~~~~~~~ - -Make sure to connect the ``CutterCore::seekChanged(RVA offset)`` signal -so your widget refreshes its output when radare2 seek is modified -(switching to another function, etc.). - -Coding Style ------------- - -In general, we follow `the official Qt guidelines `__ to -format the code. If in doubt, you can use `AStyle -2.06 `__ -to format the code. The command line for formatting the code according -to the style is: - -.. code:: bash - - astyle --project=src/Cutter.astylerc src/filename.cpp - -In contrast to the official guidelines of Qt, in Cutter we always use curly braces in conditional statements, even if the body of a conditional statement contains only one line. - -.. code:: cpp - - // Wrong - if (address.isEmpty()) - return false; - - // Correct - if (address.isEmpty()) { - return false; - } - - // Wrong - for (int i = 0; i < 10; ++i) - qDebug("%i", i); - - // Correct - for (int i = 0; i < 10; ++i) { - qDebug("%i", i); - } - - -Includes -~~~~~~~~ - -Strive to include only **required** definitions inside header files. -This will avoid triggering additional unnecessary compilations. - -If you only need to know that a class exists but don't need the prototype, -you can declare the class like this: - -.. code:: cpp - - class MyClassThatExists; - - /** ... **/ - - private: - MyClassThatExists *classInstance; - -And then include the class header inside your .cpp so you can use that class. - -If you need something in the source file (.cpp) that is not a class member, -then add the include in the source file. - -The includes must be ordered from local to global. That is, first include -any local header file (with double quotes like `#include "common/Helpers.h"`. -Then, after an empty newline, include Qt definitions like -`#include `. -Finally, include the standard C++ headers you need. - -Includes must be sorted by alphabetical order. - -Docstrings -~~~~~~~~~~ - -Our API reference is generated using Doxygen, so when it comes to -function documentation, please use the following format: - -.. code:: cpp - - /** - * @brief Add a new param to the accumulator - */ - virtual void accumulate(RefreshDeferrerParams params) =0; - -Loops -~~~~~ - -We use the C++11 foreach loop style, which means any “foreach” loop should -look like: - -.. code:: cpp - - for (QJsonValue value : importsArray) { - doSomething(value); - } - -nullptr -~~~~~~~ - -Please do not use ``0`` nor ``Q_NULLPTR``, only use ``nullptr``. - -Example: - -.. code:: cpp - - QObject *object = nullptr; - -Connecting Qt Signals -~~~~~~~~~~~~~~~~~~~~~ - -Use one of the following methods for connecting signals to slots: - -.. code:: cpp - - // typically you will make connection in the constructor to a member of current class - connect(this->ui->button1, &QPushButton::clicked, - this, &MyObject::buttonClicked); // Good - - // you can also connect directly other object slots - connect(checkbox, &QCheckBox::toggled, widget, &QWidget::setEnabled); // Good - - // use lambda for passing extra arguments - connect(button1, &QPushButton::clicked, this, [this](){ foo(getBar()); }); // Good - -This syntax performs compile-time type checks and allows the use of lambda -functions. Other approaches for connecting signals can silently break at runtime. - -Don't use the older macro based syntax or automatic name based connections. - -.. code:: cpp - - // SIGNAL and SLOT macros - connect(sender, SIGNAL(clicked), this, SLOT(buttonClicked)); // BAD - - // automatic name based connection - slot: - void on_actionNew_triggered(); // BAD - - // 3 argument connect without receiver object - connect(sender, &SomeObject::signal, [this](){ this->foo(getBar()); }); // BAD - - -General Coding Advices ----------------------- - -Functions Documentation -~~~~~~~~~~~~~~~~~~~~~~~ - -You can find the class documentation in the API Reference menu item. - -Updating the Git Submodules -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Git submodules play a major part in Cutter. This, because Cutter is powered -by radare2, its parent project, and it tries to stay up-to-date with its -recent version, which allows us to implement new features, and enjoy bug -fixes and performance improvements on radare2. Often, we need to update -the radare2 submodule or the others, to push their most recent -version to Cutter. - -You can view the list of all the submodules from the cutter root folder with: - -.. code:: sh - - git config --file .gitmodules --get-regexp path | awk '{ print $2 }' - -To update all the submodules at once, run these commands from the -cutter root folder: - -.. code:: sh - - git submodule foreach git pull origin master - git add submodule_name_1 submodule_name_2 - git commit -m "Update submodules" - -More likely, you'll only need to update the radare2 submodule. -In order to update one submodule individually, use the following code: - -.. code:: sh - - cd radare2 - git checkout master && git pull - cd .. - git add radare2 - git commit -m "Update radare2 submodule" - - -Useful Resources (Qt Development) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -* `Signals & Slots `__ -* `Model/View Programming `__ - read this if you are going to work with a list or table-like widgets -* `QAction `__ diff --git a/docs/source/contributing/code/getting-started.rst b/docs/source/contributing/code/getting-started.rst deleted file mode 100644 index 77925dd57..000000000 --- a/docs/source/contributing/code/getting-started.rst +++ /dev/null @@ -1,96 +0,0 @@ -Contributing code to Cutter -============================ - -Thank you so much for your interest in contributing to Cutter! Contributors like you are a treasured resource for Cutter and their contributions have made the project what it is. And so, we appreciate everyone who gives the community the gift of their time <3. - -The following section in our documentation is *not* intended to be comprehensive but rather a quick guide to walk you through the basic flow of contributing to Cutter. For more thorough documentation, follow the links on this page and read our Development Guidelines. - -Clone and compile Cutter -------------------------- -The first step before starting to add code to Cutter is to build it on your environment. Whether it is Linux, Windows, or macOS, we have you covered and detailed the instructions to compile Cutter on our :doc:`/building`. Once you are done and Cutter is built successfully, test that it works correctly and continue to the next steps. - -.. tip:: - If you are facing issues with building Cutter on your environment, make sure you didn't miss anything in the documentation. Specifically, check the :ref:`Building:Troubleshooting` section. - -.. tip:: - If you need help configuring your development environment, make sure to read our :doc:`instructions, recommendations and tips ` for setting up a Cutter development environment for popular IDEs. - - - -Find something to work on --------------------------- -Some will reach this page with a clear idea of what issue they want to fix or what feature they wish to implement. But some would simply want to help Cutter getting better while doing open-source, without having a specific thing in mind. If you already have something in mind - great! Move forward to the next section. If you don't have anything specific, stick with us a little bit more. - -The issues and the feature-requests of Cutter are listed and tracked on our `Github Issues `_ page. Don't get scared by the number of issues open, we will learn how to filter them to find those which fit you best. - -.. tip:: - **Fix your pet peeve!** Anything specific that annoys you about Cutter? Fantastic! This can be a great place to start. - - -Organizing issues -******************* -In order to organize the hundreds of Issues opened on Cutter, we use several features of Github for project management. Get yourself familiar with the following features, it will help you filter the issues. - -Labels -^^^^^^^^ -Tagging issues and pull requests with labels allows us to quickly search for them later. We use labels to describe the type of the issue, the feature it belongs to, the difficulty, and even its priority. We recommend you to start from issues labeled as `good-first-issue `_. These issues were tagged by us as suitable for new contributors. - -Projects -^^^^^^^^^^ -We use `project boards `_ to gather together tasks and issues for specific features or problems. For example, we have dedicated project boards for Debugger, Hexdump widget, Decompiler widget, and High DPI support. If you are interested to take part in developing a major feature, or you want to get a broader look at a progress of a specific part in Cutter, this can be a good place to visit. - -Milestones -^^^^^^^^^^^^ - -When starting working on a new release, we gather together the bug and feature-requests that we consider of high-priority into a `Milestone `_. If you want to work on a feature or fix a bug that is needed and prioritized for the next release, then check out the open Milestone,. - - -Assigning Issues -^^^^^^^^^^^^^^^^^^ - -Before choosing an issue to work on, make sure it is not assigned to anyone. If it is, you can comment and ask if this person is intended to work on the issue. Some assigned issues are abandoned by their assignee and can be picked up by other contributors. - - - -Get familiar with the current situation ----------------------------------------- - -Run Cutter and get familiar with how the functionality you want to modify works currently. For example, if it is a dialog, make sure you understand its role and how our users are using it. If it is a bug, try to repeat it using the instructions from the bug report. - -.. tip:: - If you are inexperienced with binary analysis tasks, you can always ask other developers in the team about the feature and how it should be used. The team and the community will be happy to help and instruct you with everything you need to know. - -Find the source files implementing the feature you want to work on. By doing this, practice searching code in your editor, this is an important skill. We suggest searching for files with the name of the feature. For example, if you are interested in improving the "Sections" widget, you can find the source code of this feature in `SectionsWidget.cpp` and `SectionsWidget.h`. Alternatively, you can try and look for specific unique strings that exist in the dialog, widget, or feature you want to improve. Usually, when searching the entire code base for these strings, you'll land on a file related to this feature, whether it is a ``.cpp`` file or a ``.ui`` file. From there it will be easy to navigate your way to the right place. - - -Work on your feature or bug-fix -------------------------------- - -If you are experienced with such tasks, go ahead - we leave this in your hands. Otherwise, we recommend you come up with a plan for things that need to be done to solve this bug or implement this feature. Discuss your plan in the relevant issue on GitHub. - -.. important:: - Before starting coding, make sure to get yourself familiar with our comprehensive documentation for our `coding style, conventions, and guidelines `_. - - -If you don't know how to implement something, check if any of the existing code implements similar behavior in the same widget or similar widgets. If you do copy an existing code consider why it did things the way it did, the same factors might not apply in your case or the old code was poorly written from the first place. - -Open a Pull request -------------------- - -When you are done, and the additions and modifications to the code are in place, commit your changes, and get your code reviewed by opening a new Pull Request. Please remember to follow the Pull Request template. - -In the Pull Request template you will be required to add a "Test plan". For example, if you performed GUI changes, demonstrate it by posting a screenshot. Make a list of steps to be taken by the reviewers to verify that the changes are working as expected. This is also a good point to consider any potential edge-cases or different kinds of inputs if you didn't already do it while writing the code. Perform the steps you described when making the PR even if they seem trivial and you did them during development, it helps to catch any mistakes done during the final cleanup and making sure you didn't forget anything. - - -Repeat -------- - -**Thank you!** You've made your very first contribution, and Cutter is better for it. But don't stop now. Go back to the first steps, as there is plenty more to do. A mentor or other developers might suggest a new issue for you to work on. - - -More Information ------------------ - -.. important:: - We're always in the process of improving the information on this page for newcomers to the Cutter. Please help us by suggesting improvements and tell us about the information that this page lacks. - diff --git a/docs/source/contributing/code/ide-setup.rst b/docs/source/contributing/code/ide-setup.rst deleted file mode 100644 index 989d2cd53..000000000 --- a/docs/source/contributing/code/ide-setup.rst +++ /dev/null @@ -1,199 +0,0 @@ -Development environment setup -============================= - -This page contains recommendations and tips on how to better setup different IDEs for Cutter development. - - -General advice --------------- -Everyone has their own preferences for their favorite IDE or code editor. -There are no strict requirements for using a specific one for Cutter development. -Any IDE with good CMake integration should work well. - -For most development builds, unless you are working on packaging issues, it is recommended to use ``CUTTER_USE_BUNDLED_RADARE2=ON`` Cmake option. It is the easiest way to ensure that a compatible r2 version is used, and helps you deal with different versions of radare2 when working with multiple Cutter branches. On Linux, in case you have multiple r2 versions without ``CUTTER_USE_BUNDLED_RADARE2``, the ``PKG_CONFIG_PATH`` environment variable can be used to select the desired radare2 installation. - -While `Qt Creator`_ has a builtin visual form and widget editor, not having it in other IDEs is not a major problem. It is also available as a standalone tool called Qt Designer and you can configure the file associations so that ``.ui`` files are opened using it. Depending on the ``.ui`` file and changes you want to make, it is sometimes easier to perform them by editing the ``.ui`` file as a text file. Essentially, ``.ui`` files are XML files. Most code editors should have some support for XML highlighting and possibly block folding. - -The following instructions and recommendations assume that you have already download Cutter source and obtained required dependencies as described in :doc:`/building`. - -Linux ------ - -On a rolling-release distribution or a somewhat recent version of traditional distributions like Ubuntu 18.04, it should be possible to get all the dependencies from the official repository. There might be some problems with PySide2 and Shiboken2 but it can be easily disabled and isn't necessary for most work on Cutter. Don't try to install PySide using pip. - -Windows -------- - -Assuming you have a sufficiently powerful computer, a nice way of getting and configuring Qt for Cutter is to use `vcpkg `_. -For a quick test, the exact versions of libraries used by Cutter release packages can be obtained from `cutter-deps `_ but they don't contain debug -versions of libraries so they are not suitable for more serious Cutter development on Windows. - -Qt Creator ----------- -QT Creator is an open-source IDE made by the same developers as Qt. - -Even though Cutter has qmake project cutter.pro it is recommended to use the CMake project in QTCreator. -QTCreator support for CMake is as good as qmake one but not all Cutter project configuration options are available in qmake project and in future Cutter qmake project might be removed. - -Pros and Cons -~~~~~~~~~~~~~ - -- builtin help for Qt API -- builtin .ui file editor (Qt Designer - visual form editor) -- builtin helper for displaying Qt types in the debugger -- Viewing source files that are not directly part of the project (R2 source code) is somewhat inconvenient. -- The simplest way of installing on non-Linux operating systems require login with Qt account - -Project setup -~~~~~~~~~~~~~ -The following instructions were made based on version 4.12.4 of Qt Creator. The steps might slightly differ between the versions. - -- Go to :menuselection:`File --> Open File or Project..` and select :file:`cutter/src/CMakeList.txt` -- Select kit and press :guilabel:`Configure Project` -- Configuration step might fail due to r2 not being found, that's normal -- Click :guilabel:`Projects` button with wrench icon on the left side of the screen -- Click :menuselection:`Add --> Boolean` in the CMake section -- Enter ``CUTTER_USE_BUNDLED_RADARE2`` as a key name and change the value to ON. In earlier Qt Creator versions it is necessary to do this during the initial kit selection and configuration step. -- Click :guilabel:`Apply Configuration Changes`:. The configuration should succeed now. In case of errors inspect the output log. - -Either in :menuselection:`Projects --> Code Style --> C++` or :menuselection:`Tools --> Options --> C++ --> Code Style` select :guilabel:`Qt [built-in]`. It should be selected by default unless you have used Qt Creator for other projects. Cutter Coding style is almost identical to Qt one. This will help with using correct indentation type and basic formatting without running code formatter. - -To configure AStyle for formatting a file go to :menuselection:`Tools --> Options --> Beautifier --> Artistic Style`. If necessary, specify the path to astyle executable. The :guilabel:`Use file \*.astylerc defined in project files` option doesn't seem to be working reliably so it is necessary to use :guilabel:`Use specific config file` option. Cutter astyle configuration is stored in :file:`cutter/src/Cutter.astylerc`. - -Changing CMake configuration -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Click on the "Projects" button on the left side of the screen and then select "Build". All the project CMake options are listed and can be edited there in a graphical editor. - -Editing Qt .ui files -~~~~~~~~~~~~~~~~~~~~ -Double-clicking a ``.ui`` file in a file list opens it inside a visual editor. If you want to make changes that are easier to do by editing ``.ui`` file as text - right-click the file and select :menuselection:`Open With --> Plain Text Editor`. Switching from visual form editor back to code editor mode will open the ``.ui`` file in read-only mode with the following warning "This file can only be edited in Design mode". To edit use the same steps as described before. - -VSCode -------- -`VSCode `_ is an open-source code editor made by Microsoft. - -Pros and Cons -~~~~~~~~~~~~~ - -- A large number of plugins -- A good fallback mechanism for files that are not directly part of a project. - -Recommended plugins -~~~~~~~~~~~~~~~~~~~ -- `C/C++ `_ - The official C++ support plugin made by Microsoft -- `CMake Tools `_ - Provides CMake project integration. Originally developed by vector-of-bool and currently maintained by Microsoft. -- `CMake `_ - CMake language support when editing CMake files. Does not replace the previous CMake plugin. They provide non-overlapping functionality and should be used together. - -Project setup -~~~~~~~~~~~~~ -- :menuselection:`File --> Open Folder` select the folder in which you cloned Cutter -- If the recommend plugins are already installed, in the corner you will see a popup asking you "Would you like to configure project 'cutter'? Source: CMake Tools (Extension)". Click Yes. -- If you initially dismissed the configuration window or didn't have the plugins installed yet - open command pallet using :kbd:`Ctrl-Shift-P` and select :guilabel:`Cmake: Configure` -- In the kit selection choose :guilabel:`[Unspecified]` unless you have more specific needs. -- If you see the following error: "CMakeList.txt was not found in the root of folder cutter", choose :guilabel:`Locate` and specify the path to :file:`cutter/src/CMakeLists.txt` -- :kbd:`Ctrl-Shift-P`/:guilabel:`CMake: Edit CMake Cache`, find the line ``CUTTER_USE_BUNDLED_RADARE2:BOOL=OFF`` and change it to ON. - -Changing CMake configuration -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -After the first configuration :kbd:`Ctrl-Shift-P`/:guilabel:`CMake: Edit CMake Cache` opens a text editor with all CMake options. Cutter specific ones mostly start with "CUTTER". - - -.. _vscode-debug-setup: - -Building, Running, Debugging -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Build and running commands are available in the bar at the bottom left and in the Command Palette menu (:kbd:`Ctrl-Shift-P`) named ``CMake: Build F7``, ``CMake: Run Without Debugging Shift+F5``, and ``CMake Debug Ctrl + F5``. -Shortcuts can be viewed in the :kbd:`Ctrl-Shift-P` menu. They don't match default VS Code ones since those depend on :file:`tasks.json``. - -Running and debugging launches the executable without any arguments. Command-line arguments can be passed to the debug -executable by creating a ``.vscode/launch.json`` configuration. Read the `documentation `_ for more information. Instead of creating :file:`launch.json` manually it can be created from template: :kbd:`Ctrl-Shift-P`/:menuselection:`Debug: Select and Start Debugging --> Add configuration.. --> C,C++: (gdb) Launch`. - -To setup gdb pretty printers for Qt types on Linux, download the scripts from `Kdevelop `_. In the :file:`~/.gdbinit` file add the following code: - - -.. code-block:: python - - python - import sys - - sys.path.insert(0, '/path/to/folder/with/pretty_printer_scripts') - from qt import register_qt_printers - register_qt_printers (None) - - end - set print pretty 1 - - -CLion ------ -`CLion `_ is a C and C++ IDE from the popular software development tool maker - JetBrains. - - -Pros and Cons -~~~~~~~~~~~~~ - -- Medium amount of plugins, many first-party plugins made by JetBrains for their IntelliJ based IDE family -- There is no free version -- Takes some time to analyze the files after opening a project. Switching between .cpp and corresponding .h file may for the first time may take a few seconds. - -Project setup -~~~~~~~~~~~~~ -- Go to :menuselection:`File --> Open` and select the folder in which you cloned Cutter -- Go to :menuselection:`File --> Settings --> Build, Execution, Deployment --> CMake`. In the :guilabel:`CMake Options` field enter ``-DCUTTER_USE_BUNDLED_RADARE2=ON`` -- Open :file:`cutter/src/CMakeLists.txt` using the project file list on the left side of the screen -- A yellow bar with a message :guilabel:`CMake project is not loaded` should appear, click :guilabel:`Load CMake project` - -Changing CMake configuration -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Go to :menuselection:`File --> Settings --> Build,Execution,Deployment --> CMake`. CMake options are specified the same way as on command-line ``-DOPTION_NAME=VALUE``. - -Building, Running, Debugging -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Follow the `Clion documentation `_ for how to configure Qt type debugger renderers. If you are using the MSVC toolchain -it can use :file:`qt5.natvis`. In rest of the cases you can use ``.gdbinit`` or ``..ldbinit`` based approach similar to one described for :ref:`VSCode setup` - -Editing Qt .ui files -~~~~~~~~~~~~~~~~~~~~ -Default CLion behavior for opening .ui files is `somewhat buggy `_. Double-clicking the file does nothing, but it can be opened by dragging it to the text editor side. -This can be somewhat improved by changing `file association `_. Open :menuselection:`File --> Settings --> Editor --> File Types` and change type association of \*.ui files from :guilabel:`Qt UI Designer Form` to either "XML" or :guilabel:`Files Opened in Associated Applications`. -The first one will open it within CLion as an XML file and the second will use the operating system configuration. - -Visual Studio -------------- -Visual Studio Community edition is available for free and can be used for contributing to open source projects. - -It is recommended to use the latest Visual Studio version 2019 because it has the best CMake integration. -Older VS versions can be used but CMake integration isn't as good. With those, it might be better to generate Visual Studio -project from CMake project using the command-line or :command:`cmake-gui` and opening the generated Visual Studio project instead of opening the -CMake project directly. - -Visual Studio supports many different languages and use-cases. Full installation takes a lot of space. To keep the size minimal during installation -select only component called "Desktop development with C++". Don't worry too much about missing something. -Additional components can be later added or removed through the VS installer which also serves as an updater and package manager for Visual Studio components. - -Pros and Cons -~~~~~~~~~~~~~ -- good debugger -- medium amount of plugins -- completely closed source -- Windows only - -Project setup -~~~~~~~~~~~~~ -- Open folder in which you cloned Cutter source using Visual Studio -- Open CMake settings configurator using either :menuselection:`Project --> CMake Settings` or by clicking :guilabel:`Open the CMake Settings Editor` in the overview page. -- Check ``CUTTER_USE_BUNDLED_RADARE2`` option -- If you are using vcpkg, Visual Studio should detect it automatically. The list of CMake options in the configurator should have some referring to vcpkg. If they are not there, specify the path to vcpkg toolchain file in the :guilabel:`CMake toolchain file` field. -- If you are not using vcpkg, configure the path to Qt as mentioned in :ref:`windows CMake instructions`. You can specify the CMake flag in :guilabel:`CMake command arguments:` field. -- To Ensure that VS debugger can display Qt types in a readable way, it is recommended to install `Qt Visual Studio Tools `_ plugin. It will create a :file:`Documents/Visual Studio 2019/Visualizers/qt5.natvis` file. Once :file:`qt5.natvis` has been created you can uninstall the plugin. - -Changing CMake configuration -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Open :menuselection:`Project --> CMake Settings`. CMake options can be modified either in graphical table editor, as a command-line flag or by switching to the JSON view. - -Editing Qt .ui files and Qt integration -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -By default Visual Studio will open ``.ui`` files as XML text documents. You can configure to open it using Qt Designer by right-clicking and selecting :guilabel:`Open With...`. - -There is a Qt plugin for Visual Studio from Qt. It isn't very useful for Cutter development since it is aimed more at helping with Qt integration into Visual Studio projects. -It doesn't do much for CMake based projects. The biggest benefit is that it automatically installs :file:`qt5.natvis` file for more readable displaying of Qt types in the debugger. diff --git a/docs/source/contributing/docs.rst b/docs/source/contributing/docs.rst deleted file mode 100644 index 374e879f1..000000000 --- a/docs/source/contributing/docs.rst +++ /dev/null @@ -1,8 +0,0 @@ -Contributing Documentation -========================== - -.. toctree:: - :maxdepth: 2 - - Getting Started - docs/building-docs diff --git a/docs/source/contributing/docs/building-docs.rst b/docs/source/contributing/docs/building-docs.rst deleted file mode 100644 index 4ff22d10a..000000000 --- a/docs/source/contributing/docs/building-docs.rst +++ /dev/null @@ -1,37 +0,0 @@ -Building docs -======================= - -This page explains the steps that are needed to build Cutter's documentation. - -Requirements ------------- - -You will need: - -* doxygen -* python3 -* pip3 - - * sphinx - * breathe - * recommonmark - -On Debian-based Linux distributions, the packages above can be installed with the following command. - -.. code:: sh - - sudo apt install make doxygen python3-pip doxygen - sudo pip3 install sphinx breathe recommonmark - -Then, you can build the documentation with the following commands: - -.. code:: sh - - cd cutter/docs/ - make html - -.. tip:: - - If you do not need API documentation, type ``make quick`` instead of ``make html``. - -You can find the generated html files at ``cutter/docs/build``. Open ``cutter/docs/build/html/index.html`` with your browser to visit the index file of your local copy of the documentation. diff --git a/docs/source/contributing/docs/getting-started.rst b/docs/source/contributing/docs/getting-started.rst deleted file mode 100644 index 230d4369f..000000000 --- a/docs/source/contributing/docs/getting-started.rst +++ /dev/null @@ -1,51 +0,0 @@ -Contributing documentation to Cutter -======================================= - -If you reached this place you were probably looking to help and improve Cutter's documentation - Fantastic, welcome aboard! - -As many other young projects, Cutter has a problem - it lacks comprehensive documentation and written content. Thankfully, contributing to Cutter's documentation doesn’t require you to have a deep knowledge about the internals of the project. Writing, reviewing, and editing the documentation are great ways to learn about Cutter. - -Don’t like the way something reads? Discover some information that wasn’t documented? Your pull request will be gleefully embraced. - -.. note:: - The documentation of Cutter is written using `Sphinx and reStructuredText `_. The syntax is quite straight forward and very similar to Markdown. In the future, we hope to move completely to Markdown as it is more popular. - - -How can you help? ------------------ - -The following sections suggest ways you can contribute to Cutter's documentation. The list isn't complete as the possibilities are limitless. - -The source for this documentation is available in the `docs directory `_ on Cutter's repository. This source can be generated according to the steps described in the :ref:`building docs page`. When the docs are updated, they are generated and pushed directly to the website at . The source for the website and blog are available on the `cutter.re's repository `_ and are served from the ``gh-pages`` branch. - -.. tip:: - Document what you wished to see. If you are a user of Cutter, try to think what things you would want to see documented when you started using the project. Sometimes, the best contributions are coming from your own needs. - -User documentation -^^^^^^^^^^^^^^^^^^^ - -The documentation for users describes how to use Cutter and what the different features in Cutter do. The possibilities for contributing are endless since there are so many features that weren't even described on our docs yet. To contribute to our user documentation, all you need to do is pick a subject, widget, or functionality and document it. Describe the different visual components, how to use them, and what this feature even does. - -Common Errors and Troubleshooting -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -As our community gets bigger, more and more people are using, installing or building Cutter on different setups. Naturally, different environments might cause different issues. The :ref:`common issues` section in our docs aims to go over the most popular issues that you might face while using Cutter and the :ref:`building errors troubleshooting` section goes over common errors that you might face while building Cutter from sources. These docs sections also explain what causes these issues and how to solve them. - -If you know of such a common issue, whether you faced it yourself or noticed it on our community chats, it will be very helpful if you could document it and possible solutions for it. - - -Developers documentation -^^^^^^^^^^^^^^^^^^^^^^^^^ - -The documentation for Cutter developers aims to instruct new contributors on how to get started with developing to Cutter's codebase. It also describes best practices and development guidelines for all developers in the project. Think you have something to add to the developers' docs? We would love you to contribute. - -API documentation -^^^^^^^^^^^^^^^^^^ - -The documentation for Cutter's API is an important reference for Cutter developers as well as Plugin developers. It thoroughly describes for developers how some functions and features work. While some of the functions are thoroughly documented, most of them aren't. Any help with improving these documentations will be blessed. - - -Blog posts -^^^^^^^^^^^^^ - -We would love to see people writing and sharing their experiences with Cutter. Whether you are solving CTF challenges with Cutter, analyzing malware, finding vulnerabilities, or working on personal projects - we would love to see these published. If you have a personal blog, we would be proud to share and retweet your Cutter-related publications on our profiles, bringing you more engagement and followers. If you don't have a personal blog, we would love to host your publication on our community blog over at https://cutter.re/blog. diff --git a/docs/source/contributing/plugins/disasm-dynamic.png b/docs/source/contributing/plugins/disasm-dynamic.png deleted file mode 100644 index 278dbdb19..000000000 Binary files a/docs/source/contributing/plugins/disasm-dynamic.png and /dev/null differ diff --git a/docs/source/contributing/plugins/disasm-static.png b/docs/source/contributing/plugins/disasm-static.png deleted file mode 100644 index a449f0e80..000000000 Binary files a/docs/source/contributing/plugins/disasm-static.png and /dev/null differ diff --git a/docs/source/contributing/plugins/getting-started.rst b/docs/source/contributing/plugins/getting-started.rst deleted file mode 100644 index 3a321b974..000000000 --- a/docs/source/contributing/plugins/getting-started.rst +++ /dev/null @@ -1,262 +0,0 @@ -Getting Started with Python Plugins -=================================== - -This article provides a step-by-step guide on how to write a simple Python plugin for Cutter. - -Create a python file, called ``myplugin.py`` for example, and add the following contents: - -.. code-block:: python - - import cutter - - class MyCutterPlugin(cutter.CutterPlugin): - name = "My Plugin" - description = "This plugin does awesome things!" - version = "1.0" - author = "1337 h4x0r" - - def setupPlugin(self): - pass - - def setupInterface(self, main): - pass - - def terminate(self): - pass - - def create_cutter_plugin(): - return MyCutterPlugin() - -This is the most basic code that makes up a plugin. -Python plugins in Cutter are regular Python modules that are imported automatically on startup. -In order to load the plugin, Cutter will call the function ``create_cutter_plugin()`` located -in the root of the module and expects it to return an instance of ``cutter.CutterPlugin``. -Normally, you shouldn't have to do anything else in this function. - -.. note:: - The Cutter API is exposed through the ``cutter`` module. - This consists mostly of direct bindings of the original C++ classes, generated with Shiboken2. - For more detail about this API, see the Cutter C++ code or :ref:`api`. - -The ``CutterPlugin`` subclass contains some meta-info and two callback methods: - -* ``setupPlugin()`` is called right after the plugin is loaded and can be used to initialize the plugin itself. -* ``setupInterface()`` is called with the instance of MainWindow as an argument and should create and register any UI components. -* ``terminate()`` is called on shutdown and should clean up any resources used by the plugin. - -Copy this file into the ``python`` subdirectory located under the plugins directory of Cutter and start the application. -You should see an entry for your plugin in the list under Edit -> Preferences -> Plugins. -Here, the absolute path to the plugins directory is shown too if you are unsure where to put your plugin: - -.. image:: preferences-plugins.png - -.. note:: - As mentioned, plugins are Python modules. This means, instead of only a single .py file, you can also - use a directory containing multiple python files and an ``__init__.py`` file that defines or imports the - ``create_cutter_plugin()`` function. - -.. note:: - If you are working on a Unix-like system, instead of copying, you can also symlink your plugin into the plugins - directory, which lets you store the plugin somewhere else without having to copy the files over and over again. - - -Creating a Widget ------------------ - -Next, we are going to add a simple dock widget. Extend the code as follows: - -.. code-block:: python - - import cutter - - from PySide2.QtWidgets import QAction, QLabel - - class MyDockWidget(cutter.CutterDockWidget): - def __init__(self, parent, action): - super(MyDockWidget, self).__init__(parent, action) - self.setObjectName("MyDockWidget") - self.setWindowTitle("My cool DockWidget") - - label = QLabel(self) - self.setWidget(label) - label.setText("Hello World") - - class MyCutterPlugin(cutter.CutterPlugin): - # ... - - def setupInterface(self, main): - action = QAction("My Plugin", main) - action.setCheckable(True) - widget = MyDockWidget(main, action) - main.addPluginDockWidget(widget, action) - - # ... - -We are subclassing ``cutter.CutterDockWidget``, which is the base class for all dock widgets in Cutter, -and adding a label to it. - -.. note:: - You can access the whole Qt5 API from Python, which is exposed by PySide2. For more information about this, refer to the - Documentation of `Qt `_ and `PySide2 `_. - -In our ``setupInterface()`` method, we create an instance of our dock widget and an action to be -added to the menu for showing and hiding the widget. -MainWindow provides a helper method called ``addPluginDockWidget()`` to easily register these. - -When running Cutter now, you should see the widget: - -.. image:: mydockwidget.png - -... as well as the action: - -.. image:: mydockwidget-action.png - - -Fetching Data -------------- - -Next, we want to show some actual data from the binary in our widget. -As an example, we will display the instruction and instruction size at the current position. -Extend the code as follows: - -.. code-block:: python - - # ... - - class MyDockWidget(cutter.CutterDockWidget): - def __init__(self, parent, action): - # ... - - label = QLabel(self) - self.setWidget(label) - - disasm = cutter.cmd("pd 1").strip() - - instruction = cutter.cmdj("pdj 1") - size = instruction[0]["size"] - - label.setText("Current disassembly:\n{}\nwith size {}".format(disasm, size)) - - # ... - -We can access the data by calling radare2 commands and utilizing their output. -This is done by using the two functions ``cmd()`` and ``cmdj()``, which behave just as they -do in `r2pipe `_. - -Many commands in radare2 can be suffixed with a ``j`` to return JSON output. -``cmdj()`` will automatically deserialize the JSON into python dicts and lists, so the -information can be easily accessed. - -.. warning:: - When fetching data that is not meant to be used only as readable text, **always** use the JSON variant of a command! - Regular command output is not meant to be parsed and is subject to change at any time, which will break your code. - -In our case, we use the two commands ``pd`` (Print Disassembly) and ``pdj`` (Print Disassembly as JSON) -with a parameter of 1 to fetch a single line of disassembly. - -.. note:: - To try out commands, you can use the Console widget in Cutter. Almost all commands support a ``?`` suffix, like in - ``pd?``, to show help and available sub-commands. - To get a general overview, enter a single ``?``. - -The result will look like the following: - -.. image:: disasm-static.png - -Of course, since we only fetch the info once during the creation of the widget, the content never updates. -We are going to change that in the next section. - - -Reacting to Events ------------------- - -We want to update the content of our widget on every seek. -This can be done like the following: - -.. code-block:: python - - # ... - - from PySide2.QtCore import QObject, SIGNAL - - # ... - - class MyDockWidget(cutter.CutterDockWidget): - def __init__(self, parent, action): - # ... - - self._label = QLabel(self) - self.setWidget(self._label) - - QObject.connect(cutter.core(), SIGNAL("seekChanged(RVA)"), self.update_contents) - self.update_contents() - - def update_contents(self): - disasm = cutter.cmd("pd 1").strip() - - instruction = cutter.cmdj("pdj 1") - size = instruction[0]["size"] - - self._label.setText("Current disassembly:\n{}\nwith size {}".format(disasm, size)) - - -First, we move the update code to a separate method. -Then we call ``cutter.core()``, which returns the global instance of ``CutterCore``. -This class provides the Qt signal ``seekChanged(RVA)``, which is emitted every time the current seek changes. -We can simply connect this signal to our method and our widget will update as we expect it to: - -.. image:: disasm-dynamic.png - -For more information about Qt signals and slots, refer to ``_. - -Full Code ---------- - -.. code-block:: python - - import cutter - - from PySide2.QtCore import QObject, SIGNAL - from PySide2.QtWidgets import QAction, QLabel - - class MyDockWidget(cutter.CutterDockWidget): - def __init__(self, parent, action): - super(MyDockWidget, self).__init__(parent, action) - self.setObjectName("MyDockWidget") - self.setWindowTitle("My cool DockWidget") - - self._label = QLabel(self) - self.setWidget(self._label) - - QObject.connect(cutter.core(), SIGNAL("seekChanged(RVA)"), self.update_contents) - self.update_contents() - - def update_contents(self): - disasm = cutter.cmd("pd 1").strip() - - instruction = cutter.cmdj("pdj 1") - size = instruction[0]["size"] - - self._label.setText("Current disassembly:\n{}\nwith size {}".format(disasm, size)) - - - class MyCutterPlugin(cutter.CutterPlugin): - name = "My Plugin" - description = "This plugin does awesome things!" - version = "1.0" - author = "1337 h4x0r" - - def setupPlugin(self): - pass - - def setupInterface(self, main): - action = QAction("My Plugin", main) - action.setCheckable(True) - widget = MyDockWidget(main, action) - main.addPluginDockWidget(widget, action) - - def terminate(self): - pass - - def create_cutter_plugin(): - return MyCutterPlugin() diff --git a/docs/source/contributing/plugins/mydockwidget-action.png b/docs/source/contributing/plugins/mydockwidget-action.png deleted file mode 100644 index 259602a58..000000000 Binary files a/docs/source/contributing/plugins/mydockwidget-action.png and /dev/null differ diff --git a/docs/source/contributing/plugins/mydockwidget.png b/docs/source/contributing/plugins/mydockwidget.png deleted file mode 100644 index feace3d65..000000000 Binary files a/docs/source/contributing/plugins/mydockwidget.png and /dev/null differ diff --git a/docs/source/contributing/plugins/preferences-plugins.png b/docs/source/contributing/plugins/preferences-plugins.png deleted file mode 100644 index 69451eca7..000000000 Binary files a/docs/source/contributing/plugins/preferences-plugins.png and /dev/null differ diff --git a/docs/source/contributing/translations/getting-started.rst b/docs/source/contributing/translations/getting-started.rst deleted file mode 100644 index 9b6bed6e8..000000000 --- a/docs/source/contributing/translations/getting-started.rst +++ /dev/null @@ -1,10 +0,0 @@ -Translate Cutter -================== - -Help Cutter by adding translations to the project! - -Cutter is a global project with users from all around the world. We believe that Cutter should be as accessible as possible, and want our users to feel comfortable while using its interface. Providing our community an interface with their own language makes the experience of using Cutter better. Thus, Cutter supports a translation and localization mechanism powered by the `Crowdin `_ platform. We invite you to contribute and add translations to the project. - - -.. important:: - We currently support more than 15 languages. If you need to add a language that isn't available yet, ask any developer from the team and they will happily assist you. diff --git a/docs/source/images/InitializationScriptEditor.png b/docs/source/images/InitializationScriptEditor.png deleted file mode 100644 index 6e72c1f82..000000000 Binary files a/docs/source/images/InitializationScriptEditor.png and /dev/null differ diff --git a/docs/source/images/analysis_dialog.png b/docs/source/images/analysis_dialog.png deleted file mode 100644 index 51c990a8e..000000000 Binary files a/docs/source/images/analysis_dialog.png and /dev/null differ diff --git a/docs/source/images/crash-dialog.png b/docs/source/images/crash-dialog.png deleted file mode 100644 index a3e50eb26..000000000 Binary files a/docs/source/images/crash-dialog.png and /dev/null differ diff --git a/docs/source/images/cutter_path_settings.png b/docs/source/images/cutter_path_settings.png deleted file mode 100644 index c84f0b923..000000000 Binary files a/docs/source/images/cutter_path_settings.png and /dev/null differ diff --git a/docs/source/images/layout_manager.png b/docs/source/images/layout_manager.png deleted file mode 100644 index ae7d132bc..000000000 Binary files a/docs/source/images/layout_manager.png and /dev/null differ diff --git a/docs/source/images/screenshot.png b/docs/source/images/screenshot.png deleted file mode 100644 index c66c27ef2..000000000 Binary files a/docs/source/images/screenshot.png and /dev/null differ diff --git a/docs/source/images/success-dump-dialog.png b/docs/source/images/success-dump-dialog.png deleted file mode 100644 index 94144c857..000000000 Binary files a/docs/source/images/success-dump-dialog.png and /dev/null differ diff --git a/docs/source/index.rst b/docs/source/index.rst deleted file mode 100644 index 24fd49037..000000000 --- a/docs/source/index.rst +++ /dev/null @@ -1,57 +0,0 @@ -Cutter -====== - -Cutter is a Qt and C++ GUI for radare2. Its goal is to provide an advanced, -customizable and FOSS reverse-engineering platform while keeping the -user experience in mind. Cutter was created by reverse engineers for -reverse engineers. - -.. image:: images/screenshot.png - - -Getting Cutter --------------- - -Cutter is available for all major platforms. You can -download the latest release from -`here `__. - -- **macOS**: Download the ``.dmg`` file and install it. -- **Windows**: Download the ``.zip`` archive and extract it. -- **Linux**: Download the ``.AppImage`` file and make it executable by doing: - -:: - - chmod +x Cutter*.AppImage - - -Building from Sources ---------------------- - -To build Cutter on your machine, please follow this guide: :doc:`Building from Source `. - -Need help? ----------- - -You can contact the *Cutter* developers and community on: - -- Telegram: https://t.me/r2cutter -- #cutter on irc.freenode.net -- Twitter: https://twitter.com/r2gui - -Want to help the project? -------------------------- - -If you want to contribute to Cutter, take a look at our :doc:`Contribution Guidelines ` to learn how you can help improve the project! - -.. toctree:: - :caption: Contents: - :maxdepth: 3 - - user-docs - contributing - Developer documentation - building - plugins - api - diff --git a/docs/source/plugins.rst b/docs/source/plugins.rst deleted file mode 100644 index b0f7154c6..000000000 --- a/docs/source/plugins.rst +++ /dev/null @@ -1,35 +0,0 @@ -Plugins -======= - -Cutter supports writing plugins in both C++ and Python. -If you are unsure of which language to choose, starting with Python is strongly suggested as -it provides a faster and simpler workflow. - -If you plan to implement support for a new file format or architecture, Cutter plugins are not the correct approach. -Instead, you will want to implement a radare2 plugin, which is documented `here `_. - - -Loading and Overview ----------------------- - -Plugins are loaded from an OS-dependent user-level directory. -To get the location of this directory and a list of currently loaded plugins, navigate to Edit -> Preferences -> Plugins. - -.. image:: contributing/plugins/preferences-plugins.png - -The plugins directory contains two subdirectories, ``native`` and ``python`` for C++ and Python plugins respectively, -which will be created automatically by Cutter. - -.. note:: - The support for Python plugins is only available if Cutter was built with the options ``CUTTER_ENABLE_PYTHON`` - and ``CUTTER_ENABLE_PYTHON_BINDINGS`` enabled. - This is the case for all official builds from GitHub Releases starting with version 1.8.0. - - -Creating Plugins ------------------- - -.. toctree:: - :glob: - - contributing/plugins/* diff --git a/docs/source/user-docs.rst b/docs/source/user-docs.rst deleted file mode 100644 index 344b1c73a..000000000 --- a/docs/source/user-docs.rst +++ /dev/null @@ -1,21 +0,0 @@ -User Documentation -======================= - -This page contains information about the different menus in Cutter. - -Cutter is an advanced reverse engineering platform powered by radare2. -This user's guide provides detailed information on how to use Cutter. -The documentation for users is still on its early stages and will be improved over time. - - -.. toctree:: - :maxdepth: 3 - :titlesonly: - :glob: - - user-docs/shortcuts - user-docs/command-line - user-docs/menus - user-docs/preferences - user-docs/common-issues - diff --git a/docs/source/user-docs/command-line.rst b/docs/source/user-docs/command-line.rst deleted file mode 100644 index 683e57a00..000000000 --- a/docs/source/user-docs/command-line.rst +++ /dev/null @@ -1,81 +0,0 @@ -Command-line Options -==================== - -Synopsis --------- - -**Cutter** [*options*] [<*filename*>] - - -Options -------- - -.. option:: - - Filename to open. If not specified file selection dialog will be shown. - -.. option:: -h, --help - - Displays help on command-line options. - -.. option:: --help-all - - Displays help including Qt specific options. - -.. option:: -v, --version - - Displays version information. - -.. option:: -A, --analysis - - When opening a file automatically perform analysis at a given level. Requires - :option:`` to be specified. Following levels are available: - - **0** - No analysis. - - **1** - aaa - - **2** - aaaa (experimental) - -.. option:: -F, --format - - Force using a specific file format (bin plugin) - -.. option:: -B, --base - - Load binary at a specific base address - -.. option:: -i - - Run script file - -.. option:: -w, --writemode - - Open a file in write mode, instead of the default read-only mode. - When used together with -A/--analysis , it will open a file directly - in write mode without any further dialog or confirmation. - -.. option:: --pythonhome - - PYTHONHOME to use for the embedded python interpreter - -.. option:: --no-output-redirect - - Disable output redirection. Some of the output in the console widget will not - be visible. Use this option when debugging a crash or freeze and output - redirection is causing some messages to be lost. - -.. option:: --no-plugins - - Start cutter with all plugins disabled. Implies :option:`--no-cutter-plugins` and :option:`--no-r2-plugins`. - -.. option:: --no-cutter-plugins - - Start cutter with cutter plugins disabled. - -.. option:: --no-r2-plugins - - Start cutter with r2 plugins disabled. diff --git a/docs/source/user-docs/common-issues.rst b/docs/source/user-docs/common-issues.rst deleted file mode 100644 index e5216123f..000000000 --- a/docs/source/user-docs/common-issues.rst +++ /dev/null @@ -1,19 +0,0 @@ -Common Issues -============= - -This page lists common issues encountered by users. - -AppImage Crashes ----------------- - -If the Linux AppImage binary crashes upon startup, make sure your -``LD_LIBRARY_PATH`` environment variable is empty. -For a detailed explanation, see the issue `#579 `__ - -Keyboard Layout Issue ---------------------- - -Some people report that they have keyboard issues. Usually it is because -the Xorg layout is wrong. You can check it with: ``setxkbmap -query`` -Most of the time using ``setxkbmap us`` solves the issue, but it might -not be enough and require a more advanced Xorg configuration. diff --git a/docs/source/user-docs/menus.rst b/docs/source/user-docs/menus.rst deleted file mode 100644 index 974351c58..000000000 --- a/docs/source/user-docs/menus.rst +++ /dev/null @@ -1,13 +0,0 @@ -Menus -====== - -This part of the user documentation will provide the reader with information about the different menus and context menu items they can find on Cutter. Each item has a description that explains about its actions, as well as how to reach this feature from the UI and a keyboard shortcut if one assigned to the feature. - - -.. toctree:: - :maxdepth: 3 - :glob: - - menus/* - - diff --git a/docs/source/user-docs/menus/breakpoints-widget-context-menu.rst b/docs/source/user-docs/menus/breakpoints-widget-context-menu.rst deleted file mode 100644 index 21698fc96..000000000 --- a/docs/source/user-docs/menus/breakpoints-widget-context-menu.rst +++ /dev/null @@ -1,25 +0,0 @@ -Breakpoints Widget Context Menu -================================ - - -Edit a Breakpoint ----------------------------------------- -**Description:** Open the Advanced Breakpoint Edit dialog to edit the selected breakpoint. In this dialog, you can define a software or hardware breakpoint, use conditionals, and more. - -**Steps:** Right-click on an item in the Breakpoints widget and choose ``Edit``. - -Toggle Breakpoint State ----------------------------------------- -**Description:** Enable or disable a breakpoint, depending on its current state. An active breakpoint will be disabled, and an inactive breakpoint will be enabled. - -**Steps:** Right-click on an item in the Breakpoints widget and choose ``Toggle breakpoint``. - -**Shortcut:** :kbd:`Space` - -Delete Breakpoint ----------------------------------------- -**Description:** These options will disable and remove the selected breakpoint from the program. - -**Steps:** Right-click on an item in the Breakpoints widget and choose ``Delete breakpoint`` - -**Shortcut:** :kbd:`Del` \ No newline at end of file diff --git a/docs/source/user-docs/menus/debug-buttons-toolbar.rst b/docs/source/user-docs/menus/debug-buttons-toolbar.rst deleted file mode 100644 index dc32867ab..000000000 --- a/docs/source/user-docs/menus/debug-buttons-toolbar.rst +++ /dev/null @@ -1,20 +0,0 @@ -Debug Buttons Toolbar -============================== - -Continue until Main ----------------------------------------- -**Description:** Continue the execution of the program until the Main function is reached. - -**Steps:** Continue until main - -Continue until Call ----------------------------------------- -**Description:** Continue the execution of the program until a function call is reached. - -**Steps:** Continue until call - -Continue until Syscall ----------------------------------------- -**Description:** Continue the execution of the program until a Syscall is reached. - -**Steps:** Continue until syscall \ No newline at end of file diff --git a/docs/source/user-docs/menus/disassembly-context-menu.rst b/docs/source/user-docs/menus/disassembly-context-menu.rst deleted file mode 100644 index 9b6ebd280..000000000 --- a/docs/source/user-docs/menus/disassembly-context-menu.rst +++ /dev/null @@ -1,130 +0,0 @@ -Disassembly Context Menu -============================== - -.. toctree:: - :maxdepth: 1 - :glob: - - disassembly-context-menu/* - -The Disassembly context menu contains actions that operate with selected instruction in disassembly and graph widgets. - -Copy ----------------------------------------- -**Description:** Copy the selected text. - -**Steps:** Right-click on a selected text and choose ``Copy`` - -**Shortcut:** :kbd:`Ctrl` + :kbd:`C` - -Copy Address ----------------------------------------- -**Description:** Copy the address of the location under the cursor. - -**Steps:** Right-click on a location and choose ``Copy address`` - -**Shortcut:** :kbd:`Ctrl` + :kbd:`Shift` + :kbd:`C` - -Show address in another widget ----------------------------------------- -**Description:** Show the selected address or item in another opened widget, or open a new one. - -**Steps:** Right-click on an address or an item in instruction and choose the ``Show in`` sub-menu - -Add Comment ----------------------------------------- -**Description:** Add a comment in the current location. - -**Steps:** Right-click an address and choose `Add Comment`. - -**Shortcut:** :kbd:`;` - -Add Flag ----------------------------------------- -**Description:** Add a flag to the selected item or location by bookmarking and giving it a name. - -**Steps:** Right-click an address or item and choose ``Add Flag``. This will open the Flag dialog in which you can name the location. - -Rename ----------------------------------------- -**Description:** Rename the flag in the current location. - -**Steps:** Right-click an address or item and choose ``Rename`` - -**Shortcut:** :kbd:`N` - -Edit Function ----------------------------------------- -**Description:** Open the Function edit dialog in which you can define the name of the function, its start address, stack size, calling convention, and more. - -**Steps:** Right-click on a location inside a function and choose ``Edit function``. - -**Shortcut:** :kbd:`Shift` + :kbd:`P` - -Rename Flag/Function/Variable ----------------------------------------- -**Description:** Rename a specific flag, variable or function under the cursor. - -**Steps:** -> Rename Flag/Fcn/Var Used Here - -**Shortcut:** :kbd:`Shift` + :kbd:`N` - -Re-type Local Variables ----------------------------------------- -**Description:** Rename or set the types of the function's variables and arguments. - -**Steps:** Right-click anywhere inside a function and then choose ``Re-type Local Variables``. - -**Shortcut:** :kbd:`Y` - -Delete a Comment ----------------------------------------- -**Description:** Delete the comment at the current address. This option only available for addresses with user-defined comments. - -**Steps:** Right-click on an instruction with a user-defined comment and choose ``Delete comment`` - -Delete a Flag ----------------------------------------- -**Description:** Delete the flag at the current location. - -**Steps:** Right-click on a location with a flag and choose ``Delete flag``. - -Undefine a Function ----------------------------------------- -**Description:** Undefine the current function. This will remove the function and its associated meta-data. You can always re-define the function, but every change that was made to the previously defined function (e.g variable renaming) would not be restored. - -**Steps:** Right-Click on the name of the function and choose ``Undefine function``. - -**Shortcut:** :kbd:`U` - -Define a function ----------------------------------------- -**Description:** Define a function starting from the current location. Cutter will automatically guess the size of the function. This can later be changed using the function editor. - -**Steps:** Right-click on an instruction and choose ``Define function here``. - -**Shortcut:** :kbd:`P` - -Set Structure Offset ----------------------------------------- -**Description:** Present the current value is an offset in a structure. - -**Steps:** -> Structure offset - -Link a Type to Address ----------------------------------------- -**Description:** You can link type, enum or structure to a specific address. Types, structures and enums can be defined in the Types widget. - -**Steps:** Right-click on an instruction and choose ``Link Type to Address``. - -**Shortcut:** :kbd:`L` - - -Show Cross References ----------------------------------------- -**Description:** Show X-Refs from and to the specific location. This option will open Cutter's X-Refs dialog in which you will be able to see a list of X-Refs from and to the selected location, in addition to a preview of each cross-reference to quickly inspect the different usages. - -**Steps:** Right-click on an instruction and choose ``Show X-Refs`` - -**Shortcut:** :kbd:`X` - diff --git a/docs/source/user-docs/menus/disassembly-context-menu/debug-context-menu.rst b/docs/source/user-docs/menus/disassembly-context-menu/debug-context-menu.rst deleted file mode 100644 index 33eec6066..000000000 --- a/docs/source/user-docs/menus/disassembly-context-menu/debug-context-menu.rst +++ /dev/null @@ -1,14 +0,0 @@ -Debug Context Menu -============================== - -Continue Until Line ----------------------------------------- -**Description:** Continue the execution of the program until reached the selected offset. The program is not guaranteed to ever reach this address and will keep running until exited or until reached another breakpoint. If other breakpoints hit before reaching this line, they will be triggered and pause the execution. *This option is only available on Debug or Emulation modes*. - -**Steps:** While in Debug or Emulation modes, right-click and address and choose ``Debug -> Continue until line``. - -Set Program Counter (PC) ----------------------------------------- -**Description:** Set the Program Counter of the debuggee to the current offset. For example, on an Intel 64bit program, Cutter will set the value of the RIP register to the current address. *This option is only available on Debug or Emulation modes*. - -**Steps:** While in Debug or Emulation modes, right-click and address and choose ``Debug -> Set PC``. diff --git a/docs/source/user-docs/menus/disassembly-context-menu/manage-breakpoints-context-menu.rst b/docs/source/user-docs/menus/disassembly-context-menu/manage-breakpoints-context-menu.rst deleted file mode 100644 index 3453cddd0..000000000 --- a/docs/source/user-docs/menus/disassembly-context-menu/manage-breakpoints-context-menu.rst +++ /dev/null @@ -1,18 +0,0 @@ -Manage Breakpoints Context Menu -================================ - -Add or Remove a Breakpoint ----------------------------------------- -**Description:** Add a breakpoint at the current address. If a breakpoint already exists, Cutter will remove it. - -**Steps:** Right-click on an instruction and choose ``Breakpoint -> Add/remove breakpoint`` - -**Shortcut:** :kbd:`F2` - -Advanced Breakpoint Dialog ----------------------------------------- -**Description:** Open the advanced breakpoint dialog. This dialog lets you define not only a regular breakpoint in this address, but also a Hardware breakpoint, a conditional breakpoint, and more. - -**Steps:** Right-click on an instruction and choose ``Breakpoint -> Advanced breakpoint``. - -**Shortcut:** :kbd:`Ctrl` + :kbd:`F2` \ No newline at end of file diff --git a/docs/source/user-docs/menus/disassembly-context-menu/patching.rst b/docs/source/user-docs/menus/disassembly-context-menu/patching.rst deleted file mode 100644 index 87586e7c3..000000000 --- a/docs/source/user-docs/menus/disassembly-context-menu/patching.rst +++ /dev/null @@ -1,26 +0,0 @@ -Patching -============================== - -Edit Instruction ----------------------------------------- -**Description:** Edit the current instruction by typing a sequence of one or more instructions. Cutter will automatically fetch a preview of the bytes that are constructing the instruction. - -**Steps:** Right-click on an instruction and choose ``Edit -> Instruction`` - -Edit Bytes ----------------------------------------- -**Description:** Edit the bytes of the current instruction by typing a sequence of bytes. Cutter will automatically disassemble a preview of the instructions that are create by the typed bytes. - -**Steps:** Right-click on an instruction and choose ``Edit -> Bytes`` - -NOP Instruction ----------------------------------------- -**Description:** Fill the content of the instruction with NOP instructions. Cutter will fill the instructions with NOP as the length of the bytes constructing the instruction. - -**Steps:** Right-click on an instruction and choose ``Edit -> Nop Instruction`` - -Reverse Jump ----------------------------------------- -**Description:** On conditional jumps, Cutter will detect the inverted conditional instruction and will replace it. For example, from ``je`` to ``jne``. - -**Steps:** Right-click on an instruction and choose ``Edit -> Reverse Jump`` \ No newline at end of file diff --git a/docs/source/user-docs/menus/disassembly-context-menu/set-as-code-data-string.rst b/docs/source/user-docs/menus/disassembly-context-menu/set-as-code-data-string.rst deleted file mode 100644 index cde1891b7..000000000 --- a/docs/source/user-docs/menus/disassembly-context-menu/set-as-code-data-string.rst +++ /dev/null @@ -1,62 +0,0 @@ -Set as Code\Data\String -============================== - -Set as Code ----------------------------------------- -**Description:** Set the current instruction to Code. This will force Cutter to display the current instruction as Code. - -**Steps:** Set as... -> Code - -**Shortcut:** :kbd:`C` - -Set as String (auto-detect length) ----------------------------------------- -**Description:** Set the current location to String. This will tell Cutter to treat the current address as a string and will auto-detect the length (e.g by looking for a string null-terminator). - -**Steps:** Right click on an instruction and choose ``Set as... -> String... -> Auto-detect`` - -**Shortcut:** :kbd:`A` - -Remove string definition ----------------------------------------- -**Description:** Remove a defined string in this address. Cutter will then treat this location as a code. - -**Steps:** Right click on an instruction and choose ``Set as... -> String... -> Remove``. - -Set as String (Advance dialog) ----------------------------------------- -**Description:** Set the current location to String. This will open a String definition dialog in which the user will supply the length and the type (ASCII, UTF8, ...) of the string. Cutter will then treat the current address as the defined string. - -**Steps:** Right click on an instruction and choose ``Set as... -> String... -> Advanced``. - -Set as data (bytes) ----------------------------------------- -**Description:** Convert the instruction to data of Bytes. - -**Steps:** Right click on an instruction and choose ``Set as... -> Data... -> Byte`` - -Set as data (Word) ----------------------------------------- -**Description:** Convert the instruction to data of Words. - -**Steps:** Right click on an instruction and choose ``Set as... -> Data... -> Word`` - -Set as data (Dword) ----------------------------------------- -**Description:** Convert the instruction to data of Dwords. - -**Steps:** Right click on an instruction and choose ``Set as... -> Data... -> Dword`` - -Set as data (Qword) ----------------------------------------- -**Description:** Convert the instruction to data of Qwords. - -**Steps:** Right click on an instruction and choose ``Set as... -> Data... -> Qword`` - -Set as data (Advanced) ----------------------------------------- -**Description:** Open an advanced dialog to define the custom data type of the current instruction. - -**Steps:** Right click on an instruction and choose ``Set as... -> Data... -> ...`` - -**Shortcut:** :kbd:`*` \ No newline at end of file diff --git a/docs/source/user-docs/menus/disassembly-context-menu/set-current-bits.rst b/docs/source/user-docs/menus/disassembly-context-menu/set-current-bits.rst deleted file mode 100644 index 0a6d55ff0..000000000 --- a/docs/source/user-docs/menus/disassembly-context-menu/set-current-bits.rst +++ /dev/null @@ -1,20 +0,0 @@ -Set Current Bits -============================== - -Set Current Bits to 16 ----------------------------------------- -**Description:** Set the current instruction to 16-bit. - -**Steps:** Right-click on an instruction and choose ``Set current bits to... -> 16`` - -Set Current Bits to 32 ----------------------------------------- -**Description:** Set the current instruction to 32-bit. - -**Steps:** Right-click on an instruction and choose ``Set current bits to... -> 32`` - -Set Current Bits to 64 ----------------------------------------- -**Description:** Set the current instruction to 64-bit. - -**Steps:** Right-click on an instruction and choose ``Set current bits to... -> 64`` \ No newline at end of file diff --git a/docs/source/user-docs/menus/disassembly-context-menu/set-immediate-base.rst b/docs/source/user-docs/menus/disassembly-context-menu/set-immediate-base.rst deleted file mode 100644 index 4113af96c..000000000 --- a/docs/source/user-docs/menus/disassembly-context-menu/set-immediate-base.rst +++ /dev/null @@ -1,50 +0,0 @@ -Set Immediate Base -============================== - -Set Immediate Base to Binary ----------------------------------------- -**Description:** Set the immediate value of the operand to a Binary representation. - -**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> Binary`` - -Set Immediate Base to Octal ----------------------------------------- -**Description:** Set the immediate value of the operand to an Octal representation. - -**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> Octal`` - -Set Immediate Base to Decimal ----------------------------------------- -**Description:** Set the immediate value of the operand to a Decimal representation. - -**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> Decimal`` - -Set Immediate Base to Hexadecimal ----------------------------------------- -**Description:** Set the immediate value of the operand to Hexadecimal. - -**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> Hexadecimal`` - -Set Immediate Base to Network Port ----------------------------------------- -**Description:** Set the immediate value of the operand to a Network Port - -**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> Network Port`` - -Set Immediate Base to IP Address ----------------------------------------- -**Description:** Set the immediate value of the operand to an IP Address - -**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> IP Address`` - -Set Immediate Base to Syscall ----------------------------------------- -**Description:** Set the immediate value of the operand to Syscall - -**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> Syscall`` - -Set Immediate Base to String ----------------------------------------- -**Description:** Set the immediate value of the operand to String - -**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> String`` \ No newline at end of file diff --git a/docs/source/user-docs/menus/graph-widget-context-menu.rst b/docs/source/user-docs/menus/graph-widget-context-menu.rst deleted file mode 100644 index a73323158..000000000 --- a/docs/source/user-docs/menus/graph-widget-context-menu.rst +++ /dev/null @@ -1,68 +0,0 @@ -Graph Widget Context Menu -============================== - - -Highlight Block ----------------------------------------- -**Description:** Open the Color Picker dialog to set a background color for the selected block in the Graph view. - -**Steps:** Right-click on a node\block in the Graph view and choose ``Highlight block``. - -UnHighlight Block ----------------------------------------- -**Description:** If a block in the Graph view is highlighted, this option will unhighlight it and restore the original color. - -**Steps:** Right-click on a highlighted node\block in the Graph view and choose ``Unhighlight block``. - -Highlight Instruction ----------------------------------------- -**Description:** Open the Color Picker dialog to set a background color for the selected instruction in the Graph view. - -**Steps:** Right-click on an instruction in the Graph view and choose ``Highlight instruction``. - -UnHighlight Instruction ----------------------------------------- -**Description:** If an instruction in the Graph view is highlighted, this option will unhighlight it and restore the original color. - -**Steps:** Right-click on a highlighted instruction in the Graph view and choose ``Unhighlight instruction``. - -Export Graph ----------------------------------------- -**Description:** Export the current graph to one of the following formats: - - PNG Image - - JPEG Image - - SVG Image - -When Graphviz is installed, the following options are also available: - - Graphviz PostScript File - - Graphviz Dot File - - Graphviz JSON File - - Graphviz Gif Image - - Graphviz PNG Image - - Graphviz JPG Image - - Graphviz SVG Image - -**Steps:** Right-click anywhere on the Graph view and choose ``Export Graph``. - - -Graph Layout Direction ----------------------------------------- -**Description:** Graph layout direction can be either vertical top to bottom or horizontal left to right. - - -**Steps:** Right-click anywhere on the Graph view ``Layout -> Horizontal``. - -Choose Graph Layout ----------------------------------------- -**Description:** Choose the layout to be used by Cutter to display the Graph. Cutter supports the following Graph layout algorithms: - - - Grid narrow - - Grid medium - - Grid wide - -When Graphviz is installed, the following options are also available: - - - Graphviz polyline - - Graphviz ortho - -**Steps:** Right-click anywhere on the Graph view and choose a layout from the ``Layout`` sub-menu. \ No newline at end of file diff --git a/docs/source/user-docs/menus/hexdump-context-menu/patching.rst b/docs/source/user-docs/menus/hexdump-context-menu/patching.rst deleted file mode 100644 index 1e5eb53cc..000000000 --- a/docs/source/user-docs/menus/hexdump-context-menu/patching.rst +++ /dev/null @@ -1,63 +0,0 @@ -Patching -============================== - -Write String ----------------------------------------- -**Description:** Write ASCII string at the current location. If multiple bytes are selected, the string will be written from the start of the selection. Please note, this item won't write a null-terminated nor wide string. Please see the other items for these features. - -**Steps:** Right-click on a byte and select ``Edit -> Write string`` - -Write Length and String ----------------------------------------- -**Description:** Write a length prefix followed by ASCII string at the current location. If multiple bytes are selected, the string will be written from the start of the selection. Please note, although similar to BSTR in its concept, this item would not add a null terminator WCHAR at the end of the string. - -**Steps:** Right-click on a byte and select ``Edit -> Write length and string`` - - -Write Wide String ----------------------------------------- -**Description:** Write null-terminated wide string at the current location. If multiple bytes are selected, the string will be written from the start of the selection. - -**Steps:** Right-click on a byte and select ``Edit -> Write wide string`` - - -Write Null-Terminated String ----------------------------------------- -**Description:** Write a null-terminated ASCII string at the current location. If multiple bytes are selected, the string will be written from the start of the selection. - -**Steps:** Right-click on a byte and select ``Edit -> Write zero terminated string`` - - -Write Encoded\\Decoded Base64 String ----------------------------------------- -**Description:** Write an encoded or decoded base64 string at the current location. If multiple bytes are selected, the string will be written from the start of the selection. - -**Steps:** Right-click on a byte and select ``Edit -> Write De\Encoded Base64 string`` . On the dialog that will open choose whether you want to encode a string or decode one. - - -Write Zeroes ----------------------------------------- -**Description:** Write null-bytes at the current location. The number of null-bytes is specified by the user. If multiple bytes are selected, the null-bytes will be written from the start of the selection. - -**Steps:** Right-click on a byte and select ``Edit -> Write zeroes``. On the dialog that will open, specify how many null-bytes you'd like to write. - - -Write Random Bytes ----------------------------------------- -**Description:** Write random bytes at the current location. The number of bytes is specified by the user. If multiple bytes are selected, the null-bytes will be written from the start of the selection. - -**Steps:** Right-click on a byte and select ``Edit -> Write random bytes``. On the dialog that will open, specify how many bytes you'd like to write. - - -Duplicate Bytes From Offset ----------------------------------------- -**Description:** Duplicate N bytes from an offset to the current location. The number of bytes to duplicated and the offset of origin are specified by the user. If multiple bytes are selected, the bytes will be written from the start of the selection. A preview pane will display the bytes to be copied. - -**Steps:** Right-click on a byte and select ``Edit -> Duplicate from offset``. On the dialog that will open, specify the offset from which to copy, and how many bytes to copy. - - -Increment/Decrement Bytes ----------------------------------------- -**Description:** Increment or decrement Byte, Word, Dword or Qword at the current location. The value to add or subtract from the location is specified by the user. If multiple bytes are selected, the function will apply on the start of the selection. - -**Steps:** Right-click on a byte and select ``Edit -> Increment/Decrement``. On the dialog that will open, specify if you'd like to modify a Byte, Word, Dword or Qword, choose the value of the operation, and choose whether you want to increment or decrement. \ No newline at end of file diff --git a/docs/source/user-docs/menus/hexdump-widget-context-menu.rst b/docs/source/user-docs/menus/hexdump-widget-context-menu.rst deleted file mode 100644 index 91cab63e0..000000000 --- a/docs/source/user-docs/menus/hexdump-widget-context-menu.rst +++ /dev/null @@ -1,20 +0,0 @@ -Hexdump Widget Context Menu -============================== -.. toctree:: - :maxdepth: 1 - :glob: - - hexdump-context-menu/* - -Bytes Per Row ----------------------------------------- -**Description:** Select how many bytes should be displayed by Cutter in each row in the Hexdump widget. - -Available options are: - - 1 byte - - 2 bytes - - 4 bytes - - 8 bytes - - 16 bytes - - 32 bytes - - Power of 2 (Auto) \ No newline at end of file diff --git a/docs/source/user-docs/menus/information-windows-menu.rst b/docs/source/user-docs/menus/information-windows-menu.rst deleted file mode 100644 index b424eefc0..000000000 --- a/docs/source/user-docs/menus/information-windows-menu.rst +++ /dev/null @@ -1,92 +0,0 @@ -Information Windows Menu -============================== - -Info sub-menu ----------------------------------------- -**Description:** This is a sub-menu of the Windows menu. It contains a list of available widgets to get more information about the opened binary. - -**Steps:** Windows -> Info... - -Show Classes ----------------------------------------- -**Description:** List the classes that were detected in the binary. - -**Steps:** Windows -> Info... -> Classes - -Show Entry Points ----------------------------------------- -**Description:** List the entry points of the binary - -**Steps:** Windows -> Info... -> Entry Points - -Show Exports ----------------------------------------- -**Description:** Show a list of exported functions in the binary. - -**Steps:** Windows -> Info... -> Exports - -Show Flags ----------------------------------------- -**Description:** Show the Flags widget. Flags are conceptually similar to bookmarks. They associate a name with a given offset in a file. Function names, strings, and more are considered flags. - -**Steps:** Windows -> Info... -> Flags - -Show Headers ----------------------------------------- -**Description:** Show the Headers widget, displaying information about the opened file headers. - -**Steps:** Windows -> Info... -> Headers - -Show Imports ----------------------------------------- -**Description:** Show the Imports widget with a list of all the imported functions required by the binary. - -**Steps:** Windows -> Info... -> Imports - -Show Relocations ----------------------------------------- -**Description:** Show the Relocations widget, displaying a list of relocation information. - -**Steps:** Windows -> Info... -> Relocs - -Show Resources ----------------------------------------- -**Description:** Show the resources widget, which contains a list of the resources inside the binary. - -**Steps:** Windows -> Info... -> Resources - -Show SDB Browser ----------------------------------------- -**Description:** Show the SDB browser widget. - -**Steps:** Windows -> Info... -> SDB Browser - -Show Sections ----------------------------------------- -**Description:** Show the Sections widget which contains a list of all the sections found in the binary. The view also contains a nice visualization of raw and virtual memory layout. - -**Steps:** Windows -> Info... -> Sections - -Show Segments ----------------------------------------- -**Description:** Show the Segments widget with a list of the binary segments. - -**Steps:** Windows -> Info... -> Segments - -Show Symbols ----------------------------------------- -**Description:** Show the Symbols widget, with a list of symbol information from the binary, such as function names, and more. - -**Steps:** Windows -> Info... -> Symbols - -Show VTables ----------------------------------------- -**Description:** Show the VTables widget, which contains information about the Virtual Tables found in the binary. - -**Steps:** Windows -> Info... -> VTables - -Show Zignatures ----------------------------------------- -**Description:** Cutter has its own format of signatures, called Zignatures. This widget lists all the loaded Zignatures. - -**Steps:** Windows -> Info... -> Zignatures \ No newline at end of file diff --git a/docs/source/user-docs/menus/menu-bar.rst b/docs/source/user-docs/menus/menu-bar.rst deleted file mode 100644 index 27258f8e1..000000000 --- a/docs/source/user-docs/menus/menu-bar.rst +++ /dev/null @@ -1,21 +0,0 @@ -Menu Bar -======== - -Depending on your desktop environment menu bar is located either at the top of the window -or top of the screen. - -.. toctree:: - :maxdepth: 2 - :glob: - - menu-bar/file-menu - menu-bar/edit-menu - menu-bar/view-menu - menu-bar/windows-menu - menu-bar/plugins-menu - menu-bar/debug-menu - menu-bar/debug-view-menu - menu-bar/help-menu - menu-bar/* - - diff --git a/docs/source/user-docs/menus/menu-bar/debug-menu.rst b/docs/source/user-docs/menus/menu-bar/debug-menu.rst deleted file mode 100644 index d6643aec0..000000000 --- a/docs/source/user-docs/menus/menu-bar/debug-menu.rst +++ /dev/null @@ -1,73 +0,0 @@ -Debug Menu -============================== - - -Start Debugging ----------------------------------------- -**Description:** Start the debugging session of the current loaded binary. - -**Steps:** Debug -> Start debug - -**Shortcut:** :kbd:`F9` - -Start Emulation ----------------------------------------- -**Description:** Start an emulation session on the current loaded binary. Cutter supports emulation of different file formats. Unlike debugging, emulation isn't really executing the binary, but only emulating the instructions. This is very strong feature for analysis of self-contained functions or programs, to analyze cryptographic algorithms or to deobfuscate data. Emulation isn't limited by the running platform, so Linux files such as ELF can be emulated on Windows platforms, and DLL can be emulated on Linux. - -**Steps:** Debug -> Start emulation - -Attach to Process ----------------------------------------- -**Description:** Attach Cutter's debugger to a running process, instead of spawning a new process. - -**Steps:** Debug -> Attach to process - -Connect to a Remote Debugger ----------------------------------------- -**Description:** Connect Cutter to a remote debugger such as GDB ot WinDbg by providing IP and Port of the remote debugger.. - -**Steps:** Debug -> Connect to a remote debugger - -Step Into ----------------------------------------- -**Description:** Execute a single assembler instruction, stepping into functions and loops. - -**Steps:** Debug -> Step - -**Shortcut:** :kbd:`F7` - -Step Over ----------------------------------------- -**Description:** Execute a single assembler instruction, stepping over functions and procedures. The functions will not be skipped and will be executed by Cutter. The execution will pause when reaching the instruction after the function call. - -**Steps:** Debug -> Step over - -**Shortcut:** :kbd:`F8` - -Step Out ----------------------------------------- -**Description:** Execute the code and suspends execution when the current function returns - -**Steps:** Debug -> Step out - -**Shortcut:** :kbd:`Ctrl` + :kbd:`F8` - -Continue ----------------------------------------- -**Description:** Continue the execution of the running program. The execution will stop when reached a breakpoint, when manually suspended by the user, or when the running program quits. - -**Steps:** Debug -> Continue - -**Shortcut:** :kbd:`F5` - -Continue Until Call ----------------------------------------- -**Description:** Continue the execution of the program until a function call is reached. - -**Steps:** Debug -> Continue until call - -Continue Until Syscall ----------------------------------------- -**Description:** Continue the execution of the program until a Syscall is reached. - -**Steps:** Debug -> Continue until syscall diff --git a/docs/source/user-docs/menus/menu-bar/debug-view-menu.rst b/docs/source/user-docs/menus/menu-bar/debug-view-menu.rst deleted file mode 100644 index 7dd4acecb..000000000 --- a/docs/source/user-docs/menus/menu-bar/debug-view-menu.rst +++ /dev/null @@ -1,64 +0,0 @@ -Debug -> View Menu -============================== - -Show Backtrace ----------------------------------------- -**Description:** Display the Backtrace window. -***Note:** This view only available on Debug mode.* - - -**Steps:** Debug -> View -> Backtrace - -Show Breakpoints ----------------------------------------- -**Description:** Show the Breakpoints widget in which you can list, manage, add, remove and define breakpoints. - -**Steps:** Debug -> View -> Breakpoints - -Show Threads ----------------------------------------- -**Description:** List the threads of the running application. -***Note:** This view only available on Debug mode.* - - -**Steps:** Debug -> View -> Threads - -Show Processes ----------------------------------------- -**Description:** The processes widget shows all the child processes and allows the user to switch between them. This is useful feature for kernel debugging or for following forks. -***Note:** This view only available on Debug mode.* - - -**Steps:** Debug -> View -> Processes - -Show Memory Map ----------------------------------------- -**Description:** Show the Memory Map widget which shows the mapped memory pages of the running process. Including mapped memory of loaded libraries and dynamically allocated maps. -***Note:** This view only available on Debug mode.* - - -**Steps:** Debug -> View -> Memory map - -Show Registers ----------------------------------------- -**Description:** Show the Registers widget with information of the registers and their value of the running process. The widget allows not only to view registers and flags, but also to manipulate and modify them. -***Note:** This view only available on Debug mode.* - - -**Steps:** Debug -> View -> Registers - -Show Register References ----------------------------------------- -**Description:** The Register References widget is an extended view of the Register widget which allows you to "telescope", dereference, the register values in multiple depths. -***Note:** This view only available on Debug mode.* - - -**Steps:** Debug -> View -> Register References - -Show Stack ----------------------------------------- -**Description:** Show the Stack widget, listing the stack values and structure of the running process. -***Note:** This view only available on Debug mode.* - - -**Steps:** Debug -> View -> Stack diff --git a/docs/source/user-docs/menus/menu-bar/edit-menu.rst b/docs/source/user-docs/menus/menu-bar/edit-menu.rst deleted file mode 100644 index 7eedb4c82..000000000 --- a/docs/source/user-docs/menus/menu-bar/edit-menu.rst +++ /dev/null @@ -1,30 +0,0 @@ -Edit Menu -============================== - -Show Search Widget ----------------------------------------- -**Description:** Show the Search widget - -**Steps:** Edit -> Search - -Go Back ----------------------------------------- -**Description:** Seek backward to your previous location. - -**Steps:** Edit -> Undo Seek - -**Shortcut:** :kbd:`Alt` + :kbd:`Left` - -Redo Seek ----------------------------------------- -**Description:** Seek forward a location. - -**Steps:** Edit -> Redo Seek - -**Shortcut:** :kbd:`Alt` + :kbd:`Right` - -Preferences ----------------------------------------- -**Description:** Open the preferences dialog to access and define Cutter's configurations. - -**Steps:** Edit -> Preferences \ No newline at end of file diff --git a/docs/source/user-docs/menus/menu-bar/file-menu.rst b/docs/source/user-docs/menus/menu-bar/file-menu.rst deleted file mode 100644 index 9537e16f3..000000000 --- a/docs/source/user-docs/menus/menu-bar/file-menu.rst +++ /dev/null @@ -1,99 +0,0 @@ -File Menu -============================== - -New Instance of Cutter ----------------------------------------- -**Description:** Open a new instance of Cutter to start a new session. This option will open a new window of Cutter without exiting the current session. - -**Steps:** File -> New Window - -**Shortcut:** :kbd:`Ctrl` + :kbd:`N` - -Map a New File ----------------------------------------- -**Description:** Cutter allows you to map the contents of other files into the same I/O space used to contain the loaded binary. The new contents can be placed at random or specific offsets. -Specifically, Cutter is able to open files and map portions of them at random or specific places in memory. It is the perfect basic tooling to reproduce an environment like a core file, a debug session, or a framework by also loading and mapping all the libraries and files the binary depends on. - -**Steps:** File -> Map File - -**Shortcut:** :kbd:`Ctrl` + :kbd:`M` - -Import a PDB File ----------------------------------------- -**Description:** Cutter allows you to load additional debugging information by loading external PDB files. Unlike other platforms, Cutter does not rely on Windows API to parse a PDB files, thus they can be loaded on any other supported platform like Linux or macOS. - -**Steps:** File -> Import PDB - -Enable Write Mode ------------------------ -**Description:** This option will enable Write mode and allow you to patch and edit the binary on disk. **Please note** that when Write mode is enabled, each change you make to the binary in Cutter will be applied to the original file on disk. In order not to take unnecessary risks, consider using Cache mode instead. - -**Steps:** File -> Set mode -> Write mode - - -Enable Cache Mode ------------------------ -**Description:** This option will enable Cache mode and allow you to patch and edit the binary **without** applying the changes to the file on disk. Unlike in Write mode, in Cache mode, the changes you make to the binary in Cutter will not be applied to the original file on disk unless you specifically committing them using the "Commit changes" menu item. This is safer than using Write mode because there is no risk to lose important data. - -**Steps:** File -> Set mode -> Cache mode - - -Enable Read-Only Mode ------------------------- -**Description:** This option is available when files are opened in Write or Cache modes. When Read-Only mode is enabled, no patches and editions to the file are allowed. This is the default mode for files in Cutter, unless specified otherwise by the user, by either enabling Write or Cache mode. - -**Steps:** File -> Set mode -> Read-Only mode - -Commit Changes from Cache ----------------------------- -**Description:** Apply the changes performed in Cache mode to the file on disk. Cache mode will not apply the changes and patches made unless the user clicks "Commit changes". To automatically apply every change to the file on disk, use the less-safer Write mode. - -**Steps:** File -> Commit changes - - -Save Project ----------------------------------------- -**Description:** Save your session to a project. If no project file assigned to your session, the "Save as..." dialog will open. - -**Steps:** File -> Save - -**Shortcut:** :kbd:`Ctrl` + :kbd:`S` - -Save Project as... ----------------------------------------- -**Description:** Save the current state of your session, including function names, comments, and more. -On the saving dialog, choose the project type that fits your needs. -***Note:** This feature is currently unstable and under constructions.* - - -**Steps:** File -> Save As... - -Export to Code ----------------------------------------- -**Description:** Export the entire binary in different formats that later can be used in your favorite programming language. The feature supports many formats such as Python arrays, java, several C array formats, javascript, and more. -***Note:** This isn't a decompilation feature.* - - -**Steps:** File -> Export as code - -Run a radare2 Script ----------------------------------------- -**Description:** Cutter allows you to execute radare2 scripts to automate task or transfer information. Radare2 scripts are files that contain list of radare2 commands. The scripts can be created manually by you, or automatically generated by radare2 commands (which typically end with a star character. e.g. ``afl*``). - -Such a script can look like this: - -.. code-block:: - - ?e hello world - ?v 10+5 - pdf @ main - -**Steps:** File -> Run radare2 script - -Quit Cutter ----------------------------------------- -**Description:** Quit and exit your current session of Cutter. On exit, you'll be asked whether you want to save your session in order to avoid losing data. - -**Steps:** File -> Quit - -**Shortcut:** :kbd:`Ctrl` + :kbd:`Q` diff --git a/docs/source/user-docs/menus/menu-bar/help-menu.rst b/docs/source/user-docs/menus/menu-bar/help-menu.rst deleted file mode 100644 index 4bbe25294..000000000 --- a/docs/source/user-docs/menus/menu-bar/help-menu.rst +++ /dev/null @@ -1,20 +0,0 @@ -Help Menu -============================== - -About ----------------------------------------- -**Description:** Learn more about Cutter. View the current version of the application, the installed plugins, the authors, building options, the license, and more. - -**Steps:** Help -> About - -Report an Issue ----------------------------------------- -**Description:** Quickly report an issue to Cutter's GitHub repository. Clicking this option will navigate your browser to the new-issue page in Cutter's GitHub repository. It will also automatically fill relevant information inside the issue template. - -**Steps:** Help -> Report an issue - -Documentation ---------------------------------------- -**Description:** Clicking this option will open the user documentation of Cutter in your browser. - -**Steps:** Help -> Documentation diff --git a/docs/source/user-docs/menus/menu-bar/plugins-menu.rst b/docs/source/user-docs/menus/menu-bar/plugins-menu.rst deleted file mode 100644 index 7a210a0ac..000000000 --- a/docs/source/user-docs/menus/menu-bar/plugins-menu.rst +++ /dev/null @@ -1,8 +0,0 @@ -Plugins Menu -============================== - -Plugins Sub-Menu ----------------------------------------- -**Description:** This menu will contain the windows and views created by the loaded plugins. By default, this menu is empty unless plugins added their actions and items to the menu. - -**Steps:** Windows -> Plugins \ No newline at end of file diff --git a/docs/source/user-docs/menus/menu-bar/view-menu.rst b/docs/source/user-docs/menus/menu-bar/view-menu.rst deleted file mode 100644 index 8465d4fe5..000000000 --- a/docs/source/user-docs/menus/menu-bar/view-menu.rst +++ /dev/null @@ -1,86 +0,0 @@ -View Menu -============================== - - -Refresh Contents ----------------------------------------- -**Description:** In some cases, not all the displayed information on Cutter's widgets will be up-to-date, for example - after defining a new function from the integrated radare2 console. By refreshing the contents, Cutter will fetch the most up to date information from the session and will update the different views. - -***Note:** In the future, Cutter will be aware to any underlying change and will update everything automatically. This is currently a work-in-progress.* - - -**Steps:** View -> Refresh Contents - -Reset to Default Layout ----------------------------------------- -**Description:** Reset the current :doc:`layout` to the default layout provided by Cutter. - -**Steps:** View -> Reset to default layout - -Reset to Default Settings ----------------------------------------- -**Description:** Reset the current settings to the default settings defined by Cutter. - -**Steps:** View -> Reset Settings - -Lock and Unlock Panels ----------------------------------------- -**Description:** Allow or disable moving and closing of different widgets. Uncheck this option to prevent accidentally modifying current layout. - -**Steps:** View -> Unlock Panels - -Show Tabs at the Top ----------------------------------------- -**Description:** Toggle the position of the tab bar. - -**Steps:** View -> Show Tabs at the Top - -Grouped Dock Dragging ----------------------------------------- -**Description:** When enabled, dragging a widget will also drag the widgets which are grouped to it. You can drag a specific widget from a group by dragging from the tab itself and not from the title bar. Disable this option to always drag individual widgets. - -**Steps:** View -> Grouped dock dragging - - -Zoom In ----------------------------------------- -**Description:** Zoom-In inside different widgets such as Graph, Disassembly and Hexdump. - -**Steps:** View -> Zoom -> Zoom In - -**Shortcut:** :kbd:`Ctrl` + :kbd:`+` - -Zoom Out ----------------------------------------- -**Description:** Zoom-Out inside different widgets such as Graph, Disassembly and Hexdump. - -**Steps:** View -> Zoom -> Zoom Out - -**Shortcut:** :kbd:`Ctrl` + :kbd:`-` - -Reset Zoom ----------------------------------------- -**Description:** Reset the zoom to its default size. - -**Steps:** View -> Zoom -> Reset - -**Shortcut:** :kbd:`Ctrl` + :kbd:`=` - - -Manage Layouts ----------------------------------------- -**Description:** Rename and delete saved :doc:`layouts`. - -**Steps:** View -> Manage layouts , select layout, choose command - -Save Layout ----------------------------------------- -**Description:** Save the current :doc:`layout` with a given name. A layout includes the set of currently opened widgets, their position, and some properties. - -**Steps:** View -> Save Layout , enter a layout name in the dialog. - -Layouts ----------------------------------------- -**Description:** Load the settings from the selected :doc:`layout` into the current layout. Loading a layout will not cause it to automatically be modified. To do that you must use the `Save layout`_ command. - -**Steps:** View -> Layouts -> layout name diff --git a/docs/source/user-docs/menus/menu-bar/windows-menu.rst b/docs/source/user-docs/menus/menu-bar/windows-menu.rst deleted file mode 100644 index b0b26777a..000000000 --- a/docs/source/user-docs/menus/menu-bar/windows-menu.rst +++ /dev/null @@ -1,91 +0,0 @@ -Windows Menu -============================== - -Show Dashboard ----------------------------------------- -**Description:** Show the Dashboard panel. Cutter's dashboard contains basic information about the binary. On the Dashboard you can find: - - File name - - Binary format (PE, ELF64, ...) - - Bits (16, 32, 64, ...) - - Binary Architecture (x86, ARM, ...) - - Access mode (Read, Write, Execute) - - Size - - Binary type - - Written Language - - Compiler detection - - Stack Canaries - - NX bit - - Position independent code - - Checksums (MD5, SHA1, ...) - - Entropy - - and more... - - -**Steps:** Windows -> Dashboard - -Show Functions ----------------------------------------- -**Description:** Display the list of functions identified by Cutter. The list also contains information about each function such as name, address, size, and more. Some functions like Main, Entrypoint and external functions are highlighted with specific colors to make them easier to spot. - -**Steps:** Windows -> Functions - -Show Decompiler ----------------------------------------- -**Description:** Cutter releases are shipped with two decompilers by default - [r2ghidra](https://github.com/radareorg/r2ghidra-dec) and [r2dec](https://github.com/radareorg/r2dec-js). The Decompiler view will display the decompilation of the current function. The widget is interactive and support address-syncing, renaming, re-typing and more. Cutter can be extended with more decompilers. - -**Steps:** Windows -> Decompiler - -Show Graph ----------------------------------------- -**Description:** One of the main views of Cutter allows you to navigate inside functions in a graph mode. This view displays the flow of a functions where each node on the graph represents a basic block in the function. The edges coming-to and getting-out of the blocks represents the control flow. - -**Steps:** Windows -> Graph Overview - -Show Search ----------------------------------------- -**Description:** Show the Search panel in which you can search data, strings, hex and more in the opened binary. - -**Steps:** Windows -> Search - -Show Strings ----------------------------------------- -**Description:** Show the Strings view that will display all the printable strings in the program. A combo-box will allow the user to choose whether they want to view strings from the entire binary or from specific segments and sections. - -**Steps:** Windows -> Strings - -Show Types ----------------------------------------- -**Description:** Show the Types widget in which you can define, load, export and manage data types such as Structures and Enums, - -**Steps:** Windows -> Types - -Add a new instance of the Disassembly Widget ----------------------------------------------- -**Description:** Create a new instance of the Disassembly widget in order to view one or multiple locations at the same time. - -**Steps:** Windows -> Add Disassembly - -Add a new instance of the Graph Widget ----------------------------------------- -**Description:** Create a new instance of the Graph widget in order to view one or multiple locations at the same time. - -**Steps:** Windows -> Add Graph - -Add a new instance of the Hexdump Widget -------------------------------------------- -**Description:** Create a new instance of the Hexdump widget in order to view one or multiple locations at the same time. - -**Steps:** Windows -> Add Hexdump - - -Show Comments ----------------------------------------- -**Description:** Show the comments widgets in order to view the automatic and user-defined comments in this session. - -**Steps:** Windows -> Comments - -Show Console ----------------------------------------- -**Description:** Open the integrated radare2 console. This will allow you to execute radare2 commands straight from Cutter. - -**Steps:** Windows -> Console \ No newline at end of file diff --git a/docs/source/user-docs/menus/registers-widget-context-menu.rst b/docs/source/user-docs/menus/registers-widget-context-menu.rst deleted file mode 100644 index 9b02020fe..000000000 --- a/docs/source/user-docs/menus/registers-widget-context-menu.rst +++ /dev/null @@ -1,14 +0,0 @@ -Registers Widget Context Menu -============================== - -Copy Register Value ----------------------------------------- -**Description:** Copy the value of the selected register. *This option is only available on Debug or Emulation modes*. - -**Steps:** Right-click a register in the widget and choose ``Copy register value``. - -Copy Register Reference ----------------------------------------- -**Description:** Copy the value of the data referenced from the selected register. *This option is only available on Debug or Emulation modes*. - -**Steps:** Right-click a register in the widget and choose ``Copy register reference``. \ No newline at end of file diff --git a/docs/source/user-docs/menus/set-table-layout.rst b/docs/source/user-docs/menus/set-table-layout.rst deleted file mode 100644 index e2652a744..000000000 --- a/docs/source/user-docs/menus/set-table-layout.rst +++ /dev/null @@ -1,14 +0,0 @@ -Set Table Layout -============================== - -Set Table Layout to Horizontal ----------------------------------------- -**Description:** This option sets the layout of the current widget to Horizontal, in which each row contains one or more columns with relevant information (such as offset, size, name, etc). This is the default view in most of the widgets in Cutter. - -**Steps:** Right-click on a widget title and select ``Horizontal``. - -Set Table Layout to Vertical ----------------------------------------- -**Description:** This option sets the layout of the current widget to Vertical, in which the items are displayed in a tree-like view, where every item can be expanded to view more information. - -**Steps:** Right-click on a widget title and select ``Vertical`` \ No newline at end of file diff --git a/docs/source/user-docs/menus/stack-widget-context-menu.rst b/docs/source/user-docs/menus/stack-widget-context-menu.rst deleted file mode 100644 index 54e81c9d2..000000000 --- a/docs/source/user-docs/menus/stack-widget-context-menu.rst +++ /dev/null @@ -1,9 +0,0 @@ -Stack Widget Context Menu -============================== - - -Edit Stack Value ----------------------------------------- -**Description:** Edit the value of the current stack item using a dialog. - -**Steps:** Right-click on an item in the Stack widget and choose ``Edit stack value...`` to open the edit dialog. \ No newline at end of file diff --git a/docs/source/user-docs/menus/syncing-a-widget.rst b/docs/source/user-docs/menus/syncing-a-widget.rst deleted file mode 100644 index b20d9c843..000000000 --- a/docs/source/user-docs/menus/syncing-a-widget.rst +++ /dev/null @@ -1,9 +0,0 @@ -Syncing a Widget -============================== - -Sync Widget to an Offset ----------------------------------------- -**Description:** By default, widgets like Disassembly, Graph, -Decompiler and Hexdump are synchronized with each other, pointing to the same address. A change in one widget will affect the others. We consider this feature as a Global-Seek. By un-syncing a widget, the widget will be independent of the global seek and will have its own seek location. Navigating in an unsynced widget will not change the Global-Seek of the rest of the widgets, and vice versa - Changing the Global-Seek will not affect the unsynced widget. Multiple widgets can be unsynced independently. - -**Steps:** -> Sync/unsync offset \ No newline at end of file diff --git a/docs/source/user-docs/preferences.rst b/docs/source/user-docs/preferences.rst deleted file mode 100644 index 3daf9c1cb..000000000 --- a/docs/source/user-docs/preferences.rst +++ /dev/null @@ -1,13 +0,0 @@ -Configuration -===================== -This part of the documentation will provide the reader with information about different configuration options available. -Most configuration is done using the Preferences dialog. It can be opened by clicking :ref:`Edit -> Preferences`. - -.. toctree:: - :maxdepth: 1 - :glob: - - preferences/analysis - preferences/initialization-script - preferences/layout - preferences/* diff --git a/docs/source/user-docs/preferences/analysis.rst b/docs/source/user-docs/preferences/analysis.rst deleted file mode 100644 index 5229bfe47..000000000 --- a/docs/source/user-docs/preferences/analysis.rst +++ /dev/null @@ -1,74 +0,0 @@ -Analysis Options -================ - -Cutter will use the underlying radare2 analysis options to analyze a binary. These options are usually -configured when the binary is first loaded. However, they can be later changed using the Analysis -dialog, and a new analysis that takes these options into account can then be performed. - -Analysis Dialog ---------------- - -.. image:: ../../images/analysis_dialog.png - :alt: Analysis dialog - -**Description:** The Analysis dialog allows setting some radare2's analysis options. The supported options are described -below. - -Clicking on the "Analyze Program" button will trigger an analysis of the current binary with radare2's ``aaa`` -command, taking into account the configured values of the analysis options. - -**Steps to open:** ``Edit -> Preferences -> Analysis`` - -Speculatively set a name for the functions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Try to name functions without symbols by using artifacts in the functions such as API calls and strings. - -**Configuration variable:** ``anal.autoname`` - - -Search for new functions following already defined functions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Cutter will check if there is a candidate for a new function following an already defined one, as the compiler usually -state them together. This option is taking the advantages of both Recursive Analysis and Linear Sweep into some kind of a hybrid mode. For each discovered function, the analysis will try to check for a function-prologue, usually following a gap of null bytes or ``cc`` bytes. This will help with discovering functions which are not referenced in the program. As such, it will make the analysis slower and prone to false-positives. - -**Configuration variable:** ``anal.hasnext`` - - -Create references for unconditional jumps -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When encountering unconditional jumps during the analysis, Cutter will add a code-reference even if it is not guaranteed -that the jump will take place. - -**Configuration variable:** ``anal.jmp.ref`` - - -Analyze jump tables in switch statements -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When encountering switch statements during analysis, continue and analyze the target blocks of the jump tables. - -**Configuration variable:** ``anal.jmp.tbl`` - - -Analyze ``push`` + ``ret`` as ``jmp`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When performing analysis of a function, treat the sequence of ``push`` followed by ``ret`` instruction as a ``jmp``. -This can help Cutter to continue the analysis to target of the ``jmp``. - -**Configuration variable:** ``anal.pushret`` - - -Show verbose information when performing analysis -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When enabled, Cutter will print warnings it encountered while preforming analysis. These warnings can help the user -understand if anything went wrong in the analysis. This function is not only helpful when trying to perform a full -analysis of the program, but also when trying to analyze and define new functions. - -**Configuration variable:** ``anal.verbose`` - - -Verbose output from type analysis -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Print warnings encountered while preforming type analysis. These warnings can help the user understand if anything went -wrong in the analysis. - -**Configuration variable:** ``anal.types.verbose`` diff --git a/docs/source/user-docs/preferences/initialization-script.rst b/docs/source/user-docs/preferences/initialization-script.rst deleted file mode 100644 index fa92a5a59..000000000 --- a/docs/source/user-docs/preferences/initialization-script.rst +++ /dev/null @@ -1,17 +0,0 @@ -Initialization Script -=================================== - -On the launch of Cutter, it loads ``.cutterrc`` files from various locations if they are present. The directories from where ``.cutterrc`` files are loaded are all directories of type ``QStandardPaths::AppConfigLocation``. These locations vary according to OS. You can visit `here `__ to see all the locations. - -If multiple ``.cutterrc`` scripts are present in different directories, all of them will be loaded. In case of conflicting or contradictory commands, the corresponding command in the script loaded last will override all the previous commands. Cutter has a GUI editor for Initialization Script whose description is given below. The script from the editor will be the last loaded initialization script and hence will override all the previous scripts in the event of conflicting commands. - -Initialization Script Editor ------------------------------------ - -.. image:: ../../images/InitializationScriptEditor.png - :alt: Image of Initialization Script Editor - - -**Description:** You can add new commands and modify existing commands here. To save the script, click on the ``Save`` button. If you want to see the changes you have made without restarting Cutter, you can use the ``Execute`` button. The hyperlink that shows the location of the script will open the directory containing the script on click. - -**Steps to open:** ``Edit -> Preferences -> Initialization Script`` diff --git a/docs/source/user-docs/preferences/layout.rst b/docs/source/user-docs/preferences/layout.rst deleted file mode 100644 index b9dc4c36a..000000000 --- a/docs/source/user-docs/preferences/layout.rst +++ /dev/null @@ -1,21 +0,0 @@ -Layout -====== - -The set of currently opened widgets, their placement, and some properties is grouped into layouts. -Cutter will automatically restore the last layout state when reopening Cutter. The last debug and normal layouts are stored separately. -You can :ref:`save` multiple named layouts for different use cases. -Use :doc:`../menus/menu-bar/view-menu` to :ref:`save`, -:ref:`load` or :ref:`user-docs/menus/menu-bar/view-menu:Reset to default layout`. -A named layout is never automatically modified. To modify a previously saved layout, instead of entering a new name, select -an existing layout from the list in Save Layout dialog. - -Layout Manager ------------------------------------ - -.. image:: ../../images/layout_manager.png - :alt: Layout manager dialog - - -**Description:** Layout manager allows renaming and deleting saved layouts. - -**Steps to open:** :doc:`View<../menus/menu-bar/view-menu>` -> :ref:`user-docs/menus/menu-bar/view-menu:Manage Layouts` diff --git a/docs/source/user-docs/shortcuts.rst b/docs/source/user-docs/shortcuts.rst deleted file mode 100644 index 9f95a1856..000000000 --- a/docs/source/user-docs/shortcuts.rst +++ /dev/null @@ -1,125 +0,0 @@ -Shortcuts -========= - -This page regroups the common shortcuts available in Cutter. - -Global Shortcuts ----------------- - -+------------+---------------------+ -| Shortcut | Function | -+============+=====================+ -| . | Focus console input | -+------------+---------------------+ -| G/S | Focus search bar | -+------------+---------------------+ -| Ctrl/Cmd+R | Refresh contents | -+------------+---------------------+ - -Widget Shortcuts ----------------- - -+-----------+---------+ -| Shortcut | Widget | -+===========+=========+ -| Shift+F12 | Strings | -+-----------+---------+ -| Shift+G | Graph | -+-----------+---------+ -| Shift+I | Imports | -+-----------+---------+ -| Shift+E | Exports | -+-----------+---------+ -| Ctrl+` | Console | -+-----------+---------+ -| : | Console | -+-----------+---------+ - -Disassembly View Shortcuts --------------------------- -*Most of these shortcuts are also applied to Disassembly Graph view* - -+-------------+----------------------------------+ -| Shortcut | Function | -+=============+==================================+ -| Esc | Seek to the previous position | -+-------------+----------------------------------+ -| Space | Switch to disassembly graph view | -+-------------+----------------------------------+ -| Ctrl/Cmd+C | Copy | -+-------------+----------------------------------+ -| ; | Add comment | -+-------------+----------------------------------+ -| P | Define a new function | -+-------------+----------------------------------+ -| Shift+P | Edit function | -+-------------+----------------------------------+ -| U | Undefine a function | -+-------------+----------------------------------+ -| N | Rename current function/flag | -+-------------+----------------------------------+ -| Shift+N | Rename flag/function used here | -+-------------+----------------------------------+ -| Y | Edit/rename local variables | -+-------------+----------------------------------+ -| L | Link a type/struct to address | -+-------------+----------------------------------+ -| A | Set current address to String | -+-------------+----------------------------------+ -| C | Set current address to Code | -+-------------+----------------------------------+ -| X | Show Xrefs | -+-------------+----------------------------------+ -| Ctrl/Cmd+\+ | Zoom in | -+-------------+----------------------------------+ -| Ctrl/Cmd+\- | Zoom out | -+-------------+----------------------------------+ -| Ctrl/Cmd+= | Reset zoom | -+-------------+----------------------------------+ - -Graph View Shortcuts --------------------- - -+---------------------+-----------------------------------+ -| Shortcut | Function | -+=====================+===================================+ -| Esc | Seek to previous position | -+---------------------+-----------------------------------+ -| Space | Switch to disassembly view | -+---------------------+-----------------------------------+ -| Ctrl/Cmd+MouseWheel | Zoom | -+---------------------+-----------------------------------+ -| \+ | Zoom in | -+---------------------+-----------------------------------+ -| \- | Zoom out | -+---------------------+-----------------------------------+ -| = | Reset zoom | -+---------------------+-----------------------------------+ -| J | Next instruction | -+---------------------+-----------------------------------+ -| K | Previous instruction | -+---------------------+-----------------------------------+ -| T | Follow True/Unconditional branch | -+---------------------+-----------------------------------+ -| F | Follow False/Unconditional branch | -+---------------------+-----------------------------------+ - - -Debug Shortcuts ---------------- - -+-----------------+------------------------------------------+ -| Shortcut | Function | -+=================+==========================================+ -| F9 | Start debug | -+-----------------+------------------------------------------+ -| F7 | Step into | -+-----------------+------------------------------------------+ -| F8 | Step over | -+-----------------+------------------------------------------+ -| F5 | Continue | -+-----------------+------------------------------------------+ -| F2/(Ctrl/Cmd)+B | Add or Remove breakpoint | -+-----------------+------------------------------------------+ -| (Ctrl/Cmd)+F2 | Edit or open Advanced breakpoint dialog | -+-----------------+------------------------------------------+