This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[rfc] Really turn off wrapping for "set width 0"


I've noticed for a while now that some of the XML tests fail in our
nightly builds.  I tracked this down to the length of paths to our
objdir; I get output like:

(gdb) set tdesc filename /path/to/really/long ^M/file

The manual says wrapping should be turned off for "set width 0", which
the testsuite already uses.  But the width of my underlying terminal
is used anyway, because we fall back to rl_get_screen_size.

Mark, I've copied you on this because you added set_screen_size; it
was a long time ago, but maybe you remember why you wrote it this way.
Does this look OK?  Tested on mips64-linux, where it fixes about a
half-dozen gdb.xml failures.

-- 
Daniel Jacobowitz
CodeSourcery

2007-05-18  Daniel Jacobowitz  <dan@codesourcery.com>

	* utils.c (set_screen_size): Use INT_MAX for default columns.

---
 utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: gdb/utils.c
===================================================================
--- gdb.orig/utils.c	2007-05-17 16:46:31.000000000 -0400
+++ gdb/utils.c	2007-05-17 16:46:48.000000000 -0400
@@ -1633,7 +1633,7 @@ set_screen_size (void)
     rows = INT_MAX;
 
   if (cols <= 0)
-    rl_get_screen_size (NULL, &cols);
+    cols = INT_MAX;
 
   /* Update Readline's idea of the terminal size.  */
   rl_set_screen_size (rows, cols);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]