Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1349039

[PATCHv3 06/13] scripts/gdb: Provide a dentry_name VFS path helper

From Kieran Bingham <kieran.bingham@linaro.org>
Newsgroups linux.kernel
Subject [PATCHv3 06/13] scripts/gdb: Provide a dentry_name VFS path helper
Date 2016-03-03 12:50 +0100
Message-ID <r8zVy-6xi-73@gated-at.bofh.it> (permalink)
References <r8zVv-6xi-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Walk the VFS entries, pre-pending the iname strings to generate a full
VFS path name from a dentry.

Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org>

---
Changes since v2:
 - dentry_name separated out from proc module for use elsewhere
---
 scripts/gdb/linux/utils.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/scripts/gdb/linux/utils.py b/scripts/gdb/linux/utils.py
index dbe2ad78048c..de03a6b505bb 100644
--- a/scripts/gdb/linux/utils.py
+++ b/scripts/gdb/linux/utils.py
@@ -161,3 +161,11 @@ def gdb_eval_or_none(expresssion):
         return gdb.parse_and_eval(expresssion)
     except:
         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()
-- 
2.5.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHv3 00/13] scripts/gdb: Linux awareness debug commands Kieran Bingham <kieran.bingham@linaro.org> - 2016-03-03 12:50 +0100
  [PATCHv3 11/13] scripts/gdb: Add a Radix Tree Parser Kieran Bingham <kieran.bingham@linaro.org> - 2016-03-03 12:50 +0100
  [PATCHv3 02/13] scripts/gdb: Provide kernel list item generators Kieran Bingham <kieran.bingham@linaro.org> - 2016-03-03 12:50 +0100
  [PATCHv3 05/13] scripts/gdb: Support !CONFIG_MODULES gracefully Kieran Bingham <kieran.bingham@linaro.org> - 2016-03-03 12:50 +0100
  [PATCHv3 01/13] scripts/gdb: Provide linux constants Kieran Bingham <kieran.bingham@linaro.org> - 2016-03-03 12:50 +0100
  [PATCHv3 04/13] scripts/gdb: Provide exception catching parser Kieran Bingham <kieran.bingham@linaro.org> - 2016-03-03 12:50 +0100
  [PATCHv3 13/13] scripts/gdb: Add lx_thread_info_by_pid helper Kieran Bingham <kieran.bingham@linaro.org> - 2016-03-03 12:50 +0100
  [PATCHv3 10/13] scripts/gdb: Add cpu iterators Kieran Bingham <kieran.bingham@linaro.org> - 2016-03-03 12:50 +0100
  [PATCHv3 12/13] scripts/gdb: Add interrupts command Kieran Bingham <kieran.bingham@linaro.org> - 2016-03-03 12:50 +0100
  [PATCHv3 06/13] scripts/gdb: Provide a dentry_name VFS path helper Kieran Bingham <kieran.bingham@linaro.org> - 2016-03-03 12:50 +0100
  [PATCHv3 08/13] scripts/gdb: Add mount point list command Kieran Bingham <kieran.bingham@linaro.org> - 2016-03-03 12:50 +0100
  [PATCHv3 03/13] scripts/gdb: Convert modules usage to lists functions Kieran Bingham <kieran.bingham@linaro.org> - 2016-03-03 12:50 +0100

csiph-web