summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2023-06-05 13:10:23 +0300
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2023-06-05 13:10:23 +0300
commit9ff17e6bdaa50892dd9bdb1b116cb71b73dd711a (patch)
treecbffbccb83865b418a0aabb4487b6e8fe70c590d /scripts/gdb/linux/utils.py
parentd922b80b1010cd6164fa7d3c197b4fbf94b47beb (diff)
parent2e1492835e439fceba57a5b0f9b17da8e78ffa3d (diff)
downloadlinux-9ff17e6bdaa50892dd9bdb1b116cb71b73dd711a.tar.xz
Merge drm/drm-next into drm-intel-gt-next
For conflict avoidance we need the following commit: c9a9f18d3ad8 drm/i915/huc: use const struct bus_type pointers Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
-rw-r--r--scripts/gdb/linux/utils.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/scripts/gdb/linux/utils.py b/scripts/gdb/linux/utils.py
index 1553f68716cc..9f44df13761e 100644
--- a/scripts/gdb/linux/utils.py
+++ b/scripts/gdb/linux/utils.py
@@ -88,7 +88,10 @@ def get_target_endianness():
def read_memoryview(inf, start, length):
- return memoryview(inf.read_memory(start, length))
+ m = inf.read_memory(start, length)
+ if type(m) is memoryview:
+ return m
+ return memoryview(m)
def read_u16(buffer, offset):
@@ -193,11 +196,3 @@ def gdb_eval_or_none(expresssion):
return gdb.parse_and_eval(expresssion)
except gdb.error:
return None
-
-
-def dentry_name(d):
- parent = d['d_parent']
- if parent == d or parent == 0:
- return ""
- p = dentry_name(d['d_parent']) + "/"
- return p + d['d_iname'].string()