aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorGeoffrey Noer <noer@cygnus>1996-07-18 08:29:09 +0000
committerGeoffrey Noer <noer@cygnus>1996-07-18 08:29:09 +0000
commit3f17fed8f1e79ab7559f0cbb1450c0a910dd07e6 (patch)
treebdcec051a4386d0c59041ddfcc17ba5e11d36f96 /gdb/symfile.c
parent4fa14cf71c086365452d4bcde51b5c5ecb64aaf2 (diff)
downloadgdb-3f17fed8f1e79ab7559f0cbb1450c0a910dd07e6.zip
gdb-3f17fed8f1e79ab7559f0cbb1450c0a910dd07e6.tar.gz
gdb-3f17fed8f1e79ab7559f0cbb1450c0a910dd07e6.tar.bz2
Thu Jul 18 01:22:01 1996 Geoffrey Noer <noer@cygnus.com>
* symfile.c (symfile_bfd_open): * exec.c (exec_file_command): for __GO32__ and __WIN32__ systems, free the user from having to type the .exe extension.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index cdf12a6..1d91e7f 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -838,6 +838,15 @@ symfile_bfd_open (name)
/* Look down path for it, allocate 2nd new malloc'd copy. */
desc = openp (getenv ("PATH"), 1, name, O_RDONLY | O_BINARY, 0, &absolute_name);
+#if defined(__GO32__) || defined(__WIN32__)
+ if (desc < 0)
+ {
+ char *exename = alloca (strlen (name) + 5);
+ strcat (strcpy (exename, name), ".exe");
+ desc = openp (getenv ("PATH"), 1, exename, O_RDONLY | O_BINARY,
+ 0, &absolute_name);
+ }
+#endif
if (desc < 0)
{
make_cleanup (free, name);