[Crash-utility] less(1) TERM requirements; man page update [was Re: crash CPU bound waiting for user response]

Dave Anderson anderson at redhat.com
Tue Jul 10 14:49:43 UTC 2007


D. Hugh Redelmeier wrote:
> | From: Dave Anderson <anderson at redhat.com>
> | 
> | Chip Coldwell wrote:
> | > On Tue, 3 Jul 2007, D. Hugh Redelmeier wrote:
> 
> | > >==> It does not say in what way the terminal is not fully
> | > >functional.  That seems like a bug.
> 
> | > Well, the issue is that the emacs terminal emulator does not fully
> | > support the [n]curses escape sequences needed to position the cursor
> | > for your pager (e.g. less).
> 
> The whole point of termcap/terminfo is to tame the whacky world of
> terminal diversity.  There is nothing "wrong" with a terminal that
> does not have features needed by less(1).
> 
> In fact less(1) would almost never be useful within an emacs/jove
> terminal window even if it did work:  emacs/jove has more appropriate
> facilities built in.
> 
> The same goes for readline within an emacs/jove terminal.
> 
> | I would think the easiest way to deal with this issue would be
> | to not allow crash to use "less" if the TERM type is "vanilla".
> | And if it is vanilla, fall back to using "more", which is what
> | is done now if "less" doesn't exist on the host system.
> 
> The name of an entry in termcap/terminfo is not supposed to be
> material.  One is supposed to make decisions based on the declared
> attributes.
> 
> Unfortunately, less(1) does not document what capabilities it
> requires: neither in the man page nor in the warning messages.  I
> don't care enough to read the source code, and in any case anything
> learned there would be provisional since it isn't part of the
> "contract".
> 
> Getting crash entagled with termcap/terminfo on behalf of less(1) is
> probably a bad idea.  Mind you, I expect crash already is involved
> with termca/terminfo through using readline (I've not checked).
> 
> I suspect that the current situation is probably better than trying to
> fix it.  A simple "set scroll off" cures the problem for a run.
> Making this clear in documentation would be a modest improvement.
> 

Fine, but at a minimum I propose the addition of a "--more" command
line argument to force its use instead of "less".  With that in place,
I've verified that crash scrolling works fine using the "vanilla"
TERM type, and I presume that using "more" for scrolling would suffice
within the emacs/jove/vanilla environment as well?

> Is there a simple way of turning off readline?  To make the problem
> harder: I want to do it some times (i.e. when running crash under jove)
> but not at others (i.e. when running crash directly in an xterm).
> 

No.

> 
> Here is a proposed patch to the man page.
>

OK, thanks,
   Dave


> ===================================================================
> RCS file: RCS/crash.8,v
> retrieving revision 1.1
> diff -u -r1.1 crash.8
> --- crash.8	2007/07/09 15:41:55	1.1
> +++ crash.8	2007/07/09 18:16:56
> @@ -5,7 +5,7 @@
>  .TH CRASH 8
>  .SH NAME
>  crash \- Analyze Linux crash data or a live system
> -.SH SYNAPSIS
> +.SH SYNOPSIS
>  .B crash
>  [
>  .B -h
> @@ -44,7 +44,7 @@
>  core dump has been created by the Red Hat 
>  .I netdump
>  facility.  It is loosely based on the SVR4 UNIX crash 
> -command, but has been signficantly enhanced
> +command, but has been significantly enhanced
>  by completely merging it with the 
>  .I gdb
>  debugger. The marriage of the two effectively combines the 
> @@ -207,11 +207,11 @@
>  .I dis
>  disassembles memory, either entire kernel functions, from a
>  location for a specified number of instructions, or from the start of a
> -fuction up to a specified memory location.
> +function up to a specified memory location.
>  .TP
>  .I eval
>  evalues an expression or numeric type and displays the result
> -in hexidecimal, decimal, octal and binary.
> +in hexadecimal, decimal, octal and binary.
>  .TP
>  .I exit
>  causes
> @@ -230,7 +230,7 @@
>  in the system.
>  .TP
>  .I fuser
> -displays the tasks using the specifed file or socket.
> +displays the tasks using the specified file or socket.
>  .TP
>  .I gdb
>  passes its argument to the underlying
> @@ -274,7 +274,7 @@
>  display various network related data.
>  .TP
>  .I p
> -passes its argumnts to the
> +passes its arguments to the
>  .I gdb
>  "print" command for evaluation and display.
>  .TP
> @@ -361,11 +361,54 @@
>  .I wr
>  modifies the contents of memory.  When writing to memory on
>  a live system, this command should obviously be used with great care.
> +.SH FILES
> +.TP
> +.I ~/.crashrc
> +initialization commands
> +.SH ENVIRONMENT
> +.TP
> +.B EDITOR
> +Command input is read using
> +.BR readline(3).
> +If
> +.B EDITOR
> +is set to
> +.I emacs
> +or
> +.I vi
> +then suitable keybindings are used.  This can be overridden by ``\fBset\ vi\fP''
> +or ``\fBset\ emacs\fP'' commands, but only in
> +.IR ~/.crashrc .
> +.SH NOTES
> +.PP
> +If
> +.B crash
> +does not work, look for a newer version: kernel evolution frequently makes
> +.B crash
> +updates necessary.
> +.PP
> +The command ``\fBset\ scroll\ off\fP'' will cause output to be sent directly to
> +the terminal rather than through a paging program.  This is useful,
> +for example, if you are running
> +.B crash
> +in a window of
> +.BR emacs .
>  .SH AUTHOR
>  Dave Anderson <anderson at redhat.com> wrote
>  .B Crash
>  .TP
>  Jay Fenlason <fenlason at redhat.com> wrote this man page.
>  .SH "SEE ALSO"
> -netdump(8)
> -gdb(1)
> +.PP
> +The
> +.B help
> +command within
> +.B crash
> +provides more complete and accurate documentation than this manpage.
> +.TP
> +.I http://people.redhat.com/anderson/
> +The home page of
> +.IR crash .
> +.PP
> +.BR netdump (8),
> +.BR gdb (1)
> ================ end ================
> 
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility





More information about the Crash-utility mailing list