Article View: gnu.gdb.bug
Article #83gdb 4.5 doesn't read g++ symbols under IRIX 4.0.1
From: Bill Reynolds
Date: Tue, 14 Apr 1992 15:09
Date: Tue, 14 Apr 1992 15:09
135 lines
3664 bytes
3664 bytes
gdb 4.5 seems to work fine for C code generated from both gcc and the
bundled cc. For g++, gdb doesn't know about any variables.
SGI 4D/35
IRIX kepler 4.0.1 11150233 IP12
gcc 2.1
gdb 4.5
Below is a session which illustrates the problem.
kepler{bill}257: cat tst.cc
#include <stdio.h>
//accell
main()
{
const double g=9.8;
for( int t=1; t<=10; t++)
{
double dist = g*t*t/2;
printf("\t%2d %7.2f\n",t,dist);
}
}
kepler{bill}258: g++ -g tst.cc
In file included from tst.cc:1:
/usr/local/lib/g++-include/stdio.h:54: warning: `#pragma once' is obsolete
kepler{bill}259: gdb a.out
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.5, Copyright 1992 Free Software Foundation, Inc...
(gdb) l
1 #include <stdio.h>
2 //accell
3 main()
4 {
5 const double g=9.8;
6
7 for( int t=1; t<=10; t++)
8 {
9 double dist = g*t*t/2;
10 printf("\t%2d %7.2f\n",t,dist);
(gdb) b 9
Breakpoint 1 at 0x40029c: file tst.cc, line 9.
(gdb) r
Starting program: /usr/people/bill/a.out
Breakpoint 1, main () at tst.cc:9
9 double dist = g*t*t/2;
(gdb) p t
No symbol "t" in current context.
(gdb) p g
No symbol "g" in current context.
(gdb) info var
All defined variables:
File ./libgcc2.c:
void (*__CTOR_LIST__[2])();
void (*__DTOR_LIST__[2])();
static enum reg_class ALL_REGS;
static enum cmp_type CMP_DF;
static enum cmp_type CMP_MAX;
static enum cmp_type CMP_SF;
static enum cmp_type CMP_SI;
static enum delay_type DELAY_HILO;
static enum delay_type DELAY_LOAD;
static enum delay_type DELAY_NONE;
static enum reg_class FP_REGS;
static enum reg_class GR_REGS;
static enum reg_class HI_REG;
static enum reg_class LIM_REG_CLASSES;
static enum reg_class LO_REG;
static enum reg_class MD_REGS;
static enum reg_class NO_REGS;
static enum processor_type PROCESSOR_DEFAULT;
static enum processor_type PROCESSOR_R3000;
static enum processor_type PROCESSOR_R4000;
---Type <return> to continue---
static enum processor_type PROCESSOR_R6000;
static enum reg_class ST_REGS;
File ctype.c:
int _ctype;
static int first_call;
File data.c:
int _bufendtab;
int _iob;
int _lastbuf;
int _sibuf;
int _smbuf;
int _sobuf;
File mp_def.c:
int _cas;
int _clock;
int _ctlock;
int _dlock;
int _flock;
int _ilock;
int _lock;
---Type <return> to continue---
int _nlock;
int _sproced;
int _tlock;
int _ulock;
int _us_rsthread_stdio;
int _wlock;
File sys/_sbrk.s:
int _curbrk;
int _minbrk;
int end;
static int err;
File crt1tinit.s:
int __istart;
File crt1text.s:
int __Argc;
int __Argv;
int _environ;
int _gp;
int environ;
int errno;
---Type <return> to continue---
static int STARTFRM;
(gdb)
_______________________________________________________________________
Bill Reynolds | `But I don't want to go among mad people,'
bill@kepler.ucsd.edu | Alice remarked.
| `Oh, you can't help that,' said the Cat: `we're
| all mad here. I'm mad. You're mad.'
Technical Details
Message-ID:
<9204150509.AA09315@kepler.ucsd.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!kepler.ucsd.edu!billShow Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!kepler.ucsd.edu!bill From: bill@kepler.ucsd.edu (Bill Reynolds) Subject: gdb 4.5 doesn't read g++ symbols under IRIX 4.0.1 Message-ID: <9204150509.AA09315@kepler.ucsd.edu> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Tue, 14 Apr 1992 15:09:44 GMT Approved: bug-gdb@prep.ai.mit.edu Lines: 137