🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #10151

choosing a source file in gdb

#10151
From: Dana A. Chee
Date: Wed, 21 Mar 1990 14:15
18 lines
1542 bytes
Having come from the dbx world, I'm used to being able to say
"file source.c" and have source.c become my current source file for
listing and searching.  I can't figure out how to do it in gdb.  For
instance, I know a variable is in x.c and I want to go to x.c and
search for the line containing it.  The only way I know how to do it
is to say list x.c:1,1 and then search.  I also can't figure out how
to determine what source file is current.

Can anyone give me pointers on how to do these things?

Thanks.
+*************************************************************************+
*  Dana Chee				(201) 829-4488			  *
*  Bellcore								  *
*  Room 2Q-250								  *
*  445 South Street			ARPA: dana@bellcore.com		  *
*  Morristown,  NJ  07960-1910		UUCP: {gateways}!bellcore!dana	  *
+*************************************************************************+
Technical Details
Message-ID: <21141@bellcore.bellcore.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!snorkelwacker!think!zaphod.mps.ohio-state.edu!usc!apple!rutgers!bellcore!dana@dino

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,b955e76ff73f6001,start
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 1990-03-21 22:00:10 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!snorkelwacker!think!zaphod.mps.ohio-state.edu!usc!apple!rutgers!bellcore!dana@dino
From: dana@dino.bellcore.com (Dana A. Chee)
Newsgroups: gnu.gdb.bug
Subject: choosing a source file in gdb
Message-ID: <21141@bellcore.bellcore.com>
Date: 21 Mar 90 14:15:50 GMT
Sender: news@bellcore.bellcore.com
Reply-To: dana@thumper.bellcore.com
Organization: Packet Communications Research Group (Bellcore)
Lines: 18
Posted: Wed Mar 21 15:15:50 1990