Commit graph

682 commits

Author SHA1 Message Date
Mark Pizzolato
f602b132dd SCP: Make output of SHOW commands also appear in debug output while debugging 2015-08-17 11:47:19 -07:00
Mark Pizzolato
bd2f592918 Revert "SCP: Remove ASCII source code character set dependency"
This reverts commit 7c7b44e409.

The prior commit didn't work for static initializers.  There are other ASCII dependencies in simh.  They should all be solved together or not at all.
2015-08-07 00:54:23 -07:00
Mark Pizzolato
7c7b44e409 SCP: Remove ASCII source code character set dependency
Provide reasonable behavior on any platform which doesn't use ASCII as a character set.  Method suggested by Dave G4UGM.
2015-08-03 12:35:08 -07:00
Mark Pizzolato
dee7135cfb SCP: More immediate detection of changed stop_cpu during event processing. 2015-04-25 03:49:48 -07:00
Mark Pizzolato
71b99c6fa1 SCP: Add -D switch to RESTORE command to suppress detach/attach activities during a restore. Fix #197 2015-04-19 05:28:28 -07:00
Mark Pizzolato
d75ec66607 FRONTPANEL: Added support for a register array to be returned as part of a register set 2015-04-17 14:46:06 -07:00
Mark Pizzolato
04142da99c SCP: Added simulator version checking while performing a RESTORE operation.
Added -Q switch to suppress version check messages
Added -D switch to disable the detach_all at the beginning of a restore and any actual attach operations during the restore
2015-04-17 14:43:52 -07:00
Mark Pizzolato
674b8e0ced SCP: Fix incorrect version check in RESTORE command and add logic to report git version differences (#197), Fix #206 2015-04-11 11:33:52 -07:00
Mark Pizzolato
8ad7dc2b93 SCP: Fix error returned by detach_unit to SCPE_NOTATT when an attachable unit isn't currently attached 2015-04-04 16:49:18 -07:00
Mark Pizzolato
325e369bfd FRONTPANEL: Added mount and dismount commands for removable media 2015-04-04 16:37:43 -07:00
Mark Pizzolato
9d47891971 FRONTPANEL: Added logic to pass simulator startup messages in panel error text if the connection to the simulator shuts down while it is starting. 2015-04-04 09:18:02 -07:00
Mark Pizzolato
1548777278 SCP: Fix dangling perror details 2015-04-03 20:11:21 -07:00
Mark Pizzolato
41978eca80 All: Convert from C runtime library perror() to sim_perror so that all messages will arrive in the same place(s). 2015-04-03 19:56:37 -07:00
Mark Pizzolato
ef6528bf32 SCP: Added automatic saving of console WRU, DEL, BRK and PCHAR console variables and provided a way for a simulator to declare that is doesn't have a console port so automatic WRU detection can be performed. 2015-04-03 16:05:01 -07:00
Mark Pizzolato
9cb9018665 SCP: Extend SHOW processing for default (unspecified) device to also handle global show modifiers, thus making SHOW RADIX display the radix for the default device (usually CPU). 2015-04-03 04:42:35 -07:00
Scott Bailey
38eaee77d9 SCP: future-proof save/restore logic
Distinguish explicitly between save_vercur, the version that is
	used by sim_save(), and save_ver40, the latest defined version
	that is supported by sim_rest().

	The intent is to ensure that a change to save_vercur does not
	cause an unedited sim_rest() to think it knows how to read that
	new format if a human forgets to add the appropriate logic. This
	also removes some possible ambiguity in sim_rest() about what
	elements are present in what format versions.

	Finally, added a comment reminding authors to update save_vercur
	in conjunction with any changes to sim_save().
2015-04-01 11:02:19 -07:00
Mark Pizzolato
d84883a4ce SCP: Add a special pseudo name "$" which is the value returned from the most recent EXAMINE command which can be used for register (or memory) indirect EXAMINE commands.
To examine the instruction which the PC points at:
   sim> EXAMINE PC
   sim> EXAMINE -m $
2015-04-01 10:29:14 -07:00
Mark Pizzolato
d75c072235 VAX, VAX780, VAX8600, MicroVAX1, MicroVAX2: Stabilize SAVE/RESTORE capabilities to allow restore of older version VAX and VAX780 save images and to properly allow simulator restores of processor model variations as discussed in #197 points 1 & 2 2015-03-30 13:52:48 -07:00
Mark Pizzolato
1d3ac294c4 SCP: Make sure that dynamically allocated print buffers have room for NUL character string terminator 2015-03-30 10:15:33 -07:00
Mark Pizzolato
137f825811 SCP: Removed unused conditional compile referenced to HAS_vsprintf_void and HAS_vsnprintf_void. Avoid emitting redundant \r characters when writing to stdout while a simulator is running. Suggestions from Bob Supnik. 2015-03-29 16:21:27 -07:00
Mark Pizzolato
9eb8439658 SCP: Fix spelling of SET VERBOSE command alias for SET VERIFY. 2015-02-24 22:06:00 -08:00
Mark Pizzolato
059a54152a FRONTPANEL: General Enhancements
- added verification of the existence of simulator registers which they are referenced.
- sim_frontpanel API version checking to make sure that the invoking API and the simulator support the same capabilities.
- added the ability for a simulator to reference data in simh register data which is not in the set of registers defined in the default simh device (usually the CPU).
- added a simulator time reference relating to a set of register data which is provided.
- added example automatically creating a console terminal port from a simulator startup (front panel or not).
2015-02-24 19:49:09 -08:00
Mark Pizzolato
e768629009 SCP: Added the capability for EXAMINE command output to be written directly to a socket. 2015-02-21 12:40:36 -08:00
Mark Pizzolato
2c2ffe39bf Remote Console: Restructured so that commands are not executed within the sim_instr() routine.
This approach removes the burden from any simulator code to perform instruction execution postlude before calling sim_process_event and prelude activites when sim_process_event returns.

Remote Console commands are now executed from the same simulator context as if entered from the initial sim> prompt.
2015-02-15 11:00:01 -08:00
Mark Pizzolato
ef9d1adce1 PDP10, PDP11, VAX: const cleanup 2015-02-13 06:18:24 -08:00
Mark Pizzolato
5b4e9d5891 SCP: Corrected error message text 2015-02-11 07:03:10 -08:00
Mark Pizzolato
4ee599b97e SCP: Added a SHOW VIDEO command for simulators which include video devices
This displays the capabilities of the available SDL environment on the running platform.
2015-02-05 09:22:36 -08:00
Mark Pizzolato
e0108b52a2 SCP: Compiler suggested cleanup and spelling fix 2015-01-14 15:09:54 -08:00
Mark Pizzolato
6f1e8377c9 SCP: Added -T switch to the EXPECT, SEND and STEP commands to specify that the units of delay/stepping are in microseconds rather than instructions. 2015-01-09 04:52:21 -08:00
Mark Pizzolato
9f9c983688 SCP: Fix debug setup info displayed by SHOW SEND and SHOW EXPECT 2015-01-06 12:44:24 -08:00
Mark Pizzolato
470b9b586a SCP: Fix EXPECT matching logic for non-regex strings to have enough room to buffer all of potential match data plus a NUL byte. 2015-01-06 11:25:55 -08:00
Mark Pizzolato
fb7b53cd07 SCP: Add info displayed in SHOW EXPECT and SHOW SEND to advise how SEND & EXPECT debugging is enabled 2015-01-06 08:27:03 -08:00
Mark Pizzolato
7a2600d6e1 SCP: EXPECT debug fix to avoid invalid memory reference if a expect structure doesn have a device pointer. Corrected comments. From Mark Emmer. 2015-01-06 06:31:05 -08:00
Mark Pizzolato
bc8ee69aba SCP: better parsing support for command files which contain UTF-8 data in SEND/EXPECT strings 2015-01-05 16:53:54 -08:00
Mark Pizzolato
aae9e55a39 SCP: More allow command files to contain UTF-8 data.
- Provide a sim_islower(), sim_isalpha(), sim_isprinit(), sim_isdigit(), sim_isgraph(), sim_isalnum()  which make sure that the character being examined as an unsigned char.
2015-01-05 14:08:03 -08:00
Mark Pizzolato
256bbdddc9 SCP: Allow command files to contain UTF-8 data.
- Ignore a UTF_BOM sequence at the beginning of command files.
- Provide a sim_isspace() which makes sure that isspace only considers the character being examined as an unsigned char.
2015-01-04 06:59:56 -08:00
Mark Pizzolato
99a7e65876 SCP: Only report DO file context when run_cmd completes if the completion status is not a simulator specific error code and not due to a STEP, EXPECT or STOP completion.
The commands which operate through run_cmd (GO, STEP, CONTINUE, BOOT, RUN) will all exit with a status which is NOT SCPE_OK.  Most of the exit status values will be 100% normal and not indicative of a true error, so producing error message context is not necessary or desired.
2014-12-31 15:04:52 -08:00
Mark Pizzolato
6ec6b6ab1f SCP: Provide an API to display alternate error message text while returning SCPE status. 2014-12-31 14:32:10 -08:00
Mark Pizzolato
de9fc84fd4 SCP: added flexibility to search specifier parsing to fallback to register value format if the VM supplied parse_sym() doesn't handle the value provided. 2014-12-29 14:03:43 -08:00
Mark Pizzolato
9e1e32584b SCP: Avoid redundant log and debug output 2014-12-29 03:41:32 -08:00
Mark Pizzolato
1d530cc48d SCP: Enhanced ASSERT/IF to support expressions which test memory contents. Also enhanced EXAMINE's search capabilities to be able to match multi-byte patterns for VMs which are byte addressable. 2014-12-25 06:19:59 -08:00
Mark Pizzolato
47a0576f09 SCP: Revert prior commit since it was the wrong approach 2014-12-25 06:15:52 -08:00
Mark Pizzolato
0a96584fdf SCP: Added special EXAMINE reference variable "$" usable in conditional expression for the ASSERT and IF commands 2014-12-23 03:09:40 -08:00
Mark Pizzolato
88d644258e SCP: Allow the VM to print simulator stop message information in lieu of, or in addition to, the default message.
The current implementation of "run_cmd" in scp.c calls "fprint_stopped_gen" (via "fprint_stopped") to print the message associated with the "sim_instr" return status.  Messages associated with VM stops must be provided to the SCP via the "sim_stop_messages" array.

"fprint_stopped_gen" prints the status message in a rigid format: the message string, a comma, the program counter register name, a colon, the current PC value, and the instruction at that address in symbolic format.

For example:

       HALT instruction, P: 24713 (LDA 1)

Only the message string is under the control of the VM.  If additional information is needed, it can only be added before the first comma.

The HP2100 simulator does this for halt instructions, which contain device select code and flag hold/clear bit fields that, in practice, are used to communicate to the operator the significance of the particular halt encountered, rather than to affect the device interface:

       HALT instruction 102077, P: 24713 (LDA 1)

To implement this, the simulator must define the message as a variable and then copy the formatted octal value into the buffer at the appropriate location before returning from "sim_instr".

However, if the VM wants to display a different register value, e.g.:

       Self test #13 complete, STAT: 000020

...this cannot be done without also displaying the program counter, which may be irrelevant for the given stop condition.
2014-12-18 11:16:27 -08:00
Mark Pizzolato
42e7d48c82 SCP: Fixes Cannot show radix, etc. for a device that has no modifiers and SET and SHOW responses for invalid entry are inconsistent. from Dave Bryan
001. PROBLEM:  Cannot show radix, etc. for a device that has no modifiers.

     OBSERVATION:  The default data radix for a device may be set with the SET
     <dev> OCT|DEC|HEX command.  However, if the device does not have a modifier
     table, SHOW <dev> RADIX is rejected with "No settable parameters".

     The same problem occurs for SHOW <dev> DEBUG and SHOW <dev> NAMES.  For a
     device that provides debug printouts, SHOW <dev> MOD will list "DEBUG,
     NODEBUG" among the modifiers, and the SHOW <dev> DEBUG command will display
     the current debug status.  However, if the device does not contain a
     modifier table, SHOW <dev> MOD and SHOW <dev> DEBUG will report "No
     settable parameters", even though SET <dev> DEBUG is accepted and works as
     expected.  For such a device, SHOW MOD will show "DEBUG, NODEBUG" as
     acceptable modifiers.

002. PROBLEM:  SET and SHOW responses for invalid entry are inconsistent.

     OBSERVATION:  Entering SET <dev> <mod> where <mod> is not defined in the
     device's modifier table displays "Non-existent parameter."  Entering SHOW
     with the same parameters displays "Invalid argument."

     Similarly, entering SET <dev> DEBUG for a device that does not have
     debugging capability displays "Command not allowed."  Entering SHOW with
     the same parameters displays nothing.

     In both cases, the messages displayed should be the same for the same
     error.
2014-12-17 21:00:38 -08:00
Mark Pizzolato
e87d40c600 SCP: Add a -Q option to ATTACH -R and ATTACH -N to suppress success status messages. From Dave Bryan 2014-12-17 20:21:17 -08:00
Mark Pizzolato
95740f1f2d SCP: Add a "-N" (new file) option to the SET LOG and SET DEBUG commands. From Dave Bryan. 2014-12-17 20:07:28 -08:00
Mark Pizzolato
03800ae725 SCP: Stop calls VM-provided address printer for PC without REG_VMAD from Dave Bryan
OBSERVATION:  For a simulator stop, sim_vm_fprint_addr (if defined) is
     called to print the value of the program counter, regardless of whether or
     not the register was defined with REG_VMAD.  However, displaying the PC
     value with "examine" calls sim_vm_fprint_addr only if the REG_VMAD flag is
     present.  The displayed value of the PC should be the same in both cases.
2014-12-16 09:02:57 -08:00
Mark Pizzolato
e35081db1f SCP: Avoid duplicate output when run_cmd completes just as is done in sim_printf() 2014-12-16 07:56:21 -08:00
Mark Pizzolato
4f41c53674 SCP: Fixed potential out of bounds array reference while expanding command arguments.
Avoid race condition while producing debug header output from multiple threads.
2014-12-14 13:21:32 -08:00