misc. documentation updates (#2259)

* move building errors to the troubleshooting section

* add submodule out of sync issue to troubleshooting

* changes to get cutter section

* move common issues to user docs

* add error related to submodule not in sync

* Grammarly scan on all the docs

* update contribution guide now that common-errors is split
This commit is contained in:
Surendrajat 2020-07-26 10:26:46 +05:30 committed by GitHub
parent e0bfcccb87
commit 79b2314e5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 267 additions and 258 deletions

View File

@ -68,7 +68,7 @@ On Arch-based Linux distributions:
sudo pacman -Syu base-devel cmake meson qt5-base qt5-svg qt5-tools
Building steps
Building Steps
~~~~~~~~~~~~~~
The recommended way to build Cutter on Linux is by using CMake. Simply invoke CMake to build Cutter and its dependency radare2.
@ -115,8 +115,8 @@ To compile Cutter it is necessary to have the following installed:
* CMake
* Qt
Default way
~~~~~~~~~~~
Recommended Way
~~~~~~~~~~~~~~~
To build Cutter on Windows machines using CMake,
you will have to make sure that the executables are available
@ -134,14 +134,14 @@ Note that the paths below may vary depending on your version of Qt and Visual St
Click ``Configure`` and select your version of Visual Studio from the list,
for example ``Visual Studio 14 2015``.
After configuration is done, click ``Generate`` and you can open
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
There is another way to compile Cutter on Windows if the one above does
not work or does not suit your needs.
Additional requirements:
@ -214,7 +214,7 @@ If you want to manually use qmake, follow these steps:
make
cd ..
Additional steps for macOS
Additional Steps for macOS
~~~~~~~~~~~~~~~~~~~~~~~~~~
On macOS you will also have to copy the launcher bash script:
@ -240,13 +240,13 @@ Note that there are some major building options available:
* ``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, in order to build Cutter with support for Python plugins, you can run this command:
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 explicitely disable an option:
Or if one wants to explicitly disable an option:
::
@ -255,7 +255,7 @@ Or if one wants to explicitely disable an option:
--------------
Compiling Cutter with Breakpad support
Compiling Cutter with Breakpad Support
--------------------------------------
If you want to build Cutter with crash handling system, you will want to first prepare Breakpad.
@ -280,13 +280,13 @@ so it contains ``$CUSTOM_BREAKPAD_PREFIX/lib/pkgconfig``. For this simply run
Troubleshooting
---------------
* Cmake can't find Qt
* **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
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.:
@ -296,7 +296,7 @@ containing bin/, lib/, include/, etc.) and specify it to CMake using
rm CMakeCache.txt # the cache may be polluted with unwanted libraries found before
cmake -DCMAKE_PREFIX_PATH=/opt/Qt/5.9.1/gcc_64 ..
* R2 libr_***.so cannot be found when running Cutter
* **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
@ -307,3 +307,48 @@ The workaround is to either add the `--disable-new-dtags` linker flag when compi
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 (doesnt 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

View File

@ -1,58 +0,0 @@
Common errors
=============
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.
`#579 <https://github.com/radareorg/cutter/issues/579>`__
--------------
Compilation error
-----------------
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 (doesnt contain
``/usr/local/bin``). That can 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.
On macOS, you can also try:
- ``PKG_CONFIG_PATH=$HOME/bin/prefix/radare2/lib/pkgconfig qmake``
- ``PKG_CONFIG_PATH=$HOME/cutter/radare2/pkgcfg qmake`` (for modern
version and if radare2 was installed like the submodule)
.. image:: images/cutter_path_settings.png
Or radare2 libs could be installed to ``/usr/lib/pkgconfig/``, so you
can add variable ``PKG_CONFIG_PATH`` with value ``/usr/lib/pkgconfig/``
--------------
OS X libjpeg error
~~~~~~~~~~~~~~~~~~
On macOS, QT5 apps fail to build on QtCreator if you have the libjpeg lib
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
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.

View File

@ -7,7 +7,7 @@ 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
Solution Description
--------------------
There are only 2 source files:
@ -18,7 +18,7 @@ There are only 2 source files:
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 argument.
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.
@ -26,7 +26,7 @@ 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 user.
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

View File

@ -9,7 +9,7 @@ Cutter Development Guidelines
Common Usage
--------------
CutterCore class
CutterCore Class
~~~~~~~~~~~~~~~~
This is the main class where every link with r2 is made. It is *unique*
@ -21,7 +21,7 @@ Example:
Core()->getOffset();
Calling a radare2 command
Calling a radare2 Command
~~~~~~~~~~~~~~~~~~~~~~~~~
There are multiple ways to call a radare2 command:
@ -32,16 +32,16 @@ There are multiple ways to call a radare2 command:
- ``CutterCore::cmdRaw(<command>)`` - 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.
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(<command>, <address>)`` - 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 does not parsed correctly in ``cmdRaw``.
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.
is preferred to use the JSON API.
Example:
@ -49,7 +49,7 @@ Example:
QJsonArray array = Core()->cmdj("pdj 1 @ main").array();
Seek the current file
Seek the Current File
~~~~~~~~~~~~~~~~~~~~~
To modify radare2 seek use ``CutterCore::seek(const RVA offset)``. This
@ -68,15 +68,15 @@ Example:
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
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
-------------
Coding Style
------------
In general, we follow `the official Qt guidelines <https://wiki.qt.io/Qt_Coding_Style>`__ to
format the code. If in doubt, you can use `AStyle
@ -178,7 +178,7 @@ Example:
QObject *object = nullptr;
Connecting signals
Connecting Signals
~~~~~~~~~~~~~~~~~~
To connect a signal to a slot, this is the preferred syntax:
@ -190,23 +190,23 @@ To connect a signal to a slot, this is the preferred syntax:
This syntax performs compile-time type checks and allows the use of lambda
functions. Other approaches for connecting signals silently break at runtime.
General coding advices
General Coding Advices
----------------------
Functions documentation
Functions Documentation
~~~~~~~~~~~~~~~~~~~~~~~
You can find the classes documentation in the API Reference menu item.
You can find the class documentation in the API Reference menu item.
Updating the submodules
~~~~~~~~~~~~~~~~~~~~~~~
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 others, in order to push the most recent
version of them to Cutter.
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:
@ -235,9 +235,9 @@ In order to update one submodule individually, use the following code:
git commit -m "Update radare2 submodule"
Useful resources to learn more about Qt development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Useful Resources (Qt Development)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* `Signals & Slots <https://doc.qt.io/qt-5/signalsandslots.html>`__
* `Model/View Programming <https://doc.qt.io/qt-5/model-view-programming.html>`__ - read this if you are going to work with list or table-like widgets
* `Model/View Programming <https://doc.qt.io/qt-5/model-view-programming.html>`__ - read this if you are going to work with a list or table-like widgets
* `QAction <https://doc.qt.io/qt-5/qaction.html#details>`__

View File

@ -7,7 +7,7 @@ The following section in our documentation is *not* intended to be comprehensive
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 was built successfully, test that it works correctly and continue to the next steps.
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.

View File

@ -30,7 +30,7 @@ versions of libraries so they are not suitable for more serious Cutter developme
Qt Creator
----------
QT Creator is an open source IDE made by same developers as Qt.
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.
@ -53,7 +53,7 @@ The following instructions were made based on version 4.12.4 of Qt Creator. The
- 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 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.
- 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.
@ -66,17 +66,17 @@ Click on the "Projects" button on the left side of the screen and then select "B
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.
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 <https://github.com/Microsoft/vscode>`_ is an open source code editor made by Microsoft.
`VSCode <https://github.com/Microsoft/vscode>`_ is an open-source code editor made by Microsoft.
Pros and Cons
~~~~~~~~~~~~~
- Large amount of plugins
- Good fallback mechanism for files that are not directly part of a project.
- A large number of plugins
- A good fallback mechanism for files that are not directly part of a project.
Recommended plugins
~~~~~~~~~~~~~~~~~~~
@ -105,7 +105,7 @@ 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
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 <https://code.visualstudio.com/docs/cpp/launch-json-reference>`_ 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 <https://github.com/KDE/kdevelop/tree/master/plugins/gdb/printers>`_. In the :file:`~/.gdbinit` file add the following code:
@ -140,8 +140,8 @@ 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 project file list on the left side of the screen
- A yellow bar with message :guilabel:`CMake project is not loaded` should appear, click :guilabel:`Load CMake project`
- 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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -149,14 +149,14 @@ Go to :menuselection:`File --> Settings --> Build,Execution,Deployment --> CMake
Building, Running, Debugging
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Follow the `Clion documentation <https://www.jetbrains.com/help/clion/qt-tutorial.html#debug-renderers>`_ for how to configure Qt type debugger renderers. If you are using MSVC toolchain
Follow the `Clion documentation <https://www.jetbrains.com/help/clion/qt-tutorial.html#debug-renderers>`_ 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<vscode-debug-setup>`
Editing Qt .ui files
~~~~~~~~~~~~~~~~~~~~
Default CLion behavior for opening .ui files is `somewhat buggy <https://youtrack.jetbrains.com/issue/CPP-17197>`_. Double clicking the file does nothing, but it can be opened by dragging it to text editor side.
Default CLion behavior for opening .ui files is `somewhat buggy <https://youtrack.jetbrains.com/issue/CPP-17197>`_. 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 <https://www.jetbrains.com/help/clion/creating-and-registering-file-types.html>`_. 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`.
First one will open it within CLion as XML file and the second will use the operating system configuration.
The first one will open it within CLion as an XML file and the second will use the operating system configuration.
Visual Studio
-------------
@ -189,11 +189,11 @@ Project setup
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 JSON view.
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...`.
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.

View File

@ -30,7 +30,7 @@ The documentation for users describes how to use Cutter and what the different f
Common Errors and Troubleshooting
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
As our community gets bigger, more and more people are using and installing Cutter on different setups. Naturally, different environments might cause different issues. This section in our docs aims to go over the most popular issues and errors that our users face and explain what causes these issues and how to solve them.
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<user-docs/common-issues: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<building: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.

View File

@ -1,4 +1,4 @@
Getting started with Python Plugins
Getting Started with Python Plugins
===================================
This article provides a step-by-step guide on how to write a simple Python plugin for Cutter.

View File

@ -9,23 +9,26 @@ reverse engineers.
.. image:: images/screenshot.png
Get Cutter
----------
Getting Cutter
--------------
Cutter is available for all platforms (Linux, OS X, Windows). You can
download the latest release
Cutter is available for all major platforms. You can
download the latest release from
`here <https://github.com/radareorg/cutter/releases>`__.
- OSX: Download the latest ``.dmg`` file.
- Windows: Download the latest archive.
- Linux: use the AppImage file. Then just make it executable and run it: ``chmod +x Cutter-v1.11.0-x86_64.AppImage``
- **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
Building from Sources
---------------------
To build Cutter on your local machine, please follow this guide:
`Building from source <building.html>`__
To build Cutter on your machine, please follow this guide: :doc:`Building from Source </building>`.
Need help?
----------
@ -39,9 +42,7 @@ You can contact the *Cutter* developers and community on:
Want to help the project?
-------------------------
If you want to contribute to Cutter, take a look
`here <contributing>`_
to learn how you can help improve the project!
If you want to contribute to Cutter, take a look at our :doc:`Contribution Guidelines </contributing>` to learn how you can help improve the project!
.. toctree::
:caption: Contents:
@ -51,7 +52,6 @@ to learn how you can help improve the project!
contributing
Developer documentation <contributing/code>
building
common-errors
plugins
api

View File

@ -1,9 +1,11 @@
User documentation
User Documentation
=======================
This page contains information about the different menus in Cutter.
Cutter is an advanced reverse engineering platform that is 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.
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::
@ -15,4 +17,5 @@ Cutter is an advanced reverse engineering platform that is powered by radare2. T
user-docs/command-line
user-docs/menus
user-docs/preferences
user-docs/common-issues

View File

@ -1,4 +1,4 @@
Command line options
Command-line Options
====================
Synopsis
@ -16,7 +16,7 @@ Options
.. option:: -h, --help
Displays help on commandline options.
Displays help on command-line options.
.. option:: --help-all
@ -28,7 +28,7 @@ Options
.. option:: -A, --analysis <level>
When opening a file automatically perform analysis at given level. Requires
When opening a file automatically perform analysis at a given level. Requires
:option:`<filename>` to be specified. Following levels are available:
**0**
@ -60,12 +60,12 @@ Options
.. option:: --pythonhome <PYTHONHOME>
PYTHONHOME to use for embedded python interpreter
PYTHONHOME to use for the embedded python interpreter
.. option:: --no-output-redirect
Disable output redirection. Some of the output in console widget will not
be visible. Use this option when debuging a crash or freeze and output
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

View File

@ -0,0 +1,19 @@
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 <https://github.com/radareorg/cutter/issues/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.

View File

@ -1,7 +1,7 @@
Menus
======
This part of the user documentation will provide the reader with information about the different menus and context menu item 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.
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::

View File

@ -2,24 +2,24 @@ Breakpoints Widget Context Menu
================================
Edit a breakpoint
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.
**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``.
**Steps:** Right-click on an item in the Breakpoints widget and choose ``Edit``.
Toggle breakpoint state
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``.
**Steps:** Right-click on an item in the Breakpoints widget and choose ``Toggle breakpoint``.
**Shortcut:** :kbd:`Space`
Delete Breakpoint
----------------------------------------
**Description:** This options will disable and remove the selected breakpoint from the program.
**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``
**Steps:** Right-click on an item in the Breakpoints widget and choose ``Delete breakpoint``
**Shortcut:** :kbd:`Del`

View File

@ -1,19 +1,19 @@
Debug Buttons Toolbar
==============================
Continue Until Main
Continue until Main
----------------------------------------
**Description:** Continue the execution of the program until the Main function is reached.
**Steps:** Continue until main
Continue Until Call
Continue until Call
----------------------------------------
**Description:** Continue the execution of the program until a function call is reached.
**Steps:** Continue until call
Continue Until Syscall
Continue until Syscall
----------------------------------------
**Description:** Continue the execution of the program until a Syscall is reached.

View File

@ -7,13 +7,13 @@ Disassembly Context Menu
disassembly-context-menu/*
Disassembly context menu contains actions that operate with selected instruction in disassembly and graph widgets.
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``
**Steps:** Right-click on a selected text and choose ``Copy``
**Shortcut:** :kbd:`Ctrl` + :kbd:`C`
@ -21,7 +21,7 @@ Copy Address
----------------------------------------
**Description:** Copy the address of the location under the cursor.
**Steps:** Right click on a location and choose ``Copy address``
**Steps:** Right-click on a location and choose ``Copy address``
**Shortcut:** :kbd:`Ctrl` + :kbd:`Shift` + :kbd:`C`
@ -29,19 +29,19 @@ Show address in another widget
----------------------------------------
**Description:** Show the selected address or item in another opened widget, or open a new one.
**Steps:** Right click an address or an item in an instruction and choose the ``Show in`` sub-menu
**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`.
**Steps:** Right-click an address and choose `Add Comment`.
**Shortcut:** :kbd:`;`
Add Flag
----------------------------------------
**Description:** Add flag to the selected item or location by bookmarking and giving it a name.
**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.
@ -55,9 +55,9 @@ Rename
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.
**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``.
**Steps:** Right-click on a location inside a function and choose ``Edit function``.
**Shortcut:** :kbd:`Shift` + :kbd:`P`
@ -73,23 +73,23 @@ 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``.
**Steps:** Right-click anywhere inside a function and then choose ``Re-type Local Variables``.
**Shortcut:** :kbd:`Y`
Delete a comment
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``
**Steps:** Right-click on an instruction with a user-defined comment and choose ``Delete comment``
Delete a flag
Delete a Flag
----------------------------------------
**Description:** Delete the flag at the current location.
**Steps:** Right click on a location with a flag and choose ``Delete flag``.
**Steps:** Right-click on a location with a flag and choose ``Delete flag``.
Undefine a function
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.
@ -101,30 +101,30 @@ 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``.
**Steps:** Right-click on an instruction and choose ``Define function here``.
**Shortcut:** :kbd:`P`
Set structure offset
Set Structure Offset
----------------------------------------
**Description:** Present the current value is an offset in a structure.
**Steps:** -> Structure offset
Link a type to address
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``.
**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 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.
**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``
**Steps:** Right-click on an instruction and choose ``Show X-Refs``
**Shortcut:** :kbd:`X`

View File

@ -1,7 +1,7 @@
Debug Context Menu
==============================
Continue until line
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*.
@ -9,6 +9,6 @@ Continue until line
Set Program Counter (PC)
----------------------------------------
**Description:** Set the Program Counter of the debuggee to the current offset. For example, on Intel 64bit program, Cutter will set the value of the RIP register to the curren address. *This option is only available on Debug or Emulation modes*.
**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``.

View File

@ -5,14 +5,14 @@ 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``
**Steps:** Right-click on an instruction and choose ``Breakpoint -> Add/remove breakpoint``
**Shortcut:** :kbd:`F2`
Advanced Breakpoint dialog
Advanced Breakpoint Dialog
----------------------------------------
**Description:** Open the advanced breakpoint dialog. This dialog lets you define not only a regular breakpoint in this address, but also an Hardware breakpoint, a conditional breakpoint, and more.
**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``.
**Steps:** Right-click on an instruction and choose ``Breakpoint -> Advanced breakpoint``.
**Shortcut:** :kbd:`Ctrl` + :kbd:`F2`

View File

@ -5,22 +5,22 @@ 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``
**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``
**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``
**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``
**Steps:** Right-click on an instruction and choose ``Edit -> Reverse Jump``

View File

@ -1,20 +1,20 @@
Set Current Bits
==============================
Set current bits to 16
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``
**Steps:** Right-click on an instruction and choose ``Set current bits to... -> 16``
Set current bits to 32
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``
**Steps:** Right-click on an instruction and choose ``Set current bits to... -> 32``
Set current bits to 64
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``
**Steps:** Right-click on an instruction and choose ``Set current bits to... -> 64``

View File

@ -1,50 +1,50 @@
Set Immediate Base
==============================
Set immediate base to Binary
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``
**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> Binary``
Set immediate base to Octal
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``
**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> Octal``
Set immediate base to Decimal
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``
**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> Decimal``
Set immediate base to Hexadecimal
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``
**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> Hexadecimal``
Set immediate base to Network Port
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``
**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> Network Port``
Set immediate base to IP Address
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``
**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> IP Address``
Set immediate base to Syscall
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``
**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> Syscall``
Set immediate base to String
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``
**Steps:** Right-click on an immediate base of instruction and choose ``Set Immediate Base to... -> String``

View File

@ -6,25 +6,25 @@ 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``.
**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 an highlighted node\block in the Graph view and choose ``Unhighlight block``.
**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``.
**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 an highlighted instruction in the Graph view and choose ``Unhighlight instruction``.
**Steps:** Right-click on a highlighted instruction in the Graph view and choose ``Unhighlight instruction``.
Export Graph
----------------------------------------
@ -42,7 +42,7 @@ When Graphviz is installed, the following options are also available:
- Graphviz JPG Image
- Graphviz SVG Image
**Steps:** Right click anywhere on the Graph view and choose ``Export Graph``.
**Steps:** Right-click anywhere on the Graph view and choose ``Export Graph``.
Graph Layout Direction
@ -50,7 +50,7 @@ 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``.
**Steps:** Right-click anywhere on the Graph view ``Layout -> Horizontal``.
Choose Graph Layout
----------------------------------------
@ -65,4 +65,4 @@ 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.
**Steps:** Right-click anywhere on the Graph view and choose a layout from the ``Layout`` sub-menu.

View File

@ -3,61 +3,61 @@ 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 strings. Please see the other items for this features.
**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``
**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``
**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``
**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``
**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.
**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.
**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.
**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.
**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
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.
**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.

View File

@ -45,7 +45,7 @@ Show Imports
Show Relocations
----------------------------------------
**Description:** Show the Relocations widget, displaying list of relocation information.
**Description:** Show the Relocations widget, displaying a list of relocation information.
**Steps:** Windows -> Info... -> Relocs

View File

@ -1,7 +1,7 @@
Menu bar
Menu Bar
========
Depending on your desktop environment menu bar is located either at the top of window
Depending on your desktop environment menu bar is located either at the top of the window
or top of the screen.
.. toctree::

View File

@ -16,7 +16,7 @@ Start Emulation
**Steps:** Debug -> Start emulation
Attach to process
Attach to Process
----------------------------------------
**Description:** Attach Cutter's debugger to a running process, instead of spawning a new process.

View File

@ -1,13 +1,13 @@
Edit Menu
==============================
Show Search widget
Show Search Widget
----------------------------------------
**Description:** Show the Search widget
**Steps:** Edit -> Search
Go back
Go Back
----------------------------------------
**Description:** Seek backward to your previous location.

View File

@ -9,7 +9,7 @@ New Instance of Cutter
**Shortcut:** :kbd:`Ctrl` + :kbd:`N`
Map a new file
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.
@ -18,40 +18,40 @@ Specifically, Cutter is able to open files and map portions of them at random or
**Shortcut:** :kbd:`Ctrl` + :kbd:`M`
Import a PDB file
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
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
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
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
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
Save Project
----------------------------------------
**Description:** Save your session to a project. If no project file assigned to your session, the "Save as..." dialog will open.
@ -59,7 +59,7 @@ Save project
**Shortcut:** :kbd:`Ctrl` + :kbd:`S`
Save project as...
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.
@ -68,7 +68,7 @@ On the saving dialog, choose the project type that fits your needs.
**Steps:** File -> Save As...
Export to code
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.*
@ -76,7 +76,7 @@ Export to code
**Steps:** File -> Export as code
Run a radare2 script
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*``).

View File

@ -7,7 +7,7 @@ About
**Steps:** Help -> About
Report an issue
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.

View File

@ -1,7 +1,7 @@
Plugins Menu
==============================
Plugins sub-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.

View File

@ -2,7 +2,7 @@ View Menu
==============================
Refresh contents
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.
@ -11,19 +11,19 @@ Refresh contents
**Steps:** View -> Refresh Contents
Reset to default layout
Reset to Default Layout
----------------------------------------
**Description:** Reset the current :doc:`layout</user-docs/preferences/layout>` to the default layout provided by Cutter.
**Steps:** View -> Reset to default layout
Reset to default settings
Reset to Default Settings
----------------------------------------
**Description:** Reset the current settings to the default settings defined by Cutter.
**Steps:** View -> Reset Settings
Lock and Unlock panels
Lock and Unlock Panels
----------------------------------------
**Description:** Allow or disable moving and closing of different widgets. Uncheck this option to prevent accidentally modifying current layout.
@ -35,7 +35,7 @@ Show Tabs at the Top
**Steps:** View -> Show Tabs at the Top
Grouped dock dragging
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.
@ -67,13 +67,13 @@ Reset Zoom
**Shortcut:** :kbd:`Ctrl` + :kbd:`=`
Manage layouts
Manage Layouts
----------------------------------------
**Description:** Rename and delete saved :doc:`layouts</user-docs/preferences/layout>`.
**Steps:** View -> Manage layouts , select layout, choose command
Save layout
Save Layout
----------------------------------------
**Description:** Save the current :doc:`layout</user-docs/preferences/layout>` with a given name. A layout includes the set of currently opened widgets, their position, and some properties.

View File

@ -59,19 +59,19 @@ Show Types
**Steps:** Windows -> Types
Add a new instance of the Disassembly widget
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
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
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.

View File

@ -5,10 +5,10 @@ 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``.
**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 tree-like view, where every item can be expanded to view more information.
**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``
**Steps:** Right-click on a widget title and select ``Vertical``

View File

@ -6,4 +6,4 @@ 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.
**Steps:** Right-click on an item in the Stack widget and choose ``Edit stack value...`` to open the edit dialog.

View File

@ -1,9 +1,9 @@
Syncing a widget
Syncing a Widget
==============================
Sync widget to an offset
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 th others. We consider this feature as a Global-Seek. By unsyncing 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.
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

View File

@ -2,14 +2,14 @@ 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. Last debug and normal layouts are stored separately.
Cutter will automatically restore the last layout state when reopening Cutter. The last debug and normal layouts are stored separately.
You can :ref:`save<user-docs/menus/menu-bar/view-menu:Save Layout>` multiple named layouts for different use cases.
Use :doc:`../menus/menu-bar/view-menu` to :ref:`save<user-docs/menus/menu-bar/view-menu:Save Layout>`,
:ref:`load<user-docs/menus/menu-bar/view-menu:Layouts>` 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 list in Save Layout dialog.
an existing layout from the list in Save Layout dialog.
Layout manager
Layout Manager
-----------------------------------
.. image:: ../../images/layout_manager.png

View File

@ -3,7 +3,7 @@ Shortcuts
This page regroups the common shortcuts available in Cutter.
Global shortcuts
Global Shortcuts
----------------
+------------+---------------------+
@ -16,7 +16,7 @@ Global shortcuts
| Ctrl/Cmd+R | Refresh contents |
+------------+---------------------+
Widget shortcuts
Widget Shortcuts
----------------
+-----------+---------+
@ -35,14 +35,14 @@ Widget shortcuts
| : | Console |
+-----------+---------+
Disassembly view shortcuts
Disassembly View Shortcuts
--------------------------
*Most of these shortcuts are also applied to Disassembly Graph view*
+-------------+----------------------------------+
| Shortcut | Function |
+=============+==================================+
| Esc | Seek to previous position |
| Esc | Seek to the previous position |
+-------------+----------------------------------+
| Space | Switch to disassembly graph view |
+-------------+----------------------------------+
@ -77,7 +77,7 @@ Disassembly view shortcuts
| Ctrl/Cmd+= | Reset zoom |
+-------------+----------------------------------+
Graph view shortcuts
Graph View Shortcuts
--------------------
+---------------------+-----------------------------------+
@ -105,7 +105,7 @@ Graph view shortcuts
+---------------------+-----------------------------------+
Debug shortcuts
Debug Shortcuts
---------------
+-----------------+------------------------------------------+