summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-12-11 20:48:50 +0300
committerMark Brown <broonie@kernel.org>2020-12-11 20:48:50 +0300
commit58f7553fa424fd0fd74e8b796d50c66014cebebe (patch)
tree8aecb1d047b1df2abbfa1ef323d2a724a6a61c77 /scripts/gdb/linux/utils.py
parentdd91c555461261fed220ae29a508f508a0afeb43 (diff)
parent9326e4f1e5dd1a4410c429638d3c412b6fc17040 (diff)
downloadlinux-58f7553fa424fd0fd74e8b796d50c66014cebebe.tar.xz
Merge remote-tracking branch 'spi/for-5.10' into spi-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