247 Commits

Author SHA1 Message Date
Colin Snover
10d97ce379 SCI: Fix more unsafe C-string usage 2017-02-05 12:38:21 -06:00
Colin Snover
be14778b2b SCI: Ensure bytecode/BWT for "file" op is also printed
Learning the bytecode for file op is necessary when creating
workaround signatures, as the signature-finding mechanism does not
currently ignore line/file instructions.
2016-12-12 15:20:08 -06:00
Colin Snover
4814682d5f SCI: Improve disassembly output
1. pushi opcode now displays decimal value and selector value (if
   one exists) in-line
2. lofsa, lofss, and super opcodes now display resolved
   object/class names
3. Opcode arguments are visually aligned
2016-11-20 12:31:44 -06:00
Colin Snover
9380b54120 SCI: Add code-address breakpoints to debugger 2016-11-20 12:31:43 -06:00
Johannes Schickel
1c6112e121 SCI: Introduce accessors for SegmentObjTable entries.
This makes code not use _table directly whenever possible. An exception is the
save game code which is not easy to adapt due to design deficiencies.
2016-03-25 01:15:26 +01:00
Filippos Karapetis
cdbd7c8add SCI: Use uint32 instead of unsigned int 2016-03-01 01:12:58 +02:00
Johannes Schickel
daa8d57a86 ALL: Rename Debugger::DebugPrintf to Debugger::debugPrintf. 2014-05-27 02:04:07 +02:00
Johannes Schickel
8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Martin Kiewitz
07568931ce SCI: fix null pointer access in logKernelCall
method was/is used for debugging only
CID 1003612
2014-01-27 23:31:40 +01:00
Willem Jan Palenstijn
2d1fd3b554 ALL: Fix typo (existant->existent) 2013-02-23 22:07:32 +01:00
Willem Jan Palenstijn
e38d4f20e8 SCI: Fix dissect_script crash with invalid object types 2012-10-06 13:07:12 +02:00
Willem Jan Palenstijn
5f3f21e20e SCI: Fix some console output formatting 2012-10-06 13:07:12 +02:00
Filippos Karapetis
20b6770808 SCI: Change the program counter (PC) to be a 32-bit variable
This is needed for future support of large SCI3 scripts. The program
counter is isolated and does not interfere with other parts of the VM,
plus it does not get stored in saved games, so it's pretty straightforward
to convert
2012-06-23 21:45:26 +03:00
Filippos Karapetis
c075aafddb SCI: Add support for the debug opcode "file" in our script dissassembler
Also set the correct name for the debug opcode "line"
2012-06-23 21:45:22 +03:00
Filippos Karapetis
76f3f1b136 SCI: Fix warnings 2012-06-21 22:24:22 +03:00
Filippos Karapetis
065e83e44f SCI: Store script sizes in 32-bit integers
Since scripts can be larger than 64KB, and getBufSize() returns a 32-bit
integer, adapt variables that store script sizes accordingly
2012-06-18 12:20:07 +03:00
Filippos Karapetis
2b50824133 SCI: Add setter/getter methods to reg_t's
No functionality change has been made with this commit. This avoids
setting and getting the reg_t members directly, and is the basis of any
future work on large SCI3 scripts (larger than 64KB)
2012-06-18 05:24:06 +03:00
Tarek Soliman
a4798602d7 JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'

