Commit Graph

77 Commits

Author SHA1 Message Date
Lephenixnoir e8616c4dcc
meta: ignore previous commit in git blame 2022-04-14 15:31:54 +01:00
Lephenixnoir cf2bc1870c
meta: provide automatic formatting with clang-format 2022-04-14 15:28:20 +01:00
Lephenixnoir 3a9a622ee3
_ic: new command to show claims on addresses 2022-04-06 18:41:41 +01:00
Lephenixnoir ee1c36db4e
_ads: functions now claim the instructions they explore 2022-04-06 12:15:34 +01:00
Lephenixnoir 8a2c67d83f
fix token memory leaks in lexer 2022-04-06 12:02:53 +01:00
Lephenixnoir 4ab1df810b
fix mismatch of new[] and delete in Buffer 2022-04-06 09:36:29 +01:00
Lephenixnoir 9e37c2685c Merge pull request 'Enable -l for log option' (#2) from Dr-Carlos/fxos:master into master
Reviewed-on: https://gitea.planet-casio.com/Lephenixnoir/fxos/pulls/2
2022-04-06 10:36:19 +02:00
Dr-Carlos 5f82ad29e7 Enable -l for log option 2022-04-06 07:28:28 +09:30
Lephenixnoir 23275d99c7
add infrastructure for function claiming parts of the binary
The CFG pass will soon be extended to actually emit the claims.
2022-04-05 19:35:52 +01:00
Lephenixnoir 8b1105fb03
shell: add --log CLI parameter 2022-04-05 15:36:24 +01:00
Lephenixnoir 6ae1a88bf7
_ads: register functions during discovery 2022-04-05 14:02:06 +01:00
Lephenixnoir 613e5b07f4
remove explicit \e coloring 2022-04-05 12:23:39 +01:00
Lephenixnoir d7b3fd0de8
add infrastructure for function passes
Ported existing passes to the new pass interface, now working properly.
2022-04-05 11:11:19 +01:00
Lephenixnoir d61f4e0a2f
meta: fix uninitialized command-line argument logic 2022-04-05 11:11:19 +01:00
Lephenixnoir 45888eb01c
add infrastructure for function passes (WIP) 2022-04-04 22:53:05 +01:00
Lephenixnoir 0028a3ad45
meta: enable reasonable optimisation by default 2022-04-04 22:52:33 +01:00
Lephenixnoir f7f5fbf884
shell: fix uninitialized CLI parameters
Could start with show_help = true at higher optimization levels.
2022-04-04 10:51:31 +01:00
Lephenixnoir 11ca1cc2fc
ads: actually analyze *all* syscalls 2022-04-03 21:36:59 +01:00
Lephenixnoir ae1db62314 Merge pull request 'Add --norc, --help, -e, and FILE options' (#1) from Dr-Carlos/fxos:master into master
Reviewed-on: https://gitea.planet-casio.com/Lephenixnoir/fxos/pulls/1
2022-03-31 22:11:49 +02:00
Dr-Carlos ef40cb3469 Add comments and allow multiple -e options 2022-04-01 06:24:48 +10:30
Dr-Carlos 446590448b Change debugger to disassembler in --help 2022-03-31 20:04:04 +10:30
Dr-Carlos b6fbc352e0 Add --norc, --help, -e, and FILE options 2022-03-31 19:54:44 +10:30
Lephenixnoir 59ed0c8621
add main disassembly, ad and ads commands 2022-03-28 22:42:53 +01:00
Lephenixnoir 29cd2815ec
refactor disassembly infrastructure and passes 2022-03-28 20:59:30 +01:00
Lephenixnoir 1f475b0863
refactor vspace - remove most memory simulation
All of it can be derived from translate_dynamic().
2022-03-27 18:32:28 +01:00
Lephenixnoir e90ef447fc
more refactoring, still less exceptions: os 2022-03-27 17:39:42 +01:00
Lephenixnoir da69725697
more refactoring and minor style updates 2022-03-27 16:10:13 +01:00
Lephenixnoir a9660da767
get rid of exceptions in the library, use explicit errors 2022-03-27 13:59:49 +01:00
Lephenixnoir 50963d7c20
refactor logging utility 2022-03-27 12:57:36 +01:00
Lephenixnoir b37a056c2e
clean up indent for utils 2022-03-27 12:16:58 +01:00
Lephenixnoir 36fe7fcff4
refactor library utils 2022-03-27 12:12:53 +01:00
Lephenixnoir 36fc94bf16
README update (fxdoc now up-to-date) 2022-03-07 21:04:25 +00:00
Lephenixnoir 54721cac93
README for the shell interface 2022-03-06 23:39:44 +00:00
Lephenixnoir 2394725074
add OS checksum computations 2022-03-06 22:50:48 +00:00
Lephenixnoir 4e76ff3a24
add command help messages 2022-03-06 16:15:19 +00:00
Lephenixnoir bd5e1f918c
change option syntax; less exceptions; better autocompletion
* Change option syntax to <name>=<value>, with mandatory "=". This is
  still not great, but manageable.
* Remove the Session::require_vspace() function, whose named overload
  was misused (to check for the existence of a named space), and the
  associated exceptions. Explicit error flow is better error flow.
* Change the autocompletion system to generate all options in a vector
  of strings and then iterate, rather than using generators.
* Add completion for symbols.
2022-03-04 22:54:45 +00:00
Lephenixnoir 3b684389e9
replace CLI with WIP shell (huge commit) 2022-03-04 11:29:33 +00:00
Lephenixnoir 0a659cc6e6
memory: correct end address for RAM and RAM_P2 2021-03-18 18:44:16 +01:00
Lephenixnoir f1ccb5ce88
use the less-painful CMake 2021-03-16 17:53:37 +01:00
Lephenixnoir 41fbdb144e
remove long-unused parser file 2021-03-16 17:30:53 +01:00
Lephenixnoir cd52f5efd6
rename TargetDescription into Target 2021-03-16 17:30:28 +01:00
Lephenixnoir 245af5e993
rename Target into VirtualSpace 2021-03-16 14:43:43 +01:00
Lephenixnoir ca1217af1b
lib/load-asm: greatly improve loading time with less strings 2021-03-16 13:40:36 +01:00
Lephenixnoir dea24a2547
print: fix ellipses after non-decodable words 2021-03-16 13:40:01 +01:00
Lephenixnoir c8b28b447f
masive improvements to memory use by compacting core objects
* Store CpuRegister on a single byte
* Store operation sizes (0, 1, 2, 4) on a single byte
* Share the (disp) and (imm) fields of instruction arguments
* Store instructions as char[12] instead of std::string (>32B)
* Store instruction args in Argument[2], not std::vector (>24B)

Size changes:
  CpuRegister:    4B ->  1B
  Argument:      24B ->  8B
  Instruction:  >64B -> 32B

This reduced the malloc size from 3.3M to 177k after a standard 40-line
disassembly (this excludes OS files mapped to memory), and improved the
loading time for the SH3 instruction table by about 30% (100 ms -> 65
ms).
2021-03-16 13:37:55 +01:00
Lephenixnoir fc9b292846
main: print malloc() stats after disassembly in verbose mode 2021-03-16 13:35:23 +01:00
Lephenixnoir c20db6a8ca
minor data storage improvements 2021-03-16 13:19:48 +01:00
Lephenixnoir 4c9b738247
(cosmetics) 2021-03-16 12:29:39 +01:00
Lephenixnoir 23809e40ef
improve help message to reflect implemented functions 2021-03-16 12:27:19 +01:00
Lephenixnoir c36b63870a
info: fix serial number 2021-03-16 12:25:10 +01:00