summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-12-11 17:47:55 +0000
committerMark Brown <broonie@kernel.org>2020-12-11 17:47:55 +0000
commit031616c434db05ce766f76c62865f55698e0924f (patch)
tree7f29aa1ff3e7b51a8058cd570fb785c6e769b245 /scripts/gdb/linux/utils.py
parent064841ccfc49b2315dc0b797239862d3a343aa07 (diff)
parent85a7555575a0e48f9b73db310d0d762a08a46d63 (diff)
Merge remote-tracking branch 'asoc/for-5.10' into asoc-linus
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