public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* get the location of the definition of expression's type?
@ 2016-06-15 13:48 zet
  2016-06-15 14:39 ` Jan Kratochvil
  0 siblings, 1 reply; 2+ messages in thread
From: zet @ 2016-06-15 13:48 UTC (permalink / raw)
  To: gdb

Hello, All

When (gdb) ptype global_options
I will get definition of the type of global_options whose type is
'struct gcc_options'

Is it possible get the definition location(which file it is defined
in) info  of 'struct gcc_options'?

I know the line info of 'struct gcc_options' in ELF may lose, but is
gdb has the facility show the line info of the symbol?

thx

-- 
业精于勤,荒于嬉..

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: get the location of the definition of expression's type?
  2016-06-15 13:48 get the location of the definition of expression's type? zet
@ 2016-06-15 14:39 ` Jan Kratochvil
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kratochvil @ 2016-06-15 14:39 UTC (permalink / raw)
  To: zet; +Cc: gdb

On Wed, 15 Jun 2016 15:48:20 +0200, zet wrote:
> When (gdb) ptype global_options
> I will get definition of the type of global_options whose type is
> 'struct gcc_options'
> 
> Is it possible get the definition location(which file it is defined
> in) info  of 'struct gcc_options'?

(gdb) set filename-display absolute 
(gdb) info line global_options
Line number 4677 is out of range for "/quad/home/jkratoch/redhat/gcc5-build/gcc/options.h".
No line number information available for address 0x6d6020 <global_options>
(gdb) info line gcc_options
Line number 13 is out of range for "/quad/home/jkratoch/redhat/gcc5-build/gcc/options.h".


/quad/home/jkratoch/redhat/gcc5-build/gcc/options.h:
13:struct GTY(()) gcc_options
14:#else
15:struct gcc_options
16:#endif
17:{
[...]
4677:extern struct gcc_options global_options;


Jan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-15 14:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-15 13:48 get the location of the definition of expression's type? zet
2016-06-15 14:39 ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).