summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorJerome Guitton <guitton@adacore.com>2007-09-04 09:45:06 +0000
committerJerome Guitton <guitton@adacore.com>2007-09-04 09:45:06 +0000
commitd31df399589497b9b67d356b64d7dd54d64bac5a (patch)
treef7ba8d5428a2e30472b82f96f2ab10779a98bb63 /sim
parentc3071028150ce9da979c526d134bae38f3820fd4 (diff)
downloadgdb-d31df399589497b9b67d356b64d7dd54d64bac5a.tar.gz
* sim/ppc/emul_bugapi.c (emul_bugapi_create): quote the file
name property before parsing it.
Diffstat (limited to 'sim')
-rw-r--r--sim/ppc/ChangeLog5
-rw-r--r--sim/ppc/emul_bugapi.c9
2 files changed, 12 insertions, 2 deletions
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 6a2fe62ccb8..a7efe94673f 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,8 @@
+2007-09-04 Jerome Guitton <guitton@adacore.com>
+
+ * sim/ppc/emul_bugapi.c (emul_bugapi_create): quote the file
+ name property before parsing it.
+
2006-12-21 Hans-Peter Nilsson <hp@axis.com>
* acconfig.h: Remove.
diff --git a/sim/ppc/emul_bugapi.c b/sim/ppc/emul_bugapi.c
index 97028bf9de9..9e09d2429ce 100644
--- a/sim/ppc/emul_bugapi.c
+++ b/sim/ppc/emul_bugapi.c
@@ -203,6 +203,7 @@ emul_bugapi_create(device *root,
{
device *node;
os_emul_data *bugapi;
+ char *filename;
/* check it really is for us */
if (name != NULL
@@ -301,8 +302,12 @@ emul_bugapi_create(device *root,
: "ppc-xcoff"));
if (image != NULL)
- tree_parse(root, "/openprom/init/load-binary/file-name \"%s",
- bfd_get_filename(image));
+ {
+ filename = tree_quote_property (bfd_get_filename(image));
+ tree_parse(root, "/openprom/init/load-binary/file-name %s",
+ filename);
+ free (filename);
+ }
return bugapi;
}