[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gdb core dump
From: |
Dave Lawrence |
Subject: |
gdb core dump |
Date: |
Fri, 05 Jan 2001 08:51:15 -0800 |
gdb crashed with a core dump as I executed the command "next".
Version info:
address@hidden:66} gdb -v
GNU gdb 5.0
Copyright 2000 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".
address@hidden:67} rpm -qi gdb
Name : gdb Relocations: (not
relocateable)
Version : 5.0 Vendor: Red Hat, Inc.
Release : 7 Build Date: Wed 09 Aug 2000
07:42:39 AM PDT
Install date: Mon 06 Nov 2000 11:35:07 AM PST Build Host:
porky.devel.redhat.com
Group : Development/Debuggers Source RPM:
gdb-5.0-7.src.rpm
Size : 2071995 License: GPL
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary : A GNU source-level debugger for C, C++ and other
languages.
Description :
GDB, the GNU debugger, allows you to debug programs written in C, C++,
and other languages, by executing them in a controlled fashion and
printing their data.
Session output:
GNU gdb 5.0
Copyright 2000 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"...
(gdb) list
54 fscanf(fp, "%lf", &z);
55 xnvp->maxRange = z/200.0 + 0.5;
56 fscanf(fp, "%lf", &z);
57 xnvp->timeout = z/10.0 + 0.5;
58 }
59
60 main()
61 {
62 int i;
63 printf("IBLS X-31 nvram loader.\n");
(gdb)
64
65 OMPort *port, *fport;
66 char dummy[128];
67
68 x31nvram_s xnvram;
69 get_x31nvram(&xnvram);
70 fport = createPort("OfilePort,nvget.raw");
71 if (fport->open(True)!=Error) {
72 RxPrivProxy rxproxy2;
73 rxproxy2.bind(fport);
(gdb)
74 OM_MSG_DECLARE(RxPrivIfc::NvGet2, 0, nvg);
75 nvg.partId = 0;
76 nvg.len = sizeof(xnvram);
77 memcpy(nvg.data, &xnvram, nvg.len);
78 printf("%d\n", nvg.len);
79 rxproxy2.pollSend(nvg, 50);
80 fport->close();
81 }
82
83 port = createPort(lookupstring("portlist","RXport", dummy,
128));
(gdb) break 83
Breakpoint 1 at 0x8049cd5: file nvramload.cc, line 83.
(gdb) run
Starting program:
/projects/x31/team/dgl/x31build/x31/nvramload/src/../bin/redhat7.x86/nvramload
IBLS X-31 nvram loader.
104
Breakpoint 1, main () at nvramload.cc:83
83 port = createPort(lookupstring("portlist","RXport", dummy,
128));
(gdb) next
85 ASSERT(port->open(True)!=Error);
(gdb) print *port
$1 = {
myName = "Server", '\000' <repeats 46 times>, "\020£\005\bÿÿÿÿ",
'\000' <repeats 12 times>, "\030¥\005\bÿÿÿÿ", myInBufSize = 256,
myOutBufSize = 256,
_vptr. = 0x8057cc0}
(gdb) next
Segmentation fault (core dumped)
It doesn't crash if I don't issue the command "print *port" before
calling "next".
Compiler info:
g++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.0)
I can't provide all of the library source code, but I've attached the
application itself. Here is the output of the makefile (without
warnings):
make redhat7.x86
make: *** Warning: File `redhat7.x86' has modification time in the
future (2001-01-05 08:46:13 > 2001-01-05 08:45:59)
< MAKING TARGET redhat7.x86 >
MAKEHOME=../../makehome
EXECDIR=../bin/
mkdir -p redhat7.x86
mkdir -p include
mkdir -p ../bin/redhat7.x86
make -f ../../makehome/redhat7.x86.mk \
"USERMAKEFILE=makefile.common"
make[1]: Entering directory
`/projects/x31/team/dgl/x31build/x31/nvramload/src'
makeheader -k Public -k Peer -k Package nvramload.cc -o
include/nvramload.pkg.h
cat \
redhat7.x86/nvramload.d > redhat7.x86/dependencies.tmp
/bin/sh: /apps/gnu/bin/redhat7.x86/diff: No such file or directory
No need to update redhat7.x86/dependencies
g++ -DOS_ARCH_LINUX_X86 -DOS_VERSION=700 -g -DDEBUG -D__extension__=""
-I./include -I../include -I../../makehome/headerFixes/unix/redhat7.x86
-I../../makehome/headerFixes/unix -I../../mvlib/include
-I../../inx/include -I../../omlib/include -I../../omcomp/include
-I../../omcomp.x-31/include -I../../omcomp.ibls/include
-I../../rxpreproc/include -Wall -DPtrIntType=int -DRTI_UNIX
-DRTS_UNIX -DTARGET=redhat7.x86 -DCSREAL_IS_FLOAT -c nvramload.cc -o
redhat7.x86/nvramload.o
g++ -DOS_ARCH_LINUX_X86 -DOS_VERSION=700 -o
../bin/redhat7.x86/nvramload \
redhat7.x86/nvramload.o \
-lcurses -lcmcinxpreproc -lrxpreproc -lx31proxies
-lx31interfaces -lphasering -liblsproxies -liblsinterfaces -lcustomers
-lproxies -lprotocols -linterfaces -lports -lomcomm -lomcore -lcontract
-linxmisc -lmv -lecef -linxlos -lm -L ../../omcomp.ibls/lib/redhat7.x86
-L ../../rxpreproc/lib/redhat7.x86 -L ../../inx/lib/redhat7.x86 -L
../../omlib/lib/redhat7.x86 -L ../../omcomp/lib/redhat7.x86 -L
../../omcomp.x-31/lib/redhat7.x86 -L ../../mvlib/lib/redhat7.x86
-mthreads
make[1]: Leaving directory
`/projects/x31/team/dgl/x31build/x31/nvramload/src
I'm using redhat 7.0 on a Pentium III. All patches as of 1/4/01 have
been applied.
The core dumped by gdb is attached.
Cheers...
Dave
--
+---------------------------------------------------------------------+
| David Lawrence (650)833-7847 (W) |
| IntegriNautics Corporation (650)833-5601 (Fax) |
| 1505 Adams Drive |
| Menlo Park, CA 94025 (650)960-6864 (H) |
| mailto:address@hidden |
+---------------------------------------------------------------------+
core.gz
Description: GNU Zip compressed data
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "omcomm.h"
#include "interfaces.h"
#include "proxies.h"
#include "ports.h"
#include "x31ifc.h"
#include "x31proxies.h"
#include "cmcinxpreproc.h"
#include "inx_ecef.h"
#include "inx_misc.h"
void get_x31nvram(x31nvram_p xnvp)
{
char dummy[128];
FILE *fp;
fp = fopen("x31survey", "r");
ASSERT(fp > 0);
int i;
double lat,lon,alt, x,y,z;
for (i=0;i<2;i++) {
fscanf(fp, "%lf %lf %lf", &lat, &lon, &alt);
xnvp->rs[i].dsLat = lat/180.0*TWO_EXP_32+0.5;
xnvp->rs[i].dsLon = lon/360.0*TWO_EXP_32+0.5;
xnvp->rs[i].dsAlt = floor(alt*1000.0+0.5);
fscanf(fp, "%d %d", &xnvp->rs[i].pl1ID, &xnvp->rs[i].pl2ID);
fscanf(fp, "%lf %lf %lf", &x, &y, &z);
xnvp->rs[i].pl1enu[0] = x*TWO_EXP_12+0.5;
xnvp->rs[i].pl1enu[1] = y*TWO_EXP_12+0.5;
xnvp->rs[i].pl1enu[2] = z*TWO_EXP_12+0.5;
fscanf(fp, "%lf %lf %lf", &x, &y, &z);
xnvp->rs[i].pl2enu[0] = x*TWO_EXP_12+0.5;
xnvp->rs[i].pl2enu[1] = y*TWO_EXP_12+0.5;
xnvp->rs[i].pl2enu[2] = z*TWO_EXP_12+0.5;
fscanf(fp, "%d", &xnvp->rs[i].surveyID);
}
fscanf(fp, "%lf %lf %lf", &x, &y, &z);
xnvp->top2fwd[0] = x*TWO_EXP_10+0.5;
xnvp->top2fwd[1] = y*TWO_EXP_10+0.5;
xnvp->top2fwd[2] = z*TWO_EXP_10+0.5;
fscanf(fp, "%lf %lf %lf", &x, &y, &z);
xnvp->top2bottom[0] = x*TWO_EXP_10+0.5;
xnvp->top2bottom[1] = y*TWO_EXP_10+0.5;
xnvp->top2bottom[2] = z*TWO_EXP_10+0.5;
fscanf(fp, "%lf", &z);
xnvp->finalAlt = z + 0.5;
fscanf(fp, "%lf", &z);
xnvp->maxAlt = z/10.0 + 0.5;
fscanf(fp, "%lf", &z);
xnvp->maxRange = z/200.0 + 0.5;
fscanf(fp, "%lf", &z);
xnvp->timeout = z/10.0 + 0.5;
}
main()
{
int i;
printf("IBLS X-31 nvram loader.\n");
OMPort *port, *fport;
char dummy[128];
x31nvram_s xnvram;
get_x31nvram(&xnvram);
fport = createPort("OfilePort,nvget.raw");
if (fport->open(True)!=Error) {
RxPrivProxy rxproxy2;
rxproxy2.bind(fport);
OM_MSG_DECLARE(RxPrivIfc::NvGet2, 0, nvg);
nvg.partId = 0;
nvg.len = sizeof(xnvram);
memcpy(nvg.data, &xnvram, nvg.len);
printf("%d\n", nvg.len);
rxproxy2.pollSend(nvg, 50);
fport->close();
}
port = createPort(lookupstring("portlist","RXport", dummy, 128));
ASSERT(port->open(True)!=Error);
RxPrivProxy rxproxy;
rxproxy.bind(port);
OM_MSG_DECLARE(RxPubIfc::Query, RxPubIfc::Query::version, mp);
mp.setFlags(RxMsg::CUST_FLAG);
rxproxy.pollSend(mp, 50);
OM_MSG_DECLARE(RxPrivIfc::NvPut, 0, nvp);
nvp.partId = 0;
nvp.len = sizeof(xnvram);
memcpy(nvp.data, &xnvram, nvp.len);
printf("%d\n", nvp.len);
rxproxy.pollSend(nvp, 50);
}
- gdb core dump,
Dave Lawrence <=