* how to find where specified variable is declared?
@ 2007-10-02 12:05 Bogdan Slusarczyk
2007-10-02 12:07 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Bogdan Slusarczyk @ 2007-10-02 12:05 UTC (permalink / raw)
To: gdb
Hi,
Does gdb have information about source file for specified variable (I
want to find where such variable is declared)?.
Thank in advance
Bogdan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to find where specified variable is declared?
2007-10-02 12:05 how to find where specified variable is declared? Bogdan Slusarczyk
@ 2007-10-02 12:07 ` Daniel Jacobowitz
2007-10-02 12:27 ` Bogdan Slusarczyk
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2007-10-02 12:07 UTC (permalink / raw)
To: Bogdan Slusarczyk; +Cc: gdb
On Tue, Oct 02, 2007 at 02:04:41PM +0200, Bogdan Slusarczyk wrote:
> Hi,
> Does gdb have information about source file for specified variable (I want to
> find where such variable is declared)?.
Try "list varname"?
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to find where specified variable is declared?
2007-10-02 12:07 ` Daniel Jacobowitz
@ 2007-10-02 12:27 ` Bogdan Slusarczyk
2007-10-02 12:39 ` Daniel Jacobowitz
2007-10-02 12:43 ` Andreas Schwab
0 siblings, 2 replies; 5+ messages in thread
From: Bogdan Slusarczyk @ 2007-10-02 12:27 UTC (permalink / raw)
To: gdb
>> Does gdb have information about source file for specified variable (I want to
>> find where such variable is declared)?.
>
> Try "list varname"?
It works only for function names :(
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to find where specified variable is declared?
2007-10-02 12:27 ` Bogdan Slusarczyk
@ 2007-10-02 12:39 ` Daniel Jacobowitz
2007-10-02 12:43 ` Andreas Schwab
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2007-10-02 12:39 UTC (permalink / raw)
To: Bogdan Slusarczyk; +Cc: gdb
On Tue, Oct 02, 2007 at 02:27:31PM +0200, Bogdan Slusarczyk wrote:
> >> Does gdb have information about source file for specified variable (I want to
> >> find where such variable is declared)?.
> > Try "list varname"?
>
> It works only for function names :(
It works fine for variables here.
(gdb) set listsize 1
(gdb) list inferior_ptid
146 ptid_t inferior_ptid;
(gdb) info source
Current source file is /space/fsf/commit/src/gdb/infcmd.c
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to find where specified variable is declared?
2007-10-02 12:27 ` Bogdan Slusarczyk
2007-10-02 12:39 ` Daniel Jacobowitz
@ 2007-10-02 12:43 ` Andreas Schwab
1 sibling, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2007-10-02 12:43 UTC (permalink / raw)
To: Bogdan Slusarczyk; +Cc: gdb
Bogdan Slusarczyk <bodzio131@op.pl> writes:
>>> Does gdb have information about source file for specified variable (I
>>> want to find where such variable is declared)?.
>>
>> Try "list varname"?
>
> It works only for function names :(
Then the debugging information is incomplete. Without that gdb cannot
do anything.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-02 12:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-02 12:05 how to find where specified variable is declared? Bogdan Slusarczyk
2007-10-02 12:07 ` Daniel Jacobowitz
2007-10-02 12:27 ` Bogdan Slusarczyk
2007-10-02 12:39 ` Daniel Jacobowitz
2007-10-02 12:43 ` Andreas Schwab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox