Whamcloud - gitweb
replace tag with rtag to better deal with added/removed files
[fs/lustre-release.git] / lnet / utils / debug.c
index ba8b790..857be97 100644 (file)
@@ -34,7 +34,8 @@
 #include <string.h>
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
-#else
+#endif
+#ifndef _IOWR
 #include "ioctl.h"
 #endif
 #include <fcntl.h>
@@ -274,7 +275,7 @@ static void print_saved_records(struct list_head *list, FILE *out)
                 list_del(&line->chain);
 
                 hdr = line->hdr;
-                fprintf(out, "%06x:%06x:%u:%u.%06Lu:%u:%u:%u:(%s:%u:%s()) %s",
+                fprintf(out, "%07x:%06x:%u:%u.%06Lu:%u:%u:%u:(%s:%u:%s()) %s",
                         hdr->ph_subsys, hdr->ph_mask, hdr->ph_cpu_id,
                         hdr->ph_sec, (unsigned long long)hdr->ph_usec,
                         hdr->ph_stack, hdr->ph_pid, hdr->ph_extern_pid,
@@ -672,6 +673,8 @@ static struct mod_paths {
         {"llog_test", "lustre/obdclass"},
         {"ptlrpcs", "lustre/sec"},
         {"ptlrpcs_gss", "lustre/sec/gss"},
+        {"gks", "lustre/sec/gks"},
+        {"gkc", "lustre/sec/gks"},
         {"ptlrpc", "lustre/ptlrpc"},
         {"obdext2", "lustre/obdext2"},
         {"ost", "lustre/ost"},
@@ -721,6 +724,7 @@ static int jt_dbg_modules_2_4(int argc, char **argv)
                 return 0;
         }
 
+        printf("dir\n");
         for (mp = mod_paths; mp->name != NULL; mp++) {
                 struct module_info info;
                 int rc;
@@ -738,6 +742,8 @@ static int jt_dbg_modules_2_4(int argc, char **argv)
                         printf("add-symbol-file %s%s%s/%s.o 0x%0lx\n", path,
                                path[0] ? "/" : "", mp->path, mp->name,
                                info.addr + sizeof(struct module));
+                        printf("dir %s%s%s\n", path,
+                               path[0] ? "/" : "", mp->path);
                 }
         }
 
@@ -773,6 +779,7 @@ static int jt_dbg_modules_2_5(int argc, char **argv)
                 return 0;
         }
 
+        printf("dir\n");
         while ((rc = fscanf(file, "%s %s %s %s %s %lx\n",
                 modname, others, others, others, others, &modaddr)) == 6) {
                 for (mp = mod_paths; mp->name != NULL; mp++) {
@@ -782,6 +789,8 @@ static int jt_dbg_modules_2_5(int argc, char **argv)
                 if (mp->name) {
                         printf("add-symbol-file %s%s%s/%s.o 0x%0lx\n", path,
                                path[0] ? "/" : "", mp->path, mp->name, modaddr);
+                        printf("dir %s%s%s\n", path,
+                               path[0] ? "/" : "", mp->path);
                 }
         }