scripts: print the file name when decode syscall

the script shows an incorrect file name, I check the wrong file first, then
I find the script did not print the current reading file name.

Fix this to prevent others from wasting their time on this.

The new error message:

```
[1/179] Generating syscalls.json, struct_tags.json
Error decoding zmk/.../altera_msgdma.c (included in zephyr/.../ethernet.c)
```

Signed-off-by: Sa Sasu <i@sasa.su>
This commit is contained in:
Sa Sasu 2024-08-12 14:09:39 +08:00 committed by Mahesh Mahadevan
parent fa29a07526
commit 5dc5fa5ee2

View File

@ -119,7 +119,7 @@ def analyze_headers(include_dir, scan_dir, file_list):
try:
contents = fp.read()
except Exception:
sys.stderr.write("Error decoding %s\n" % path)
sys.stderr.write("Error decoding %s (included in %s)\n" % (one_file, path))
raise
fn = os.path.basename(one_file)