Commit Graph

139 Commits

Author SHA1 Message Date
Lephenixnoir dffc3c7b02
shell: go back to unix shell-like options 2023-09-25 21:36:25 +02:00
Lephenixnoir 2a3f1845de
fxos: remove vspace as a session abstraction
And rewrite all existing commands to read from a binary instead.

The transition to the new data model is *not* complete because a bunch
of data is still hidden in the "Disassembly" inside the binary's virtual
space instead of being managed by the binary itself. Removing these is
the next step.
2023-09-24 20:52:37 +02:00
Lephenixnoir fcdcdba423
fxos: create, select, remove, save and load binaries
This includes migrating them from legacy vspaces, which currently
migrates the bindings but not the symbol definitions.
2023-09-24 16:37:08 +02:00
Lephenixnoir 9d7c87ac3d
fxos: rename Instruction -> OldInstruction 2023-09-24 10:45:40 +02:00
Lephenixnoir 0c52cfca27
shell: load fxosrc files into flat legacy vspace info 2023-09-23 22:50:35 +02:00
Lephenixnoir e52b8411b3
fix my damn protocol for testing builds
I consistently checked that commits built by stashing all other
changes... but forgot to stash untracked files.
2023-09-23 21:37:01 +02:00
Lephenixnoir 12d41ac823
shell: refactor main loop 2023-09-23 21:36:14 +02:00
Lephenixnoir 356d09e52d
fxos: add new project logic (without any data in them)
Projects are now created, saved, reloaded. Next step is to provide the
pm command to migrate old vspaces to them, and then start getting rid of
the old abstractions.
2023-09-23 20:21:08 +02:00
Lephenixnoir 6edbd1dba1
fxos: more BSON utilities 2023-09-23 19:07:31 +02:00
Lephenixnoir c0820b59f0
fxos: refactor AbstractMemory into <fxos/vspace.h> 2023-09-16 11:49:56 +02:00
Lephenixnoir 56a4800bbd
fxos: add a small BSON serialization library
(I tested it obviously)
2023-09-09 23:19:10 +02:00
Lephenixnoir a4cda4cb66
fxos: rename Function -> OldFunction
This prepares the introduction of a new program model different enough
from the original that I'd rather build it on the side than
progressively update the current one.
2023-09-03 19:20:45 +02:00
Lephenixnoir b5d7947958
fxos: set optimization level depending on build type 2023-09-03 19:19:13 +02:00
Lephenixnoir 3e620280c0
fxos: add a CMake option to post-process compiler logs 2023-09-03 19:11:44 +02:00
Lephenixnoir 6406f05eb2
shell: fix crash for commands without a long description 2023-09-03 19:03:48 +02:00
Lephenixnoir 47764a61eb
fxos: refactor AsmInstruction categories into assembly table tags 2023-08-27 23:25:35 +02:00
Lephenixnoir 61c3714404
shell: fix syntax error + autocompletion exception
Somehow there were two types of syntax errors, and the autocompletion
code was not catching the correct one.
2023-08-23 16:20:29 +02:00
Lephenixnoir 0373ae50fe
_ic: also print claims owned by provided address 2023-08-20 20:27:52 +02:00
Lephenixnoir 2dbd910379
fxos, _if: add insufficient call analysis
We look for constants in call instruction parameters, but this only
works for jsr because the register argument in [jmp @rn] is not known to
be a constant yet (some static analysis required).
2023-08-20 20:23:30 +02:00
Lephenixnoir df4bba2c1a
fxos: analyze pcrel in cfg (for future call analysis)
This will not cover advanced stuff that relies on static analysis, but
we don't care at the moment.
2023-08-20 19:42:06 +02:00
Lephenixnoir 12e6cd45a4
_am: add search for OS main menu function 2023-08-20 18:52:34 +02:00
Lephenixnoir 0f23fec85d
shell: fix double syntax errors aborting program
Type e.g. "e 1 + 2 * 3". The first "+" throws a syntax error
(parentheses are needed around expressions) and the "*" another one
during the final exhaust_until_separator phase, which wasn't protected
by a try/catch.
2023-08-20 18:31:30 +02:00
Lephenixnoir 44babe3baf
lib: allow declaring exclusive claims multiple times 2023-08-20 18:31:30 +02:00
Lephenixnoir 97029d4f3e
clang-format and other minor changes 2023-08-20 17:54:03 +02:00
Lephenixnoir a399ed31d7
relconst: fix a printing bug causing some constants to show as 0
Constants (no base) that fit on a single byte would print as 0 due to
flawed logic.
2022-12-29 22:16:47 +01:00
Dr-Carlos 5e20cbe805 Merge pull request 'Add sort option to `is`' (#13) from Dr-Carlos/fxos:sort-is into master
Reviewed-on: https://gitea.planet-casio.com/Lephenixnoir/fxos/pulls/13
2022-12-23 21:30:26 +01:00
Dr-Carlos efaad5b980 add extra symbol comparison methods 2022-12-23 09:51:00 +11:00
Dr-Carlos b494a30404 _is: add sort option 2022-12-23 07:11:16 +11:00
Dr-Carlos f16ecc370c _e: print large demical representations correctly 2022-12-22 09:58:52 +11:00
Dr-Carlos 5a3de5aa17 Allow building fxos with Clang 2022-12-20 15:33:29 +10:30
Lephenixnoir bbd25b625c Merge pull request 'Remove `dr` and integrate into `d`' (#11) from Dr-Carlos/fxos:remove-dr into master
Reviewed-on: https://gitea.planet-casio.com/Lephenixnoir/fxos/pulls/11
2022-12-17 21:54:47 +01:00
Dr-Carlos 111620a649 _d: determine address or range in _d 2022-12-18 07:22:09 +10:30
Dr-Carlos c66ae1d5c6 _d: use expr_or_range to allow addresses or ranges 2022-12-17 20:37:56 +10:30
Dr-Carlos 2f2e4bb1d5 shell: provide parser with expr_or_range() function 2022-12-17 20:37:56 +10:30
Dr-Carlos 1082c451d2 Remove _dr and add token options to atom and expr 2022-12-17 20:37:56 +10:30
Lephenixnoir a277a4ffad
lexer: only allow one leading dot in symbols to avoid clash with ..
The latter is used for ranges. Previously 0..Bdisp_PutDisp_DD would
parse as 0 then the symbol `..Bdisp_PutDisp_DD`.
2022-12-08 17:46:41 +01:00
Lephenixnoir 0a908ad835 Merge pull request 'Update syntax in README' (#9) from Dr-Carlos/fxos:master into master
Reviewed-on: https://gitea.planet-casio.com/Lephenixnoir/fxos/pulls/9
2022-12-08 17:23:23 +01:00
Dr-Carlos ae8ed1fcdd _isc: print syscall to 4 hex digits 2022-12-05 12:19:38 +10:30
Dr-Carlos b402c1804d Update syntax in README 2022-12-04 21:40:57 +10:30
Lephenixnoir 27b2b044fd Merge pull request 'Print all syscalls to 4 hex figures' (#8) from Dr-Carlos/fxos:syscall-lengths into master
Reviewed-on: https://gitea.planet-casio.com/Lephenixnoir/fxos/pulls/8
2022-12-04 11:57:42 +01:00
Dr-Carlos 0e6cec0821 Print all syscalls to 4 hex figures 2022-12-04 21:15:25 +10:30
Lephenixnoir a005b57e72 Merge pull request 'Add vspace and syscall/address option to 'is' command' (#7) from Dr-Carlos/fxos:master into master
Reviewed-on: https://gitea.planet-casio.com/Lephenixnoir/fxos/pulls/7
2022-12-04 11:37:48 +01:00
Dr-Carlos dd09f9a71d _is: use optional, use FxOS log instead of fmt 2022-12-04 20:44:44 +10:30
Dr-Carlos 31406efc13 _is: info for specific symbols and vspace option 2022-12-04 14:34:43 +10:30
Dr-Carlos e5cab0cca9 Add vector include to semantics.h 2022-10-24 06:27:03 +10:30
Lephenixnoir 0bdb98562d Merge pull request 'Move vspace to option in isc command, adding custom addresses as positional arguments' (#6) from Dr-Carlos/fxos:isc into master
Reviewed-on: https://gitea.planet-casio.com/Lephenixnoir/fxos/pulls/6
2022-04-20 10:17:16 +02:00
Dr-Carlos 3308f72773 _isc: sort specific addresses if required 2022-04-19 21:51:27 +09:30
Dr-Carlos 771b12eab8 _isc: resolve vspace when parsing and misc fixes 2022-04-19 21:21:21 +09:30
Dr-Carlos 08c000539c _isc: use os->syscall_at instead of remove_if 2022-04-19 07:32:09 +09:30
Dr-Carlos e037d5889c _isc: print instead of throwing error 2022-04-19 07:13:07 +09:30