Skip to content

Commit f5a8fa7

Browse files
keith-packardnashif
authored andcommitted
scripts/logging: Skip log symbols of zero size
I'm not sure why this was necessary, but analyzing RX executables was crashing with a divide by zero error on a symbol which appeared to be duplicated in this list. Signed-off-by: Keith Packard <[email protected]>
1 parent 9b68fbe commit f5a8fa7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/logging/dictionary/database_gen.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ def parse_log_const_symbols(database, log_const_area, log_const_symbols, string_
213213
# Not enough data to unpack
214214
continue
215215

216+
if sym.entry['st_size'] == 0:
217+
# Empty entry
218+
continue
219+
216220
str_ptr, level = struct.unpack(formatter, datum)
217221

218222
# Offset to rodata section for string

0 commit comments

Comments
 (0)