[aklug] Re: terminal types and curses programming

From: Arthur Corliss <acorliss@nevaeh-linux.org>
Date: Sat Jan 24 2009 - 09:58:13 AKST

On Sat, 24 Jan 2009, Shane R. Spencer wrote:

> Or.. be cool and stuff and do the diagnostics like a pro :)
> 1.) use strace and -o to poop a file of all system calls a program uses.
>
> spencersr@undertow:~$ strace -o traceofevil nano
>
> 2.) .... exit out of nano or whatever ....
>
> 3.) use grep, search for the term name or if you're know what you're
> looking for ('term') use that.
>
> spencersr@undertow:~$ cat traceofevil | grep term
> stat("/home/spencersr/.terminfo", 0x7fffcc1d1390) = -1 ENOENT (No such
> file or directory)
> stat("/etc/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> access("/etc/terminfo/x/xterm", R_OK) = -1 ENOENT (No such file or
> directory)
> stat("/lib/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> access("/lib/terminfo/x/xterm", R_OK) = 0
> open("/lib/terminfo/x/xterm", O_RDONLY) = 3
> read(3, "\32\1\34\0\35\0\17\0\235\1&\5xterm|X11 terminal e"..., 4097) = 2244
>
> 4.) Rejoice!
> Shane R. Spencer wrote:
>> /usr/share/terminfo

If he wanted to see what initscr was doing internally (since it calls a
number of normal curses functions) he would want to use ltrace, which will
get all the library calls. And, then, there's always the use of gdb...

         --Arthur Corliss
           Live Free or Die
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sat Jan 24 09:58:23 2009

This archive was generated by hypermail 2.1.8 : Sat Jan 24 2009 - 09:58:23 AKST