Commit graph

2061 commits

Author SHA1 Message Date
Premade
867c54e838
Optimize disassembly scroll and selection logic (#3646)
1. Scroll by visual lines instead of disassembly lines (see #3604)

Previously whenever a scroll happened, cutter cleared all of the disassembled
lines it had and queried rizin again, even if the scroll was only for one
instruction. This causes two problems:

* All of the lines have to be queried again making scrolling slow.
* Since an instruction can have multiple metadata lines attached to it, it meant
  that whenever a user scrolled a single instruction all of the metadata lines
  will also be scrolled - making scrolling feel choppy.

To solve this we keep a buffer of "max visible lines * 5" which is filled in as
user scrolls, meaning at first only "max visible lines" are queried from rizin,
if user scrolls upwards the entire "max visible lines" above the current top
instruction is fetched and prepended to our "lines" buffer. Since the previous
lines are still saved - if the user scrolls back down we can just show those
specific lines from our buffer instead of querying again.

Lines are erased from start or end based on scroll direction if the buffer
exceeds the size cap of "max visible lines * 5" The "lines" buffer is fully
cleared if user seeks to some address using some external signal - like the
Visual nav bar at the top (basically seeking using any method other than
directly clicking on the instruction line itself)

2. Adds infinite selection via mouse and keyboard

There was no way in cutter to select more lines than whats currently shown on
screen and there was also no way to select text via keyboard. This is done via
manually handling the selection instead of letting Qt handle it. The selection
is preserved no matter how far user scrolls up or down.

3. Fixes empty space at the bottom of disassembly widget viewport

Whenever "max visible lines" were calculated it didn't account for the fact that
the last line might be partially visible meaning there is not enough space to
display it fully, which created empty space at the bottom

4. Adds a visible/blinking cursor to the disassembly panel

Avoids the issue of not knowing which line we are on, if the line contains
similar text that is highlighted. Also helps to know where selection will start
using physical keys
2026-07-17 12:52:28 +02:00
Anton Bolshakov
e01d86b5fa
cmake: add CUTTER_ENABLE_TRANSLATIONS option to skip translation build (#3640)
Allows building and installing Cutter without translation files by
passing -DCUTTER_ENABLE_TRANSLATIONS=OFF to CMake.

This is useful when building from a source snapshot (e.g. a GitHub
commit archive) that does not include the .ts files, or when the Qt
linguist tools are not available.
2026-07-02 16:43:10 +05:00
Andersen Dsa
2c6c838a13
Add viewport intersection check to cull invisible GraphView edges (#3619) 2026-07-02 13:23:57 +05:00
Florian Märkl
beb64885be
Bump Cutter version to 2.5.0 (#3635)
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2026-06-27 12:37:14 +02:00
Florian Märkl
d48436b8e2
Fix portable rizin system themes loading (#3632)
Regression introduced in 4e53fd64 for the macOS application bundle:
rz_path_set_prefix() is only applied to the core-global RzPath instance,
but the ColorThemeWorker created its own instance, ignoring this
setting.
This led to the message box saying "The Rizin standard themes could not
be found in..." on startup.
2026-06-25 11:28:12 +02:00
Anton Bolshakov
6a65cf57a7
Fix namespace alias DH conflict with OpenSSL typedef (#3620)
* Fix namespace alias DH conflict with OpenSSL typedef

OpenSSL 3.x includes openssl/types.h (via openssl/bn.h pulled in
transitively through rizin headers) which declares:

    typedef struct dh_st DH;

This conflicts with the namespace alias:

    namespace DH = DisassemblyHelper;

The C++ standard does not allow a namespace alias and a typedef to
share the same identifier in the same declarative region. The compiler
resolves DH as the OpenSSL struct, causing build failures when using
rizin built with SSL support.

Rename the alias from DH to DisHlp to eliminate the collision.
2026-06-23 09:25:44 +05:00
Premade
7af2e9ed77
Update translations (#3627) 2026-06-21 17:18:26 +08:00
Premade
136c631e59
Add tab in preferences to query/modify rizin evars (#3615) 2026-06-21 13:04:48 +08:00
Premade
cf443b0b81
Use rizin api for setting fcn calling convention (#3616) 2026-06-20 22:16:21 +05:00
Premade
0f709214d5
TypesWidget: Add rename and set typeclass option (#3622)
* Add option to rename a type
* Add option to view and set type class for a type
* Fix type usages not being shown
* Fix Double clicking on type usage not showing memory widget
2026-06-20 15:07:45 +05:00
Premade
dd557df46a
Add a toggle for showing raw strings in Strings Widget (#3617) 2026-06-19 17:56:16 +05:00
Premade
f6ce266c37
RichTextPainter: Draw text using QPoint instead of QRect (#3613) 2026-05-26 14:12:13 +05:00
Premade
dc76ccf59e
Enforce coding style using clang-tidy (#3603)
Added scripts/clang-tidy.py
Updated doc to tell about clang-tidy
Added checks for clang-tidy are defined below
* cppcoreguidelines-pro-type-cstyle-cast
* misc-const-correctness
* misc-unused-parameters
* modernize-loop-convert
* modernize-use-auto
* modernize-use-nullptr
* readability-braces-around-statements
* readability-identifier-naming
* readability-make-member-function-const
* performance-for-range-copy
* performance-enum-size
* performance-move-const-arg
* performance-no-automatic-move
* performance-noexcept-destructor
* performance-noexcept-move-constructor
* performance-noexcept-swap
* performance-unnecessary-copy-initialization
* performance-unnecessary-value-param
* performance-use-std-move
* performance-move-constructor-init
2026-05-22 21:46:02 +05:00
Premade
1e6782de48
Refactor code to match new style (#3612)
* Refactor code to match coding style
* NULL to nullptr
* clang format 16
* Remove unused header
* Fix ordering of headers
* QtResImporter: Don't ignore return value of file.open()
* Add missing memory header
* GraphGridLayout: Remove <ranges>
* GraphGridLayout: no views::reverse
* Fix typos
* Console widget cmd fix
2026-05-21 14:26:49 +05:00
Premade
07fea9c772
PluginsManager: handle type index case for shiboken6 (#3606) 2026-05-01 15:43:36 +05:00
Premade
e3b38809c0
Show less entries in Omnibar by default (#3592) 2026-05-01 13:41:13 +08:00
Premade
1220f26798
Set default width for function name columns (#3598) 2026-04-29 23:28:55 +05:00
Khairul Azhar Kasmiran
2d03f66b83
Update rizin to latest dev (#3608)
* Convert `%ll` format specifiers to PFMT64
* Update rizin to latest dev
* In Qt land, generally do as the Qt'ians do
* Refactor out offset subtraction
2026-04-25 22:13:23 +08:00
Pavel Potemkin
013a76616b
RzAsm plugins info page enhancement (#3595)
* Limit CPU's width and add tooltips for it
* Add columns displaying asm plugin capabilities
* Handle number of bits of 27 and none
* Fix: make sure that all the values coming to html are escaped
* Use rz_analysis_get_plugins to get the plugin list
2026-04-20 03:30:54 +08:00
Ron Stephen Mathew
2ef6d65328
Debuginfod servers in InitialOptions dialog (#3584)
* Added support for adding debuginfod servers in InitialOptionsDialog
* added new function applyDwarf to CutterCore
* Added sepearted dialogue under preferences->Analysis->SymbolServers to configure the symbol Servers as a unified approach didn't test for PDB files tested for Dwarf servers
* Resolved changes: added Icons, PreferenceDialog will allways have MainWindow as parent,added MainWindow passing to PreferencesDialog
* fixed icon coloring issue while theme changing for shortcuts and symbol servers
* Added pdb servers to the dialogue
2026-04-19 18:10:25 +05:00
Premade
1685f70286
Fix word highlight color issues (#3560)
* Remove custom foreground color option
* Reduce transparency of word highlight slightly
2026-04-17 23:06:38 +08:00
Premade
1e0c17243b
Improve inefficient screen space usage (#3580)
* Add new class `ItemCountLineEdit`
* Create a parent class `AbstractFilterView` for `QuickFilterView` and `ComboQuickFilterView`
* Remove `CutterTreeWidget`
* Add new tab in preferences (`Interface`) for interface related options 
* Add the options to hide item count by default or on overflow (saved in config)
* Add the option to hide item count by default or on overflow for an individual view (not saved)
* Decrease height for Header view sections
2026-04-17 16:53:24 +05:00
Pavel Potemkin
a9e2a7909c
Switch to widget on seek change (#3597)
* Seek to other widgets if the address type matches
* Open the correct widget on undo or redo actions
* Don't seek to the last on Unknown
* Only switch to other widgets from Graph
* Create getSectionAddressAt(RVA addr)
* Remove on_core_seekChanged
* Use virtual address in rz_bin_get_section_at
* Move address == RVA_INVALID check to the correct place
2026-04-16 11:35:53 +08:00
Khairul Azhar Kasmiran
1de599c11b
Update rizin to latest dev (#3600)
* Fix build due to rzheap as subproject
* Fix build due to RzAsm public struct removal
* Fix build due to move to RzCoreDecodedBytes
* Fix build due to RzBin feature refactor
* Fix build due to RzAnalysis refactor
* Update rizin to latest dev
2026-04-15 23:05:44 +08:00
Rakesh-djr
1bcbfcac55
Add mnemonics to main menu (#3583)
* Add mnemonics to top-level menu for keyboard navigation
* Fix XML escaping for menu mnemonics
2026-04-09 03:33:47 +08:00
Ron Stephen Mathew
37dc845965
Docking is made non-mandatory (#3578) 2026-04-01 14:23:46 +08:00
Ron Stephen Mathew
9ac6c75c1a
Added support for search in XRef dialogue (#3579)
* Updated using given instructions new class XrefFilterProxyModel
* Updated using given instructions new class XrefFilterProxyModel clang formatted
* Added shortcuts for clear and show and added sorting functionality to XrefProxyModel
* fixed clear shortcut not working
* clang formatted
2026-03-30 18:50:06 +05:00
Pavel Potemkin
41b91515d3
Add tooltips for registers, variables and memory during debugging/emulating (#3570)
* Allow sub-register values in tooltips
* Allow previewing non-memory values in brackets
* fix: also check for variables within the brackets
* Move the resolving logic to the DissassemblyHelper::resolveTarget
* Fix: remove the additional DH::Variables filter
* Minor refactoring for TargetFilter enum
* Add filter to resolveTarget
* Add defaults to suppress the warning
* Refactor bracket finding into DisassemblyHelper::findBracketRange
* Use the findBracketRange in DisassemblyGraphView
* Pass correct pos to findBracketRange
* Introduce isValidInputNumValue()
* Pass core to the rz_is_valid_input_num_value
* Check if both values (with and without brackets) are valid
* Only show tooltips during debugging or emulating sessions

---------

Co-authored-by: Premade <128969155+PremadeS@users.noreply.github.com>
2026-03-28 17:04:59 +05:00
Premade
ae53338011
Graph Widget: add missing addActions function (#3585) 2026-03-23 15:06:42 +08:00
Premade
d8a8964504
Fix: infinite loop and crash in search bar (#3574) 2026-03-15 15:21:54 +08:00
Premade
9cd2b43767
Fix wheelEvent in disassembly (#3573)
* Fix wheelEvent in disassembly
* Handle qt5 QWheelEvent constructor
2026-03-13 23:01:29 +08:00
Premade
994da3dfca
Add search bar widget to console (#3562)
* Add search bar widget to console
* Update search bar pos on scrollbar visibility
2026-03-10 23:41:34 +08:00
Premade
d6fb33713d
Show Caller Name in XREF with delta (#3569)
* show caller name in xref #3416
* show 'name+offset' in xref to
* Use rizin API

---------

Co-authored-by: lorsanta <lorenzo.santangelo998@gmail.com>
2026-03-10 01:09:44 +08:00
0xsec
b6b562d59e
Fix file open failure after invalid IO mode (#3564) 2026-03-02 21:16:41 +08:00
Premade
13a65dc07d
Follow conditional branching targets in Disassembly and Graph (#3561)
* Fix "return" key in disassembler widget (#3090)
* Move logic to DisassemblyHelper + handle key press in graph
* Handle return on xrefTo instr in graph
2026-02-28 03:02:13 +08:00
Premade
be6101423f
Remove duplicate code for handling word under cursor (#3559) 2026-02-27 02:17:23 +08:00
Premade
4bd2dbc8c9
Fix color theme issues (#3557) 2026-02-22 14:31:19 +08:00
0xsec
18376ebcf7
Fix shortcut for Rename operates on wrong line/address (fixes #2631) (#3553) 2026-02-21 19:01:40 +00:00
Premade
b65b8a0f22
Remove graph.offset (#3556) 2026-02-21 21:04:44 +08:00
Premade
04c0f33865
Fix preview and seek on XREF comment (#3552)
* Fix incorrect preview and seek on XREF comment
* Add token nullptr check
* DisassemblerGraphView: Use trimmed() on inst->plainText
* Ignore flags + improve comment
* Use rizin API function for xref comment comparison
* Compare address instead of raw strings + xref config check
2026-02-21 21:03:11 +08:00
Khairul Azhar Kasmiran
71027c55a9
Fix build wrt to rz_heap_bin_free refactor (#3554)
* Fix build wrt to rz_heap_bin_free refactor
* Set CMAKE_CXX_STANDARD to 20
* Check for cutter_yara_plugin.dll
* Update rizin to latest dev
2026-02-21 17:37:20 +08:00
Premade
ab29174388
Show correct context menu through Menu key (#3550) 2026-02-07 02:41:17 +08:00
Premade
f338901ae0
DisassemblerGraphView: Add missing nullptr check (#3551) 2026-02-06 02:45:23 +08:00
Premade
04147210ca
Add Vertical scrollbar to Hex Panel (#3546)
* Rebase PR #3499
* Fix choppy scroll down on small files
* Fix cursor showing below last row
* Replace viewport()->update() with updateViewport()
* Handle scrollBar only visible when scrolling case
2026-02-04 02:59:20 +08:00
Premade
2e86e0793d
Add interface to change/specify register profiles (#3541)
* Add interface to change/specify register profiles

* Remove unnecessary changes

* Remove hiding recent profiles list

* Fix qt5 deps + add custom context menu
2026-02-01 14:44:24 +08:00
Premade
22dac837f7
Fix file opening logic for Enter key and fileless mode (#3549) 2026-01-31 03:44:15 +08:00
Premade
ca392250bb
Fix VisualNavbar address selection and dragging issues (#3547)
* Fix mouse press calculation in navbar

* Center the cursor rect item

* Fix cursor dragging on navbar

* Disallow dragging to initiate from legend

* use eventFilter to fix dragging in windowed mode
2026-01-25 20:27:48 +08:00
Premade
f832a2bed0
Add more info in navigation bar (#3544) 2026-01-21 23:35:01 +08:00
Premade
19ae96dd66
Update rizin to latest dev (#3545)
* Update Rizin to latest dev
* use `RZ_OUTPUT_MODE_STANDARD` for hasrefs call
2026-01-21 01:00:54 +08:00
Premade
760ab0caea
Make types and variable names clickable (#3538)
* Use `filterRegExp` for qt5
2026-01-19 01:16:08 +08:00