gdb --args mged -o moss.g warning: Can not parse XML syscalls information; XML support was disabled at compile time. GNU gdb (Gentoo 7.0 p2) 7.0 Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /usr/brlcad/bin/mged...done. (gdb) break pkg_getclient Breakpoint 1 at 0x40e8a0 (gdb) run Starting program: /usr/brlcad/bin/mged -o moss.g [Thread debugging using libthread_db enabled] WARNING: -o is a developer option and subject to change. Do not use. WARNING: screen number is [0] WARNING: screen number is [0] WARNING: screen number is [0] WARNING: screen number is [0] Breakpoint 1, pkg_getclient (fd=0, switchp=0x7fffe76ccb40, errlog=0x7fffe74a6424 , nodelay=0) at ../../../brlcad/src/libpkg/pkg.c:719 719 unsigned int fromlen = sizeof (from); (gdb) up #1 0x00007fffe74a7a9d in new_client_handler (clientData=0x2a998c8, chan=0x2, host=0x7fffe74a7a50 "UH\211\345H\203\354@H\211}\330H\211u\320H\211U?M\304H\213E\330H\211E\350H\213E\350H\213@\020H\211E\360\307E", , port=15044288) at ../../../brlcad/src/libfb/fbserv_obj.c:837 837 new_client(fbsp, pkg_getclient(fd, pswitch, comm_error, 0), 0); (gdb) print fbsp $1 = (struct fbserv_obj *) 0x2a998b8 (gdb) print *fbsp $2 = {fbs_fbp = 0x2b979d0, fbs_interp = 0x72f740, fbs_listener = { fbsl_fd = 15, fbsl_port = 0, fbsl_listen = 0, fbsl_fbsp = 0x2a998b8}, fbs_clients = {{fbsc_fd = 0, fbsc_pkg = 0x0, fbsc_fbsp = 0x0} }, fbs_callback = 0x7fffe69dd862 , fbs_clientData = 0x2a99870, fbs_mode = 1} (gdb) print fd $3 = 0 (gdb) print pswitch $4 = {{pks_type = 1, pks_handler = 0x7fffe74a693a , pks_title = 0x7fffe74c31fa "Open Framebuffer"}, {pks_type = 2, pks_handler = 0x7fffe74a6a0e , pks_title = 0x7fffe74c320b "Close Framebuffer"}, {pks_type = 3, pks_handler = 0x7fffe74a6aab , pks_title = 0x7fffe74c321d "Clear Framebuffer"}, {pks_type = 4, pks_handler = 0x7fffe74a6b2e , pks_title = 0x7fffe74c322f "Read Pixels"}, {pks_type = 5, pks_handler = 0x7fffe74a6c8f , pks_title = 0x7fffe74c323b "Write Pixels"}, {pks_type = 105, pks_handler = 0x7fffe74a6c8f , pks_title = 0x7fffe74c3248 "Asynch write"}, {pks_type = 6, pks_handler = 0x7fffe74a71be , pks_title = 0x7fffe74c3255 "Cursor"}, {pks_type = 19, pks_handler = 0x7fffe74a724c , pks_title = 0x7fffe74c325c "Get Cursor"}, {pks_type = 9, pks_handler = 0x7fffe74a73bc , pks_title = 0x7fffe74c3267 "Screen Cursor"}, {pks_type = 7, pks_handler = 0x7fffe74a7442 , pks_title = 0x7fffe74c3275 "Window"}, {pks_type = 8, pks_handler = 0x7fffe74a74b5 , pks_title = 0x7fffe74c327c "Zoom"}, {pks_type = 10, pks_handler = 0x7fffe74a7528 , ---Type to continue, or q to quit--- pks_title = 0x7fffe74c3281 "View"}, {pks_type = 11, pks_handler = 0x7fffe74a75d3 , pks_title = 0x7fffe74c3286 "Get View"}, {pks_type = 12, pks_handler = 0x7fffe74a7692 , pks_title = 0x7fffe74c328f "R Map"}, {pks_type = 13, pks_handler = 0x7fffe74a77e4 , pks_title = 0x7fffe74c3295 "W Map"}, {pks_type = 14, pks_handler = 0x7fffe74a79e4 , pks_title = 0x7fffe74c329b "Help Request"}, {pks_type = 23, pks_handler = 0x7fffe74a6903 , pks_title = 0x7fffe74c32a8 "Error Message"}, {pks_type = 22, pks_handler = 0x7fffe74a6903 , pks_title = 0x7fffe74c32b6 "Close Connection"}, {pks_type = 15, pks_handler = 0x7fffe74a6d43 , pks_title = 0x7fffe74c32c7 "Read Rectangle"}, {pks_type = 16, pks_handler = 0x7fffe74a6ec8 , pks_title = 0x7fffe74c32d6 "Write Rectangle"}, {pks_type = 116, pks_handler = 0x7fffe74a6ec8 , pks_title = 0x7fffe74c32d6 "Write Rectangle"}, {pks_type = 32, pks_handler = 0x7fffe74a6f95 , pks_title = 0x7fffe74c32e6 "Read BW Rectangle"}, {pks_type = 33, pks_handler = 0x7fffe74a70f1 , pks_title = 0x7fffe74c32f8 "Write BW Rectangle"}, {pks_type = 133, ---Type to continue, or q to quit--- pks_handler = 0x7fffe74a70f1 , pks_title = 0x7fffe74c32f8 "Write BW Rectangle"}, {pks_type = 17, pks_handler = 0x7fffe74a793f , pks_title = 0x7fffe74c330b "Flush Output"}, {pks_type = 117, pks_handler = 0x7fffe74a793f , pks_title = 0x7fffe74c330b "Flush Output"}, {pks_type = 18, pks_handler = 0x7fffe74a6a61 , pks_title = 0x7fffe74c3318 "Free Resources"}, {pks_type = 30, pks_handler = 0x7fffe74a79a4 , pks_title = 0x7fffe74c3327 "Handle Events"}, {pks_type = 31, pks_handler = 0x7fffe74a72f0 , pks_title = 0x7fffe74c3335 "Set Cursor Shape"}, {pks_type = 131, pks_handler = 0x7fffe74a72f0 , pks_title = 0x7fffe74c3335 "Set Cursor Shape"}, {pks_type = 0, pks_handler = 0, pks_title = 0x0}} (gdb) print comm_error $5 = {void (char *)} 0x7fffe74a6424 (gdb) print *comm_error $6 = {void (char *)} 0x7fffe74a6424 (gdb) print (char *)comm_error $7 = 0x7fffe74a6424 "UH\211\345H\203\354\020H\211}\370H\213u\370H\215=u\314\001" (gdb) down #0 pkg_getclient (fd=0, switchp=0x7fffe76ccb40, errlog=0x7fffe74a6424 , nodelay=0) at ../../../brlcad/src/libpkg/pkg.c:719 719 unsigned int fromlen = sizeof (from); (gdb) print from $8 = {sin_family = 0, sin_port = 0, sin_addr = {s_addr = 0}, sin_zero = "\210,\217\000\000\000\000"} (gdb) n 722 if (_pkg_debug) { (gdb) 731 if (errlog == NULL) (gdb) 735 if (nodelay) { (gdb) 754 s2 = accept(fd, (struct sockaddr *)&from, &fromlen); (gdb) print fd $9 = 0 (gdb) print (struct sockaddr *)&from $10 = (struct sockaddr *) 0x7fffffffcfa0 (gdb) print *(struct sockaddr *)&from $11 = {sa_family = 0, sa_data = "\000\000\000\000\000\000\210,\217\000\000\000\000"} (gdb) print &fromlen $12 = (unsigned int *) 0x7fffffffcf98 (gdb) print fromlen $13 = 16 (gdb) n 756 if (s2 < 0) { (gdb) n 757 if (errno == EINTR) (gdb) print s2 $14 = -1 (gdb) q