bug-ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ddd 3.3.10 source code display bug


From: Arnaud Desitter
Subject: Re: ddd 3.3.10 source code display bug
Date: Thu, 16 Dec 2004 12:35:43 -0000

Hi,

Try to set LANG=C in the environment before starting ddd.
Most probably, this is a problem with Motif.

Regards,

----- Original Message ----- From: "Richard Dengler" <RDengler@t-online.de>
Newsgroups: gmane.comp.debugging.ddd.bugs
Sent: Tuesday, December 14, 2004 6:46 PM
Subject: ddd 3.3.10 source code display bug


Hi!

There is a problem with ddd 3.3.8-104 and ddd 3.3.10, in that it truncates
the source code display at the first occurrence of a non-ascii character, e.g.
a character from the set "äÄüÜöÖß", even if the character is in a comment.
(Was already reported reported by Del Merritt, whom I contacted. A year or so ago).

This occurs at least under SuSE9.1/KDE.
The behaviour is so annoying because it does not even look like bug,
it more feels like a feature  :-).

Changeing the source code is not an option in my case, because many people are involved, and the non-ascii characters also appear in the names of the people
(in the file header!) and, again and again, in other comments or strings.


A simple workaround for me was to replace all non-ascii characters
in SourceView::read_indented() with a question-mark

       const int ch(text[t++]);
       *pos_ptr++ = isascii(ch) ? ch : '?';

(in the while loop near the end of the function).
I did not find out where problem with the display of the characters is.


Actually, to see the non-ascii characters diplayed properly in the source code window is fairly irrelevant, if it is only is possibly to get along with the debugging
(there is no substitute for the ddd).
The ddd-logfile follows below (but seems to be rather irrelevant in this case).

Thank you for the great work.

Regards
Richard  Dengler

----------------------------------------

GNU DDD 3.3.8 (i386-suse-linux-gnu)
Copyright (C) 1995-1999 Technische Universität Braunschweig, Germany.
Copyright (C) 1999-2001 Universität Passau, Germany.
Copyright (C) 2001 Universität des Saarlandes, Germany.

Compiled with GCC 3.3.3 (SuSE Linux), GNU libc 2.3
Requires X11R6, Xt11R6, Motif 2.2.2 (Motif Version 2.2.2)
Includes XPM 3.4.11, Athena Panner (7000002L), DDD core
Built 2004-04-06 by Autobuild <abuild@e33.suse.de>.
$  ddd tst
+  /bin/sh -c 'exec gdb -q -fullname '\''tst'\'''
#  Hello, world!
#  Opening session "107a3696c8000110285168200000027210027"...
#  Enabling core dumps...
#  Enabling core dumps...done.
#  Running GDB (pid 22175, tty /dev/pts/48)...
#  Current language: C/C++
#  Searching "vsllib/ddd.vsl"...
#  Trying "/home/rid/.ddd/vsllib/ddd.vsl"
#  Trying "/usr/share/ddd-3.3.8/vsllib/ddd.vsl"
#  Searching "vsllib/ddd.vsl"..."/usr/share/ddd-3.3.8/vsllib/ddd.vsl".
<- "Using host libthread_db library \"/lib/tls/libthread_db.so.1\".\n"
  "(gdb) "
-> "set prompt (gdb) \n"
# Creating "/home/rid/.ddd/sessions/107a3696c8000110285168200000027210027/"... # Creating "/home/rid/.ddd/sessions/107a3696c8000110285168200000027210027/"...done. # Copying "/home/rid/.ddd/init" to "/home/rid/.ddd/sessions/107a3696c8000110285168200000027210027/init"... # Copying "/home/rid/.ddd/init" to "/home/rid/.ddd/sessions/107a3696c8000110285168200000027210027/init"...done. # Copying "/home/rid/.ddd/history" to "/home/rid/.ddd/sessions/107a3696c8000110285168200000027210027/history"... # Copying "/home/rid/.ddd/history" to "/home/rid/.ddd/sessions/107a3696c8000110285168200000027210027/history"...done. # Saving session in "/home/rid/.ddd/sessions/107a3696c8000110285168200000027210027/init"...
#  Searching "ddd/Ddd"...
#  Trying "/home/rid/.ddd/ddd/Ddd"
#  Trying "/usr/share/ddd-3.3.8/ddd/Ddd"
#  Searching "ddd/Ddd"..."/usr/share/ddd-3.3.8/ddd/Ddd".
# Saving session in "/home/rid/.ddd/sessions/107a3696c8000110285168200000027210027/init"...done.
<- "(gdb) "
-> "set height 0\n"
<- "(gdb) "
-> "set width 0\n"
<- "(gdb) "
-> "set annotate 1\n"
<- "(gdb) "
-> " set verbose off\n"
<- "(gdb) "
-> "info line\n"
<- "No line number information available.\n"
  "(gdb) "
