mirror of
https://github.com/simh/simh.git
synced 2026-02-27 09:09:46 +00:00
SCP: Reword ambiguous REGister message to more easily locate source
Add source and line reference to REG macros.
This commit is contained in:
4
scp.c
4
scp.c
@@ -16252,7 +16252,9 @@ for (i = 0; (dptr = devices[i]) != NULL; i++) {
|
||||
}
|
||||
if (arptr != NULL) {
|
||||
Bad = TRUE;
|
||||
Mprintf (f, "\tThe %s DEVICE %d REGister entry has an identical name\n", dptr->name, amb_entry);
|
||||
if (rptr->source_file != NULL)
|
||||
Mprintf (f, "\tIn %s at line %d:\n", rptr->source_file, rptr->source_line);
|
||||
Mprintf (f, "\tThe %s DEVICE's REGister entry #%d has an identical name\n", dptr->name, amb_entry + 1);
|
||||
Mprintf (f, "\ttherefore EXAMINE and SAVE operations will reference %u byte%s\n", bytes, (bytes != 1) ? "s" : "");
|
||||
Mprintf (f, "\tand DEPOSIT and RESTORE operations will affect %u byte%s of memory\n", bytes, (bytes != 1) ? "s" : "");
|
||||
Mprintf (f, "\tinconsistently.\n");
|
||||
|
||||
@@ -705,6 +705,8 @@ struct REG {
|
||||
size_t obj_size; /* sizeof(*loc) */
|
||||
size_t size; /* sizeof(**loc) or sizeof(*loc) if depth == 1 */
|
||||
const char *macro; /* Initializer Macro Name */
|
||||
const char *source_file; /* source file used macro */
|
||||
int source_line; /* source line used macro */
|
||||
/* NOTE: Flags and maxval MUST always be last since they are initialized outside of macro definitions */
|
||||
uint32 flags; /* flags */
|
||||
t_value maxval; /* maximum value */
|
||||
@@ -1019,7 +1021,7 @@ struct MEMFILE {
|
||||
|
||||
/* Internal use ONLY (see below) Generic Register declaration for all fields */
|
||||
#define _RegCheck(nm,loc,rdx,wd,off,dep,desc,flds,qptr,siz,elesiz,macro) \
|
||||
nm, (loc), (rdx), (wd), (off), (dep), (desc), (flds), (qptr), (siz), sizeof(*(loc)), (elesiz), #macro
|
||||
nm, (loc), (rdx), (wd), (off), (dep), (desc), (flds), (qptr), (siz), sizeof(*(loc)), (elesiz), #macro, __FILE__, __LINE__
|
||||
|
||||
/* Generic Register declaration for all fields.
|
||||
If the register structure is extended, this macro will be retained and a
|
||||
|
||||
Reference in New Issue
Block a user