mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 22:48:57 +08:00
From Craig Silverstein: support @file expansion.
This commit is contained in:
@ -91,7 +91,10 @@ write_debug_script(std::string filename_str,
|
|||||||
FILE* fp = fopen(filename, "w");
|
FILE* fp = fopen(filename, "w");
|
||||||
if (fp)
|
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);
|
fprintf(fp, "$PREFIX%s $*\n", args);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
chmod(filename, 0755);
|
chmod(filename, 0755);
|
||||||
@ -132,6 +135,9 @@ main(int argc, char** argv)
|
|||||||
|
|
||||||
program_name = argv[0];
|
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.
|
// This is used by write_debug_script(), which wants the unedited argv.
|
||||||
std::string args = collect_argv(argc, argv);
|
std::string args = collect_argv(argc, argv);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user