aboutsummaryrefslogtreecommitdiff
path: root/Debug
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2012-08-22 10:00:46 +0200
committerLorenz Meier <lm@inf.ethz.ch>2012-08-22 10:00:46 +0200
commit1bea49869b8daadddedf1c78c4eea5281b931d93 (patch)
tree2adca4bccdbeb30989cd0b9268ab7bd14a95d113 /Debug
parentd2e757aa3c9c352701f935ea269bcf862042b9a2 (diff)
downloadpx4-firmware-1bea49869b8daadddedf1c78c4eea5281b931d93.tar.gz
px4-firmware-1bea49869b8daadddedf1c78c4eea5281b931d93.tar.bz2
px4-firmware-1bea49869b8daadddedf1c78c4eea5281b931d93.zip
task file list gdb macro
Diffstat (limited to 'Debug')
-rw-r--r--Debug/NuttX23
1 files changed, 23 insertions, 0 deletions
diff --git a/Debug/NuttX b/Debug/NuttX
index b6d4e74f0..5396ab6b1 100644
--- a/Debug/NuttX
+++ b/Debug/NuttX
@@ -74,6 +74,29 @@ document showheap
end
################################################################################
+# Task file listing
+################################################################################
+
+define showfiles
+ set $task = (struct _TCB *)$arg0
+ set $nfiles = sizeof((*(struct filelist*)0).fl_files) / sizeof(struct file)
+ printf "%d files\n", $nfiles
+ set $index = 0
+ while $index < $nfiles
+ set $file = &($task->filelist->fl_files[$index])
+ printf "%d: inode %p f_priv %p\n", $index, $file->f_inode, $file->f_priv
+ if $file->f_inode != 0
+ printf " i_name %s i_private %p\n", &$file->f_inode->i_name[0], $file->f_inode->i_private
+ end
+ set $index = $index + 1
+ end
+end
+
+document showfiles
+. showfiles <TCB pointer>
+. Prints the files opened by a task.
+
+################################################################################
# Task display
################################################################################