Skip to content

Commit d5ea306

Browse files
committed
ls_parse: improve debugging by printing a trace
In case parsing a linker script fails, generate a trace, so that debugging is possible. This way, unknown blocks in linker scripts can be spotted more easily.
1 parent 17bc726 commit d5ea306

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/ls_parse.py

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import subprocess
1616
import sys
1717
import textwrap
18+
import traceback
1819

1920

2021
def epilog():
@@ -282,6 +283,7 @@ def close_brace_fun(state, _, buf):
282283
state["UNKNOWN"] = False
283284
else:
284285
error("Not in block\n%s", buf)
286+
traceback.print_stack()
285287
exit(1)
286288

287289

0 commit comments

Comments
 (0)