[comp.unix.questions] dbx thinks pointer is int

kevin@msa3b.UUCP (Kevin P. Kleinfelter) (10/20/89)

I am running dbx on a large program.  I have clearly defined "int *kpk;".
However, when I tell dbx to "p kpk" it displays an integer, and when I
tell it to "p *kpk" it tells me '"kpk" is not a pointer'.  If I move
the declaration inside the "main" function, dbx behaves normally.

I have written a stub program 
   int *kpk;
   void main (void)
   {
   }
and dbx behaves properly on this program.

Also, when I ask dbx "whereis kpk", it tells me ".kpk", so it looks like
there is only one variable with this name.

This is all under AIX PS/2 v1.1.
Am I confused, or is dbx?
-- 
Kevin Kleinfelter @ Management Science America, Inc (404) 239-2347
gatech!nanovx!msa3b!kevin

oleg@gryphon.COM (Oleg Kiselev) (10/22/89)

In article <1161@msa3b.UUCP> kevin@msa3b.UUCP (Kevin P. Kleinfelter) writes:
>I am running dbx on a large program.  I have clearly defined "int *kpk;".
>However, when I tell dbx to "p kpk" it displays an integer, and when I
>tell it to "p *kpk" it tells me '"kpk" is not a pointer'.  If I move
>the declaration inside the "main" function, dbx behaves normally.
...
>This is all under AIX PS/2 v1.1.
>Am I confused, or is dbx?

dbx.  It's a bug, I have run into it as well.  File an APAR.

370 version of dbx does not have these problems.

-- 
			"No regrets, no apologies"   Ronald Reagan

Oleg Kiselev            ARPA: lcc.oleg@seas.ucla.edu, oleg@gryphon.COM
(213)337-5230           UUCP: [world]!{ucla-se|gryphon}!lcc!oleg