On NetBSD/evbarm aarch64 (a Pinebook) with a -current of Sun Oct 27 2019, with userland from the `2019-10-26 20:40 UTC' HEAD snapshot, when opening vi(1) with just `vi', and writing: | foo | bar | baz ...and then piping it to sort via `:%!sort' I have: parent-writer: received signal: Segmentation fault; core dumped. ...and the text is not sorted as expected. Checking out src/external/bsd/nvi from CVS and then rebuilding it via `make' here the corresponding debugging of the `.core': | % gdb -core vi.core ./vi | Reading symbols from ./vi... | Reading symbols from /tmp/src/external/bsd/nvi/usr.bin/nvi/vi.debug... | [New process 1] | Core was generated by `vi'. | Program terminated with signal SIGSEGV, Segmentation fault. | #0 0x000000020011e140 in ex_writefp (sp=sp@entry=0xf1ef4e281000, name=name@entry=0x20014b520 "filter", fp=0xf1ef4e48e730, | fm=fm@entry=0xf1ef4e6db118, tm=tm@entry=0x0, nlno=nlno@entry=0x0, nch=nch@entry=0x0, silent=silent@entry=1) | at /tmp/src/external/bsd/nvi/dist/ex/ex_write.c:305 | 305 gp = sp->gp; | (gdb) bt | #0 0x000000020011e140 in ex_writefp (sp=sp@entry=0xf1ef4e281000, name=name@entry=0x20014b520 "filter", fp=0xf1ef4e48e730, | fm=fm@entry=0xf1ef4e6db118, tm=tm@entry=0x0, nlno=nlno@entry=0x0, nch=nch@entry=0x0, silent=silent@entry=1) | at /tmp/src/external/bsd/nvi/dist/ex/ex_write.c:305 | #1 0x0000000200112004 in ex_filter (sp=sp@entry=0xf1ef4e281000, cmdp=cmdp@entry=0xf1ef4e6db050, fm=fm@entry=0xf1ef4e6db118, tm=0x0, | tm@entry=0xf1ef4e6db128, rp=rp@entry=0xffffff9f3ab0, cmd=0x0, ftype=FILTER_BANG) | at /tmp/src/external/bsd/nvi/dist/ex/ex_filter.c:238 | #2 0x000000020010f76c in ex_bang (sp=0xf1ef4e281000, cmdp=0xf1ef4e6db050) at /tmp/src/external/bsd/nvi/dist/ex/ex_bang.c:162 | #3 0x000000020010b494 in ex_cmd (sp=sp@entry=0xf1ef4e281000) at /tmp/src/external/bsd/nvi/dist/ex/ex.c:1391 | #4 0x000000020012b978 in v_ex (sp=0xf1ef4e281000, vp=0xffffff9f3ca0) at /tmp/src/external/bsd/nvi/dist/vi/v_ex.c:418 | #5 0x0000000200137620 in vi (spp=0xffffff9f3ec0) at /tmp/src/external/bsd/nvi/dist/vi/vi.c:248 | #6 0x00000002001221d4 in editor (wp=wp@entry=0xf1ef4e6db000, argc=, argc@entry=1, argv=, | argv@entry=0xffffff9f40e8) at /tmp/src/external/bsd/nvi/dist/common/main.c:136 | #7 0x0000000200147238 in main (argc=1, argv=0xffffff9f40e8) at /tmp/src/external/bsd/nvi/dist/cl/cl_main.c:134 | (gdb) set pagination off | (gdb) p *sp->gp | $1 = { | progname = 0xffffff9f485a "vi", | id = 2, | dq = { | tqh_first = 0xf1ef4e6db000, | tqh_last = 0xf1ef4e6db000 | }, | hq = { | tqh_first = 0x0, | tqh_last = 0xf1ef4e299020 | }, | perl_interp = 0x0, | tcl_interp = 0x0, | cl_private = 0xf1ef4e28f000, | tk_private = 0x0, | frefq = { | tqh_first = 0xf1ef4e279140, | tqh_last = 0xf1ef4e2798c0 | }, | exfq = { | tqh_first = 0xf1ef4e26e000, | tqh_last = 0xf1ef4e26e0e0 | }, | opts = {{ | o_cur = { | val = 136, | str = 0x88 | }, | o_def = { | val = 136, | str = 0x88 | }, | flags = 0 '\000' | }, { | o_cur = { | val = 32, | str = 0x20 | }, | o_def = { | val = 32, | str = 0x20 | }, | flags = 0 '\000' | }, { | o_cur = { | val = 0, | str = 0x0 | }, | o_def = { | val = 0, | str = 0x0 | }, | flags = 0 '\000' | }, { | o_cur = { | val = 266010115686408, | str = 0xf1ef4e73c008 "screen" | }, | o_def = { | val = 266010115686880, | str = 0xf1ef4e73c1e0 "screen" | }, | flags = 0 '\000' | }}, | msg = 0x0, | msgq = { | lh_first = 0x0 | }, | noprint = 1, | c_option = 0x0, | seqq = { | lh_first = 0xf1ef4e1010f0 | }, | seqb = "\000@\001\b", '\000' , | cname = {{ | name = "^@\000\000", | len = 2 '\002' | }, { | name = "^A\000\000", | len = 2 '\002' | }, { | name = "^B\000\000", | len = 2 '\002' | }, { | name = "^C\000\000", | len = 2 '\002' | }, { | name = "^D\000\000", | len = 2 '\002' | }, { | name = "^E\000\000", | len = 2 '\002' | }, { | name = "^F\000\000", | len = 2 '\002' | }, { | name = "^G\000\000", | len = 2 '\002' | }, { | name = "^H\000\000", | len = 2 '\002' | }, { | name = "^I\000\000", | len = 2 '\002' | }, { | name = "^J\000\000", | len = 2 '\002' | }, { | name = "^K\000\000", | len = 2 '\002' | }, { | name = "^L\000\000", | len = 2 '\002' | }, { | name = "^M\000\000", | len = 2 '\002' | }, { | name = "^N\000\000", | len = 2 '\002' | }, { | name = "^O\000\000", | len = 2 '\002' | }, { | name = "^P\000\000", | len = 2 '\002' | }, { | name = "^Q\000\000", | len = 2 '\002' | }, { | name = "^R\000\000", | len = 2 '\002' | }, { | name = "^S\000\000", | len = 2 '\002' | }, { | name = "^T\000\000", | len = 2 '\002' | }, { | name = "^U\000\000", | len = 2 '\002' | }, { | name = "^V\000\000", | len = 2 '\002' | }, { | name = "^W\000\000", | len = 2 '\002' | }, { | name = "^X\000\000", | len = 2 '\002' | }, { | name = "^Y\000\000", | len = 2 '\002' | }, { | name = "^Z\000\000", | len = 2 '\002' | }, { | name = "^[\000\000", | len = 2 '\002' | }, { | name = "^\\\000\000", | len = 2 '\002' | }, { | name = "^]\000\000", | len = 2 '\002' | }, { | name = "^^\000\000", | len = 2 '\002' | }, { | name = "^_\000\000", | len = 2 '\002' | }, { | name = " \000\000\000", | len = 1 '\001' | }, { | name = "!\000\000\000", | len = 1 '\001' | }, { | name = "\"\000\000\000", | len = 1 '\001' | }, { | name = "#\000\000\000", | len = 1 '\001' | }, { | name = "$\000\000\000", | len = 1 '\001' | }, { | name = "%\000\000\000", | len = 1 '\001' | }, { | name = "&\000\000\000", | len = 1 '\001' | }, { | name = "'\000\000\000", | len = 1 '\001' | }, { | name = "(\000\000\000", | len = 1 '\001' | }, { | name = ")\000\000\000", | len = 1 '\001' | }, { | name = "*\000\000\000", | len = 1 '\001' | }, { | name = "+\000\000\000", | len = 1 '\001' | }, { | name = ",\000\000\000", | len = 1 '\001' | }, { | name = "-\000\000\000", | len = 1 '\001' | }, { | name = ".\000\000\000", | len = 1 '\001' | }, { | name = "/\000\000\000", | len = 1 '\001' | }, { | name = "0\000\000\000", | len = 1 '\001' | }, { | name = "1\000\000\000", | len = 1 '\001' | }, { | name = "2\000\000\000", | len = 1 '\001' | }, { | name = "3\000\000\000", | len = 1 '\001' | }, { | name = "4\000\000\000", | len = 1 '\001' | }, { | name = "5\000\000\000", | len = 1 '\001' | }, { | name = "6\000\000\000", | len = 1 '\001' | }, { | name = "7\000\000\000", | len = 1 '\001' | }, { | name = "8\000\000\000", | len = 1 '\001' | }, { | name = "9\000\000\000", | len = 1 '\001' | }, { | name = ":\000\000\000", | len = 1 '\001' | }, { | name = ";\000\000\000", | len = 1 '\001' | }, { | name = "<\000\000\000", | len = 1 '\001' | }, { | name = "=\000\000\000", | len = 1 '\001' | }, { | name = ">\000\000\000", | len = 1 '\001' | }, { | name = "?\000\000\000", | len = 1 '\001' | }, { | name = "@\000\000\000", | len = 1 '\001' | }, { | name = "A\000\000\000", | len = 1 '\001' | }, { | name = "B\000\000\000", | len = 1 '\001' | }, { | name = "C\000\000\000", | len = 1 '\001' | }, { | name = "D\000\000\000", | len = 1 '\001' | }, { | name = "E\000\000\000", | len = 1 '\001' | }, { | name = "F\000\000\000", | len = 1 '\001' | }, { | name = "G\000\000\000", | len = 1 '\001' | }, { | name = "H\000\000\000", | len = 1 '\001' | }, { | name = "I\000\000\000", | len = 1 '\001' | }, { | name = "J\000\000\000", | len = 1 '\001' | }, { | name = "K\000\000\000", | len = 1 '\001' | }, { | name = "L\000\000\000", | len = 1 '\001' | }, { | name = "M\000\000\000", | len = 1 '\001' | }, { | name = "N\000\000\000", | len = 1 '\001' | }, { | name = "O\000\000\000", | len = 1 '\001' | }, { | name = "P\000\000\000", | len = 1 '\001' | }, { | name = "Q\000\000\000", | len = 1 '\001' | }, { | name = "R\000\000\000", | len = 1 '\001' | }, { | name = "S\000\000\000", | len = 1 '\001' | }, { | name = "T\000\000\000", | len = 1 '\001' | }, { | name = "U\000\000\000", | len = 1 '\001' | }, { | name = "V\000\000\000", | len = 1 '\001' | }, { | name = "W\000\000\000", | len = 1 '\001' | }, { | name = "X\000\000\000", | len = 1 '\001' | }, { | name = "Y\000\000\000", | len = 1 '\001' | }, { | name = "Z\000\000\000", | len = 1 '\001' | }, { | name = "[\000\000\000", | len = 1 '\001' | }, { | name = "\\\000\000\000", | len = 1 '\001' | }, { | name = "]\000\000\000", | len = 1 '\001' | }, { | name = "^\000\000\000", | len = 1 '\001' | }, { | name = "_\000\000\000", | len = 1 '\001' | }, { | name = "`\000\000\000", | len = 1 '\001' | }, { | name = "a\000\000\000", | len = 1 '\001' | }, { | name = "b\000\000\000", | len = 1 '\001' | }, { | name = "c\000\000\000", | len = 1 '\001' | }, { | name = "d\000\000\000", | len = 1 '\001' | }, { | name = "e\000\000\000", | len = 1 '\001' | }, { | name = "f\000\000\000", | len = 1 '\001' | }, { | name = "g\000\000\000", | len = 1 '\001' | }, { | name = "h\000\000\000", | len = 1 '\001' | }, { | name = "i\000\000\000", | len = 1 '\001' | }, { | name = "j\000\000\000", | len = 1 '\001' | }, { | name = "k\000\000\000", | len = 1 '\001' | }, { | name = "l\000\000\000", | len = 1 '\001' | }, { | name = "m\000\000\000", | len = 1 '\001' | }, { | name = "n\000\000\000", | len = 1 '\001' | }, { | name = "o\000\000\000", | len = 1 '\001' | }, { | name = "p\000\000\000", | len = 1 '\001' | }, { | name = "q\000\000\000", | len = 1 '\001' | }, { | name = "r\000\000\000", | len = 1 '\001' | }, { | name = "s\000\000\000", | len = 1 '\001' | }, { | name = "t\000\000\000", | len = 1 '\001' | }, { | name = "u\000\000\000", | len = 1 '\001' | }, { | name = "v\000\000\000", | len = 1 '\001' | }, { | name = "w\000\000\000", | len = 1 '\001' | }, { | name = "x\000\000\000", | len = 1 '\001' | }, { | name = "y\000\000\000", | len = 1 '\001' | }, { | name = "z\000\000\000", | len = 1 '\001' | }, { | name = "{\000\000\000", | len = 1 '\001' | }, { | name = "|\000\000\000", | len = 1 '\001' | }, { | name = "}\000\000\000", | len = 1 '\001' | }, { | name = "~\000\000\000", | len = 1 '\001' | }, { | name = "^?\000\000", | len = 2 '\002' | }, { | name = "\\x80", | len = 4 '\004' | }, { | name = "\\x81", | len = 4 '\004' | }, { | name = "\\x82", | len = 4 '\004' | }, { | name = "\\x83", | len = 4 '\004' | }, { | name = "\\x84", | len = 4 '\004' | }, { | name = "\\x85", | len = 4 '\004' | }, { | name = "\\x86", | len = 4 '\004' | }, { | name = "\\x87", | len = 4 '\004' | }, { | name = "\\x88", | len = 4 '\004' | }, { | name = "\\x89", | len = 4 '\004' | }, { | name = "\\x8a", | len = 4 '\004' | }, { | name = "\\x8b", | len = 4 '\004' | }, { | name = "\\x8c", | len = 4 '\004' | }, { | name = "\\x8d", | len = 4 '\004' | }, { | name = "\\x8e", | len = 4 '\004' | }, { | name = "\\x8f", | len = 4 '\004' | }, { | name = "\\x90", | len = 4 '\004' | }, { | name = "\\x91", | len = 4 '\004' | }, { | name = "\\x92", | len = 4 '\004' | }, { | name = "\\x93", | len = 4 '\004' | }, { | name = "\\x94", | len = 4 '\004' | }, { | name = "\\x95", | len = 4 '\004' | }, { | name = "\\x96", | len = 4 '\004' | }, { | name = "\\x97", | len = 4 '\004' | }, { | name = "\\x98", | len = 4 '\004' | }, { | name = "\\x99", | len = 4 '\004' | }, { | name = "\\x9a", | len = 4 '\004' | }, { | name = "\\x9b", | len = 4 '\004' | }, { | name = "\\x9c", | len = 4 '\004' | }, { | name = "\\x9d", | len = 4 '\004' | }, { | name = "\\x9e", | len = 4 '\004' | }, { | name = "\\x9f", | len = 4 '\004' | }, { | name = "\\xa0", | len = 4 '\004' | }, { | name = "\\xa1", | len = 4 '\004' | }, { | name = "\\xa2", | len = 4 '\004' | }, { | name = "\\xa3", | len = 4 '\004' | }, { | name = "\\xa4", | len = 4 '\004' | }, { | name = "\\xa5", | len = 4 '\004' | }, { | name = "\\xa6", | len = 4 '\004' | }, { | name = "\\xa7", | len = 4 '\004' | }, { | name = "\\xa8", | len = 4 '\004' | }, { | name = "\\xa9", | len = 4 '\004' | }, { | name = "\\xaa", | len = 4 '\004' | }, { | name = "\\xab", | len = 4 '\004' | }, { | name = "\\xac", | len = 4 '\004' | }, { | name = "\\xad", | len = 4 '\004' | }, { | name = "\\xae", | len = 4 '\004' | }, { | name = "\\xaf", | len = 4 '\004' | }, { | name = "\\xb0", | len = 4 '\004' | }, { | name = "\\xb1", | len = 4 '\004' | }, { | name = "\\xb2", | len = 4 '\004' | }, { | name = "\\xb3", | len = 4 '\004' | }, { | name = "\\xb4", | len = 4 '\004' | }, { | name = "\\xb5", | len = 4 '\004' | }, { | name = "\\xb6", | len = 4 '\004' | }, { | name = "\\xb7", | len = 4 '\004' | }, { | name = "\\xb8", | len = 4 '\004' | }, { | name = "\\xb9", | len = 4 '\004' | }, { | name = "\\xba", | len = 4 '\004' | }, { | name = "\\xbb", | len = 4 '\004' | }, { | name = "\\xbc", | len = 4 '\004' | }, { | name = "\\xbd", | len = 4 '\004' | }, { | name = "\\xbe", | len = 4 '\004' | }, { | name = "\\xbf", | len = 4 '\004' | }, { | name = "\\xc0", | len = 4 '\004' | }, { | name = "\\xc1", | len = 4 '\004' | }, { | name = "\\xc2", | len = 4 '\004' | }, { | name = "\\xc3", | len = 4 '\004' | }, { | name = "\\xc4", | len = 4 '\004' | }, { | name = "\\xc5", | len = 4 '\004' | }, { | name = "\\xc6", | len = 4 '\004' | }, { | name = "\\xc7", | len = 4 '\004' | }...}, | special_key = {K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_CNTRLD, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_VERASE, K_TAB, K_NL, K_NOTUSED, K_FORMFEED, K_CR, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_VLNEXT, K_CNTRLR, K_NOTUSED, K_CNTRLT, K_VKILL, K_VLNEXT, K_VWERASE, K_HEXCHAR, K_NOTUSED, K_CNTRLZ, K_ESCAPE, K_NOTUSED , K_RIGHTPAREN, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_ZERO, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_COLON, K_NOTUSED , K_BACKSLASH, K_NOTUSED, K_CARAT, K_NOTUSED , K_RIGHTBRACE, K_NOTUSED, K_VERASE, K_NOTUSED }, | flags = 64, | scr_addstr = 0x200104e48 , | scr_waddstr = 0x200104e40 , | scr_attr = 0x200104e50 , | scr_baud = 0x200104f88 , | scr_bell = 0x200105040 , | scr_busy = 0x200139670 , | scr_child = 0x0, | scr_clrtoeol = 0x2001050c8 , | scr_cursor = 0x2001050f8 , | scr_deleteln = 0x200105150 , | scr_discard = 0x200105248 , | scr_event = 0x200105fb0 , | scr_ex_adjust = 0x2001052f8 , | scr_fmap = 0x200107420 , | scr_keyval = 0x2001055c8 , | scr_imctrl = 0x2001054e8 , | scr_insertln = 0x200105598 , | scr_optchange = 0x200107588 , | scr_move = 0x200105670 , | scr_refresh = 0x2001056e8 , | scr_rename = 0x2001058d0 , | scr_reply = 0x0, | scr_screen = 0x200106788 , | scr_split = 0x2001059d0 , | scr_suspend = 0x200105a50 , | scr_usage = 0x200105c68 , | th_private = 0x0, | run = 0x200123e20 , | lock_init = 0x200123e38 , | lock_try = 0x200123e38 , | lock_unlock = 0x200123e38 , | lock_end = 0x200123e38 | } | (gdb) p gp | $2 = | (gdb) disas/s | Dump of assembler code for function ex_writefp: | /tmp/src/external/bsd/nvi/dist/ex/ex_write.c: | 293 { | 294 struct stat sb; | 295 GS *gp; | 296 u_long ccnt; /* XXX: can't print off_t portably. */ | 297 db_recno_t fline, tline, lcnt; | 298 size_t len; | 299 int rval; | 300 const char *msg; | 301 CHAR_T *p; | 302 const char *f; | 303 size_t flen; | 304 | 305 gp = sp->gp; | 0x000000020011e130 <+0>: stp x19, x20, [sp, #-320]! | 0x000000020011e134 <+4>: mov x19, x2 | 0x000000020011e138 <+8>: ldr w20, [x3] | 0x000000020011e13c <+12>: stp x23, x24, [sp, #32] | => 0x000000020011e140 <+16>: ldr w23, [x4] | 0x000000020011e144 <+20>: str d8, [sp, #88] | 0x000000020011e148 <+24>: fmov d8, x1 | 0x000000020011e14c <+28>: ldr x1, [x0, #48] | 0x000000020011e150 <+32>: stp x21, x22, [sp, #16] | 0x000000020011e154 <+36>: stp x27, x28, [sp, #64] | 0x000000020011e158 <+40>: mov x28, x0 | 0x000000020011e15c <+44>: mov w27, w7 | 0x000000020011e160 <+48>: str x30, [sp, #80] | 0x000000020011e164 <+52>: str x1, [sp, #104] | | 306 fline = fm->lno; | 307 tline = tm->lno; | 308 | 309 if (nlno != NULL) { | 0x000000020011e168 <+56>: stp x5, x6, [sp, #112] | 0x000000020011e16c <+60>: cbz x5, 0x20011e178 | | [... more assembler dump output truncated ...] | End of assembler dump. | (gdb) info reg | x0 0xf1ef4e281000 266010110726144 | x1 0x20014b520 8591291680 | x2 0xf1ef4e48e730 266010112878384 | x3 0xf1ef4e6db118 266010115289368 | x4 0x0 0 | x5 0x0 0 | x6 0x0 0 | x7 0x1 1 | x8 0x3808 14344 | x9 0x6 6 | x10 0x40 64 | x11 0x3f 63 | x12 0x3c7bd3923ca 4156408013770 | x13 0x3c7bd3923cd 4156408013773 | x14 0xf1ef4e6acd38 266010115099960 | x15 0xf1ef4e48f378 266010112881528 | x16 0xf1ef4e4817d8 266010112825304 | x17 0xf1ef4e2e9c98 266010111155352 | x18 0x1c10 7184 | x19 0xf1ef4e48e730 266010112878384 | x20 0x1 1 | x21 0xf1ef4e6db118 266010115289368 | x22 0x0 0 | x23 0x0 0 | x24 0xf1ef4e48e698 266010112878232 | x25 0xd44 3396 | x26 0x0 0 | x27 0x0 0 | x28 0xf1ef4e6db050 266010115289168 | x29 0x0 0 | x30 0x200112004 8591056900 | sp 0xffffff9f3860 0xffffff9f3860 | pc 0x20011e140 0x20011e140 | cpsr 0x80000000 [ EL=0 N ] | fpsr 0x0 0 | fpcr 0x0 0 | (gdb) p $x23 | $3 = 0 | (gdb) p $x24 | $4 = 266010112878232 | (gdb) p $sp | $5 = (void *) 0xffffff9f3860 | (gdb) p $sp + 0x32 | $6 = (void *) 0xffffff9f3892 | (gdb) x/16x $sp + 0x32 | 0xffffff9f3892: 0x00000000 0x00000000 0x00000000 0x38d00000 | 0xffffff9f38a2: 0xffffff9f 0x382c0000 0xf1ef4e38 0x00040000 | 0xffffff9f38b2: 0x00000000 0xea680000 0xf1ef4e69 0x000d0000 | 0xffffff9f38c2: 0x00000000 0x00080000 0x00000000 0x00010000 | (gdb) p $w23 | $7 = 0 | (gdb) p $x4 | $8 = 0 Rebuilding with `-O0' (by default `-O2' is used) vi(1) doesn't crashes when doing `:%!sort' and the text is piped and sorted as expected. Trying to put a breakpoint on ex_writefp() and analyzing that: | % gdb -p 16366 | Attaching to process 16366 | Reading symbols from /tmp/src/external/bsd/nvi/usr.bin/nvi/./vi... | Reading symbols from /tmp/src/external/bsd/nvi/usr.bin/nvi/vi.debug... | Reading symbols from /usr/lib/libcurses.so.8... | Reading symbols from /usr/libdata/debug//usr/lib/libcurses.so.8.2.debug... | Reading symbols from /usr/lib/libterminfo.so.1... | Reading symbols from /usr/libdata/debug//usr/lib/libterminfo.so.1.0.debug... | Reading symbols from /usr/lib/libutil.so.7... | Reading symbols from /usr/libdata/debug//usr/lib/libutil.so.7.24.debug... | Reading symbols from /usr/lib/libc.so.12... | Reading symbols from /usr/libdata/debug//usr/lib/libc.so.12.214.debug... | Reading symbols from /usr/lib/i18n/libUTF8.so.5.0... | Reading symbols from /usr/libdata/debug//usr/lib/i18n/libUTF8.so.5.0.debug... | Reading symbols from /usr/libexec/ld.elf_so... | Reading symbols from /usr/libdata/debug//usr/libexec/ld.elf_so.debug... | [Switching to LWP 1 of process 16366] | 0x0000fceb4f6b85a0 in read () from /usr/lib/libc.so.12 | (gdb) b ex_writefp | Breakpoint 1 at 0x20012d92c: file /tmp/src/external/bsd/nvi/dist/ex/ex_write.c, line 305. | (gdb) set pagination off | (gdb) set follow-fork-mode child | (gdb) set detach-on-fork off | (gdb) c | Continuing. | [Attaching after LWP 1 of process 16366 vfork to child LWP 1 of process 14304] | [New inferior 2 (process 14304)] | process 14304 is executing new program: /usr/pkg/bin/tcsh | [New process 14304] | [Attaching after process 14304 fork to child process 10597] | [New inferior 3 (process 10597)] | Reading symbols from /usr/libdata/debug/usr/lib/libterminfo.so.1.0.debug... | Reading symbols from /usr/libdata/debug/usr/lib/libcrypt.so.1.0.debug... | Reading symbols from /usr/libdata/debug/usr/lib/libc.so.12.214.debug... | Reading symbols from /usr/libdata/debug/usr/lib/i18n/libUTF8.so.5.0.debug... | Reading symbols from /usr/libdata/debug/usr/lib/i18n/libiconv_std.so.5.0.debug... | Reading symbols from /usr/libdata/debug/usr/lib/i18n/libmapper_none.so.5.0.debug... | Reading symbols from /usr/libdata/debug/libexec/ld.elf_so.debug... | [Inferior 3 (process 10597) exited normally] | (gdb) info inferiors | Num Description Executable | 1 process 16366 /tmp/src/external/bsd/nvi/usr.bin/nvi/vi | 2 process 14304 /usr/pkg/bin/tcsh | * 3 /usr/pkg/bin/tcsh | (gdb) inferior 1 | [Switching to inferior 1 [process 16366] (/tmp/src/external/bsd/nvi/usr.bin/nvi/vi)] | [Switching to thread 1.1 (LWP 1 of process 16366)] | #0 0x0000fceb4f705908 in __vfork14 () from /usr/lib/libc.so.12 | (gdb) c | Continuing. | [New process 16366] | [Attaching after process 16366 fork to child process 15574] | [New inferior 4 (process 15574)] | Reading symbols from /tmp/src/external/bsd/nvi/usr.bin/nvi/vi.debug... | Reading symbols from /usr/libdata/debug/usr/lib/libcurses.so.8.2.debug... | Reading symbols from /usr/libdata/debug/usr/lib/libterminfo.so.1.0.debug... | Reading symbols from /usr/libdata/debug/usr/lib/libutil.so.7.24.debug... | Reading symbols from /usr/libdata/debug/usr/lib/libc.so.12.214.debug... | Reading symbols from /usr/libdata/debug/usr/lib/i18n/libUTF8.so.5.0.debug... | Reading symbols from /usr/libdata/debug/libexec/ld.elf_so.debug... | [Switching to LWP 1 of process 15574] | | Thread 4.1 "" hit Breakpoint 1, ex_writefp (sp=0xfceb4f657000, name=0x200175588 "filter", fp=0xfceb4f85e730, fm=0xfceb4fb0c118, tm=0xfceb4fb0c128, nlno=0x0, nch=0x0, silent=1) at /tmp/src/external/bsd/nvi/dist/ex/ex_write.c:305 | 305 gp = sp->gp; | (gdb) bt | #0 ex_writefp (sp=0xfceb4f657000, name=0x200175588 "filter", fp=0xfceb4f85e730, fm=0xfceb4fb0c118, tm=0xfceb4fb0c128, nlno=0x0, nch=0x0, silent=1) at /tmp/src/external/bsd/nvi/dist/ex/ex_write.c:305 | #1 0x000000020011ae4c in ex_filter (sp=0xfceb4f657000, cmdp=0xfceb4fb0c050, fm=0xfceb4fb0c118, tm=0xfceb4fb0c128, rp=0xffffffc5e210, cmd=0xfceb4f4dc000 L"sort", ftype=FILTER_BANG) at /tmp/src/external/bsd/nvi/dist/ex/ex_filter.c:238 | #2 0x0000000200117204 in ex_bang (sp=0xfceb4f657000, cmdp=0xfceb4fb0c050) at /tmp/src/external/bsd/nvi/dist/ex/ex_bang.c:162 | #3 0x00000002001106d8 in ex_cmd (sp=0xfceb4f657000) at /tmp/src/external/bsd/nvi/dist/ex/ex.c:1391 | #4 0x0000000200143308 in v_ex (sp=0xfceb4f657000, vp=0xffffffc5e3b8) at /tmp/src/external/bsd/nvi/dist/vi/v_ex.c:418 | #5 0x0000000200155b48 in vi (spp=0xffffffc5e690) at /tmp/src/external/bsd/nvi/dist/vi/vi.c:248 | #6 0x0000000200134470 in editor (wp=0xfceb4fb0c000, argc=0, argv=0xffffffc5e800) at /tmp/src/external/bsd/nvi/dist/common/main.c:436 | #7 0x0000000200107234 in main (argc=1, argv=0xffffffc5e7f8) at /tmp/src/external/bsd/nvi/dist/cl/cl_main.c:134 | (gdb) p *sp->gp | $1 = { | progname = 0xffffffc5ef6a "vi", | id = 2, | dq = { | tqh_first = 0xfceb4fb0c000, | tqh_last = 0xfceb4fb0c000 | }, | hq = { | tqh_first = 0x0, | tqh_last = 0xfceb4f669020 | }, | perl_interp = 0x0, | tcl_interp = 0x0, | cl_private = 0xfceb4faad000, | tk_private = 0x0, | frefq = { | tqh_first = 0xfceb4f64f140, | tqh_last = 0xfceb4f64f8c0 | }, | exfq = { | tqh_first = 0xfceb4f644000, | tqh_last = 0xfceb4f6440e0 | }, | opts = {{ | o_cur = { | val = 136, | str = 0x88 | }, | o_def = { | val = 136, | str = 0x88 | }, | flags = 0 '\000' | }, { | o_cur = { | val = 32, | str = 0x20 | }, | o_def = { | val = 32, | str = 0x20 | }, | flags = 0 '\000' | }, { | o_cur = { | val = 0, | str = 0x0 | }, | o_def = { | val = 0, | str = 0x0 | }, | flags = 0 '\000' | }, { | o_cur = { | val = 278087584522248, | str = 0xfceb4fb12008 "screen" | }, | o_def = { | val = 278087584522720, | str = 0xfceb4fb121e0 "screen" | }, | flags = 0 '\000' | }}, | msg = 0x0, | msgq = { | lh_first = 0x0 | }, | noprint = 1, | c_option = 0x0, | seqq = { | lh_first = 0xfceb4f4d40f0 | }, | seqb = "\000@\001\b", '\000' , | cname = {{ | name = "^@\000\000", | len = 2 '\002' | }, { | name = "^A\000\000", | len = 2 '\002' | }, { | name = "^B\000\000", | len = 2 '\002' | }, { | name = "^C\000\000", | len = 2 '\002' | }, { | name = "^D\000\000", | len = 2 '\002' | }, { | name = "^E\000\000", | len = 2 '\002' | }, { | name = "^F\000\000", | len = 2 '\002' | }, { | name = "^G\000\000", | len = 2 '\002' | }, { | name = "^H\000\000", | len = 2 '\002' | }, { | name = "^I\000\000", | len = 2 '\002' | }, { | name = "^J\000\000", | len = 2 '\002' | }, { | name = "^K\000\000", | len = 2 '\002' | }, { | name = "^L\000\000", | len = 2 '\002' | }, { | name = "^M\000\000", | len = 2 '\002' | }, { | name = "^N\000\000", | len = 2 '\002' | }, { | name = "^O\000\000", | len = 2 '\002' | }, { | name = "^P\000\000", | len = 2 '\002' | }, { | name = "^Q\000\000", | len = 2 '\002' | }, { | name = "^R\000\000", | len = 2 '\002' | }, { | name = "^S\000\000", | len = 2 '\002' | }, { | name = "^T\000\000", | len = 2 '\002' | }, { | name = "^U\000\000", | len = 2 '\002' | }, { | name = "^V\000\000", | len = 2 '\002' | }, { | name = "^W\000\000", | len = 2 '\002' | }, { | name = "^X\000\000", | len = 2 '\002' | }, { | name = "^Y\000\000", | len = 2 '\002' | }, { | name = "^Z\000\000", | len = 2 '\002' | }, { | name = "^[\000\000", | len = 2 '\002' | }, { | name = "^\\\000\000", | len = 2 '\002' | }, { | name = "^]\000\000", | len = 2 '\002' | }, { | name = "^^\000\000", | len = 2 '\002' | }, { | name = "^_\000\000", | len = 2 '\002' | }, { | name = " \000\000\000", | len = 1 '\001' | }, { | name = "!\000\000\000", | len = 1 '\001' | }, { | name = "\"\000\000\000", | len = 1 '\001' | }, { | name = "#\000\000\000", | len = 1 '\001' | }, { | name = "$\000\000\000", | len = 1 '\001' | }, { | name = "%\000\000\000", | len = 1 '\001' | }, { | name = "&\000\000\000", | len = 1 '\001' | }, { | name = "'\000\000\000", | len = 1 '\001' | }, { | name = "(\000\000\000", | len = 1 '\001' | }, { | name = ")\000\000\000", | len = 1 '\001' | }, { | name = "*\000\000\000", | len = 1 '\001' | }, { | name = "+\000\000\000", | len = 1 '\001' | }, { | name = ",\000\000\000", | len = 1 '\001' | }, { | name = "-\000\000\000", | len = 1 '\001' | }, { | name = ".\000\000\000", | len = 1 '\001' | }, { | name = "/\000\000\000", | len = 1 '\001' | }, { | name = "0\000\000\000", | len = 1 '\001' | }, { | name = "1\000\000\000", | len = 1 '\001' | }, { | name = "2\000\000\000", | len = 1 '\001' | }, { | name = "3\000\000\000", | len = 1 '\001' | }, { | name = "4\000\000\000", | len = 1 '\001' | }, { | name = "5\000\000\000", | len = 1 '\001' | }, { | name = "6\000\000\000", | len = 1 '\001' | }, { | name = "7\000\000\000", | len = 1 '\001' | }, { | name = "8\000\000\000", | len = 1 '\001' | }, { | name = "9\000\000\000", | len = 1 '\001' | }, { | name = ":\000\000\000", | len = 1 '\001' | }, { | name = ";\000\000\000", | len = 1 '\001' | }, { | name = "<\000\000\000", | len = 1 '\001' | }, { | name = "=\000\000\000", | len = 1 '\001' | }, { | name = ">\000\000\000", | len = 1 '\001' | }, { | name = "?\000\000\000", | len = 1 '\001' | }, { | name = "@\000\000\000", | len = 1 '\001' | }, { | name = "A\000\000\000", | len = 1 '\001' | }, { | name = "B\000\000\000", | len = 1 '\001' | }, { | name = "C\000\000\000", | len = 1 '\001' | }, { | name = "D\000\000\000", | len = 1 '\001' | }, { | name = "E\000\000\000", | len = 1 '\001' | }, { | name = "F\000\000\000", | len = 1 '\001' | }, { | name = "G\000\000\000", | len = 1 '\001' | }, { | name = "H\000\000\000", | len = 1 '\001' | }, { | name = "I\000\000\000", | len = 1 '\001' | }, { | name = "J\000\000\000", | len = 1 '\001' | }, { | name = "K\000\000\000", | len = 1 '\001' | }, { | name = "L\000\000\000", | len = 1 '\001' | }, { | name = "M\000\000\000", | len = 1 '\001' | }, { | name = "N\000\000\000", | len = 1 '\001' | }, { | name = "O\000\000\000", | len = 1 '\001' | }, { | name = "P\000\000\000", | len = 1 '\001' | }, { | name = "Q\000\000\000", | len = 1 '\001' | }, { | name = "R\000\000\000", | len = 1 '\001' | }, { | name = "S\000\000\000", | len = 1 '\001' | }, { | name = "T\000\000\000", | len = 1 '\001' | }, { | name = "U\000\000\000", | len = 1 '\001' | }, { | name = "V\000\000\000", | len = 1 '\001' | }, { | name = "W\000\000\000", | len = 1 '\001' | }, { | name = "X\000\000\000", | len = 1 '\001' | }, { | name = "Y\000\000\000", | len = 1 '\001' | }, { | name = "Z\000\000\000", | len = 1 '\001' | }, { | name = "[\000\000\000", | len = 1 '\001' | }, { | name = "\\\000\000\000", | len = 1 '\001' | }, { | name = "]\000\000\000", | len = 1 '\001' | }, { | name = "^\000\000\000", | len = 1 '\001' | }, { | name = "_\000\000\000", | len = 1 '\001' | }, { | name = "`\000\000\000", | len = 1 '\001' | }, { | name = "a\000\000\000", | len = 1 '\001' | }, { | name = "b\000\000\000", | len = 1 '\001' | }, { | name = "c\000\000\000", | len = 1 '\001' | }, { | name = "d\000\000\000", | len = 1 '\001' | }, { | name = "e\000\000\000", | len = 1 '\001' | }, { | name = "f\000\000\000", | len = 1 '\001' | }, { | name = "g\000\000\000", | len = 1 '\001' | }, { | name = "h\000\000\000", | len = 1 '\001' | }, { | name = "i\000\000\000", | len = 1 '\001' | }, { | name = "j\000\000\000", | len = 1 '\001' | }, { | name = "k\000\000\000", | len = 1 '\001' | }, { | name = "l\000\000\000", | len = 1 '\001' | }, { | name = "m\000\000\000", | len = 1 '\001' | }, { | name = "n\000\000\000", | len = 1 '\001' | }, { | name = "o\000\000\000", | len = 1 '\001' | }, { | name = "p\000\000\000", | len = 1 '\001' | }, { | name = "q\000\000\000", | len = 1 '\001' | }, { | name = "r\000\000\000", | len = 1 '\001' | }, { | name = "s\000\000\000", | len = 1 '\001' | }, { | name = "t\000\000\000", | len = 1 '\001' | }, { | name = "u\000\000\000", | len = 1 '\001' | }, { | name = "v\000\000\000", | len = 1 '\001' | }, { | name = "w\000\000\000", | len = 1 '\001' | }, { | name = "x\000\000\000", | len = 1 '\001' | }, { | name = "y\000\000\000", | len = 1 '\001' | }, { | name = "z\000\000\000", | len = 1 '\001' | }, { | name = "{\000\000\000", | len = 1 '\001' | }, { | name = "|\000\000\000", | len = 1 '\001' | }, { | name = "}\000\000\000", | len = 1 '\001' | }, { | name = "~\000\000\000", | len = 1 '\001' | }, { | name = "^?\000\000", | len = 2 '\002' | }, { | name = "\\x80", | len = 4 '\004' | }, { | name = "\\x81", | len = 4 '\004' | }, { | name = "\\x82", | len = 4 '\004' | }, { | name = "\\x83", | len = 4 '\004' | }, { | name = "\\x84", | len = 4 '\004' | }, { | name = "\\x85", | len = 4 '\004' | }, { | name = "\\x86", | len = 4 '\004' | }, { | name = "\\x87", | len = 4 '\004' | }, { | name = "\\x88", | len = 4 '\004' | }, { | name = "\\x89", | len = 4 '\004' | }, { | name = "\\x8a", | len = 4 '\004' | }, { | name = "\\x8b", | len = 4 '\004' | }, { | name = "\\x8c", | len = 4 '\004' | }, { | name = "\\x8d", | len = 4 '\004' | }, { | name = "\\x8e", | len = 4 '\004' | }, { | name = "\\x8f", | len = 4 '\004' | }, { | name = "\\x90", | len = 4 '\004' | }, { | name = "\\x91", | len = 4 '\004' | }, { | name = "\\x92", | len = 4 '\004' | }, { | name = "\\x93", | len = 4 '\004' | }, { | name = "\\x94", | len = 4 '\004' | }, { | name = "\\x95", | len = 4 '\004' | }, { | name = "\\x96", | len = 4 '\004' | }, { | name = "\\x97", | len = 4 '\004' | }, { | name = "\\x98", | len = 4 '\004' | }, { | name = "\\x99", | len = 4 '\004' | }, { | name = "\\x9a", | len = 4 '\004' | }, { | name = "\\x9b", | len = 4 '\004' | }, { | name = "\\x9c", | len = 4 '\004' | }, { | name = "\\x9d", | len = 4 '\004' | }, { | name = "\\x9e", | len = 4 '\004' | }, { | name = "\\x9f", | len = 4 '\004' | }, { | name = "\\xa0", | len = 4 '\004' | }, { | name = "\\xa1", | len = 4 '\004' | }, { | name = "\\xa2", | len = 4 '\004' | }, { | name = "\\xa3", | len = 4 '\004' | }, { | name = "\\xa4", | len = 4 '\004' | }, { | name = "\\xa5", | len = 4 '\004' | }, { | name = "\\xa6", | len = 4 '\004' | }, { | name = "\\xa7", | len = 4 '\004' | }, { | name = "\\xa8", | len = 4 '\004' | }, { | name = "\\xa9", | len = 4 '\004' | }, { | name = "\\xaa", | len = 4 '\004' | }, { | name = "\\xab", | len = 4 '\004' | }, { | name = "\\xac", | len = 4 '\004' | }, { | name = "\\xad", | len = 4 '\004' | }, { | name = "\\xae", | len = 4 '\004' | }, { | name = "\\xaf", | len = 4 '\004' | }, { | name = "\\xb0", | len = 4 '\004' | }, { | name = "\\xb1", | len = 4 '\004' | }, { | name = "\\xb2", | len = 4 '\004' | }, { | name = "\\xb3", | len = 4 '\004' | }, { | name = "\\xb4", | len = 4 '\004' | }, { | name = "\\xb5", | len = 4 '\004' | }, { | name = "\\xb6", | len = 4 '\004' | }, { | name = "\\xb7", | len = 4 '\004' | }, { | name = "\\xb8", | len = 4 '\004' | }, { | name = "\\xb9", | len = 4 '\004' | }, { | name = "\\xba", | len = 4 '\004' | }, { | name = "\\xbb", | len = 4 '\004' | }, { | name = "\\xbc", | len = 4 '\004' | }, { | name = "\\xbd", | len = 4 '\004' | }, { | name = "\\xbe", | len = 4 '\004' | }, { | name = "\\xbf", | len = 4 '\004' | }, { | name = "\\xc0", | len = 4 '\004' | }, { | name = "\\xc1", | len = 4 '\004' | }, { | name = "\\xc2", | len = 4 '\004' | }, { | name = "\\xc3", | len = 4 '\004' | }, { | name = "\\xc4", | len = 4 '\004' | }, { | name = "\\xc5", | len = 4 '\004' | }, { | name = "\\xc6", | len = 4 '\004' | }, { | name = "\\xc7", | len = 4 '\004' | }...}, | special_key = {K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_CNTRLD, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_VERASE, K_TAB, K_NL, K_NOTUSED, K_FORMFEED, K_CR, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_VLNEXT, K_CNTRLR, K_NOTUSED, K_CNTRLT, K_VKILL, K_VLNEXT, K_VWERASE, K_HEXCHAR, K_NOTUSED, K_CNTRLZ, K_ESCAPE, K_NOTUSED , K_RIGHTPAREN, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_ZERO, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_NOTUSED, K_COLON, K_NOTUSED , K_BACKSLASH, K_NOTUSED, K_CARAT, K_NOTUSED , K_RIGHTBRACE, K_NOTUSED, K_VERASE, K_NOTUSED }, | flags = 64, | scr_addstr = 0x200105b10 , | scr_waddstr = 0x200105ae4 , | scr_attr = 0x200105b3c , | scr_baud = 0x200105d64 , | scr_bell = 0x200105e38 , | scr_busy = 0x200159a1c , | scr_child = 0x0, | scr_clrtoeol = 0x200105ef0 , | scr_cursor = 0x200105f40 , | scr_deleteln = 0x200105fb0 , | scr_discard = 0x20010614c , | scr_event = 0x200107ae0 , | scr_ex_adjust = 0x200106280 , | scr_fmap = 0x200109a1c , | scr_keyval = 0x200106558 , | scr_imctrl = 0x200106410 , | scr_insertln = 0x200106508 , | scr_optchange = 0x200109c48 , | scr_move = 0x2001066ac , | scr_refresh = 0x200106750 , | scr_rename = 0x200106a1c , | scr_reply = 0x0, | scr_screen = 0x2001082b8 , | scr_split = 0x200106bf8 , | scr_suspend = 0x200106cf0 , | scr_usage = 0x200106f8c , | th_private = 0x0, | run = 0x200137250 , | lock_init = 0x200137278 , | lock_try = 0x200137278 , | lock_unlock = 0x200137278 , | lock_end = 0x200137278 | } | (gdb) p gp | $2 = (GS *) 0x200195008 | (gdb) disas/s | Dump of assembler code for function ex_writefp: | /tmp/src/external/bsd/nvi/dist/ex/ex_write.c: | 293 { | 0x000000020012d904 <+0>: sub sp, sp, #0x140 | 0x000000020012d908 <+4>: str x30, [sp] | 0x000000020012d90c <+8>: str x0, [sp, #72] | 0x000000020012d910 <+12>: str x1, [sp, #64] | 0x000000020012d914 <+16>: str x2, [sp, #56] | 0x000000020012d918 <+20>: str x3, [sp, #48] | 0x000000020012d91c <+24>: str x4, [sp, #40] | 0x000000020012d920 <+28>: str x5, [sp, #32] | 0x000000020012d924 <+32>: str x6, [sp, #24] | 0x000000020012d928 <+36>: str w7, [sp, #20] | | 294 struct stat sb; | 295 GS *gp; | 296 u_long ccnt; /* XXX: can't print off_t portably. */ | 297 db_recno_t fline, tline, lcnt; | 298 size_t len; | 299 int rval; | 300 const char *msg; | 301 CHAR_T *p; | 302 const char *f; | 303 size_t flen; | 304 | 305 gp = sp->gp; | => 0x000000020012d92c <+40>: ldr x0, [sp, #72] | 0x000000020012d930 <+44>: ldr x0, [x0, #48] | 0x000000020012d934 <+48>: str x0, [sp, #280] | | 306 fline = fm->lno; | 0x000000020012d938 <+52>: ldr x0, [sp, #48] | 0x000000020012d93c <+56>: ldr w0, [x0] | 0x000000020012d940 <+60>: str w0, [sp, #308] | | 307 tline = tm->lno; | 0x000000020012d944 <+64>: ldr x0, [sp, #40] | 0x000000020012d948 <+68>: ldr w0, [x0] | 0x000000020012d94c <+72>: str w0, [sp, #276] | | [... more assembler dump output truncated ...] | End of assembler dump. | (gdb) info reg | x0 0xfceb4f657000 278087579561984 | x1 0x200175588 8591463816 | x2 0xfceb4f85e730 278087581689648 | x3 0xfceb4fb0c118 278087584497944 | x4 0xfceb4fb0c128 278087584497960 | x5 0x0 0 | x6 0x0 0 | x7 0x1 1 | x8 0x3808 14344 | x9 0x6 6 | x10 0x40 64 | x11 0x3f 63 | x12 0x3f3ad3e17ca 4345118463946 | x13 0x3f3ad3e17cd 4345118463949 | x14 0xfceb4fa7d238 278087583912504 | x15 0xfceb4f85f378 278087581692792 | x16 0xfceb4f8517d8 278087581636568 | x17 0xfceb4f6b9c98 278087579966616 | x18 0x1c10 7184 | x19 0x20010b378 8591029112 | x20 0x200195008 8591593480 | x21 0xffffffc5ffe0 281474972909536 | x22 0x200196640 8591599168 | x23 0x0 0 | x24 0xffffffc5ffe0 281474972909536 | x25 0xfffffbd40000 281474906718208 | x26 0x0 0 | x27 0x0 0 | x28 0x0 0 | x29 0x0 0 | x30 0x20011ae4c 8591093324 | sp 0xffffffc5dff0 0xffffffc5dff0 | pc 0x20012d92c 0x20012d92c | cpsr 0x20000000 [ EL=0 C ] | fpsr 0x0 0 | fpcr 0x0 0 | (gdb) p $sp | $3 = (void *) 0xffffffc5dff0 | (gdb) p $sp + 0x72 | $4 = (void *) 0xffffffc5e062 | (gdb) x/16x $sp + 0x72 | 0xffffffc5e062: 0x00000000 0xeaac0000 0xfceb4f7c 0xb3780000 | 0xffffffc5e072: 0x00020010 0x50080000 0x00020019 0xffe00000 | 0xffffffc5e082: 0xffffffc5 0xae0c0000 0x00020011 0xebc00000 | 0xffffffc5e092: 0x06014fa6 0x90100000 0xfceb4fb1 0x39100000 | (gdb) p $w7 | $5 = 1 | (gdb) p $sp + 0x20 | $6 = (void *) 0xffffffc5e010 | (gdb) x/16x $sp + 0x20 | 0xffffffc5e010: 0x00000000 0x00000000 0x4fb0c128 0x0000fceb | 0xffffffc5e020: 0x4fb0c118 0x0000fceb 0x4f85e730 0x0000fceb | 0xffffffc5e030: 0x00175588 0x00000002 0x4f657000 0x0000fceb | 0xffffffc5e040: 0x00000004 0x00000000 0x4fa6ea68 0x0000fceb | (gdb) quit | A debugging session is active. | | Inferior 1 [process 16366] will be detached. | Inferior 2 [process 14304] will be detached. | Inferior 4 [process 15574] will be detached. | | Quit anyway? (y or n) y | Detaching from program: /tmp/src/external/bsd/nvi/usr.bin/nvi/vi, process 16366 | [Inferior 1 (process 16366) detached] | Detaching from program: /usr/pkg/bin/tcsh, process 14304 | [Inferior 2 (process 14304) detached] | Detaching from program: /tmp/src/external/bsd/nvi/usr.bin/nvi/vi, process 15574 | [Inferior 4 (process 15574) detached]