-> "list\n"
<- "22\t\t}\n"
  "23\t\n"
  "24\t};\n"
  "25\t\n"
  "26\t\n"

"27\t/*******************************************************************************\r\n"

"28\t*******************************************************************************/\r\n"
  "29\tint main(int argc, const char* argv[])\n"
  "30\t{\n"
  "31\t\tCThread thread(\"\");\n"
  "(gdb) "
-> "info line\n"
<- "Line 31 of \"main.cpp\" starts at address 0x8048b49 <main+29> and ends at 0x8048b5e <main+50>.\n"
  "\032\032/home/rid/tst2/main.cpp:31:782:beg:0x8048b49\n"
  "(gdb) "
-> "output 4711\n"
<- "4711(gdb) "
-> "show language\n"
<- "The current source language is \"auto; currently c++\".\n"
  "(gdb) "
-> "show version\n"
<- "GNU gdb 6.3\n"
  "Copyright 2004 Free Software Foundation, Inc.\n"
"GDB is free software, covered by the GNU General Public License, and you are\n" "welcome to change it and/or distribute copies of it under certain conditions.\n"
  "Type \"show copying\" to see the conditions.\n"
"There is absolutely no warranty for GDB. Type \"show warranty\" for details.\n"
  "This GDB was configured as \"i686-pc-linux-gnu\".\n"
  "(gdb) "
-> "pwd\n"
<- "Working directory /home/rid/tst2.\n"
  "(gdb) "
-> "info breakpoints\n"
<- "No breakpoints or watchpoints.\n"
  "(gdb) "
-> "show history filename\n"
<- "The filename in which to record the command history is \"/home/rid/tst2/.gdb_history\".\n"
  "(gdb) "
-> "show history size\n"
<- "The size of the command history is 1000.\n"
  "(gdb) "
#  Reading file "/home/rid/tst2/main.cpp"...
#  Reading file "/home/rid/tst2/main.cpp"...done.
#  File "/home/rid/tst2/main.cpp" 42 lines, 1109 characters
#  Setting buttons...
#  Setting buttons...done.
-> "info source\n"
<- "Current source file is main.cpp\n"
  "Compilation directory is /home/rid/tst2\n"
  "Located in /home/rid/tst2/main.cpp\n"
  "Contains 42 lines.\n"
  "Source language is c++.\n"
  "Compiled with DWARF 2 debugging format.\n"
  "Does not include preprocessor macro info.\n"
  "(gdb) "
-> "info files\n"
<- "Symbols from \"/home/rid/tst2/tst\".\n"
  "Local exec file:\n"
  "\t`/home/rid/tst2/tst\', file type elf32-i386.\n"
  "\tEntry point: 0x8048a70\n"
  "\t0x08048154 - 0x08048167 is .interp\n"
  "\t0x08048168 - 0x08048188 is .note.ABI-tag\n"
  "\t0x08048188 - 0x080481a0 is .note.SuSE\n"
  "\t0x080481a0 - 0x0804826c is .hash\n"
  "\t0x0804826c - 0x0804846c is .dynsym\n"
  "\t0x0804846c - 0x08048704 is .dynstr\n"
  "\t0x08048704 - 0x08048744 is .gnu.version\n"
  "\t0x08048744 - 0x080487e4 is .gnu.version_r\n"
  "\t0x080487e4 - 0x08048814 is .rel.dyn\n"
  "\t0x08048814 - 0x080488cc is .rel.plt\n"
  "\t0x080488cc - 0x080488e3 is .init\n"
  "\t0x080488e4 - 0x08048a64 is .plt\n"
  "\t0x08048a70 - 0x08049484 is .text\n"
  "\t0x08049484 - 0x0804949e is .fini\n"
  "\t0x080494a0 - 0x0804952e is .rodata\n"
  "\t0x08049530 - 0x080495ac is .eh_frame_hdr\n"
  "\t0x0804a5c0 - 0x0804a64c is .data\n"
  "\t0x0804a64c - 0x0804a834 is .eh_frame\n"
  "\t0x0804a834 - 0x0804a844 is .gcc_except_table\n"
  "\t0x0804a844 - 0x0804a92c is .dynamic\n"
  "\t0x0804a92c - 0x0804a934 is .ctors\n"
  "\t0x0804a934 - 0x0804a93c is .dtors\n"
  "\t0x0804a93c - 0x0804a940 is .jcr\n"
  "\t0x0804a940 - 0x0804a9b8 is .got\n"
  "\t0x0804a9b8 - 0x0804a9bc is .bss\n"
  "(gdb) "
-> "info program\n"
<- "The program being debugged is not being run.\n"
  "(gdb) "
-> "set confirm off\n"
<- "(gdb) "
-> "source /tmp/dddmjE6EO\n"
<- "The target architecture is set automatically (currently i386)\n"
  "The target endianness is set automatically (currently little endian)\n"
  "/tmp/dddmjE6EO:59: Error in sourced command file:\n"
  "Undefined item: \"`ISO-8859-1\'\".\n"
  "(gdb) "
-> "info breakpoints\n"
<- "No breakpoints or watchpoints.\n"
  "(gdb) "
-> "# reset\n"
<- "(gdb) "
-> "info breakpoints\n"
<- "No breakpoints or watchpoints.\n"
  "(gdb) "
-> "display\n"
<- "(gdb) "
-> "info display\n"
<- "There are no auto-display expressions now.\n"
  "(gdb) "
-> "set environment TERM dumb\n"
<- "(gdb) "
-> "info files\n"
<- "Symbols from \"/home/rid/tst2/tst\".\n"
  "Local exec file:\n"
  "\t`/home/rid/tst2/tst\', file type elf32-i386.\n"
  "\tEntry point: 0x8048a70\n"
  "\t0x08048154 - 0x08048167 is .interp\n"
  "\t0x08048168 - 0x08048188 is .note.ABI-tag\n"
  "\t0x08048188 - 0x080481a0 is .note.SuSE\n"
  "\t0x080481a0 - 0x0804826c is .hash\n"
  "\t0x0804826c - 0x0804846c is .dynsym\n"
  "\t0x0804846c - 0x08048704 is .dynstr\n"
  "\t0x08048704 - 0x08048744 is .gnu.version\n"
  "\t0x08048744 - 0x080487e4 is .gnu.version_r\n"
  "\t0x080487e4 - 0x08048814 is .rel.dyn\n"
  "\t0x08048814 - 0x080488cc is .rel.plt\n"
  "\t0x080488cc - 0x080488e3 is .init\n"
  "\t0x080488e4 - 0x08048a64 is .plt\n"
  "\t0x08048a70 - 0x08049484 is .text\n"
  "\t0x08049484 - 0x0804949e is .fini\n"
  "\t0x080494a0 - 0x0804952e is .rodata\n"
  "\t0x08049530 - 0x080495ac is .eh_frame_hdr\n"
  "\t0x0804a5c0 - 0x0804a64c is .data\n"
  "\t0x0804a64c - 0x0804a834 is .eh_frame\n"
  "\t0x0804a834 - 0x0804a844 is .gcc_except_table\n"
  "\t0x0804a844 - 0x0804a92c is .dynamic\n"
  "\t0x0804a92c - 0x0804a934 is .ctors\n"
  "\t0x0804a934 - 0x0804a93c is .dtors\n"
  "\t0x0804a93c - 0x0804a940 is .jcr\n"
  "\t0x0804a940 - 0x0804a9b8 is .got\n"
  "\t0x0804a9b8 - 0x0804a9bc is .bss\n"
  "(gdb) "
