summaryrefslogtreecommitdiffstats
path: root/gdb/solib.c
diff options
context:
space:
mode:
authorKung Hsu <kung@cygnus>1995-09-08 20:00:56 +0000
committerKung Hsu <kung@cygnus>1995-09-08 20:00:56 +0000
commit2858b1f25e008ebb4fc04ef3142932b487878528 (patch)
tree129de8fa0e8dc77db2235b8cecfd025efdf5cadc /gdb/solib.c
parent92a25e12ff43f233d7b73a59a82e811cb5754c40 (diff)
downloadppe42-binutils-2858b1f25e008ebb4fc04ef3142932b487878528.tar.gz
ppe42-binutils-2858b1f25e008ebb4fc04ef3142932b487878528.zip
* solib.c (solib_map_sections): Copy full path name into so_list
structure so that symbol_file_add can find it.
Diffstat (limited to 'gdb/solib.c')
-rw-r--r--gdb/solib.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/gdb/solib.c b/gdb/solib.c
index d44156d186..89d7e7d270 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
@@ -50,7 +50,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "language.h"
#include "gdbcmd.h"
-#define MAX_PATH_SIZE 256 /* FIXME: Should be dynamic */
+#define MAX_PATH_SIZE 512 /* FIXME: Should be dynamic */
/* On SVR4 systems, for the initial implementation, use some runtime startup
symbol as the "startup mapping complete" breakpoint address. The models
@@ -262,6 +262,12 @@ solib_map_sections (so)
so -> abfd = abfd;
abfd -> cacheable = true;
+ /* copy full path name into so_name, so that later symbol_file_add can find
+ it */
+ if (strlen (scratch_pathname) >= MAX_PATH_SIZE)
+ error ("Full path name length of shared library exceeds MAX_PATH_SIZE in so_list structure.");
+ strcpy (so->so_name, scratch_pathname);
+
if (!bfd_check_format (abfd, bfd_object))
{
error ("\"%s\": not in executable format: %s.",
@@ -942,15 +948,15 @@ symbol_add_stub (arg)
static int match_main (soname)
char *soname;
{
-char **mainp;
+ char **mainp;
-for (mainp = main_name_list; *mainp != NULL; mainp++)
- {
- if (strcmp (soname, *mainp) == 0)
+ for (mainp = main_name_list; *mainp != NULL; mainp++)
+ {
+ if (strcmp (soname, *mainp) == 0)
return (1);
- }
+ }
-return (0);
+ return (0);
}
/*
OpenPOWER on IntegriCloud