aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gdb/linux/tasks.py
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-06-03 09:05:51 -0400
committerThomas Gleixner <tglx@linutronix.de>2016-06-03 09:05:51 -0400
commit2eec3707a33fbf1c2e0a88ffc9fc0e465c2a59fd (patch)
tree9e47763ecd38f0ddd29f07e1ce199680304449fa /scripts/gdb/linux/tasks.py
parent59fa5860204ffc95128d60cba9f54f9740a42c7d (diff)
parent0de6b9979e2e10c79e5702d2d902cd7284d17689 (diff)
Merge tag 'irqchip-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent
Merge irqchip updates from Marc Zyngier: - A number of embarassing buglets (GICv3, PIC32) - A more substential errata workaround for Cavium's GICv3 ITS (kept for post-rc1 due to its dependency on NUMA)
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
-rw-r--r--scripts/gdb/linux/tasks.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py
index 862a4ae24d49..1bf949c43b76 100644
--- a/scripts/gdb/linux/tasks.py
+++ b/scripts/gdb/linux/tasks.py
@@ -114,3 +114,22 @@ variable."""
114 114
115 115
116LxThreadInfoFunc() 116LxThreadInfoFunc()
117
118
119class LxThreadInfoByPidFunc (gdb.Function):
120 """Calculate Linux thread_info from task variable found by pid
121
122$lx_thread_info_by_pid(PID): Given PID, return the corresponding thread_info
123variable."""
124
125 def __init__(self):
126 super(LxThreadInfoByPidFunc, self).__init__("lx_thread_info_by_pid")
127
128 def invoke(self, pid):
129 task = get_task_by_pid(pid)
130 if task:
131 return get_thread_info(task.dereference())
132 else:
133 raise gdb.GdbError("No task of PID " + str(pid))
134
135LxThreadInfoByPidFunc()