From: Pedro Alves <palves@redhat.com>
To: "Agovic, Sanimir" <sanimir.agovic@intel.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] add-inferior: expand tilde in -exec FILENAME argument
Date: Thu, 30 May 2013 09:25:00 -0000 [thread overview]
Message-ID: <51A71AF4.5020701@redhat.com> (raw)
In-Reply-To: <0377C58828D86C4588AEEC42FC3B85A7162A0A3C@IRSMSX102.ger.corp.intel.com>
Hi, sorry for the delay in getting back to this.
On 02/28/2013 05:15 PM, Agovic, Sanimir wrote:
>> -----Original Message-----
>> From: Pedro Alves [mailto:palves@redhat.com]
>> Sent: Thursday, February 28, 2013 04:33 PM
>
> Thanks for your feedback.
>
>> I assume this fixes:
>>
>> (gdb) add-inferior -exec ~/gdb/tests/main
>> Added inferior 2
>> ~/gdb/tests/main: No such file or directory.
>>
>> even though the file does exist.
> Yes. Sorry for not being clear about the cause.
>
>> I wondered if other similar places expand the tilde early
>> or just before file open [...]
> I found at least one another case:
>
> % gdb -batch \~/gdb/tests/main # or --exec=~/gdb/tests/main
> ~/gdb/tests/main: No such file or directory.
>
> Whereas:
> % gdb -batch --symbols=\~/gdb/tests/main
> Succeeds.
>
> Seems like gdb relies on the shell to expand its executable name.
>
> As an alternative approach I can expand tilde in exec_file_attach
> which is what symbol_file_add and core_file_command do.
Yes, I think that makes sense. We could then remove it from exec.c:
filename = tilde_expand (*argv);
make_cleanup (xfree, filename);
exec_file_attach (filename, from_tty);
--
Pedro Alves
prev parent reply other threads:[~2013-05-30 9:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 15:44 Sanimir Agovic
2013-02-28 15:54 ` Pedro Alves
2013-02-28 17:20 ` Agovic, Sanimir
2013-05-30 9:25 ` Pedro Alves [this message]
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=51A71AF4.5020701@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=sanimir.agovic@intel.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