Add 2019/endoh/try.sh, helper program + formatting
The helper program ascii.c converts args passed to it to char values (if isascii() returns non-zero) which with try.sh allows one to reconstruct the code with the backtrace rather than having to memorise ascii(7) (and even if they did it would be hard to put it together). One should of course use xargs(1) and try.sh does. The try.sh script checks that gdb is installed first, telling the user to install it if they don't have it. The README.md file notes that for macOS It's not a simple matter of just installing gdb - there are additional steps.
This commit is contained in:
1 parent
88e8d6a83d
commit
40936af68e
6 files changed
+88
-1
No files matched your search
@@ -25,10 +25,24 @@ For more detailed information see [2019 endoh in bugs.md](/bugs.md#2019-endoh).
|
||||
|
||||
### Try:
|
||||
|
||||
If you have `gdb(1)` installed:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
```
|
||||
|
||||
Note that in macOS installing `gdb(1)` takes multiple steps - it's not just a
|
||||
matter of installing `gdb(1)` and that's that. The [try.sh](try.sh) script has
|
||||
only been tested with linux.
|
||||
|
||||
You might also wish to try:
|
||||
|
||||
```sh
|
||||
gdb ./prog || lldb ./prog
|
||||
```
|
||||
|
||||
and then type in `r` (to run program) and then `bt` (for backtrace).
|
||||
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
@@ -38,6 +52,7 @@ ascii` when debugging it to reveal its purpose.
|
||||
|
||||
## Author's remarks:
|
||||
|
||||
|
||||
### backtrace quine:
|
||||
|
||||
Compile prog.c with no optimization.
|
||||
|
||||
Reference in new issue
Block a user