bug-ddd
[Top][All Lists]
Advanced

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

ddd bug: specific stderr text confused ddd about source file locations


From: Simon Baldwin
Subject: ddd bug: specific stderr text confused ddd about source file locations
Date: Tue, 15 Aug 2006 16:32:06 -0700 (PDT)

Example failure:

$ cat ddd_demo.c
#include <stdio.h>
#include <stdlib.h>

int main() {
  fprintf (stderr,
           "I1234 123456 foo.cc:1234]  at "
           "user@host.site.company.com:/home/user/src/foo0\n");
  abort();
}

$ gcc -g -o ddd_demo ddd_demo.c
$ ddd ./ddd_demo
...enter "run" at the "(gdb)" prompt in the lower window...

results in a popup dialog

  DDD: No Source
  /path/to/cwd/user@host.site.company.com: No such file or directory

The cause is the pattern matching within 'PosBuffer::filter_gdb(string&
answer)', which triggers on the printf() output.  While the trace below shows
results with ddd 3.3.1, I've also confirmed the same behavior with ddd
3.3.11.

Other info:

$ ddd --configuration
GNU DDD 3.3.1 (i386-redhat-linux-gnu)
Copyright (C) 1995-1999 Technische Universität Braunschweig, Germany.
Copyright (C) 1999-2001 Universität Passau, Germany.

Compiled with GCC 3.2.1 20021207 (Red Hat Linux 8.0 3.2.1-2), GNU libc 2.3
Requires X11R6, Xt11R6, Motif 2.2.3 (Motif Version 2.2.2)
Includes XPM 3.4.11, Athena Panner, DDD core
Built 2003-01-25 by Compile Server <bhcompile@porky.devel.redhat.com>.

$ gdb -v
GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux".

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

$ cat ~/.ddd/log
GNU DDD 3.3.1 (i386-redhat-linux-gnu)
Copyright (C) 1995-1999 Technische Universität Braunschweig, Germany.
Copyright (C) 1999-2001 Universität Passau, Germany.

Compiled with GCC 3.2.1 20021207 (Red Hat Linux 8.0 3.2.1-2), GNU libc 2.3
Requires X11R6, Xt11R6, Motif 2.2.3 (Motif Version 2.2.2)
Includes XPM 3.4.11, Athena Panner, DDD core
Built 2003-01-25 by Compile Server <bhcompile@porky.devel.redhat.com>.
$  ddd ./ddd_demo
+  /bin/sh -c 'exec gdb -q -fullname '\''./ddd_demo'\'''
#  Hello, world!
#  Opening session "11ac126c2a000115568442400000046100073"...
#  Enabling core dumps...
#  Enabling core dumps...done.
#  Running GDB (pid 17625, tty /dev/pts/14)...
#  Current language: C/C++
#  Searching "vsllib/ddd.vsl"...
#  Trying "/home/simonb/.ddd/vsllib/ddd.vsl"
#  Trying "/usr/share/ddd-3.3.1/vsllib/ddd.vsl"
#  Searching "vsllib/ddd.vsl"..."/usr/share/ddd-3.3.1/vsllib/ddd.vsl".
<- "Using host libthread_db library \"/lib/libthread_db.so.1\".\n"
   "(gdb) "
-> "set prompt (gdb) \n"
#  Creating
"/home/simonb/.ddd/sessions/11ac126c2a000115568442400000046100073/"...
#  Creating
"/home/simonb/.ddd/sessions/11ac126c2a000115568442400000046100073/"...done.
#  Copying "/home/simonb/.ddd/init" to
"/home/simonb/.ddd/sessions/11ac126c2a000115568442400000046100073/init"...
#  Copying "/home/simonb/.ddd/init" to
"/home/simonb/.ddd/sessions/11ac126c2a000115568442400000046100073/init"...done.
#  Copying "/home/simonb/.ddd/history" to
"/home/simonb/.ddd/sessions/11ac126c2a000115568442400000046100073/history"...
#  Copying "/home/simonb/.ddd/history" to
"/home/simonb/.ddd/sessions/11ac126c2a000115568442400000046100073/history"...done.
#  Saving session in
"/home/simonb/.ddd/sessions/11ac126c2a000115568442400000046100073/init"...
#  Saving session in
"/home/simonb/.ddd/sessions/11ac126c2a000115568442400000046100073/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"
<- "1\t#include <stdio.h>\n"
   "2\t#include <stdlib.h>\n"
   "3\t\n"
   "4\tint main() {\n"
   "5\t  fprintf (stderr,\n"
   "6\t           \"I1234 123456 foo.cc:1234]  at \"\n"
   "7\t           \"user@host.site.company.com:/home/user/src/foo0\\n"
   "\");\n"
   "8\t  abort();\n"
   "9\t}\n"
   "(gdb) "
-> "info line\n"
<- "Line number 9 is out of range for \"ddd_demo.c\".\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 Red Hat Linux (6.0post-0.20040223.19rh)\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 \"i386-redhat-linux\".\n"
   "(gdb) "
-> "pwd\n"
<- "Working directory /var/tmp/tmp/foo.\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
\"/var/tmp/tmp/foo/.gdb_history\".\n"
   "(gdb) "
-> "show history size\n"
<- "The size of the command history is 1000.\n"
   "(gdb) "
#  Reading file "/tmp/foo/ddd_demo.c"...
#  Reading file "/tmp/foo/ddd_demo.c"...done.
#  File "/tmp/foo/ddd_demo.c" 9 lines, 197 characters
#  Setting buttons...
#  Setting buttons...done.
-> "info source\n"
<- "Current source file is ddd_demo.c\n"
   "Compilation directory is /tmp/foo\n"
   "Located in /var/tmp/tmp/foo/ddd_demo.c\n"
   "Contains 9 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 \"/var/tmp/tmp/foo/ddd_demo\".\n"
   "Local exec file:\n"
   "\t`/var/tmp/tmp/foo/ddd_demo\', file type elf32-i386.\n"
   "\tEntry point: 0x80482d0\n"
   "\t0x080480f4 - 0x08048107 is .interp\n"
   "\t0x08048108 - 0x08048128 is .note.ABI-tag\n"
   "\t0x08048128 - 0x08048158 is .hash\n"
   "\t0x08048158 - 0x080481c8 is .dynsym\n"
   "\t0x080481c8 - 0x08048222 is .dynstr\n"
   "\t0x08048222 - 0x08048230 is .gnu.version\n"
   "\t0x08048230 - 0x08048250 is .gnu.version_r\n"
   "\t0x08048250 - 0x08048260 is .rel.dyn\n"
   "\t0x08048260 - 0x08048278 is .rel.plt\n"
   "\t0x08048278 - 0x0804828f is .init\n"
   "\t0x08048290 - 0x080482d0 is .plt\n"
   "\t0x080482d0 - 0x08048468 is .text\n"
   "\t0x08048468 - 0x08048482 is .fini\n"
   "\t0x080484a0 - 0x0804850e is .rodata\n"
   "\t0x08048510 - 0x08048514 is .eh_frame\n"
   "\t0x08049514 - 0x08049520 is .data\n"
   "\t0x08049520 - 0x080495e8 is .dynamic\n"
   "\t0x080495e8 - 0x080495f0 is .ctors\n"
   "\t0x080495f0 - 0x080495f8 is .dtors\n"
   "\t0x080495f8 - 0x080495fc is .jcr\n"
   "\t0x080495fc - 0x08049618 is .got\n"
   "\t0x08049618 - 0x08049620 is .bss\n"
   "(gdb) "
-> "info program\n"
<- "The program being debugged is not being run.\n"
   "(gdb) "
-> "set confirm off\n"
<- "(gdb) "
-> "source /tmp/dddWzNFzJ\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 \"/var/tmp/tmp/foo/ddd_demo\".\n"
   "Local exec file:\n"
   "\t`/var/tmp/tmp/foo/ddd_demo\', file type elf32-i386.\n"
   "\tEntry point: 0x80482d0\n"
   "\t0x080480f4 - 0x08048107 is .interp\n"
   "\t0x08048108 - 0x08048128 is .note.ABI-tag\n"
   "\t0x08048128 - 0x08048158 is .hash\n"
   "\t0x08048158 - 0x080481c8 is .dynsym\n"
   "\t0x080481c8 - 0x08048222 is .dynstr\n"
   "\t0x08048222 - 0x08048230 is .gnu.version\n"
   "\t0x08048230 - 0x08048250 is .gnu.version_r\n"
   "\t0x08048250 - 0x08048260 is .rel.dyn\n"
   "\t0x08048260 - 0x08048278 is .rel.plt\n"
   "\t0x08048278 - 0x0804828f is .init\n"
   "\t0x08048290 - 0x080482d0 is .plt\n"
   "\t0x080482d0 - 0x08048468 is .text\n"
   "\t0x08048468 - 0x08048482 is .fini\n"
   "\t0x080484a0 - 0x0804850e is .rodata\n"
   "\t0x08048510 - 0x08048514 is .eh_frame\n"
   "\t0x08049514 - 0x08049520 is .data\n"
   "\t0x08049520 - 0x080495e8 is .dynamic\n"
   "\t0x080495e8 - 0x080495f0 is .ctors\n"
   "\t0x080495f0 - 0x080495f8 is .dtors\n"
   "\t0x080495f8 - 0x080495fc is .jcr\n"
   "\t0x080495fc - 0x08049618 is .got\n"
   "\t0x08049618 - 0x08049620 is .bss\n"
   "(gdb) "
-> "info program\n"
<- "The program being debugged is not being run.\n"
   "(gdb) "
-> "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) "
#  Opening session "11ac126c2a000115568442400000046100073"...done.
#  Welcome to DDD 3.3.1 "Blue Gnu" (i386-redhat-linux-gnu)
-> "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) "
-> "set environment TERM dumb\n"
<- "(gdb) "
-> "run\n"
<- "I1234 123456 foo.cc:1234]  at
user@host.site.company.com:/home/user/src/foo0\n"
<- "\n"
<- "Program received signal SIGABRT, Aborted.\n"
<- "0x40056bd1 in kill () from /lib/i686/libc.so.6\n"
<- "(gdb) "
-> "info breakpoints\n"
<- "No breakpoints or watchpoints.\n"
<- "(gdb) "
#  Reading file "/var/tmp/tmp/foo/user@host.site.company.com"...
#  Reading file "/var/tmp/tmp/foo/user@host.site.company.com"...No such file
or directory.
-> "info source\n"
<- "Current source file is ddd_demo.c\n"
<- "Compilation directory is /tmp/foo\n"
<- "Located in /var/tmp/tmp/foo/ddd_demo.c\n"
<- "Contains 9 lines.\n"
<- "Source language is c.\n"
<- "Compiled with DWARF 2 debugging format.\n"
<- "Does not include preprocessor macro info.\n"
<- "(gdb) "
-> "info sources\n"
<- "Source files for which symbols have been read in:\n"
   "\n"
<- "ddd_demo.c\n"
   "\n"
<- "Source files for which symbols will be read in on demand:\n"
   "\n"
<- "\n"
<- "(gdb) "
#  Reading file "user@host.site.company.com" from GDB...
-> "list user@host.site.company.com:1,1000000\n"
<- "No source file named user@host.site.company.com."
<- "\n"
<- "(gdb) "
!  No source file named user@host.site.company.com.
#  Reading file "user@host.site.company.com" from GDB...failed.
#  Reading file "/var/tmp/tmp/foo/user@host.site.company.com"...
!  /var/tmp/tmp/foo/user@host.site.company.com: No such file or directory
#  Reading file "/var/tmp/tmp/foo/user@host.site.company.com"...No such file
or directory.
-> "quit\n"
#  Running GDB (pid 17625, tty /dev/pts/14)...Exit 0.
#  Saving history in
"/home/simonb/.ddd/sessions/11ac126c2a000115568442400000046100073/history"...
#  Saving history in
"/home/simonb/.ddd/sessions/11ac126c2a000115568442400000046100073/history"...done.
#  Thanks for using DDD 3.3.1!


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

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