Commit Graph

407 Commits

Author SHA1 Message Date
Kelvin Sherlock
89d8b3efcf disassembler - inline debug name support.
See IIgs technote #103.
2019-04-05 18:43:54 -04:00
Dagen Brock
3f8cce8286 add definition 2019-03-28 12:45:27 -05:00
Kelvin Sherlock
237577d886 sweet 16 asm [wip] 2019-03-27 17:02:12 -04:00
Dagen Brock
1dd1677eac
Merge pull request #65 from ksherlock/ptr2word
cleanup pointer to integer casting
2019-03-27 08:23:35 -05:00
Dagen Brock
00e8bbd3e2
Merge pull request #64 from ksherlock/mli_fix
unix host mli bug fixes
2019-03-27 08:17:05 -05:00
Kelvin Sherlock
91c24bbf8b wasn't setting stderr fileno... 2019-03-26 23:37:16 -04:00
Kelvin Sherlock
3ef3173c36 Merge branch 'master' of https://github.com/ksherlock/gsplus 2019-03-26 23:16:27 -04:00
Kelvin Sherlock
30da497087 win32 console debugger
may need a little work, still.
2019-03-26 23:15:56 -04:00
Dagen Brock
a4442e6ea8
Merge pull request #63 from ksherlock/adb_keycodes
replace hard coded ADB keycode with nice enums.
2019-03-26 21:49:03 -05:00
Kelvin Sherlock
eabcc72005 missing linux headers. 2019-03-25 16:34:31 -04:00
Kelvin Sherlock
2a82de3d54 remove unused comments/defines. 2019-03-24 11:25:50 -04:00
Kelvin Sherlock
c677f0f894 common code for i/w/h commands. 2019-03-24 03:11:16 -04:00
Kelvin Sherlock
bda785f98d add "w" command. 2019-03-23 20:49:41 -04:00
Kelvin Sherlock
07eeaf24b0 GSString-ify debug templates. 2019-03-23 00:28:39 -04:00
Kelvin Sherlock
90bf447606 debug templates - improved support for pstring/gsstring/cstring. 2019-03-22 00:14:09 -04:00
Kelvin Sherlock
6f7d6629bb memory breakpoints - proper handling for wrapped addresses. 2019-03-22 00:13:38 -04:00
Kelvin Sherlock
bf09880caf fix memory breakpoint range checking.
It's still broken for page/bank wrapped data.  Eg, sta <$ff stores @ $ff and $00
2019-03-21 22:12:30 -04:00
Kelvin Sherlock
5da4e5c39f fix mvp/mvn operand order. 2019-03-21 22:08:39 -04:00
Kelvin Sherlock
7e0963e12c remove old makefiles. 2019-03-21 18:31:15 -04:00
Kelvin Sherlock
6c38f597fd use ] as the debug shell prompt. 2019-03-21 18:05:04 -04:00
Kelvin Sherlock
ec0c255975 debug shell - only set the ignore_brk/mp/bp IF the pc hasn't changed. 2019-03-21 18:04:51 -04:00
Kelvin Sherlock
fb2dee9b9b add settings snytax.
0>setting
1>setting

where "setting" is:
brk - enable/disable GS+ brk support
cop - enable/disable GS+ cop support
e/m/x - set psr for disassembly support.
2019-03-20 00:16:20 -04:00
Kelvin Sherlock
96ecfb3b0d next command - step over brk/cop instructions. 2019-03-20 00:14:04 -04:00
Kelvin Sherlock
483d92d53a update TODO comment 2019-03-19 21:31:06 -04:00
Kelvin Sherlock
bf4c1bdc0e use vt100 escape codes (in the future, should switch to termcap/terminfo) to erase previous line when stepping to clean up the display. 2019-03-19 21:30:52 -04:00
Kelvin Sherlock
4974c36458 print an extra newline after a ^C 2019-03-19 19:17:26 -04:00
Kelvin Sherlock
b9bab83d6a check for perl/re2c programs. 2019-03-19 19:07:48 -04:00
Kelvin Sherlock
7aea2e56f2 - tweak ^D newlins
- %d was incorrect
- template pointers were 16-bit.
2019-03-19 00:38:33 -04:00
Kelvin Sherlock
d7a92f4441 cop/brk debugger support...
cop=1
brk=1

to enable brk/cop support.  cop/brk instructions will be caught *BEFORE* execution and drop into the debugger shell.  step/go/next will execute the instruction as normal.  %pc++ will skip over the instruction.
2019-03-18 17:06:14 -04:00
Kelvin Sherlock
7b9da08d72 debug shell - print newline after control-D 2019-03-18 17:03:04 -04:00
Kelvin Sherlock
027689aea5 set page protection for temporary breakpoints. 2019-03-13 20:15:17 -04:00
Kelvin Sherlock
e07f0a99e7 linux headless build, default the gui debugger to off 2019-03-13 20:14:04 -04:00
Kelvin Sherlock
2554364910 add SIGINFO / SIGUSR1 signal to headless driver.
On *BSD and MacOS X, typing ^T in the terminal sends a SIGINFO which will dump the text screen to stdout.
On Linux (as well as *BSD, etc) `kill -SIGUSR1 pid` will do the same.
2019-03-12 20:30:21 -04:00
Kelvin Sherlock
0e5f941cd5 debugger - add n (next) command
similar to s/step but skips OVER jsr/jsl commands.
implemented via a new temporary breakpoint list.
2019-03-12 18:57:59 -04:00
Kelvin Sherlock
dd3a00a734 bug 2019-03-08 01:30:33 -05:00
Kelvin Sherlock
244659b0b1 win32 - prototype for low-level event handler. 2019-03-08 01:25:28 -05:00
Kelvin Sherlock
c5c0a228ab Add Low-Level hook for Windows keyboard events
windows, alt, and control keys are handled separately, before windows can get a chance to act on them. This makes win usable as an option key and prevents things like alt-esc from minimizing the window.
Some combos (alt-control-delete, windows-L, etc) cannot be blocked.
2019-03-08 01:13:30 -05:00
Kelvin Sherlock
3e6f97c3ea Merge branch 'master' of https://github.com/ksherlock/gsplus 2019-03-08 00:54:12 -05:00
Kelvin Sherlock
a0e92cd1ff Merge branch 'mmu' 2019-03-08 00:52:48 -05:00
Kelvin Sherlock
731d5c3a5b GCC's documentation states that __LP64__ is defined if sizeof(void *) == 8 and sizeof(int) == 4. Well, under mingw64 that doesn't seem to be true. And it causes lots of warnings.
Anyhow, as of c99, stdint.h defines a type specifically for casting pointers to integers. It also defines fixed size types so no need to guess or sniff compilers.
2019-03-08 00:42:25 -05:00
Kelvin Sherlock
6ccf74f60d merge other stuff 2019-03-08 00:30:19 -05:00
Kelvin Sherlock
1a64d4c979 temporary breakpoints, part 1. 2019-03-07 23:57:03 -05:00
Kelvin Sherlock
5a90ab355a clean up some buffer overflows 2019-03-07 23:56:33 -05:00
Kelvin Sherlock
1a27ca5435 wip 2019-03-07 23:56:15 -05:00
Kelvin Sherlock
818b60e734 win32 - cleanup warning about int/ptr cast. 2019-03-07 23:35:36 -05:00
Kelvin Sherlock
5e79d2918a static link flag (for easier win32 distribution) 2019-03-07 23:12:52 -05:00
Kelvin Sherlock
f863c4cfa0 quit if the HALT_WANTOQUIT is set (ie, win32 closing the window) 2019-03-05 21:53:28 -05:00
Kelvin Sherlock
76918b362d missing include 2019-03-04 22:18:27 -05:00
Kelvin Sherlock
094f93953e prefer _WIN32 over WIN32. 2019-02-23 17:34:14 -05:00
Kelvin Sherlock
4dbad2493b missing line... 2019-02-23 17:33:56 -05:00
Kelvin Sherlock
67b187e70b prefer _WIN32 over WIN32. 2019-02-23 17:33:38 -05:00
Kelvin Sherlock
69bc724ae8 2 controls Ds needed to exit. 2019-02-23 17:32:00 -05:00
Kelvin Sherlock
52d2c5f509 win32 get_resource_path 2019-02-23 17:31:31 -05:00
ksherlock
97e6f17a31
fixup _WIN32/__CYGWIN__/WIN_SDL #defines 2019-02-21 13:56:57 -05:00
ksherlock
88d3cb9dc7
remove CYGWIN/WIN_SDL defines. 2019-02-21 13:45:35 -05:00
Kelvin Sherlock
b2d6adce69 win32 libraries needed whether GDI or SDL. 2019-02-21 00:34:26 -05:00
Kelvin Sherlock
d12ce862fc win32 sdl build needs scc_windriver. 2019-02-21 00:08:52 -05:00
Kelvin Sherlock
56528ab928 apparently, -DWIN_SOUND was to workaround cygwin not defining _WIN32. But we explicitely -D_WIN32. SMH.
Also, re-order a couple #if trees so SDL takes precedence over WIN32, etc.
2019-02-20 23:47:42 -05:00
ksherlock
adeb2006f7
__USE_W32_SOCKETS moved to parent CMakeLists.txt 2019-02-20 13:48:39 -05:00
ksherlock
516d0e1439
-D__USE_W32_SOCKETS 2019-02-20 13:28:40 -05:00
Kelvin Sherlock
bef27e165e defer to CMake's optimization level. set to release by default. 2019-02-20 00:09:53 -05:00
Kelvin Sherlock
82e976d8e2 add back missing header. 2019-02-20 00:09:25 -05:00
Kelvin Sherlock
3ce34e0e27 lookup addresses for abslong and pc. 2019-02-20 00:09:05 -05:00
Kelvin Sherlock
be9724acfc minor tweaks for nifty list format. 2019-02-20 00:08:21 -05:00
Kelvin Sherlock
367d337674 2 unhandled ^Cs will abort 2019-02-20 00:07:59 -05:00
Kelvin Sherlock
6dd598be0c disassemble prodos mli calls. 2019-02-19 22:18:22 -05:00
Kelvin Sherlock
62dcf4f9d2 clean up socket stuff a little bit to compile better with msys2 2019-02-19 21:57:52 -05:00
Kelvin Sherlock
9f3c0feb39 load tools and gs/os calls from NList.Data 2019-02-19 21:49:35 -05:00
Kelvin Sherlock
58351d1db7 win32 missing strndup 2019-02-19 19:48:39 -05:00
Kelvin Sherlock
22e488df30 GCC's documentation states that __LP64__ is defined if sizeof(void *) == 8 and sizeof(int) == 4. Well, under mingw64 that doesn't seem to be true. And it causes lots of warnings.
Anyhow, as of c99, stdint.h defines a type specifically for casting pointers to integers. It also defines fixed size types so no need to guess or sniff compilers.
2019-02-18 12:38:15 -05:00
ksherlock
b9e36df2bb
mingw/win32 lacks strndup. 2019-02-18 11:24:08 -05:00
ksherlock
8584df91f5
win32 compiler fixes. 2019-02-18 11:08:57 -05:00
ksherlock
0e9cf9879b
use uintptr_t to cast ptr to int. 2019-02-18 10:56:43 -05:00
Kelvin Sherlock
fed51ab444 HISTORY_NO_DUP_FLAG currently missing from mingw wincon.h 2019-02-17 23:42:51 -05:00
Kelvin Sherlock
31ab8d4c6c win32 typo. 2019-02-17 23:34:10 -05:00
Kelvin Sherlock
e9e9fcfd59 host mli - opening/closing a directory would close fd 0 (aka stdin). 2019-02-17 22:26:52 -05:00
Kelvin Sherlock
682dc0c562 host mli - opening/closing a directory would close fd 0 (aka stdin). 2019-02-17 22:23:22 -05:00
Kelvin Sherlock
b6406159bd unix host mli bug fixes
1. file/directory  storage types were reversed
2. month was off-by-one.
2019-02-17 18:47:32 -05:00
Kelvin Sherlock
78591a37d0 unix host mli bug fixes
1. file/directory  storage types were reversed
2. month was off-by-one.
2019-02-17 18:46:19 -05:00
Kelvin Sherlock
216d1f1b35 push 24 mmu check was only checking 2 bytes. :/ 2019-02-17 16:40:34 -05:00
Kelvin Sherlock
4e956a4e06 simplify mp check logic. 2019-02-17 14:37:51 -05:00
Kelvin Sherlock
86285cc43d replace hard coded ADB keycode with nice enums.
There are also a couple fixes in the SDL keymap (home key, {, }, keypad numbers)

