From: Gary Benson <gbenson@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 7/9] Update exec_file_attach to cope with "target:" filenames
Date: Wed, 01 Apr 2015 15:59:00 -0000 [thread overview]
Message-ID: <20150401155938.GB22176@blade.nx> (raw)
In-Reply-To: <551BFDB6.1090302@redhat.com>
Pedro Alves wrote:
> On 04/01/2015 02:55 PM, Gary Benson wrote:
> > Pedro Alves wrote:
> > > On 03/20/2015 04:48 PM, Gary Benson wrote:
> > > > This commit adds support for filenames prefixed with "target:" to
> > > > exec_file_attach. This is required to correctly follow inferior
> > > > exec* calls when a gdb_sysroot prefixed with "target:" is set.
> > >
> > > Hmm, I don't see how. Isn't this only true when target_pid_to_exec_file
> > > prepends the sysroot, which it doesn't yet? I think this should move
> > > to that other series.
> >
> > Search for gdb_sysroot in infrun.c.
>
> Ah, thanks. I went from memory (which obviously failed), while
> I should have looked.
I may make a followup patch to convert that bit to use exec_file_find
from my "Don't require 'file' for remote targets" series when that's
in.
> > diff --git a/gdb/exec.c b/gdb/exec.c
> > index 6b6fc7d..ce61303 100644
> > --- a/gdb/exec.c
> > +++ b/gdb/exec.c
> > @@ -192,6 +192,7 @@ exec_file_attach (const char *filename, int from_tty)
> >
> > if (load_via_target)
> > {
> > + /* gdb_bfd_fopen does not support "target:" filenames. */
> > if (write_files)
> > warning (_("writing into executable files is "
> > "not supported for %s sysroots"),
>
> That's a limitation that can be lifted later, by either teaching
> gdb_bfd_fopen about "target:" or using an alternative like
> gdb_bfd_open instead, right?
Yes, it's not a permanent restriction, just stuff that's not written
yet. The appropriate methods are in RSP I think, it's just gdb_bfd.c
that needs touching. (It could probably be refactored some too,
maybe make gdb_bfd_open a special case of gdb_bfd_fopen and put all
the real code in the latter.)
Cheers,
Gary
--
http://gbenson.net/
next prev parent reply other threads:[~2015-04-01 15:59 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-20 16:48 [PATCH 0/9] New default sysroot "target:" Gary Benson
2015-03-20 16:48 ` [PATCH 1/9] Introduce target_fileio_fstat Gary Benson
2015-04-01 12:11 ` Pedro Alves
2015-03-20 16:48 ` [PATCH 6/9] Strip "target:" prefix in solib_find if accessing local files Gary Benson
2015-04-01 12:14 ` Pedro Alves
2015-03-20 16:48 ` [PATCH 4/9] Convert "remote:" sysroots to "target:" and remove "remote:" Gary Benson
2015-04-01 12:13 ` Pedro Alves
2015-04-01 13:48 ` Gary Benson
2015-03-20 16:57 ` [PATCH 9/9] Document "target:" sysroot changes Gary Benson
2015-03-20 17:51 ` Eli Zaretskii
2015-04-01 12:15 ` Pedro Alves
2015-03-20 16:57 ` [PATCH 8/9] Make the default sysroot be "target:" Gary Benson
2015-04-01 12:15 ` Pedro Alves
2015-04-01 14:12 ` Gary Benson
2015-04-01 14:18 ` Pedro Alves
2015-03-20 17:18 ` [PATCH 7/9] Update exec_file_attach to cope with "target:" filenames Gary Benson
2015-04-01 12:14 ` Pedro Alves
2015-04-01 13:55 ` Gary Benson
2015-04-01 14:16 ` Pedro Alves
2015-04-01 15:59 ` Gary Benson [this message]
2015-03-20 17:32 ` [PATCH 2/9] Introduce target_filesystem_is_local Gary Benson
2015-04-01 12:11 ` Pedro Alves
2015-03-20 17:46 ` [PATCH 5/9] Rearrange symfile_bfd_open Gary Benson
2015-04-01 12:13 ` Pedro Alves
2015-04-01 15:50 ` Gary Benson
2015-04-01 16:03 ` Pedro Alves
2015-03-20 17:47 ` [PATCH 3/9] Make gdb_bfd_open able to open BFDs using target fileio Gary Benson
2015-04-01 12:13 ` Pedro Alves
2015-04-01 12:17 ` [PATCH 0/9] New default sysroot "target:" Pedro Alves
2015-04-02 13:00 ` Gary Benson
2015-04-01 12:22 ` [PING][PATCH " Gary Benson
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=20150401155938.GB22176@blade.nx \
--to=gbenson@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).