🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.objective-c
Article #419

Re: Debugging Objective C with gcc/gdb

#419
From: eric mohr
Date: Wed, 03 Aug 1994 14:00
31 lines
1982 bytes
In article <1994Jul26.185852.14238@midway.uchicago.edu> tisu@quads.uchicago.edu (Seth Tisue) writes:

   (So that when I step through my program, I don't wind up in the bowels
   of libobjc.a.)

I compiled libobjc.a without debugging information and am able to single-step
into a method call without landing in the ObjC runtime.

   Also, how can I see the contents of
   an instance variable of an arbitrary id?  i.e. if my code looks like:

     MyClass* myvar;

   I can type "p myvar->data" and get an answer.  But if my code looks like:

     id myvar;

   and I happen to know at runtime that myvar is a MyClass object, how do
   I access the instance variable?

I have never been able to look at instance variables of an object typed id, no
matter what contortions of casts I go through.  Other posters seem to suggest
that it SOMETIMES works.  If anybody has an example where it works, please
post it.

-Rick

Rick Mohr
Archetype, Inc               Internet: rick@archetype.prospect.com
100 Fifth Avenue                voice: (617) 890-7544 x231
Waltham, MA  02154                fax: (617) 890-3661
Technical Details
Message-ID: <MOHR-ERIC.94Aug3100037@nebula.CS.Yale.Edu>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!hookup!swrinde!howland.reston.ans.net!newsserver.jvnc.net!yale.edu!yale!cs.yale.edu!mohr-eric
References: <1994Jul26.185852.14238@midway.uchicago.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,2f8d99d540d413bb
X-Google-Attributes: gid11318c,public
X-Google-Thread: 1111a3,2f8d99d540d413bb
X-Google-Attributes: gid1111a3,public
X-Google-ArrivalTime: 1994-08-03 07:09:50 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!hookup!swrinde!howland.reston.ans.net!newsserver.jvnc.net!yale.edu!yale!cs.yale.edu!mohr-eric
From: mohr-eric@CS.Yale.Edu (eric mohr)
Newsgroups: comp.lang.objective-c,gnu.gcc.help
Subject: Re: Debugging Objective C with gcc/gdb
Date: 03 Aug 1994 14:00:36 GMT
Organization: Archetype, Inc, Waltham MA
Lines: 32
Message-ID: <MOHR-ERIC.94Aug3100037@nebula.CS.Yale.Edu>
References: <1994Jul26.185852.14238@midway.uchicago.edu>
NNTP-Posting-Host: systemsz-gw.cs.yale.edu
In-reply-to: tisu@quads.uchicago.edu's message of Tue, 26 Jul 1994 18:58:52 GMT