xdriver isn't updated because I don't care about x.
win32 driver isn't updated pending other win32 keymap patch.
2019-02-17 14:22:38 -05:00
Kelvin Sherlock
3c9a004a9e store fields in separate array, not as part of record. 2019-02-16 23:56:27 -05:00
Kelvin Sherlock
9589abfda7 debugger - add toolcall and GS/OS call recognition to the disassembler. 2019-02-16 17:29:39 -05:00
Kelvin Sherlock
a65833d6d8 register assignment - assign from other registers (eg, %a=%x) 2019-02-16 17:27:56 -05:00
Kelvin Sherlock
a0976f82a8 ubuntu. 2019-02-14 22:43:39 -05:00
Kelvin Sherlock
0956f154fd compile with old versions of re2c (*cough* ubuntu *cough*) 2019-02-14 22:24:42 -05:00
Kelvin Sherlock
44acfd5434 Debugger: %pc++, %s++, %s-- 2019-02-14 21:54:23 -05:00
Kelvin Sherlock
5cb4f63993 Debugger - GSBug.Templates support.
address\temp TemplateName to print structured memory.

Also, registers now need a % prefix so as not to interfere with other commands.
2019-02-14 21:37:03 -05:00
Kelvin Sherlock
2f05a766b0 fix GNU readline bug. linking libhistory is not necessary. In fact, it causes a SIGSEGV. 2019-02-11 23:09:59 -05:00
Kelvin Sherlock
14e1fe18f8 move icon files around. 2019-02-11 20:15:30 -05:00
Kelvin Sherlock
4a0c190ce3 win32 readline support, maybe. 2019-02-11 18:11:45 -05:00
Kelvin Sherlock
0021956044 bug fixes. 2019-02-10 22:45:42 -05:00
Kelvin Sherlock
f9a86eed8a auto-select readline library by default. 2019-02-10 22:39:23 -05:00
Kelvin Sherlock
817792f94d ubuntu, debian, etc, have outdated version of re2c. imagine that. 2019-02-10 22:21:06 -05:00
Kelvin Sherlock
25caf2dbad add ;s stack command. 2019-02-10 21:42:15 -05:00
Kelvin Sherlock
fdcb504d9c use simpler signal interface. 2019-02-10 21:40:47 -05:00
Kelvin Sherlock
66fbd7f677 move readline code to separate file. 2019-02-10 21:40:22 -05:00
Kelvin Sherlock
61858c4d62 Add Low-Level hook for Windows keyboard events
windows, alt, and control keys are handled separately, before windows can get a chance to act on them. This makes win usable as an option key and prevents things like alt-esc from minimizing the window.
Some combos (alt-control-delete, windows-L, etc) cannot be blocked.
2019-02-08 20:59:15 -05:00
Kelvin Sherlock
a76d26a0ad drop all keys when window no longer active (not jut loss of focus). Also drop all pending keys that haven't been sent to the ADB yet. 2019-02-07 23:09:53 -05:00