Mail Archives: djgpp/1998/02/13/09:45:38
From: | Martin DOT Stromberg AT lu DOT erisoft DOT se (Martin Stromberg)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | gdb crash while debugging df
|
Date: | 13 Feb 1998 14:02:58 GMT
|
Organization: | Ericsson Erisoft AB, Sweden
|
Lines: | 57
|
Message-ID: | <6c1jqi$4di$1@antares.lu.erisoft.se>
|
NNTP-Posting-Host: | juno.lu.erisoft.se
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
gdb crashed while I debugged df. When I ran it again I looked first at the
variable before dereferencing it, and it being 0xffffffff I'm not too
surprised that it crashed, but should gdb really _crash_? Is it a bug
in gdb or am I myself to blame?
MartinS
Here the session with gdb:
GDB is free software and you are welcome to 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.
GDB 4.16 (go32), Copyright 1996 Free Software Foundation, Inc...
(gdb) b 755
Breakpoint 1 at 0x2bec: file df.c, line 755.
(gdb) r
Starting program: d:/tmp/fil/gnu/filutil3.16/src/df
Breakpoint 1, main (argc=1, argv=0x5a090) at df.c:755
755 mount_list =
(gdb) s
read_filesystem_list (need_fs_type=0, all_fs=0) at mountlist.c:258
258 me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
(gdb) n
259 me->me_next = NULL;
(gdb) n
260 mount_list = mtail = me;
(gdb) n
299 fp = setmntent (table, "r");
(gdb) p mnt
$1 = (struct mntent *) 0xffffffff
(gdb) p *mnt
Cannot continue from exception, exiting due to signal 0123
General Protection Fault at eip=000ae5dd
eax=00000100 ebx=0000001c ecx=00000007 edx=0005ffff esi=ffffffff edi=001381ac
ebp=0011fe44 esp=0011fe34 program=C:\DJGPP\BIN/gdb.exe
cs: sel=00e7 base=10060000 limit=001bffff
ds: sel=012f base=10220000 limit=0005ffff
es: sel=00ef base=10060000 limit=001bffff
fs: sel=010f base=00029560 limit=000040ff
gs: sel=00ff base=00000000 limit=ffffffff
ss: sel=00ef base=10060000 limit=001bffff
Call frame traceback EIPs:
0x000ae5dd
0x000a4b25
0x00035090
0x0003a128
0x0003a077
0x0005b927
0x00013096
0x0000e039
0x00019f24
0x00019ffb
0x0007253d
- Raw text -