diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-07-24 21:08:13 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-07-24 21:08:13 +0300 |
commit | 43cbf02e7ad51007af38f39c5b2abdc7a5d7f5aa (patch) | |
tree | 1057babea8807af3f4a3c44fd116b7bbe99eb733 /scripts/gdb/linux/tasks.py | |
parent | cba59972a1191a0c1647a52fe745eed7a4b34b38 (diff) | |
parent | 996034b117b467709dec7811ef134063934fa626 (diff) | |
download | linux-43cbf02e7ad51007af38f39c5b2abdc7a5d7f5aa.tar.xz |
Merge tag 'asoc-fix-v4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v4.2
A lot of small fixes here, a few to the core:
- Fix for binding DAPM stream widgets on devices with prefixes assigned
to them
- Minor fixes for the newly added topology interfaces
- Locking and memory leak fixes for DAPM
- Driver specific fixes
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
-rw-r--r-- | scripts/gdb/linux/tasks.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py index e2037d9bb7eb..862a4ae24d49 100644 --- a/scripts/gdb/linux/tasks.py +++ b/scripts/gdb/linux/tasks.py @@ -18,8 +18,8 @@ from linux import utils task_type = utils.CachedType("struct task_struct") + def task_lists(): - global task_type task_ptr_type = task_type.get_type().pointer() init_task = gdb.parse_and_eval("init_task").address t = g = init_task @@ -38,6 +38,7 @@ def task_lists(): if t == init_task: return + def get_task_by_pid(pid): for task in task_lists(): if int(task['pid']) == pid: @@ -65,13 +66,28 @@ return that task_struct variable which PID matches.""" LxTaskByPidFunc() +class LxPs(gdb.Command): + """Dump Linux tasks.""" + + def __init__(self): + super(LxPs, self).__init__("lx-ps", gdb.COMMAND_DATA) + + def invoke(self, arg, from_tty): + for task in task_lists(): + gdb.write("{address} {pid} {comm}\n".format( + address=task, + pid=task["pid"], + comm=task["comm"].string())) + +LxPs() + + thread_info_type = utils.CachedType("struct thread_info") ia64_task_size = None def get_thread_info(task): - global thread_info_type thread_info_ptr_type = thread_info_type.get_type().pointer() if utils.is_target_arch("ia64"): global ia64_task_size |