Commit Graph

243 Commits

Author SHA1 Message Date
WerWolv e48c61cf27 Hopefully fixed macos compile finally 2021-01-07 21:52:03 +01:00
WerWolv 08c802f733 Added unbounded char arrays for null-terminated strings 2021-01-07 21:16:34 +01:00
WerWolv 7e4babaca8 Use custom versions of concepts for macos support 2021-01-07 20:06:28 +01:00
WerWolv 5d1e53f469 Added boolean patterns 2021-01-07 17:34:50 +01:00
WerWolv bef20f7808 Added function calling as well as a few builtin functions 2021-01-07 15:37:37 +01:00
WerWolv 2dbfbe70af Fixed rvalue value evaluation 2021-01-07 01:56:15 +01:00
WerWolv 3f1d9ed366 Added ternary condition operator 2021-01-07 01:19:54 +01:00
WerWolv b30bb21646 Added unary operators +, -, ~ and ! 2021-01-07 00:41:06 +01:00
WerWolv acfd5aa02f Added if, else and else if to pattern language 2021-01-07 00:02:51 +01:00
WerWolv 2248cd96b1 Fixed opening of files with non-ASCII characters in path
Fixes #116
2021-01-06 17:22:12 +01:00
WerWolv 7fd0d87d56 Allow enum entries to be accessed via the scope resolution operator 2021-01-06 16:30:30 +01:00
WerWolv ceee311efa Added support for more literal types and scope resolution operator parsing 2021-01-05 14:42:08 +01:00
WerWolv f137d759c8 Allow zero-sized arrays again 2021-01-04 16:25:03 +01:00
WerWolv f5250d6bcf Fixed rvalues not evaluating correctly in nested structs 2021-01-04 16:13:03 +01:00
WerWolv af42d2ff66 Properly convert rvalue to mathematical expression 2021-01-04 14:10:59 +01:00
WerWolv f1339f8b4a Fixed crash on load when no plugin folder was present 2021-01-04 13:52:49 +01:00
WerWolv eed7ef1ac3 Make sure important data is synchronized between ImHex and plugins 2021-01-04 00:19:56 +01:00
WerWolv c7c654d310 Improved data inspector displaying, added additional number formats 2021-01-03 17:12:20 +01:00
WerWolv e770fcd197 Fixed includes on unix 2021-01-03 15:09:12 +01:00
WerWolv 5a0f965125 Use file mapping instead of of normal file IO
This drastically reduces disk reads and improves performance
2021-01-03 15:00:16 +01:00
WerWolv 206be8b110 Greatly improved hex editor byte highlighting performance 2021-01-03 02:37:37 +01:00
WerWolv 78ef07cf0f
Pattern Language rewrite (#111)
* Initial parser rewrite effort

Lexer and Token cleanup, Parser started over

* Greatly improved parser syntax

* Reimplemented using declarations and variable placement parsing

* Added back unions and structs

* Added enums as well as mathematical expressions (+, -, *, /, <<, >>, &, |, ^)

* Code style improvement

* Implemented arrays and fixed memory issues

* Fixed more memory issues in parser, reimplemented validator, evaluator and patterns

* Fixed builtin types, arrays and reimplemented strings

* Improved error messages

* Made character a distinct type, used for chars and strings

* Implemented padding, fixed arrays

* Added bitfields

* Added rvalue parsing, no evaluating yet

* Added .idea folder to gitignore

* Fixed build on MacOS

* Added custom implementation of integral concept if not available

* Rebased onto master

* Fixed array variable decl crash

* Added rvalues and dot syntax

* Lower case all pattern language error messages

* Fixed typo in variable name

* Fixed bug where preprocessor would not ignore commented out directives

* Reimplemented pointers

* Fixed rebase issues
2021-01-02 20:27:11 +01:00
WerWolv 144e30775f Fixed duplicated utils.hpp 2020-12-27 15:54:12 +01:00
WerWolv f74eff8934 Add support for custom providers via plugins 2020-12-27 15:39:06 +01:00
WerWolv 8ba96904a6 More plugin support work 2020-12-27 14:12:53 +01:00
WerWolv dbbc525174
Added Plugin support (#102)
* Build refactoring and initial plugin support

* Possibly fixed linux / mac build

* Added libdl to libglad build script

* Add glfw to imgui dependencies

* Refactored common functionality into "libimhex" for plugins

* Added plugin loading and example plugin

* Added proper API for creating a custom view and a custom tools entry with plugins
2020-12-22 18:10:01 +01:00
WerWolv b9324f44e6 Added selected addresses to hex editor footer
This (and the two previous commits) fixes #99
2020-12-21 15:20:57 +01:00
WerWolv 7c350dde90 Added current commit hash and branch to about page 2020-12-21 12:38:50 +01:00
WerWolv 2c1759ce0a Unified OS and arch checking defines 2020-12-21 12:38:30 +01:00
WerWolv 4b59d57f89 Added version info to about page 2020-12-21 11:24:27 +01:00
WerWolv 15b3860f83 Fixed data inspector not updating properly in all cases 2020-12-21 11:23:57 +01:00
Mary 310059f274 Support macOS
This allows building and running under macOS.
There is still some issues with dpi but the application compiles and run now.
2020-12-18 21:44:13 +01:00
WerWolv 9123b21e18 Added basic command palette (similar to the one in vscode) 2020-12-16 22:43:07 +01:00
averne 56cca88fbd
Proper DPI scaling and basic custom font (#85)
* add glm to arch deps

After running got `None of the required 'glm' found`. This fixes that

* dist/fedora: Include file magic headers

Due to differences in package names between Deb based systems, Arch
Linux, and RPM based systems the package containing the development
headers for file were missing from the Fedora dependencies script.

This includes the package `file-devel`, which is the package which
resolves the issue.

In Fedora, one can identify the package providing a specific file using
the verb "whatprovides" with the command dnf, e.g.:

    [~]$ dnf whatprovides /usr/include/magic.h
    Last metadata expiration check: 4 days, 0:23:05 ago on Fri 04 Dec 2020 09:06:53 AM PST.
    file-devel-5.39-3.fc33.i686 : Libraries and header files for file development
    Repo        : fedora
    Matched from:
    Filename    : /usr/include/magic.h

    file-devel-5.39-3.fc33.x86_64 : Libraries and header files for file development
    Repo        : @System
    Matched from:
    Filename    : /usr/include/magic.h

    file-devel-5.39-3.fc33.x86_64 : Libraries and header files for file development
    Repo        : fedora
    Matched from:
    Filename    : /usr/include/magic.h

If one is unsure of the specific path, globbing may be used (but must be
quoted):

    dnf whatprovides "*/magic.h"

Resolves #48

* dist: Prevent already installed packages in ArchLinux and MSYS2.

Use --needed option with pacman to prevent it.

* Add script to install dependencies on Debian/Ubuntu.

Tested with Xubuntu 20.04 and Debian testing
(in today's Docker image bitnami/minideb).

Update README.md.

* ci: rework (#31)

* Support non standard LLVM library names (#86)

This fix openSUSE and Gentoo issue mentioned in https://github.com/WerWolv/ImHex/issues/37#issuecomment-739503138.

(tested on openSUSE tumbleweed via Docker)

I also took the liberty of renaming llvm_lib to llvm_demangle_lib to be more specific in the ``CMakeLists.txt``.

* Implement proper DPI handling

* Implement basic custom font support

* Fix building on windows

* Hopefully fix fonts on Windows

* Fix several scaling issues

* Replace font renderer with freetype

* Updated CI and dependency scripts

* Rebuild default font atlas

* Correct platform detection macro for mingw

* Fixed PKGBUILD

Co-authored-by: brockelmore <31553173+brockelmore@users.noreply.github.com>
Co-authored-by: Brian 'Redbeard' Harrington <redbeard@dead-city.org>
Co-authored-by: Biswapriyo Nath <nathbappai@gmail.com>
Co-authored-by: Stéphane Gourichon <stephane.gourichon@fidergo.fr>
Co-authored-by: umarcor <38422348+umarcor@users.noreply.github.com>
Co-authored-by: Mary <me@thog.eu>
Co-authored-by: WerWolv <werwolv98@gmail.com>
2020-12-11 14:24:42 +01:00
WerWolv e1e73077a1 Improved language parsing and validation. This fixes #58 2020-12-07 23:49:19 +01:00
WerWolv 485761f45c Fixed ImHex refusing to be closed in some circumstances 2020-12-07 00:42:52 +01:00
WerWolv b06f5630c7 Fixed additional issues with padding and zero sized arrays 2020-12-06 23:15:51 +01:00
WerWolv 5c96a28fb6 Actually fix crash when creating zero sized arrays
If size is zero, the array will be treated as non-existent. This fixes #50
2020-12-06 22:52:15 +01:00
WerWolv 7a9d7b59e8 Added overriding of endianess for individual variables 2020-12-06 21:40:57 +01:00
WerWolv 4720cf9fbe Added possible support for MacOS. Completely untested.
Relevant: #32
2020-12-06 13:48:56 +01:00
WerWolv 68f93c5e3d Fixed possible crash when loading files, relax pattern detection requirements
This fixes #20
2020-12-05 22:30:09 +01:00
WerWolv 7b8330f8f8 Added command line support / dropping files onto executable
Closes #36
2020-12-05 22:10:03 +01:00
Mary 45c29888b4 Abstract capstone architectures
This allows to support older version of Capstone (example 4.0.1).

Should help with ubuntu building issues.
2020-12-05 17:32:30 +01:00
WerWolv 502d90b117 Merge remote-tracking branch 'origin/master' 2020-12-05 12:54:42 +01:00
Mary d3dccace37 Detect python version at build time
This remove the hardcoded version in CMakeLists.txt and
loader_script_handler.cpp.

Fixing building on Arch Linux and probably other systems.
2020-12-05 12:46:50 +01:00
WerWolv a30453616b Turned cheat sheet popups into actual windows 2020-12-05 11:34:49 +01:00
WerWolv 168ba2ff9f Denote invalid GUIDs in data inspector
Addresses #24
2020-12-05 11:00:56 +01:00
WerWolv 2ca9a8fc79 Fixed data inspector displaying zero at the end of data
Fixes #25
2020-12-05 10:42:42 +01:00
WerWolv 6456a68805 Fixed crash when array size variable has a value of zero 2020-12-05 10:36:30 +01:00
WerWolv 192e7d5060 Added Python API function to create structs and unions 2020-12-01 18:21:29 +01:00
WerWolv 6aed140ecf Use custom "argc" and "argv" exposing. Fixes #6 2020-12-01 18:19:49 +01:00
WerWolv 17096055f8 Added create_struct and create_union function to Python API 2020-12-01 16:41:38 +01:00
WerWolv c6134bc038 Added basic python-based load scripts 2020-12-01 02:21:40 +01:00
WerWolv 16f885f469 Added read/write command to math evaluator 2020-11-30 21:45:48 +01:00
WerWolv 00072d0216 Improved pattern language cheat sheet, added math evaluator cheat sheet 2020-11-30 21:44:40 +01:00
WerWolv 4878f70e58 Added project files 2020-11-30 00:03:12 +01:00
WerWolv 9e8523470d Added applying of IPS and IPS32 patches 2020-11-29 15:09:36 +01:00
WerWolv 7316be0bc2 Added patches display window 2020-11-29 02:06:41 +01:00
WerWolv 8a4b663890 Prevent shortcuts from applying to closed windows 2020-11-29 01:18:12 +01:00
WerWolv 3276ad9979 Open file dialog to not pop up if hex view wasn't open 2020-11-29 01:17:54 +01:00
WerWolv 0890043bf4 Make Help view no longer appear in View menu 2020-11-28 22:01:50 +01:00
WerWolv c90ef343c1 Added math evaluator / calculator to tools window 2020-11-28 21:55:52 +01:00
WerWolv 1395c95831 Same treatment for the disassembly window 2020-11-28 16:15:12 +01:00
WerWolv 33b70a550f Improved look and feel of hash window. Added "Match selection" feature 2020-11-28 15:53:11 +01:00
WerWolv 985e924e9d Added simple bookmarks / comments feature. No saving yet though 2020-11-28 00:33:26 +01:00
WerWolv 3827919a32 Added error messages and error display to pattern language editor 2020-11-27 21:20:23 +01:00
WerWolv d55bea7c46 Added character literals to pattern language 2020-11-27 14:18:28 +01:00
WerWolv 2efe326fdb Added Save, Save As and implemented error message for Base64 importing 2020-11-27 13:45:56 +01:00
WerWolv d43bd23e1a Added default error message window 2020-11-27 13:45:27 +01:00
WerWolv 015ec12215 Improved byte write speed by a lot 2020-11-27 13:44:52 +01:00
WerWolv fde9dc7961 Various small fixes 2020-11-27 09:09:59 +01:00
WerWolv ed572ececf Added patching system and IPS/IPS32 patch exporting 2020-11-27 09:09:48 +01:00
WerWolv acc10930c2 Added MSVC symbol demangling, switched to LLVM libs for demangling 2020-11-24 18:12:08 +01:00
WerWolv f17d6c2359 Added copy string and copy demangled string to strings window 2020-11-24 02:59:49 +01:00
WerWolv 58deaa6b29 Added importing from base64 encoded file 2020-11-24 02:00:22 +01:00
WerWolv fcd88b4b3b Shrink the color picker to a bit more reasonable size 2020-11-24 00:01:44 +01:00
WerWolv 3bd987ff2c Streamline view creation, save all view states when quitting 2020-11-23 23:57:19 +01:00
WerWolv 45bcdc8c46 Added toggle for ImGui demo window in Debug mode 2020-11-23 22:23:06 +01:00
WerWolv 0d0b2d6962 Indent variable name instead of color in pattern data view 2020-11-23 22:14:11 +01:00
WerWolv fd6a41d219 Make selecting memory by clicking on a table item update the inspector 2020-11-23 16:26:01 +01:00
WerWolv b052429a73 Improved ASCII and Wide char display in data inspector 2020-11-23 16:19:58 +01:00
WerWolv 1996f401e0 Fixed last block searched for strings to yield invalid results 2020-11-23 16:19:31 +01:00
WerWolv 3b3f2226f1 Remove collapse button from all windows 2020-11-23 15:51:58 +01:00
WerWolv 5c0f6a1e50 Enabled ImGui's viewports support 2020-11-23 15:51:40 +01:00
WerWolv b7438f6ab8 Massively improved look and feel of pattern data, string and disassembly tables 2020-11-23 15:22:26 +01:00
WerWolv 84f80b3e06 Select region when clicking on string, disassembly or pattern data item 2020-11-23 13:10:14 +01:00
WerWolv c281372b8d Improved table coloring 2020-11-23 13:08:24 +01:00
misson20000 01eeb53af0 Fix out-of-bounds vector write on copy hex string 2020-11-22 18:00:46 -08:00
misson20000 7cf69128ea Actually fix time_t decoding crash on Linux 2020-11-22 18:00:17 -08:00
WerWolv 2ab2f5e675 Improved block size text 2020-11-23 00:34:53 +01:00
WerWolv f0eba69c4a Fixed time_t decoding crash on Linux 2020-11-23 00:20:29 +01:00
WerWolv cea366e135 Fixed crash when scrolling disassembler options child off screen 2020-11-23 00:12:53 +01:00
WerWolv d752c7434f Fixed crash when no patterns folder exists 2020-11-23 00:12:33 +01:00
WerWolv 4402120ffc Added the capstone disassembler and a disassembler window 2020-11-22 23:07:50 +01:00
WerWolv b3fffdf530 Fixed automatic pattern loading 2020-11-22 23:06:17 +01:00
WerWolv 8d6d959e17 No need to manually set table colors 2020-11-22 20:41:54 +01:00
WerWolv 43f5cc622e Allow loading of huge files efficiently 2020-11-22 19:43:35 +01:00
WerWolv 5f025bcbcc Fixed UTF-8 decoding to not work 2020-11-22 16:22:23 +01:00
WerWolv 8297e22f10 Added global big and little endian support to the pattern parser 2020-11-22 16:22:02 +01:00
WerWolv 989eade5d7 Added big and little endian support to inspector 2020-11-22 15:32:37 +01:00