aboutsummaryrefslogtreecommitdiff
path: root/gdb/osfsolib.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1994-03-02 20:14:07 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1994-03-02 20:14:07 +0000
commitc485c7a9ddc57c1c3b09c87f37f7c8ab02470230 (patch)
treead4f7e222493dc78c18a1a257f19f2bdf7d7952c /gdb/osfsolib.c
parentfb338f1d79bf2e003a78c8bc6003c409512ca1ed (diff)
downloadgdb-c485c7a9ddc57c1c3b09c87f37f7c8ab02470230.zip
gdb-c485c7a9ddc57c1c3b09c87f37f7c8ab02470230.tar.gz
gdb-c485c7a9ddc57c1c3b09c87f37f7c8ab02470230.tar.bz2
* osfsolib.c (xfer_link_map_member): Update to use new
target_read_string interface.
Diffstat (limited to 'gdb/osfsolib.c')
-rw-r--r--gdb/osfsolib.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/gdb/osfsolib.c b/gdb/osfsolib.c
index 55d20cf..7f0d1a5 100644
--- a/gdb/osfsolib.c
+++ b/gdb/osfsolib.c
@@ -344,11 +344,17 @@ xfer_link_map_member (so_list_ptr, lm)
len = MAX_PATH_SIZE;
strncpy (so_list_ptr->so_name, LM_NAME (so_list_ptr), MAX_PATH_SIZE);
#else
- if (!target_read_string((CORE_ADDR) LM_NAME (so_list_ptr),
- so_list_ptr->so_name, MAX_PATH_SIZE - 1))
- error ("xfer_link_map_member: Can't read pathname for load map\n");
+ int errcode;
+ char *buffer;
+ target_read_string ((CORE_ADDR) LM_NAME (so_list_ptr), &buffer,
+ MAX_PATH_SIZE - 1, &errcode);
+ if (errcode != 0)
+ error ("xfer_link_map_member: Can't read pathname for load map: %s\n",
+ safe_strerror (errcode));
+ strncpy (so_list_ptr->so_name, buffer, MAX_PATH_SIZE - 1);
+ free (buffer);
#endif
- so_list_ptr->so_name[MAX_PATH_SIZE - 1] = 0;
+ so_list_ptr->so_name[MAX_PATH_SIZE - 1] = '\0';
solib_map_sections (so_list_ptr);
}