This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 07/14] add infcall_mmap and gcc_target_options gdbarch methods
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: "Agovic, Sanimir" <sanimir dot agovic at intel dot com>
- Cc: "'Yao Qi'" <yao at codesourcery dot com>, Tom Tromey <tromey at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 19 May 2014 13:15:23 +0200
- Subject: Re: [PATCH 07/14] add infcall_mmap and gcc_target_options gdbarch methods
- Authentication-results: sourceware.org; auth=none
- References: <1400253995-12333-1-git-send-email-tromey at redhat dot com> <1400253995-12333-8-git-send-email-tromey at redhat dot com> <5379A051 dot 9040209 at codesourcery dot com> <20140519064019 dot GA19564 at host2 dot jankratochvil dot net> <5379B528 dot 5040607 at codesourcery dot com> <0377C58828D86C4588AEEC42FC3B85A71D86F725 at IRSMSX105 dot ger dot corp dot intel dot com>
On Mon, 19 May 2014 10:26:43 +0200, Agovic, Sanimir wrote:
> We may consider picking the cu die for the current $pc and extract the compiler
> options from DW_AT_producer[1]. But this requires parsing the necessary bits out
> of a string. Adding something like DW_AT_producer_options to dwarf would make
> things more straight forward.
>
> [1] DW_AT_producer : [...] -mtune=generic -march=x86-64 -g
This is already done in this patchset. I expect if one uses the compiled
expressions one is probably using -g non-stripped inferior.
This gdbarch gcc_target_options method is there only as some fallback for
stripped / non-g / old gcc / -gno-record-gcc-switches inferiors.
Jan