tags:

views:

133

answers:

1

This is part of our unit test flow. I run gdb with the --command option to have it execute commands from a text file. The output of gdb is then directed into a file, and that file is compared to a reference file. But the problem is, gdb uses the current shell window's size to place newlines in its output. If the window is smaller, it will add more newlines to the output to make it more readable.

Is there an option in gdb to disable this, so that my test's output is always the same regardless of the shell window I run it in?

Edit: found it, I just use this as the first gdb command:

set width 80

Sometimes things are easy.

+1  A: 

Found it, I just use this as the first gdb command:

set width 80

Sometimes things are easy.

Wouter Lievens