aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/nto-tdep.c2
-rw-r--r--gdb/solist.h6
3 files changed, 10 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9bc9a33..67ce94b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2013-07-16 Doug Evans <dje@google.com>
+ * solist.h (target_so_ops.find_and_open_solib): Clarify usage of
+ temp_pathname argument.
+ * nto-tdep.c (nto_find_and_open_solib): Fix setting of temp_pathname
+ when opening the file fails.
+
* target.h (struct target_section): Delete member bfd.
All users updated to use the_bfd_section->owner instead.
* exec.c (add_to_section_table): Assert bfd is expected value.
diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c
index b1a431c..3ed48a9 100644
--- a/gdb/nto-tdep.c
+++ b/gdb/nto-tdep.c
@@ -138,7 +138,7 @@ nto_find_and_open_solib (char *solib, unsigned o_flags, char **temp_pathname)
if (ret >= 0)
*temp_pathname = gdb_realpath (arch_path);
else
- **temp_pathname = '\0';
+ *temp_pathname = NULL;
}
}
return ret;
diff --git a/gdb/solist.h b/gdb/solist.h
index 244484a..a78e3ea 100644
--- a/gdb/solist.h
+++ b/gdb/solist.h
@@ -129,8 +129,10 @@ struct target_so_ops
/* Find and open shared library binary file. */
bfd *(*bfd_open) (char *pathname);
- /* Extra hook for finding and opening a solib.
- Convenience function for remote debuggers finding host libs. */
+ /* Optional extra hook for finding and opening a solib.
+ If TEMP_PATHNAME is non-NULL: If the file is successfully opened a
+ pointer to a malloc'd and realpath'd copy of SONAME is stored there,
+ otherwise NULL is stored there. */
int (*find_and_open_solib) (char *soname,
unsigned o_flags, char **temp_pathname);