diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-12-03 18:39:43 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-12-03 18:39:43 +0000 |
commit | 7171232768ab846e00032b7218b2a4ad275b6ae2 (patch) | |
tree | 6b8bbc022efaa3162cedfb3995bfdd247edd67a5 /sim/common/syscall.c | |
parent | 93f2a35e101e29e80f48ef9103a1aafb7ec2036e (diff) | |
download | gdb-7171232768ab846e00032b7218b2a4ad275b6ae2.zip gdb-7171232768ab846e00032b7218b2a4ad275b6ae2.tar.gz gdb-7171232768ab846e00032b7218b2a4ad275b6ae2.tar.bz2 |
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/common/syscall.c')
-rw-r--r-- | sim/common/syscall.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sim/common/syscall.c b/sim/common/syscall.c index 28816c0..1dfe7aa 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 |