summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-12-03 18:39:43 +0000
committerMike Frysinger <vapier@gentoo.org>2011-12-03 18:39:43 +0000
commit179a9e730846f87e3c4100d940a55167dfcb564a (patch)
tree7e40942f6fd007ce8522e4817e54719187804336 /sim
parent3ea84eb8995fcdc77a696224983812a32d0cb001 (diff)
downloadgdb-179a9e730846f87e3c4100d940a55167dfcb564a.tar.gz
sim: export cb_get_string for people to use
The common sim code provides a useful "get_string" function which reads a C string out of the target's memory space. So rename and export it for other people to use. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim')
-rw-r--r--sim/common/ChangeLog5
-rw-r--r--sim/common/syscall.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 405888fdd3e..c69b94864b8 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,10 @@
2011-12-03 Mike Frysinger <vapier@gentoo.org>
+ * syscall.c (cb_get_string): Rename from "get_string".
+ (get_path): Rename get_string call to cb_get_string.
+
+2011-12-03 Mike Frysinger <vapier@gentoo.org>
+
* Make-common.in (VPATH): Add $(srccom).
(DEP): Delete.
(DEPMODE, DEPDIR, depcomp, COMPILE.pre, COMPILE.post, COMPILE,
diff --git a/sim/common/syscall.c b/sim/common/syscall.c
index 28816c02b55..1dfe7aabaab 100644
--- a/sim/common/syscall.c
+++ b/sim/common/syscall.c
@@ -76,8 +76,8 @@ char *simulator_sysroot = "";
/* Utility of cb_syscall to fetch a path name or other string from the target.
The result is 0 for success or a host errno value. */
-static int
-get_string (cb, sc, buf, buflen, addr)
+int
+cb_get_string (cb, sc, buf, buflen, addr)
host_callback *cb;
CB_SYSCALL *sc;
char *buf;
@@ -121,7 +121,7 @@ get_path (cb, sc, addr, bufp)
int result;
int sysroot_len = strlen (simulator_sysroot);
- result = get_string (cb, sc, buf, MAX_PATH_LEN - sysroot_len, addr);
+ result = cb_get_string (cb, sc, buf, MAX_PATH_LEN - sysroot_len, addr);
if (result == 0)
{
/* Prepend absolute paths with simulator_sysroot. Relative paths