* Expected behaviour of 'set width XX'
@ 2017-07-20 7:49 Andrew Burgess
2017-07-20 8:17 ` Andreas Schwab
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Burgess @ 2017-07-20 7:49 UTC (permalink / raw)
To: gdb
I have a question about the expected behaviour of set width. I'm
going to use 'set width 10' in the example below, I know 10 probably
isn't a very useful width, but I see the same behaviour for larger
widths.
In the pictures below I'm using "|" to denote the left edge of the
terminal, and "^" to indicate where the cursor is in the line above
(the line with the actual "^" does not exist yet).
So, I start up gdb and I see this:
|(gdb)
| ^
Then I set the desired width,
|(gdb) set width 10
|(gdb)
| ^
Now I enter 3 "x"s.
|(gdb) xxx
| ^
you'll notice that including the prompt, single space, and xxx I'm now
ready to fill character 10, so, I add 1 more x:
|(gdb) xxxx
|^
Notice that the cursor has wrapper back to the first character on the
line. After this I enter 9 "y"s:
|yyyyyyyyy
| ^
Yeah.... and one more "y":
|yyyyyyyyyy
|^
And we're back to the beginning of the line again.
My expectation was that after all the "x"s and "y"s, I would have had
this situation:
|(gdb) xxxx
|yyyyyyyyyy
|
|^
So a 10 character wide block of text on the left of my N wide
terminal.
So, my question: Is the current gdb behaviour the expected behaviour?
If it is the expected behaviour then how is this useful?
Thanks,
Andrew
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Expected behaviour of 'set width XX'
2017-07-20 7:49 Expected behaviour of 'set width XX' Andrew Burgess
@ 2017-07-20 8:17 ` Andreas Schwab
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2017-07-20 8:17 UTC (permalink / raw)
To: Andrew Burgess; +Cc: gdb
On Jul 20 2017, Andrew Burgess <andrew.burgess@embecosm.com> wrote:
> So, my question: Is the current gdb behaviour the expected behaviour?
I think readline is relying on the terminal to actually have that width,
thus to wrap around without emitting a newline.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-20 8:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-20 7:49 Expected behaviour of 'set width XX' Andrew Burgess
2017-07-20 8:17 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox