ddd
[Top][All Lists]
Advanced

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

DDD 3.3.9 (i386-portbld-freebsd5.3) gets `Abort trap' signal


From: assiss
Subject: DDD 3.3.9 (i386-portbld-freebsd5.3) gets `Abort trap' signal
Date: Tue, 07 Dec 2004 19:40:49 -0000
User-agent: Opera M2/7.54 (FreeBSD, build 751)

hi,
    I got a bug with ddd 3.3.9 when debug with test.c.

this is test.c:

#include <stdio.h>

int main()
{
    char s[10];
    scanf("%s",s);
    printf("\n%s\n",s);
    return 0;
}

this is makefile:
CXX = gcc

test: test.o
        $(CXX) -o test test.o

test.o: test.c
        $(CXX) -ggdb -c test.c -o test.o

clean:
        rm -f *.o test


I typed "make" and then "ddd ./test",core dumped:

%ddd ./test
string: invalid index

Internal error (Abort trap).

Oops!  You have found a bug in DDD.
...

here is ~/.ddd/log by this session:

GNU DDD 3.3.9 (i386-portbld-freebsd5.3)
Copyright (C) 1995-1999 Technische Universit?? Braunschweig, Germany.
Copyright (C) 1999-2001 Universit?? Passau, Germany.
Copyright (C) 2001 Universit?? des Saarlandes, Germany.
Copyright (C) 2001-2004 Free Software Foundation, Inc.

Compiled with GCC 3.4.2 [FreeBSD] 20040728
Requires X11R6, Xt11R6, Motif 2.2.3 (Motif Version 2.2.3)
Includes XPM 3.4.11, Athena Panner (7000002L), DDD core
Built 2004-11-23 by Charlie  <address@hidden>.
$  ddd test
+  /bin/sh -c 'exec gdb -q -fullname '\''test'\'''
#  Hello, world!
#  Starting GDB...
#  Running GDB (pid 7686, tty /dev/ttyp4)...
#  Current language: C/C++
#  Searching "vsllib/ddd.vsl"...
#  Trying "/home/assiss/.ddd/vsllib/ddd.vsl"
#  Trying "/usr/local/share/ddd-3.3.9/vsllib/ddd.vsl"
# Searching "vsllib/ddd.vsl"..."/usr/local/share/ddd-3.3.9/vsllib/ddd.vsl".
2004.12.07 19:32:57
<- "(gdb) "
2004.12.07 19:32:57
-> "set prompt (gdb) \n"
2004.12.07 19:32:57
<- "(gdb) "
2004.12.07 19:32:57
-> "set height 0\n"
2004.12.07 19:32:57
<- "(gdb) "
2004.12.07 19:32:57
-> "set width 0\n"
2004.12.07 19:32:57
<- "(gdb) "
2004.12.07 19:32:57
-> "set annotate 1\n"
2004.12.07 19:32:57
<- "(gdb) "
2004.12.07 19:32:57
-> " set verbose off\n"
2004.12.07 19:32:57
<- "(gdb) "
2004.12.07 19:32:57
-> "info line\n"
2004.12.07 19:32:57
<- "No line number information available.\n"
2004.12.07 19:32:57
<- "(gdb) "
2004.12.07 19:32:57
-> "list\n"
2004.12.07 19:32:57
<- "1\t#include <stdio.h> \n"
2004.12.07 19:32:57
<- "2\t\n"
2004.12.07 19:32:57
<- "3\tint main()\n"
2004.12.07 19:32:57
<- "4\t{\n"
2004.12.07 19:32:57
<- "5\t    char s[10];\n"
2004.12.07 19:32:57
<- "6\t    scanf(\"%s\",s);\n"
2004.12.07 19:32:57
<- "7\t    printf(\"\\n"
   "%s\\n"
   "\",s);\n"
2004.12.07 19:32:57
<- "8\t    return 0;\n"
2004.12.07 19:32:57
<- "9\t}\n"
2004.12.07 19:32:57
<- "(gdb) "
2004.12.07 19:32:57
-> "info line\n"
2004.12.07 19:32:57
<- "Line 9 of \"test.c\" starts at address 0x80485a9 <main+73> and ends at 0x80485ab <main+75>.\n"
2004.12.07 19:32:57
<- "\032\032/usr/home/assiss/projects/test/test.c:9:107:beg:0x80485a9\n"
2004.12.07 19:32:57
<- "(gdb) "
2004.12.07 19:32:57
-> "output 4711\n"
2004.12.07 19:32:57
<- "4711(gdb) "
2004.12.07 19:32:57
-> "show language\n"
2004.12.07 19:32:57
<- "The current source language is \"auto; currently c\".\n"
2004.12.07 19:32:57
<- "(gdb) "
2004.12.07 19:32:57
-> "show version\n"
2004.12.07 19:32:57
<- "GNU gdb 6.1.1 [FreeBSD]\n"
2004.12.07 19:32:57
<- "Copyright 2004 Free Software Foundation, Inc.\n"
2004.12.07 19:32:57
<- "GDB is free software, covered by the GNU General Public License, and you are\n"
2004.12.07 19:32:57
<- "welcome to change it and/or distribute copies of it under certain conditions.\n"
2004.12.07 19:32:57
<- "Type \"show copying\" to see the conditions.\n"
2004.12.07 19:32:57
<- "There is absolutely no warranty for GDB. Type \"show warranty\" for details.\n"
2004.12.07 19:32:57
<- "This GDB was configured as \"i386-marcel-freebsd\".\n"
2004.12.07 19:32:57
<- "(gdb) "
2004.12.07 19:32:57
-> "pwd\n"
2004.12.07 19:32:57
<- "Working directory /usr/home/assiss/projects/test.\n"
2004.12.07 19:32:57
<- "(gdb) "
2004.12.07 19:32:57
-> "info breakpoints\n"
2004.12.07 19:32:57
<- "No breakpoints or watchpoints.\n"
2004.12.07 19:32:57
<- "(gdb) "
2004.12.07 19:32:57
-> "show history filename\n"
2004.12.07 19:32:57
<- "The filename in which to record the command history is \"/usr/home/assiss/projects/test/.gdb_history\".\n"
2004.12.07 19:32:57
<- "(gdb) "
2004.12.07 19:32:57
-> "show history size\n"
2004.12.07 19:32:57
<- "The size of the command history is 256.\n"
2004.12.07 19:32:57
<- "(gdb) "
#  Reading file "/usr/home/assiss/projects/test/test.c"...
#  Reading file "/usr/home/assiss/projects/test/test.c"...done.
#  File "/usr/home/assiss/projects/test/test.c" 9 lines, 154 characters
#  Setting buttons...
#  Setting buttons...done.
!  Abort trap
#  Saving options in "/home/assiss/.ddd/init"...
#  Saving options in "/home/assiss/

===
===
Then I changed the test.c:
#include <stdio.h>

int main()
{
    char s[10];
    int a;//only add this line
    scanf("%s",s);
    printf("\n%s\n",s);
    return 0;
}

make ,ddd ./test,
this time ddd works very well as normal.




reply via email to

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