+2015-04-28 Gary Benson <gbenson@redhat.com>
+
+ * infrun.c (solist.h): New include.
+ (follow_exec): Use exec_file_find to prefix execd_pathname
+ with gdb_sysroot.
+
2015-04-28 Patrick Palka <patrick@parcs.ath.cx>
* tui/tui-source.c (tui_set_source_content): Avoid calling
#include "target-descriptions.h"
#include "target-dcache.h"
#include "terminal.h"
+#include "solist.h"
/* Prototypes for local functions */
breakpoint_init_inferior (inf_execd);
- if (gdb_sysroot && *gdb_sysroot)
+ if (gdb_sysroot != NULL && *gdb_sysroot != '\0')
{
- char *name = alloca (strlen (gdb_sysroot)
- + strlen (execd_pathname)
- + 1);
+ int fd = -1;
+ char *name;
- strcpy (name, gdb_sysroot);
- strcat (name, execd_pathname);
- execd_pathname = name;
+ name = exec_file_find (execd_pathname, &fd);
+ if (fd >= 0)
+ close (fd);
+
+ execd_pathname = alloca (strlen (name) + 1);
+ strcpy (execd_pathname, name);
+ xfree (name);
}
/* Reset the shared library package. This ensures that we get a