This way we aren't wrapping ddb output lines halfway across the screen on a modern console.
diff --git sys/ddb/db_output.c sys/ddb/db_output.c index 77fd0e34944..72b9a24e761 100644 --- sys/ddb/db_output.c +++ sys/ddb/db_output.c @@ -252,3 +252,10 @@ stacktrace_print(struct stacktrace *st, int (*pr)(const char *, ...)) if (st->st_count == 0) (*pr)("<empty stack trace>\n"); } + +void +db_resize(int cols, int rows) +{ + db_max_width = cols; + db_max_line = rows; +} diff --git sys/ddb/db_output.h sys/ddb/db_output.h index 86ca761acaa..855bcc39a12 100644 --- sys/ddb/db_output.h +++ sys/ddb/db_output.h @@ -41,6 +41,7 @@ int db_printf(const char *, ...) int db_vprintf(const char *, va_list) __attribute__((__format__(__kprintf__,1,0))); void db_end_line(int); +void db_resize(int, int); /* * This is a replacement for the non-standard %z, %n and %r printf formats diff --git sys/dev/wscons/wsdisplay.c sys/dev/wscons/wsdisplay.c index 82daa85dda3..428019621c6 100644 --- sys/dev/wscons/wsdisplay.c +++ sys/dev/wscons/wsdisplay.c @@ -65,6 +65,10 @@ #include <dev/wscons/wsmuxvar.h> #endif +#ifdef DDB +#include <ddb/db_output.h> +#endif + #include "wsmoused.h" struct wsscreen_internal { @@ -836,6 +840,10 @@ wsdisplay_cnattach(const struct wsscreen_descr *type, void *cookie, int ccol, cn_tab = &wsdisplay_cons; wsdisplay_console_initted = 1; + +#ifdef DDB + db_resize(type->ncols, type->nrows); +#endif } /*