Browse Source

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>
pull/92244/head
Keith Packard 2 months ago committed by Benjamin Cabé
parent
commit
209c723b3f
  1. 4
      scripts/logging/dictionary/database_gen.py

4
scripts/logging/dictionary/database_gen.py

@ -206,6 +206,10 @@ def parse_log_const_symbols(database, log_const_area, log_const_symbols, string_ @@ -206,6 +206,10 @@ def parse_log_const_symbols(database, log_const_area, log_const_symbols, string_
# Not enough data to unpack
continue
if sym.entry['st_size'] == 0:
# Empty entry
continue
str_ptr, level = struct.unpack(formatter, datum)
# Offset to rodata section for string

Loading…
Cancel
Save