diff --git a/tools/gdb/nuttxgdb/utils.py b/tools/gdb/nuttxgdb/utils.py index 3a97a23330..144282d3a3 100644 --- a/tools/gdb/nuttxgdb/utils.py +++ b/tools/gdb/nuttxgdb/utils.py @@ -339,6 +339,12 @@ def nitems(array): return array_size +def sizeof(t: Union[str, gdb.Type]): + if type(t) is str: + t = gdb.lookup_type(t) + + return t.sizeof + # Machine Specific Helper Functions