Skip to content

Commit f1ba057

Browse files
keith-packardduynguyenxa
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 <keithp@keithp.com>
1 parent 2a6249f commit f1ba057

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
@@ -206,6 +206,10 @@ def parse_log_const_symbols(database, log_const_area, log_const_symbols, string_
206206
# Not enough data to unpack
207207
continue
208208

209+
if sym.entry['st_size'] == 0:
210+
# Empty entry
211+
continue
212+
209213
str_ptr, level = struct.unpack(formatter, datum)
210214

211215
# Offset to rodata section for string

0 commit comments

Comments
 (0)