🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #53586

Re: Disappearing Local Variables

#53586
From: Patrick Wood
Date: Fri, 01 Nov 1991 05:14
28 lines
1347 bytes
> > I am having a problem with gcc 1.40 on a DECstation 5000. Whenever I
> > compile a program with the -g option and try to use dbx or gdb,
 . . .
> 
> you mean by 'local'?  If so, a way to get around it is to do the following:
> 
> #ifdef DEBUG
> #define REG
> #else
> #define REG register
> #endif
> 
> Then declare things like
> REG int x;
> 
> If you compile for debugging, use -DDEBUG to turn off all register  
> declarations.  There is probably a macro already set by -g that you could look  
> up and use, actually.

You could just try this:

gcc -Dregister=

when you want to compile programs without assigning things to registers
for debugging purposes.  It may also be a good idea to use -Dinline= if
you use gcc's function inlining capabilities.

Pat
Technical Details
Message-ID: <9111010906.AA09376@rutgers.edu>
Path: arc1-ca.pugleaf.net!gmdzi!zeus.ieee.org!sdd.hp.com!think.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pipeline.UUCP!phw

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,1c0d75989d51e945
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1991-11-03 08:26:54 PST
Path: arc1-ca.pugleaf.net!gmdzi!zeus.ieee.org!sdd.hp.com!think.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pipeline.UUCP!phw
From: phw@pipeline.UUCP (Patrick Wood)
Newsgroups: gnu.gcc.help
Subject: Re: Disappearing Local Variables
Message-ID: <9111010906.AA09376@rutgers.edu>
Date: 1 Nov 91 05:14:11 GMT
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 28