From: Aleksandar Ristovski <aristovski@qnx.com>
To: gdb-patches@sources.redhat.com
Cc: Pedro Alves <pedro@codesourcery.com>
Subject: Re: [patch] solib-svr4.c - allow reading linkmap info from core without executable
Date: Thu, 11 Jun 2009 13:39:00 -0000 [thread overview]
Message-ID: <4A310906.4030603@qnx.com> (raw)
In-Reply-To: <200906102308.29638.pedro@codesourcery.com>
Pedro Alves wrote:
>> if (info->debug_base == 0 && svr4_have_link_map_offsets ())
>> {
>> - if (exec_bfd != NULL
>> + if ((exec_bfd != NULL
>> && bfd_get_flavour (exec_bfd) == bfd_target_elf_flavour)
>> + || (core_bfd != NULL
>> + && bfd_get_flavour (core_bfd) == bfd_target_elf_flavour))
>> info->debug_base = elf_locate_base ();
>> }
>
> Are there live debugging cases (archs?, PIE?) (e.g., "target remote"
> without specifying an executable) where letting elf_locate_base
> try to read the debug base from the target's auxv (scan_dyntag_auxv)
> will work? It would mean that removing the exec_bfd checks instead
> of adding core_bfd checks, would still improve your case, while
> letting other cases benefit as well.
>
Yes, in theory it should work as long as target_ops in
question know how to read auxv (that is, as long as
to_xfer_partial(ops, TARGET_OBJECT_AUXV,...) knows how to do
it.)
I had internally made this change:
{
- if (exec_bfd != NULL
+ if ((exec_bfd != NULL
&& bfd_get_flavour (exec_bfd) ==
bfd_target_elf_flavour)
+ || exec_bfd == NULL)
debug_base = elf_locate_base ();
}
return (debug_base);
But wanted to be more conservative for FSF, since I do not
quite understand under which circumstances could we end up
in solib-svr4, and not have "bfd_target_elf_flavour".
Thanks,
--
Aleksandar Ristovski
QNX Software Systems
next prev parent reply other threads:[~2009-06-11 13:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-29 20:42 Aleksandar Ristovski
2009-06-10 22:07 ` Pedro Alves
2009-06-11 13:39 ` Aleksandar Ristovski [this message]
2009-06-18 14:04 ` Aleksandar Ristovski
2009-06-18 23:03 ` Pedro Alves
2009-06-19 14:16 ` Aleksandar Ristovski
2009-06-19 14:42 ` Mark Kettenis
2009-06-19 14:56 ` Daniel Jacobowitz
2009-06-19 15:00 ` Pedro Alves
2009-06-19 16:03 ` Aleksandar Ristovski
2009-06-20 0:17 ` Pedro Alves
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=4A310906.4030603@qnx.com \
--to=aristovski@qnx.com \
--cc=gdb-patches@sources.redhat.com \
--cc=pedro@codesourcery.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