Skip to content

Comments

Add support for paging of output and max line length in interactive mode#47

Closed
donofrio wants to merge 8 commits intodevelfrom
console_paging_issue42
Closed

Add support for paging of output and max line length in interactive mode#47
donofrio wants to merge 8 commits intodevelfrom
console_paging_issue42

Conversation

@donofrio
Copy link

This addresses Issue #42 (and a little bit of #44 ) by adding functionality for the debugger to pause long running (multiple screens, or long lines) outputs. Currently if the output of the ls command goes beyond 50 lines the user is greeted with the message:

--Type <RET> for more, q to quit, c to continue without paging--

In addition, any lines longer than 160 characters are truncated with ...

This is accomplished by adding a new stream class DebugStream - declared as a new member named dout in SimpleDebugger It is used as a drop in replacement for std::cout and has an overloaded << operator. The key difference is you must call dout << dreset after each use to reset the stream state. No additional buffers are needed. DebugStream may implement other stream modifiers that are passed in as function pointers.

Along with this PR is a slight change to the CaptCrunch_Interactive test - an independent PR for that is also posted in the sst-ext-tests repo.

@github-actions
Copy link

CLANG-FORMAT TEST - PASSED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants