summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.com>2020-10-12 14:01:37 +0300
committerPetr Mladek <pmladek@suse.com>2020-10-12 14:01:37 +0300
commit70333f4ff9c16dd82a2667080c3ae48fe30a3cb4 (patch)
treedf9a785cca8bd73c1a1962c2cc66b1702d9a4ebd /scripts/gdb/linux/utils.py
parent4e797e6ec79c0705791c14f3e60f38b01c78ea1d (diff)
parent0463d04ea03a12d8a5aad42197a5945dfd78d7d6 (diff)
downloadlinux-70333f4ff9c16dd82a2667080c3ae48fe30a3cb4.tar.xz
Merge branch 'printk-rework' into for-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