This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15 10:07:10 -06:00
Willem Jan Palenstijn
0192d2f2de SCI: Fix restarting SCI engine with different SCI version 2011-11-29 18:34:34 +01:00
Filippos Karapetis
381e92a576 SCI: Added handling of invalid jump offsets (e.g. QFG2, script 260) 2011-11-28 22:36:58 +02:00
Filippos Karapetis
7f675de855 SCI: Fixed compilation with VM_DEBUG_SEND defined 2011-09-22 04:18:11 +03:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
Willem Jan Palenstijn
4296ac6d15 SCI: Fix sign in disasm of relative jumps 2011-06-12 02:00:09 +02:00
md5
bd2bfe85c9 SCI: Don't include several debug tables when REDUCE_MEMORY_USAGE is defined 2011-05-13 16:12:52 +03:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
md5
4133945850 SCI: Renamed restAdjust to r_rest (like r_acc and r_prev) 2011-03-28 02:23:58 +03:00
md5
6487d05ddf SCI: Moved some debug functions from vm.cpp to scriptdebug.cpp 2011-03-27 01:52:23 +02:00
Willem Jan Palenstijn
6fe95780d3 SCI: Continue disasm until no jumps go past the current opcode
This should ensure disasm will disassemble an entire function, and
not stop at an intermediate ret opcode.
2011-03-12 23:46:32 +01:00
David Turner
a7f7b90aee SCI: Fixed possible use of uninitialized variable in SCI Script Debugger.
svn-id: r55487
2011-01-23 23:25:34 +00:00
Filippos Karapetis
169c6be32b SCI: Fixed a bug in the script disassembler
svn-id: r54463
2010-11-24 21:32:34 +00:00
Johannes Schickel
94d3d82f59 SCI: Slight formatting fix and use \t instead of a tab character in debugN.
svn-id: r54349
2010-11-18 21:45:31 +00:00
Lars Skovlund
c325d815d2 SCI: Fix debugger disassembly of property accesses in SCI3
svn-id: r54348
2010-11-18 21:41:13 +00:00
Filippos Karapetis
c36f072190 SCI: Updated dissectScript() to handle synonym blocks
svn-id: r54277
2010-11-17 08:10:36 +00:00
Filippos Karapetis
9d318497f7 SCI: Unified the functionality and parameters of the disasm and disasm_addr commands
svn-id: r54276
2010-11-17 08:05:11 +00:00
Filippos Karapetis
c2d9c1b06b SCI: Added the ability to display original script bytecode in the "disasm" console command
svn-id: r54275
2010-11-17 00:05:09 +00:00
Max Horn
ba3e826872 SCI: Remove any use of printf
svn-id: r54037
2010-11-02 09:49:47 +00:00
Martin Kiewitz
63c945f93a SCI: fix warning and remove duplicate code
svn-id: r51243
2010-07-24 11:59:40 +00:00
Martin Kiewitz
e000d28654 SCI: fix debugging code of parser, add 0xffe special group into debug support
svn-id: r50956
2010-07-17 12:06:31 +00:00
Max Horn
1d3a0f6dec SCI: Turn global object g_debugState into SciEngine member var
svn-id: r50836
2010-07-12 23:20:33 +00:00
Max Horn
30218a2c32 SCI: Make Script member vars private; add const qualifiers
Only three Script members remain public (for now)

svn-id: r50428
2010-06-28 11:22:20 +00:00
Filippos Karapetis
1faebccce2 Cleanup, remove unused/obsolete code
svn-id: r50403
2010-06-27 21:29:35 +00:00
Martin Kiewitz
4653153910 SCI: added new command "p" / "stepover" to execute one command, but skip send/calls processing. single-step is now "trace" (alias "s" and "t"), stepping till ret is "step_ret" (alias "pret"), removed unused kDebugSeek
svn-id: r50388
2010-06-27 19:58:32 +00:00
Max Horn
cfcbdf8656 SCI: Remove selector_name function, some cleanup
svn-id: r49966
2010-06-17 23:13:30 +00:00
Filippos Karapetis
93f33c7dab Resolved a FIXME with getSciLanguage(), by creating a separate setter. Also, some camelCase changes
svn-id: r49568
2010-06-10 11:18:10 +00:00
Filippos Karapetis
10aeb33a42 Merged restAdjust and restAdjustCur, as we don't save the restAdjust modifier inside saved games (rightfully so). Also, the segment manager is now reset inside the main loop, when the game is restarted, not in game_exit()
svn-id: r49533
2010-06-09 07:32:17 +00:00
Filippos Karapetis
2c950b321c Fixed regression from commit #49465 - there are in fact two restAdjust variables, the current and global one
svn-id: r49486
2010-06-07 15:14:58 +00:00
Filippos Karapetis
3c82b6578f Now that EngineState is not deleted when loading games, we can move some more state-related variables to it, and remove several FIXME's about non-const global variables. Also, the entries in the data stack are now deleted when loading (fixes a memory leak - thanks to digitall for this).
svn-id: r49465
2010-06-06 23:00:33 +00:00
Filippos Karapetis
c32e88fe0b Limit access to the _bufSize, _scriptSize and _heapSize members of the Script class
svn-id: r49327
2010-05-30 16:14:31 +00:00
Filippos Karapetis
67de5b1bd3 Mass renaming of selector-related functions, and removed some defines which were just cloaking functions with a different name
- GET_SEL32 -> readSelector
- GET_SEL32V -> readSelectorValue
- PUT_SEL32 -> writeSelector
- PUT_SEL32V -> writeSelectorValue
Also, changed some selector-related function names and variables to CamelCase

svn-id: r49317
2010-05-29 23:37:15 +00:00
Max Horn
0197e9f6a1 SCI: Making various object and script related things const
svn-id: r49246
2010-05-26 16:30:10 +00:00