aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-02-04 17:26:12 +0000
committerIan Lance Taylor <iant@google.com>2008-02-04 17:26:12 +0000
commitfc955173bb408aa2485fdc9be73dcdcc9e353e4b (patch)
treeaa4f28ac6f8d7f63d2a9ef346d943d06fd4047c4 /gold/main.cc
parent2008-02-04 Antony King <antony.king@st.com> (diff)
downloadbinutils-gdb-fc955173bb408aa2485fdc9be73dcdcc9e353e4b.tar.gz
binutils-gdb-fc955173bb408aa2485fdc9be73dcdcc9e353e4b.tar.bz2
binutils-gdb-fc955173bb408aa2485fdc9be73dcdcc9e353e4b.zip
From Craig Silverstein: support @file expansion.
Diffstat (limited to 'gold/main.cc')
-rw-r--r--gold/main.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/gold/main.cc b/gold/main.cc
index a6c98721805..2f68e06ec5e 100644
--- a/gold/main.cc
+++ b/gold/main.cc
@@ -91,7 +91,10 @@ write_debug_script(std::string filename_str,
FILE* fp = fopen(filename, "w");
if (fp)
{
- fprintf(fp, "[ \"$1\" = debug ] && PREFIX=\"${GDB-/home/build/static/projects/tools/gdb} --annotate=3 --fullname %s --args\" && shift\n", argv_0);
+ fprintf(fp, "[ \"$1\" = debug ]"
+ " && PREFIX=\"${GDB-gdb} --annotate=3 --fullname %s --args\""
+ " && shift\n",
+ argv_0);
fprintf(fp, "$PREFIX%s $*\n", args);
fclose(fp);
chmod(filename, 0755);
@@ -132,6 +135,9 @@ main(int argc, char** argv)
program_name = argv[0];
+ // In libiberty; expands @filename to the args in "filename".
+ expandargv(&argc, &argv);
+
// This is used by write_debug_script(), which wants the unedited argv.
std::string args = collect_argv(argc, argv);