-> "info program\n"
<- "The program being debugged is not being run.\n"
  "(gdb) "
-> "set auto-solib-add on\n"
<- "(gdb) "
-> "set backtrace past-main off\n"
<- "(gdb) "
-> "set coerce-float-to-double on\n"
<- "(gdb) "
-> "set confirm on\n"
<- "(gdb) "
-> "set editing on\n"
<- "(gdb) "
-> "set exec-done-display off\n"
<- "(gdb) "
-> "set history expansion off\n"
<- "(gdb) "
-> "set history save off\n"
<- "(gdb) "
-> "set logging overwrite off\n"
<- "(gdb) "
-> "set logging redirect off\n"
<- "(gdb) "
-> "set opaque-type-resolution on\n"
<- "(gdb) "
-> "set overload-resolution on\n"
<- "(gdb) "
-> "set pagination on\n"
<- "(gdb) "
-> "set print address on\n"
<- "(gdb) "
-> "set print array off\n"
<- "(gdb) "
-> "set print asm-demangle off\n"
<- "(gdb) "
-> "set print demangle on\n"
<- "(gdb) "
-> "set print null-stop off\n"
<- "(gdb) "
-> "set print object off\n"
<- "(gdb) "
-> "set print pascal_static-members on\n"
<- "(gdb) "
-> "set print pretty off\n"
<- "(gdb) "
-> "set print sevenbit-strings off\n"
<- "(gdb) "
-> "set print static-members on\n"
<- "(gdb) "
-> "set print symbol-filename off\n"
<- "(gdb) "
-> "set print union on\n"
<- "(gdb) "
-> "set print vtbl off\n"
<- "(gdb) "
-> "set remotebreak off\n"
<- "(gdb) "
-> "set remotecache off\n"
<- "(gdb) "
-> "set step-mode off\n"
<- "(gdb) "
-> "set symbol-reloading off\n"
<- "(gdb) "
-> "set trust-readonly-sections off\n"
<- "(gdb) "
-> "set unwindonsignal off\n"
<- "(gdb) "
-> "set verbose off\n"
<- "(gdb) "
-> "set write off\n"
<- "(gdb) "
-> "set can-use-hw-watchpoints 1\n"
<- "(gdb) "
-> "set debug arch 0\n"
<- "(gdb) "
-> "set debug event 0\n"
<- "(gdb) "
-> "set debug expression 0\n"
<- "(gdb) "
-> "set debug frame 0\n"
<- "(gdb) "
-> "set debug lin-lwp 0\n"
<- "(gdb) "
-> "set debug overload 0\n"
<- "(gdb) "
-> "set debug remote 0\n"
<- "(gdb) "
-> "set debug serial 0\n"
<- "(gdb) "
-> "set debug target 0\n"
<- "(gdb) "
-> "set debugvarobj 0\n"
<- "(gdb) "
-> "set stop-on-solib-events 0\n"
<- "(gdb) "
-> "set architecture auto\n"
<- "The target architecture is set automatically (currently i386)\n"
  "(gdb) "
-> "set endian auto\n"
<- "The target endianness is set automatically (currently little endian)\n"
  "(gdb) "
-> "set demangle-style auto\n"
<- "(gdb) "
-> "set language auto\n"
<- "(gdb) "
-> "set disassembly-flavor att\n"
<- "(gdb) "
-> "set follow-fork-mode parent\n"
<- "(gdb) "
-> "set check range auto\n"
<- "(gdb) "
-> "set check type auto\n"
<- "(gdb) "
-> "set annotate 1\n"
<- "(gdb) "
-> "set backtrace limit 0\n"
<- "(gdb) "
-> "set breakpoint pending auto\n"
<- "(gdb) "
-> "set case-sensitive auto\n"
<- "(gdb) "
-> "set charset `ISO-8859-1\'\n"
<- "Undefined item: \"`ISO-8859-1\'\".\n"
  "(gdb) "
