+Fri Nov 25 13:37:10 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * coffread.c, symfile.h (coff_getfilename): Make it static again.
+ * xcoffread.c (coff_getfilename): Use a static copy from
+ coffread.c, modified for accessing the static xcoff strtbl.
+
Fri Nov 25 00:51:05 1994 Jeff Law (law@snake.cs.utah.edu)
* hppa-tdep.c (in_solib_call_trampoline): Recognize calls through
#include <sys/types.h>
#include <fcntl.h>
#include <ctype.h>
+#include <string.h>
#include "obstack.h"
#include <sys/param.h>
static void
find_linenos PARAMS ((bfd *, sec_ptr, PTR));
+static char *
+coff_getfilename PARAMS ((union internal_auxent *));
+
static void
read_symbol PARAMS ((struct internal_syment *, int));
return sym2;
}
+/* Extract the file name from the aux entry of a C_FILE symbol. Return
+ only the last component of the name. Result is in static storage and
+ is only good for temporary use. */
+
+static char *
+coff_getfilename (aux_entry)
+ union internal_auxent *aux_entry;
+{
+ static char buffer[BUFSIZ];
+ register char *temp;
+ char *result;
+
+ if (aux_entry->x_file.x_n.x_zeroes == 0)
+ strcpy (buffer, strtbl + aux_entry->x_file.x_n.x_offset);
+ else
+ {
+ strncpy (buffer, aux_entry->x_file.x_fname, FILNMLEN);
+ buffer[FILNMLEN] = '\0';
+ }
+ result = buffer;
+
+ /* FIXME: We should not be throwing away the information about what
+ directory. It should go into dirname of the symtab, or some such
+ place. */
+ if ((temp = strrchr (result, '/')) != NULL)
+ result = temp + 1;
+ return (result);
+}
+
/* Set *SYMBOL to symbol number symno in symtbl. */
static void
read_symbol (symbol, symno)