From: Pedro Alves <palves@redhat.com>
To: Kevin Buettner <kevinb@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb.dwarf2: Define and use gdb_target_symbol_prefix for symbol prefixes
Date: Fri, 30 Oct 2015 15:51:00 -0000 [thread overview]
Message-ID: <56334F21.1020205@redhat.com> (raw)
In-Reply-To: <20151029212509.438b5642@pinnacle.lan>
On 10/30/2015 04:25 AM, Kevin Buettner wrote:
> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index 048070b..f8e35ac 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -5521,6 +5521,45 @@ proc core_find {binfile {deletefiles {}} {arg ""}} {
> return $destcore
> }
>
> +# gdb_target_symbol_prefix compiles a test program and uses readelf
> +# to determine the prefix (such as underscore) for linker symbol
> +# prefixes.
> +
> +proc gdb_target_symbol_prefix {} {
Shouldn't this be gdb_caching_proc ?
Then T wonder whether something like:
- DW_OP_addr table_2_ptr
+ DW_OP_addr [gdb_symbol table_2_ptr]
instead of prepending the $prefix variable results in clearer
test code.
> + set readelf_program [gdb_find_readelf]
> + set result [catch "exec $readelf_program --syms $exe" output]
> +
> + if { $result == 0 \
> + && ![regexp { ([^ a-zA-Z0-9]*)main$} $output dummy prefix] } {
> + verbose "gdb_target_symbol_prefix: Could not find main in readelf output; returning null prefix" 2
> + }
I'm wondering about using a method that would work for mingw/cygwin
as well. The only existing use of the target symbol prefix in the
tree is for those targets, which are coff/pe, not elf. See
gdb_target_symbol_prefix_flags. Maybe just use objdump instead?
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-10-30 11:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-30 11:06 Kevin Buettner
2015-10-30 12:06 ` Kevin Buettner
2015-10-30 15:53 ` Pedro Alves
2015-11-05 6:39 ` Kevin Buettner
2015-11-05 10:46 ` Pedro Alves
2015-11-05 10:55 ` Pedro Alves
2015-11-06 5:33 ` Kevin Buettner
2015-10-30 15:51 ` Pedro Alves [this message]
2015-11-04 21:49 ` Kevin Buettner
2015-11-05 10:14 ` Pedro Alves
2015-11-05 20:01 ` Kevin Buettner
2015-11-05 21:19 ` Pedro Alves
2015-11-05 22:26 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56334F21.1020205@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox