drivers: power: report battery voltage in AOSP compatible format
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / Documentation / kdump / gdbmacros.txt
index bc1b9eb92ae129982ad34d6dbac4c61dbd58861b..9b9b454b048ad78e9745a3d12971aa0cff665fc5 100644 (file)
@@ -175,5 +175,27 @@ end
 document trapinfo
        Run info threads and lookup pid of thread #1
        'trapinfo <pid>' will tell you by which trap & possibly
-       addresthe kernel paniced.
+       address the kernel panicked.
+end
+
+
+define dmesg
+       set $i = 0
+       set $end_idx = (log_end - 1) & (log_buf_len - 1)
+
+       while ($i < logged_chars)
+               set $idx = (log_end - 1 - logged_chars + $i) & (log_buf_len - 1)
+
+               if ($idx + 100 <= $end_idx) || \
+                  ($end_idx <= $idx && $idx + 100 < log_buf_len)
+                       printf "%.100s", &log_buf[$idx]
+                       set $i = $i + 100
+               else
+                       printf "%c", log_buf[$idx]
+                       set $i = $i + 1
+               end
+       end
+end
+document dmesg
+       print the kernel ring buffer
 end