Luigi Rizzo <[EMAIL PROTECTED]> wrote:

> I have been experiencing this problem for sometimes on CURRENT-based
> picobsd images: the shell coredumps if it does not find an
> entry for its terminal type in /etc/termcap.

Seems to be a »feature« of the new libedit.

(gdb) run
Starting program: /usr/obj/usr/src/bin/sh/sh 
# set -E
Cannot read termcap database;
using dumb terminal settings.

Program received signal SIGABRT, Aborted.
0x8075380 in kill ()
(gdb) bt
#0  0x8075380 in kill ()
#1  0x80a0592 in abort ()
#2  0x805c72d in el_beep ()
#3  0x805c760 in el_beep ()
#4  0x805c760 in el_beep ()
#5  0x805c4bf in el_beep ()
#6  0x8061558 in el_gets ()
#7  0x80618fc in el_gets ()
#8  0x805d0ec in el_beep ()
#9  0x805ce91 in el_beep ()
#10 0x805b3c7 in el_init ()
#11 0x804eeb7 in histedit () at /usr/src/bin/sh/histedit.c:114
#12 0x805304f in optschanged () at /usr/src/bin/sh/options.c:134
#13 0x80534fa in setcmd (argc=2, argv=0x80ec574)
    at /usr/src/bin/sh/options.c:358
#14 0x804b973 in evalcommand (cmd=0x80ec54c, flags=0, backcmd=0x0)
    at /usr/src/bin/sh/eval.c:867
#15 0x804a9ec in evaltree (n=0x80ec54c, flags=0) at /usr/src/bin/sh/eval.c:285
#16 0x8051c52 in cmdloop (top=1) at /usr/src/bin/sh/main.c:253
#17 0x8051bbe in main (argc=1, argv=0xbfbffc48) at /usr/src/bin/sh/main.c:202
#18 0x8048135 in _start ()
(gdb) up 11
#11 0x804eeb7 in histedit () at /usr/src/bin/sh/histedit.c:114
114                             el = el_init(arg0, el_in, el_out, el_err);

Here's the stack trace obtained when linking against a -g compiled
libedit:

(gdb) up
#1  0x80a0592 in abort ()
(gdb) 
#2  0x805c72d in node__try (el=0x80f3000, ptr=0x80ef200, str=0x80c245a "A", 
    val=0x80f2098, ntype=-791621424) at /usr/src/lib/libedit/key.c:359
359                             EL_ABORT((el->el_errfile, "Bad XK_ type %d\n", ntype));
(gdb) 
#3  0x805c760 in node__try (el=0x80f3000, ptr=0x80ef1e0, str=0x80c2459 "[A", 
    val=0x80f2098, ntype=-791621424) at /usr/src/lib/libedit/key.c:366
366                     (void) node__try(el, ptr->next, str, val, ntype);
(gdb) 
#4  0x805c760 in node__try (el=0x80f3000, ptr=0x80ef1c0, str=0x80c2458 "\e[A", 
    val=0x80f2098, ntype=-791621424) at /usr/src/lib/libedit/key.c:366
366                     (void) node__try(el, ptr->next, str, val, ntype);
(gdb) 
#5  0x805c4bf in key_add (el=0x80f3000, key=0x80c2458 "\e[A", val=0x80f2098, 
    ntype=-791621424) at /usr/src/lib/libedit/key.c:210
210             (void) node__try(el, el->el_key.map, key, val, ntype);
(gdb) 
#6  0x8061558 in term_reset_arrow (el=0x80f3000)
    at /usr/src/lib/libedit/term.c:1070
1070            key_add(el, strA, &arrow[A_K_UP].fun, arrow[A_K_UP].type);
(gdb) 
#7  0x80618fc in term_bind_arrow (el=0x80f3000)
    at /usr/src/lib/libedit/term.c:1177
1177            term_reset_arrow(el);
(gdb) 
#8  0x805d0ec in map_init_vi (el=0x80f3000) at /usr/src/lib/libedit/map.c:1045
1045            term_bind_arrow(el);
(gdb) 
#9  0x805ce91 in map_init (el=0x80f3000) at /usr/src/lib/libedit/map.c:933
933             map_init_vi(el);
(gdb) 
#10 0x805b3c7 in el_init (prog=0xbfbffcec "/usr/obj/usr/src/bin/sh/sh", 
    fin=0x80e8d40, fout=0x80e8df0, ferr=0x80e8d98)
    at /usr/src/lib/libedit/el.c:86
86              (void) map_init(el);

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to