(Note: Reducing compiler warnings across all, but primarily LP64
platforms, is a long term objective.)
Reduce compiler warnings on LP64 platforms (macOS, Windows) and 32-bit
builds (Win32). Prefer 'size_t' for pointer arithmetic, array indexing
and extents; 'int' hasn't been used for these purposes for many years
and across many ANSI standards. N.B. that conversions from int or int32
to size_t cause the compiler to zero-extend the value, which is
inefficient.
Refactor printf() format modifiers into sim_printf_fmts.h. Add the
SIZE_T_FMT modifier for better portability, especially on LP64 platforms
where size_t is unsigned long and sizeof(size_t) > sizeof(int).
3B2: Fix known size_t printf() format.
The STEP command was inadvertently allowed to be parsed in non-master
mode connections, but it didn't actually work. It has now been removed
from the generic remote console command table.
This was illuminated as of the discussion in #854
This allowed user entered S to match the SAMPLEOUT command instead
of STEP. That then identified a bug in the intended socket output
processing to attempt to be written to the undefined debug file.
As discussed in #854
Simulators running directly in a Windows console session, that don't
have the console traffic redirected to a telnet session via
SET CONSOLE TELNET=nnn
now behave similarly to the default behavior experienced on
non-windows hosts where the terminal session usually defaults to
wrapping at EOL. Users who want more specific control of this behavior
can run their console via a telnet session with a terminal emulator that
lets them explicitly set these features in the emulator.
This change reintroduces this behavior which got lost when windows
support for ANSI (VT100) escape sequences were added to the console
sessions.
There are no extended arguments while parsing SHOW CONSOLE commands.
SHOW CONSOLE is a special parsing case somewhat equivalent to of SHOW
DEVICE for a device display. No SHOW CONSOLE commands take value arguments.
Adopted from Dave Bryan's changes in V3.11
This change is not actually necessary on Linux, but a bug in Windows
Subsystem for Linux (WSL) doesn't honor tcsetattr() with ICANON disabled
and VMIN and VTIME set to 0 should return immediately when no input data
is available, but it doesn't. Setting the fd to non blocking produces
equivalent behavior.
The -F debug switch can now be used to avoid the repetitive message
summarization. This will trade off debug log file size vs CPU cost to
summarize the output.