Commit graph

261 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
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
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
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
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
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
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
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
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
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
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
f832a2bed0
Add more info in navigation bar (#3544) 2026-01-21 23:35:01 +08:00
Premade
4e53fd64d3
Update rizin to latest dev. (#3514)
* Update rizin to latest stable.
* Remove: use_swift_demangler in `BundledRizin.cmake`
* Remove: `rz_bp` in `BundledRizin.cmake`
* Fix: use sys_path
* Bump `Rizin_VERSION` to 0.9
2025-09-09 10:52:49 +08:00
karliss
6075193db6
Support translations with multiple langauge variants. (#3496) 2025-05-26 21:25:35 +03:00
Premade
31c1958c8d
remember IO mode for recent files (#3433) 2025-05-12 21:14:40 +03:00
karliss
31f2db270c
Missing translation strings (#3478) 2025-05-12 00:08:48 +03:00
karliss
8723a470c6
Make CutterCore::core API harder to misuse. (#3473)
Don't allow using RZCoreLock returned by Core()->core() as temporary expression.
2025-05-01 07:15:39 +03:00
karliss
b7b99b6a72
Update disassembly color theme ligthness categories (#3453)
* fix bug causing unrecognized color themes to have black background
2025-04-19 13:00:07 +03:00
karliss
3652cb7b23
Specify parent window for popups. (#3406)
* Specify parrent window for popups.

Message boxes without parent are almost always a mistake. Such message boxes
* Aren't properly position on top of current window, instead they get placed in the corner of screen possibly away from main window.
* They get treated as separate window by window manager, but they still prevent proper interaction with main window. If you alt tab the message box can get lost, resulting in confusing behavior where you don't know why you can't interact with main window.
2025-01-22 13:39:35 +02:00
karliss
93a06f5edd
Fix build failure against PySide >= 6.8 (#3395) 2024-11-29 18:18:46 +02:00
Anton Kochkov
dbb49bbf98 Do not use removed rz_bin_get_info() API 2024-03-03 13:51:42 +08:00
wargio
2106551d00 Remove JSDec as decompiler and use rizin C api 2024-02-25 22:35:51 +08:00
Anton Kochkov
f97ab44072
Update rizin to latest dev & update jsdec to v0.7.0 (#3292)
* Update rizin to latest dev
* Use jsdec for rizin 0.7.0

---------

Co-authored-by: wargio <wargio@libero.it>
2024-02-13 22:54:02 +08:00
Karthik Prakash
e3087e727a
Highlight matching braces in decompiler view (#3285) 2024-01-27 18:38:34 +02:00
Karliss
7256fbb00e Temporary fix for command output to console widget.
* partially revert #3193 - printing the terminal escape sequences directly to text widget causes more issues than the tab problem it tried to fix
* move the conversation to html from command task to the console widget
* add hack converting tab to multiple spaces
2023-11-11 17:02:38 +02:00
frmdstryr
2730244ec1
Seek to first call if multiple references (#3240) 2023-09-04 22:52:07 +08:00
Anton Kochkov
041118dbd7 Reformat the code 2023-08-03 21:08:07 +08:00
Anton Kochkov
08d5c7aed7
python: disable deprecated API for newer versions (#3210) 2023-08-02 15:21:53 +08:00
Anton Kochkov
de0e55d684
python: use proper way to return None (#3209) 2023-08-02 14:30:05 +08:00
frmdstryr
7418f9c76c
Show disassembly var tooltips (#3206) 2023-07-30 16:37:52 +08:00
Anton Kochkov
93f88263a0 Address Python and PySide API changes 2023-05-20 13:05:43 +08:00
Giovanni
3ccccae291
Fix broken English in UI (#3184) 2023-05-13 10:22:05 +08:00
Lucas Hosseini
beec78b4e2
Keep topOffset history in disassembly widget. (#3171)
This commit adds support for a `topOffset` history (on top of the
rizin-managed history), that keeps track of the offset of the top
instruction in the disassembly widget.

closes #2970
2023-05-11 09:16:06 +08:00
xarkes
cf0f702590
Update IOModesController.cpp (#3166) 2023-05-04 12:14:13 +08:00
Florian Märkl
1f133741ab
Make ClassesWidget a ListDockWidget (#3152)
Adds Quick Filter and generic address-based context menu entries to the
existing ClassesWidget. The original ClassesWidget.ui is not used
anymore as the layout is provided by ListDockWidget and only adjusted.
The AddressableItemContextMenu may now also optionally be shown when
there no currently selected item by using
setShowItemContextMenuWithoutAddress(). This is used e.g. to display the
"Create Class" option when nothing is present in the list.

Fixes #2237

Co-authored-by: Tristan Crawford <tristanthtcrawford@gmail.com>
2023-03-30 19:33:31 +02:00
Florian Märkl
4e0e0000e1 Remove Breakpad Crash Reporting
Crash dumps generated with breakpad were not made use of to an extent
that would justify the extra maintenance overhead that it comes with. As
Windows builds have recently been broken by it, now is a good time to
retire it.
2023-01-13 14:53:27 +01:00
billow
756850ae27
Convert cmds {., afv[WR]j} (#3017)
* remove `asyncCmd` `asyncCmdEsil`,  `cmdjTask`,  `cmdEsil`, `cmdjAt`
* convert `afv[WR]j`
2022-08-14 12:10:18 +03:00
karliss
41c4857ed9
Introduce some helpers to deal with rizin C API more cleanly. (#3020) 2022-08-13 23:12:57 +03:00
billow
617c79f976
Convert pdsf to API (#3010)
* convert `pdsf`
* remove unused
- `CutterCore.opcodes`
- `cmdList`
2022-08-11 20:46:18 +08:00