This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: get the location of the definition of expression's type?
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: zet <feqin1023 at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 15 Jun 2016 16:39:28 +0200
- Subject: Re: get the location of the definition of expression's type?
- Authentication-results: sourceware.org; auth=none
- References: <CAOfAq_q18S6VxzR=j-zKaVQ4EXeJW9=RDQfbRt0xSX=va_wT2g at mail dot gmail dot com>
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