generated from pypa/sampleproject
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hi Zakaria1193,
in
gdb2dict/src/gdb2dict/gdb_value_to_dict.py
Line 132 in 5b3d336
| for j in range(field_type.range()[1]): |
the use of the range operator is incorrect, yielding to len(array)-1 length arrays in the dict.
e.g consider
- "field_value" to be an gdb array of length 10 of int16_t-s
- then "field_type" will be <gdb.Type code=TYPE_CODE_ARRAY name=int16_t [10]>
- then "field_type.range()" will be (0,9)
- consequently "for j in range(field_type.range()[1]):" will iterate through [0..9) or [0..8]inclusive leaving element at index "9" out of the "append_gdb_value_to_list"
the correct range is:
for j in range(field_type.range()[1]+1):
zakaria1193
Metadata
Metadata
Assignees
Labels
No labels