33 Commits

Author SHA1 Message Date
Ethan Roseman 50a2b836b9 Migrate from poetry/black to uv/ruff (#1673)
* Migrate from poetry/black to uv/ruff

* fixes

* path change

* path pt 2

* ah

* mkst tweaks (#1674)

* mkst tweaks

* tweaks++

* doh

* tweak harder

---------

Co-authored-by: Mark Street <22226349+mkst@users.noreply.github.com>
2025-09-22 19:23:55 +09:00
Mark Street e98ee8728b Warn user on empty diff when using --disassemble=SYMBOL (#1617) 2025-06-16 15:04:20 +09:00
Mark Street 0f56e4e4c9 Add traceback in logs if asm-differ throws an Exception (#1447) 2025-02-09 20:24:46 +09:00
Gilles Siberlin 7fc66435bb [WIP] Add Borland 3.1 compiler to MS-DOS platform (#1419)
* Add Borland 3.1 compiler to MS-DOS platform

* Fix formatting

* Remove useless "rm"

* Update asm-differ
2025-01-28 21:00:44 +00:00
Luke Street 2c2f876e22 Experimental objdiff integration (client-side) (#1329)
* Experimental objdiff integration (client-side)

* Work around next.js stupidity

* Port performance improvements to main diff view
2024-08-23 14:43:26 +09:00
Gilles Siberlin 17de7737d6 Add Show function symbols in diff option (#1182)
* Add Show function symbols in diff option

* Update asm-differ

* Rename frontend option

---------

Co-authored-by: 1superchip <1superchip@gmail.com>
2024-04-03 02:17:10 +09:00
Mark Street e49ad357cd Wrap objdump of target assembly in try/catch (#1187) 2024-03-31 19:38:14 +01:00
Mark Street 31276ab8ef Remove json roundtrip when calling asm-differ (#1133) 2024-03-13 15:02:51 +09:00
Mark Street 503e2f3cce Wrap diff_wrapper.run_objdump in lru_cache (#1115)
* Wrap diff_wrapper.run_objdump in lru_cache

* appease black

* appease black #2
2024-03-10 08:26:08 +00:00
Ethan Roseman 23d2a1019a Fix the last-updated tag of some endpoints & remove win32 hack (#1110)
* Fix the last-updated tag of some endpoints

* remove hack

* mypy
2024-03-06 03:36:43 +09:00
Christian 4fe7304547 x86: Update asm-differ and fix some incorrect objdump output by using mingw instead of msdosdjgpp. (#1104)
* x86: Update asm-differ and fix some incorrect objdump output by using mingw instead of msdosdjgpp.

* Fix spelling mistake

* Fix oversight in diff_wrapper
2024-02-28 03:59:42 +09:00
OmniBlade e3139d991b Remove restrictions on i686 reloc use. (#951)
Remove restriction on i686 reloc use.
2024-02-06 00:48:32 +09:00
Luke Street 5369f81263 Support binary target_obj in scratch creation (#943)
* Support binary `target_obj` in scratch creation

Also support `--disassemble=` in `diff_flags`,
so the scratch can be limited to a single function
within the object.

Resolves https://github.com/decompme/decomp.me/issues/215

* Test fixes

* Validate uploaded file size & magic

Remove `-D` from `skip_flags_with_args`,
we want to keep defines.
2024-01-17 15:52:41 +09:00
Luke Street 28155b6734 Fix diff command escaping (#944)
Fix diff_flags command escaping
2024-01-17 14:42:43 +09:00
Ethan Roseman caa803c661 Compiler refactor (#849)
* Initial commit of organizing things

* some bugs

* anudder

* smores

* fix bug?

* oopth

* strings
2023-09-12 06:40:08 +09:00
Mark Street 39107971e5 Fixup paths to wacom tools (#800)
* Update compiler_wrapper.py

* Update platforms.py

* Update compiler_wrapper.py

* Update compiler_wrapper.py

* Update diff_wrapper.py

* dumb whitespace

* Update diff_wrapper.py
2023-07-03 21:51:58 +09:00
OmniBlade fb34dbf4cb Add MS-DOS platform and Watcom compilers. (#794)
* Add MS-DOS platform and Watcom compilers.

* Remove --reloc from i686 disasm

The --reloc option seems to generate a lot of noise for the i686
objdump.

* Add credit for MS-DOS icon.

* Fixes more black formatting issues.

* Fix black & string appendage issue

---------

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2023-07-03 19:06:14 +09:00
Mark Street f33102beca Better asm diff error handling (#776)
* better asm-differ exception handling

* simplifying

* add 'asm-differ:' error text back in

* preemtively fix tests?

* appease black, maybe mypy too
2023-06-04 00:37:03 +09:00
Ethan Roseman 6efceba430 Update dependencies and black (#669) 2023-02-02 02:05:31 +09:00
ConorB 906aa4a8a8 Switch timeout mechanism to subprocess.run (#659)
* Switch to subprocess.run for timeouts

* [experiment] Set CI TIMEOUT_SCALE_FACTOR to 1

* supress parameterized.expand error in event of no compilers, change TIMEOUT_SCALE_FACTOR in CI to 2

* Exempt dummy compilers from nsjail bind mounts, disable nsjail time limits

* Don't run timeout test on windows

* Decouple test_compiler_timeout's timeout from global timeout settings, reset TIMEOUT_SCALE_FACTOR to 10

* Have DummyLongRunningCompiler subclass DummyCompiler

* Have a timeout of zero disable timeouts entirely

* Skip test_zero_timeout on windows

* black

Co-authored-by: ConorBobbleHat <c.github@firstpartners.net>
2023-01-21 03:04:27 +09:00
ConorB 721a08ccdf Make exception_on_timeout production-compatible, add more timeouts (#653)
* Force exception_on_timeout to use spawn to make gunicorn happy

* black

* Have test_fpr_reg_names_output and test_giant_compilation test for success as opposed to a lack of output

* Refactor timeouts for:
- compiling
- decompiling
- assembling
- disassembling

* Move m2c timeout wrapper to prevent interfering with StringIO

* Increase default timeouts by an order of magnitude to investigate failing CI tests

* Add timeout scale factor, have CI timeouts be 10x default

Co-authored-by: ConorBobbleHat <c.github@firstpartners.net>
2023-01-15 01:28:48 +09:00
Alex Bates 3ee5b6e8c2 Use m2c/asm-differ dependencies instead subrepos (#624) 2022-12-30 11:55:03 +00:00
Anghelo Carvajal 8c9ccc8483 Checkbox for disabling pseudo instructions for MIPS (#635)
Adds a new checkbox for disabling pseudo instructions on MIPS scratches
by passing the `-Mno-aliases` flag to `objdump`. This is disabled by
default.

![image](https://user-images.githubusercontent.com/7416381/209376892-47209728-6791-49ad-89c8-19abe7903ecf.png)

### Why is this useful?

Because GAS likes using the same pseudo instruction for multiple
instructions, which sometimes leads to confusion of "why this doesn't
match if it is the same instruction". Complains about this usually
happen with the `li` pseudo instruction.

Example ("both are `li`s, why it doesn't match?!?!?"):

![image](https://user-images.githubusercontent.com/7416381/209378149-b89c339b-2d29-4fb4-a0ff-0f17a2957ff2.png)
Disabling pseudos ("oh, they actually are different instructions"):

![image](https://user-images.githubusercontent.com/7416381/209378326-2bdb6544-a78c-418e-b69d-e7c727ca0b1f.png)

### Disadvantages

Some pseudos are clearer as pseudos than their actual raw instruction;
like for example the `nop`, which gets disassembled as `sll, zero, zero,
0x0`. `move` is also an example of this (even if the underlying
instruction changes depending on the assembler).
There doesn't seem to be any option in `objdump` to only allow some
pseudos.

`asm-differ` seems to have custom logic for handling `nop`s which gets
lost when disabling them, this can be seen in this screenshot:

![image](https://user-images.githubusercontent.com/7416381/209380469-cd14e671-4fd6-4a2b-aefe-a2dbd21646c6.png)
A workaround for this could be made in the `asm-differ` repo.


### Other

I also allowed passing the other objdump flags to PS1 and PS2.
2022-12-25 14:02:43 +09:00
Ethan Roseman 369761daef m2c / asm-differ updates (#622)
Addresses half of #612
2022-12-19 23:42:11 +09:00
Ethan Roseman 9651b7dcf2 A few issues (#603)
Fixes #312 - removes login event from plausible
Fixes #249 - adds the course db models
Fixes #583 - allow viewing target asm even when the scratch doesn't
initially compile

Update frontend & backend deps
2022-12-14 23:40:41 +09:00