From: Jim Blandy <jimb@red-bean.com>
To: Andrew STUBBS <andrew.stubbs@st.com>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Allow spaces in filenames to load command
Date: Wed, 07 Dec 2005 19:35:00 -0000 [thread overview]
Message-ID: <8f2776cb0512061912o2d37bef9y7404a51858bfd6cf@mail.gmail.com> (raw)
In-Reply-To: <8f2776cb0512061504la4a7a5brada0edaeb051f0e4@mail.gmail.com>
Here's what I think we should do. Folks who've worked a lot with the
target vector, please review.
First, I'd like to make the following change to target.h:
*** target.h 15 Sep 2005 22:46:32 -0700 1.76
--- target.h 06 Dec 2005 19:03:13 -0800
***************
*** 679,686 ****
/* Load an executable file into the target process. This is expected
to not only bring new code into the target process, but also to
! update GDB's symbol tables to match. */
extern void target_load (char *arg, int from_tty);
/* Look up a symbol in the target's symbol table. NAME is the symbol
--- 679,692 ----
/* Load an executable file into the target process. This is expected
to not only bring new code into the target process, but also to
! update GDB's symbol tables to match.
+ ARG contains command-line arguments, to be broken down with
+ buildargv (). The first non-switch argument is the filename to
+ load, FILE; the second is a number (as parsed by strtoul (..., ...,
+ 0)), which is an offset to apply to the load addresses of FILE's
+ sections. The target may define switches, or other non-switch
+ arguments, as it pleases. */
extern void target_load (char *arg, int from_tty);
/* Look up a symbol in the target's symbol table. NAME is the symbol
I believe generic_load (and all the targets that use it, which is most
of them) already meet that description.
Second, change gdbsim_load to actually call buildargv, error out if a
load address is present (saying it's not implemented yet), and pass
the filename to sim_load.
Third, change load_command to quote the result from get_exec_file if needed.
Fourth, drop the string address equality test from the patch.
Fifth, error out if there are further arguments we haven't recognized.
This moves towards a well-defined interface for target_load. I don't
think it's fair to ask you to go in and fix
freds-old-S100-bus-board-monitor.c; in the future, if people run into
problems with specific targets not expecting the quotation, we can fix
them, since we'll then have a person who can actually test the change.
next prev parent reply other threads:[~2005-12-07 3:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-06 17:06 Andrew STUBBS
2005-12-06 18:23 ` Jim Blandy
2005-12-06 20:28 ` Andrew STUBBS
2005-12-07 17:44 ` Jim Blandy
2005-12-07 19:35 ` Jim Blandy [this message]
2005-12-07 23:25 ` Andrew STUBBS
2005-12-08 0:19 ` Andrew STUBBS
2006-02-20 17:07 ` Daniel Jacobowitz
2006-02-20 20:03 ` Jim Blandy
2006-02-20 20:38 ` Daniel Jacobowitz
2006-02-21 18:27 ` Andrew STUBBS
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=8f2776cb0512061912o2d37bef9y7404a51858bfd6cf@mail.gmail.com \
--to=jimb@red-bean.com \
--cc=andrew.stubbs@st.com \
--cc=gdb-patches@sourceware.org \
/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