-> "set complaints 0\n"
<- "(gdb) "
-> "set cp-abi auto\" (currently \"gnu-v3\"\n"
<- "Could not find \"auto\" (currently \"gnu-v3\"\" in ABI list\n"
  "(gdb) "
-> "set debug-file-directory /usr/lib/debug\n"
<- "(gdb) "
-> "set download-write-size 0d512\n"
<- "(gdb) "
-> "set gnutarget auto\n"
<- "(gdb) "
-> "set height 0\n"
<- "(gdb) "
-> "set history filename /home/smau/src/SMU-Startup/MainStartup/.gdb_history\n"
<- "(gdb) "
-> "set history size 0d1000\n"
<- "(gdb) "
-> "set host-charset ISO-8859-1\n"
<- "(gdb) "
-> "set input-radix 0d10\n"
<- "Input radix now set to decimal 10, hex a, octal 12.\n"
  "(gdb) "
-> "set listsize 0d10\n"
<- "(gdb) "
-> "set logging file gdb.txt\n"
<- "(gdb) "
-> "set max-user-call-depth 0d1024\n"
<- "(gdb) "
-> "set os \n"
<- "(gdb) "
-> "set output-radix 0d10\n"
<- "Output radix now set to decimal 10, hex a, octal 12.\n"
  "(gdb) "
-> "set print elements 0d200\n"
<- "(gdb) "
-> "set print max-symbolic-offset 0\n"
<- "(gdb) "
-> "set print repeats 0d10\n"
<- "(gdb) "
-> "set prompt (gdb) \n"
<- "(gdb) "
-> "set remote hardware-breakpoint-limit 0d4294967295\n"
<- "(gdb) "
-> "set remote hardware-watchpoint-limit 0d4294967295\n"
<- "(gdb) "
-> "set remote memory-read-packet-size 0\n"
<- "(gdb) "
-> "set remote memory-write-packet-size 0\n"
<- "(gdb) "
-> "set remote system-call-allowed not allowed\n"
<- "Illegal argument for \"set remote system-call-allowed\" command\n"
  "(gdb) "
-> "set remoteaddresssize 0d32\n"
<- "(gdb) "
-> "set remotebaud 0d4294967295\n"
<- "(gdb) "
-> "set remotelogbase ascii\n"
<- "(gdb) "
-> "set remotetimeout 0d2\n"
<- "(gdb) "
-> "set solib-search-path \n"
<- "(gdb) "
-> "set struct-convention default\n"
<- "(gdb) "
-> "set target-charset ISO-8859-1\n"
<- "(gdb) "
-> "set tui active-border-mode bold-standout\n"
<- "No symbol \"tui\" in current context.\n"
  "(gdb) "
-> "set tui border-kind acs\n"
<- "No symbol \"tui\" in current context.\n"
  "(gdb) "
-> "set tui border-mode normal\n"
<- "No symbol \"tui\" in current context.\n"
  "(gdb) "
-> "set watchdog 0\n"
<- "(gdb) "
-> "set width 0\n"
<- "(gdb) "
-> "set confirm off\n"
<- "(gdb) "
-> "define session\n"
<- ">"
-> "br main\n"
<- ">"
-> "echo ddd-22174-1102851682: run\\n"
  "\n"
<- ">"
-> "end\n"
<- "(gdb) "
-> "define pss\n"
<- ">"
-> "printf \"STL-String =%s|%d>\\n"
  "\", $arg0.c_str(), $arg0.size()\n"
<- ">"
-> "end\n"
<- "(gdb) "
-> "define pqs\n"
<- ">"
-> "set $i = 0\n"
<- ">"
-> "set $unicode = $arg0.d->unicode\n"
<- ">"
-> "printf \"QString =\"\n"
<- ">"
-> "while $i < $arg0.d->len\n"
<- " >"
-> "set $c = $unicode[$i++].ucs\n"
<- " >"
-> "if $c < 32\n"
<- "  >"
-> "printf \"\\\\0%o\", $c\n"
<- "  >"
-> "else\n"
<- "  >"
-> "if $c <= 127\n"
<- "   >"
-> "printf \"%c\", $c\n"
<- "   >"
-> "else\n"
<- "   >"
-> "printf \"\\\\0%o\", $c\n"
<- "   >"
-> "end\n"
<- "  >"
-> "end\n"
<- " >"
-> "end\n"
<- ">"
-> "printf \"|%d>\\n"
  "\", $arg0.d->len\n"
<- ">"
-> "end\n"
<- "(gdb) "
-> "define br\n"
<- ">"
-> "br\n"
<- ">"
-> "end\n"
<- "(gdb) "
-> "define addsourcepath\n"
<- ">"
-> "dir /home/smau/src/SMU/SMU-Database\n"
<- ">"
-> "end\n"
<- "(gdb) "
-> "set confirm on\n"
<- "(gdb) "
#  Opening session "107a3696c8000110285168200000027210027"...done.
#  Welcome to DDD 3.3.8 "Cinnamon" (i386-suse-linux-gnu)
-> "help detach\n"
<- "Detach a process or file previously attached.\n"
"If a process, it is no longer traced, and it continues its execution. If\n" "you were debugging a file, the file is closed and gdb no longer accesses it.\n"
  "(gdb) "
-> "help run\n"
<- "Start debugged program.  You may specify arguments to give it.\n"
"Args may include \"*\", or \"[...]\"; they are expanded using \"sh\".\n" "Input and output redirection with \">\", \"<\", or \">>\" are also allowed.\n"
  "\n"
"With no arguments, uses arguments last specified (with \"run\" or \"set args\").\n"
  "To cancel previous arguments and run with no arguments,\n"
  "use \"set args\" without arguments.\n"
  "(gdb) "
-> "help step\n"
<- "Step program until it reaches a different source line.\n"
"Argument N means do this N times (or till program stops for another reason).\n"
  "(gdb) "
-> "help stepi\n"
<- "Step one instruction exactly.\n"
"Argument N means do this N times (or till program stops for another reason).\n"
  "(gdb) "
-> "help next\n"
<- "Step program, proceeding through subroutine calls.\n"
  "Like the \"step\" command as long as subroutine calls do not happen;\n"
  "when they do, the call is treated as one instruction.\n"
"Argument N means do this N times (or till program stops for another reason).\n"
  "(gdb) "
-> "help nexti\n"
<- "Step one instruction, but proceed through subroutine calls.\n"
"Argument N means do this N times (or till program stops for another reason).\n"
  "(gdb) "
-> "help until\n"
<- "Execute until the program reaches a source line greater than the current\n" "or a specified location (same args as break command) within the current frame.\n"
  "(gdb) "
-> "help finish\n"
<- "Execute until selected stack frame returns.\n"
"Upon return, the value returned is printed and put in the value history.\n"
  "(gdb) "
-> "help cont\n"
<- "Continue program being debugged, after signal or breakpoint.\n"
"If proceeding from breakpoint, a number N may be used as an argument,\n" "which means to set the ignore count of that breakpoint to N - 1 (so that\n"
  "the breakpoint won\'t break until the Nth time it is reached).\n"
  "(gdb) "
-> "help signal\n"
<- "Continue program giving it signal specified by the argument.\n"
"An argument of \"0\" means continue program without giving it a signal.\n"
  "(gdb) "
-> "help kill\n"
<- "Kill execution of program being debugged.\n"
  "(gdb) "
-> "help up\n"
<- "Select and print stack frame that called this one.\n"
  "An argument says how many frames up to go.\n"
  "(gdb) "
-> "help down\n"
<- "Select and print stack frame called by this one.\n"
  "An argument says how many frames down to go.\n"
  "(gdb) "
-> "help br\n"
<- "User-defined.\n"
<- "(gdb) "
-> "quit\n"
#  Running GDB (pid 22175, tty /dev/pts/48)...Exit 0.
#  Saving options in "/home/rid/.ddd/init"...
#  Saving options in "/home/rid/.ddd/init"...done.
#  Deleting session "107a3696c8000110285168200000027210027"...
#  Current session is [none].
#  Deleting session "107a3696c8000110285168200000027210027"...done.
#  Saving history in "/home/rid/.ddd/history"...
#  Saving history in "/home/rid/.ddd/history"...done.
# Thanks for using DDD 3.3.8!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]