Date: Sat, 23 Apr 2005 17:02:18 +0800 (CST) From: Uranus <uranus@it.muds.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/80274: GDB console problem (ddd-3.3.10 with FreeBSD 5.4-STABLE) Message-ID: <200504230902.j3N92Idc006539@it.muds.net> Resent-Message-ID: <200504230910.j3N9ADig019342@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 80274 >Category: ports >Synopsis: GDB console problem (ddd-3.3.10 with FreeBSD 5.4-STABLE) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Apr 23 09:10:13 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Uranus <uranus@it.muds.net> >Release: FreeBSD 5.4-STABLE i386 >Organization: >Environment: System: FreeBSD it.muds.net 5.4-STABLE FreeBSD 5.4-STABLE #0: Wed Apr 20 01:23:46 CST 2005 root@it.muds.net:/usr/obj/usr/src/sys/ED i386 >Description: The `GDB console' is a box, which is in the bottom of the DDD GUI. It was broken since FreeBSD 5.2-CURRENT with any xorg lib versions. While I input any two characters after the (gdb) prompt without hit `enter' key, I will get the following error messages after my input characters: Undefined command: "". Try "help". I tried to find out the problem, but I don't have enough knowledge about the Xwindow event system. The following steps are my simply worked about: 1. compile the ddd without optimization flags and append `-ggdb' 2. load ddd by gdb, set a breakpoint at LiterateA.C:142 3. start the ddd 4. input `continue' until the program be blocked. We can see some messages: -------------------------------------------------------------------------- Starting program: /usr/ports/devel/ddd/work/ddd-3.3.10/ddd/ddd Breakpoint 1, LiterateAgent::write (this=0x833ec00, data=0x84a530c "GNU DDD 3.3.10 (i386-portbld-freebsd5.4), by Dorothea L?keh 142 { (gdb) cont Continuing. Breakpoint 1, LiterateAgent::write (this=0x833ec00, data=0x84a530c "Copyright ?1995-1999 Technische Universität Braunschweig, Germany.\n", length=68) at LiterateA.C:142 142 { (gdb) Continuing. Breakpoint 1, LiterateAgent::write (this=0x833ec00, data=0x84a530c "Copyright ?1999-2001 Universität Passau, Germany.\n", length=51) at LiterateA.C:142 142 { (gdb) Continuing. <omitted> Breakpoint 1, LiterateAgent::write (this=0x833ec00, data=0x856ab0c "info files\n", length=11) at LiterateA.C:142 142 { (gdb) Continuing. Breakpoint 1, LiterateAgent::write (this=0x833ec00, data=0x85e388c "info program\n", length=13) at LiterateA.C:142 142 { (gdb) -------------------------------------------------------------------------- We can see some intial commands which were auto sent by ddd. The LiterateAgent::write() got the correct command strings. 5. input any two characters without hit the `enter' key. We can see the follow messages in the gdb: -------------------------------------------------------------------------- Breakpoint 1, LiterateAgent::write (this=0x833ec00, data=0x856a9cc ".\n", length=2) at LiterateA.C:142 142 { (gdb) -------------------------------------------------------------------------- Obviously, the LiterateAgent::write() didn't get the two characters. It got ".\n". 6. input the `backtrace' command in the gdb. We can see the following stack frame information: -------------------------------------------------------------------------- #0 LiterateAgent::write (this=0x833ec00, data=0x856bbec ".\n", length=2) at LiterateA.C:142 #1 0x081b6082 in GDBAgent::write (this=0x833ec00, data=0x856bbec ".\n", length=2) at GDBAgent.C:1684 #2 0x081bc25f in GDBAgent::write (this=0x833ec00, data=@0xbfbfe100) at GDBAgent.h:784 #3 0x081b626b in GDBAgent::write_cmd (this=0x833ec00, cmd=@0xbfbfe100) at GDBAgent.C:1701 #4 0x081b2fe3 in GDBAgent::send_user_cmd_plus (this=0x833ec00, cmds=@0xbfbfe080, qu_datas=@0xbfbfe070, qu_count=1, on_qu_array_completion=0x80e7bd8 <extra_completed>, qa_data=0x85e0180, qa_data_registered=@0xbfbfe06f, user_cmd={rep = 0x856bbe0}, user_data=0x8713c00) at GDBAgent.C:597 #5 0x080e3849 in send_gdb_command (cmd={rep = 0x856b880}, origin=0x849ea00, callback=0, extra_callback=0, data=0x0, echo=true, verbose=true, prompt=true, check=true, start_undo=true) at comm-manag.C:1832 #6 0x0817d6c8 in _do_gdb_command (c=@0xbfbfe280, is_command=true) at Command.C:325 #7 0x0817dade in do_gdb_command (given_c=@0xbfbfe2e0, is_command=true) at Command.C:446 #8 0x0817e161 in gdb_command (c0=@0xbfbfe330) at Command.C:665 #9 0x080d3204 in gdb_command (command=@0xbfbfe3b0, origin=0x849ea00) at Command.h:199 #10 0x080f52bf in gdbChangeCB (w=0x849ea00) at editing.C:764 #11 0x2859ceed in XtCallCallbackList () from /usr/X11R6/lib/libXt.so.6 #12 0x283a7944 in _XmTextValueChanged (initiator=0x849ea00, event=0xbfbfe8e0) at TextStrSo.c:1489 #13 0x2838ce27 in SelfInsert (w=0x849ea00, event=0xbfbfe8e0, params=0x0, num_params=0x285d8cb8) at TextIn.c:1446 #14 0x285ca220 in HandleActions () from /usr/X11R6/lib/libXt.so.6 #15 0x285ca6b3 in HandleSimpleState () from /usr/X11R6/lib/libXt.so.6 #16 0x285cabc4 in _XtTranslateEvent () from /usr/X11R6/lib/libXt.so.6 #17 0x285a825a in XtDispatchEventToWidget () from /usr/X11R6/lib/libXt.so.6 #18 0x285a8bea in _XtDefaultDispatcher () from /usr/X11R6/lib/libXt.so.6 #19 0x285a8dbd in XtDispatchEvent () from /usr/X11R6/lib/libXt.so.6 #20 0x08054fba in process_next_event () at ddd.C:3239 #21 0x0811f4cb in ddd_main_loop () at mainloop.C:102 #22 0x08054ee9 in main (argc=1, argv=0xbfbfe9ec) at ddd.C:3167 -------------------------------------------------------------------------- I tried to switch the stack frames between 0 and 13 and ensure them got the incorrect input strings. I had some curious about the frame 20. What kind of event the process_next_event() got? I tried to print it but I have enough knowledge to understand it and had no time to study it. It seems to get incorrect event because I never hit the `enter' key. I only hit two english characters. Would anyone like to solve this problem? >How-To-Repeat: 1. install any 5.3 or higher versions of FreeBSD OS 2. install the ports `ddd-3.3.10' (with xorg-libraries version 6.8.2 or others) 3. run the ddd program on the console's Xwindow or any other Xservers on any remote machines 4. input any two characters without hit the `enter' key 5. the problem will be happended after you input the second character immediately Even if you installed a `clean' and `new' FreeBSD OS, and you only installed the `ddd' ports without any shell/system settings, the problem is also appeared. This problem isn't appeared in FreeBSD 4.x with XFree86. Don't try to repeat it on that environment. >Fix: don't know how to fix it. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504230902.j3N92Idc006539>