summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2021-02-22 21:21:03 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-02-22 21:21:03 -0800
commit415e915fdfc775ad0c6675fde1008f6f43dd6251 (patch)
tree429851187c0e85daa78f5d2bb6853959a1f5545b /scripts/gdb/linux/utils.py
parente64123949e6c9581c97fc14594f1cf34bf1d87a8 (diff)
parentf40ddce88593482919761f74910f42f4b84c004b (diff)
Merge tag 'v5.11' into next
Merge with mainline to get latest APIs and device tree bindings.
Diffstat (limited to 'scripts/gdb/linux/utils.py')
-rw-r--r--scripts/gdb/linux/utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/gdb/linux/utils.py b/scripts/gdb/linux/utils.py
index ea94221dbd39..ff7c1799d588 100644
--- a/scripts/gdb/linux/utils.py
+++ b/scripts/gdb/linux/utils.py
@@ -123,6 +123,13 @@ def read_u64(buffer, offset):
return read_u32(buffer, offset + 4) + (read_u32(buffer, offset) << 32)
+def read_ulong(buffer, offset):
+ if get_long_type().sizeof == 8:
+ return read_u64(buffer, offset)
+ else:
+ return read_u32(buffer, offset)
+
+
target_arch = None