Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'kgdb-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux

Pull kgdb updates from Daniel Thompson:
"Fairly small changes this cycle:

- An additional static inline function when kgdb is not enabled to
reduce boilerplate in arch files

- kdb will now handle input with linefeeds more like carriage return.
This will make little difference for interactive use but can make
it script to use expect-like interaction with kdb

- A couple of warning fixes"

* tag 'kgdb-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux:
kdb: move kdb_send_sig() declaration to a better header file
kdb: Handle LF in the command parser
kdb: include kdb_private.h for function prototypes
kgdb: Provide a stub kgdb_nmicallback() if !CONFIG_KGDB

+20 -2
+2
include/linux/kdb.h
··· 196 196 return cpu; 197 197 } 198 198 199 + extern void kdb_send_sig(struct task_struct *p, int sig); 200 + 199 201 #ifdef CONFIG_KALLSYMS 200 202 extern const char *kdb_walk_kallsyms(loff_t *pos); 201 203 #else /* ! CONFIG_KALLSYMS */
+1
include/linux/kgdb.h
··· 365 365 #define dbg_late_init() 366 366 static inline void kgdb_panic(const char *msg) {} 367 367 static inline void kgdb_free_init_mem(void) { } 368 + static inline int kgdb_nmicallback(int cpu, void *regs) { return 1; } 368 369 #endif /* ! CONFIG_KGDB */ 369 370 #endif /* _KGDB_H_ */
+15 -1
kernel/debug/kdb/kdb_io.c
··· 131 131 int escape_delay = 0; 132 132 get_char_func *f, *f_prev = NULL; 133 133 int key; 134 + static bool last_char_was_cr; 134 135 135 136 for (f = &kdb_poll_funcs[0]; ; ++f) { 136 137 if (*f == NULL) { ··· 149 148 } 150 149 continue; 151 150 } 151 + 152 + /* 153 + * The caller expects that newlines are either CR or LF. However 154 + * some terminals send _both_ CR and LF. Avoid having to handle 155 + * this in the caller by stripping the LF if we saw a CR right 156 + * before. 157 + */ 158 + if (last_char_was_cr && key == '\n') { 159 + last_char_was_cr = false; 160 + continue; 161 + } 162 + last_char_was_cr = (key == '\r'); 152 163 153 164 /* 154 165 * When the first character is received (or we get a change ··· 257 244 *cp = tmp; 258 245 } 259 246 break; 260 - case 13: /* enter */ 247 + case 10: /* linefeed */ 248 + case 13: /* carriage return */ 261 249 *lastchar++ = '\n'; 262 250 *lastchar++ = '\0'; 263 251 if (!KDB_STATE(KGDB_TRANS)) {
+2
kernel/debug/kdb/kdb_keyboard.c
··· 13 13 #include <linux/ctype.h> 14 14 #include <linux/io.h> 15 15 16 + #include "kdb_private.h" 17 + 16 18 /* Keyboard Controller Registers on normal PCs. */ 17 19 18 20 #define KBD_STATUS_REG 0x64 /* Status register (R) */
-1
kernel/debug/kdb/kdb_private.h
··· 194 194 extern bool kdb_task_state(const struct task_struct *p, const char *mask); 195 195 extern void kdb_ps_suppressed(void); 196 196 extern void kdb_ps1(const struct task_struct *p); 197 - extern void kdb_send_sig(struct task_struct *p, int sig); 198 197 extern char kdb_getchar(void); 199 198 extern char *kdb_getstr(char *, size_t, const char *); 200 199 extern void kdb_gdb_state_pass(char *buf);