Skip to content

Commit b9151b0

Browse files
committed
Improved some brkdebug error messages
1 parent 981e495 commit b9151b0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Version 7.0.0
55
- Cleaned up the Spin parser to enable direct access to struct/obj members
66
- Fixed long relative branches (tjz, djnz, etc.)
77
- Fixed incorrect handling of simple for loops with unsigned variables
8+
- Improved some debug error messages
89
- Only use the stack for variables whose address is actually taken (thanks to Ada for this!)
910

1011
Version 6.9.10

backends/brkdebug.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44
// See the debugger code for more insight.
55
//
6-
// Copyright 2021-2023 Ada Gottensträter and Total Spectrum Software Inc.
6+
// Copyright 2021-2024 Ada Gottensträter and Total Spectrum Software Inc.
77
// see the file COPYING for conditions of redistribution
88
//
99

@@ -325,8 +325,12 @@ int AsmDebug_CodeGen(AST *ast, BackendDebugEval evalFunc, void *evalArg) {
325325
}
326326
needcomma = true;
327327
} break;
328+
case AST_IDENTIFIER:
329+
case AST_LOCAL_IDENTIFIER:
330+
ERROR(item, "Raw identifier found in DEBUG; did you forget sdec() or some similar wrapper?");
331+
break;
328332
default:
329-
ERROR(item,"Unhandled node kind %d in DEBUG",item->kind);
333+
ERROR(item,"Unhandled item in DEBUG (%d)",item->kind);
330334
break;
331335
}
332336
}

0 commit comments

Comments
 (0)