const char *p1 = ptr;
char *p2 = p;
const char *end = ptr + size;
+
while (p1 != end)
*p2++ = *p1++;
}
return p;
}
-/* Concatenate strings S1, S2 and S3; return the new string. Space is found
- in the obstack pointed to by OBSTACKP. */
+/* Concatenate NULL terminated variable argument list of `const char *' strings;
+ return the new string. Space is found in the OBSTACKP. Argument list must
+ be terminated by a sentinel expression `(char *) NULL'. */
char *
-obconcat (struct obstack *obstackp, const char *s1, const char *s2,
- const char *s3)
+obconcat (struct obstack *obstackp, ...)
{
- int len = strlen (s1) + strlen (s2) + strlen (s3) + 1;
- char *val = (char *) obstack_alloc (obstackp, len);
- strcpy (val, s1);
- strcat (val, s2);
- strcat (val, s3);
- return val;
+ va_list ap;
+
+ va_start (ap, obstackp);
+ for (;;)
+ {
+ const char *s = va_arg (ap, const char *);
+
+ if (s == NULL)
+ break;
+
+ obstack_grow_str (obstackp, s);
+ }
+ va_end (ap);
+ obstack_1grow (obstackp, 0);
+
+ return obstack_finish (obstackp);
}
/* True if we are reading a symbol table. */
for (cur_sec = abfd->sections; cur_sec != NULL; cur_sec = cur_sec->next)
{
int indx = cur_sec->index;
- CORE_ADDR cur_offset;
/* We don't need to compare against ourself. */
if (cur_sec == sect)
struct place_section_arg arg;
bfd *abfd = objfile->obfd;
asection *cur_sec;
- CORE_ADDR lowest = 0;
for (cur_sec = abfd->sections; cur_sec != NULL; cur_sec = cur_sec->next)
/* We do not expect this to happen; just skip this step if the
void
new_symfile_objfile (struct objfile *objfile, int add_flags)
{
-
/* If this is the main symbol file we have to clean up all users of the
old main symbol file. Otherwise it is sufficient to fixup all the
breakpoints that may have been redefined by this symbol file. */
unsigned long crc32;
char *contents;
int crc_offset;
- unsigned char *p;
sect = bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink");
char *
find_separate_debug_file_by_debuglink (struct objfile *objfile)
{
- asection *sect;
- char *basename, *name_copy, *debugdir;
+ char *basename, *debugdir;
char *dir = NULL;
char *debugfile = NULL;
char *canon_name = NULL;
- bfd_size_type debuglink_size;
unsigned long crc32;
int i;
if (desc < 0)
{
char *exename = alloca (strlen (name) + 5);
+
strcat (strcpy (exename, name), ".exe");
desc = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, exename,
O_RDONLY | O_BINARY, &absolute_name);
char *filename = NULL;
int flags = OBJF_USERLOADED;
char *arg;
- int expecting_option = 0;
int section_index = 0;
int argcnt = 0;
int sec_num = 0;
add_filename_language (".m", language_objc);
add_filename_language (".f", language_fortran);
add_filename_language (".F", language_fortran);
+ add_filename_language (".for", language_fortran);
+ add_filename_language (".FOR", language_fortran);
+ add_filename_language (".ftn", language_fortran);
+ add_filename_language (".FTN", language_fortran);
+ add_filename_language (".fpp", language_fortran);
+ add_filename_language (".FPP", language_fortran);
+ add_filename_language (".f90", language_fortran);
+ add_filename_language (".F90", language_fortran);
+ add_filename_language (".f95", language_fortran);
+ add_filename_language (".F95", language_fortran);
+ add_filename_language (".f03", language_fortran);
+ add_filename_language (".F03", language_fortran);
+ add_filename_language (".f08", language_fortran);
+ add_filename_language (".F08", language_fortran);
add_filename_language (".s", language_asm);
add_filename_language (".sx", language_asm);
add_filename_language (".S", language_asm);
for (i = 0, sect = abfd->sections; sect != NULL; i++, sect = sect->next)
{
- CORE_ADDR vma;
int which = data->segment_info[i];
if (which == 1)