/* ieee.c -- Read and write IEEE-695 debugging information.
- Copyright (C) 1996, 1998 Free Software Foundation, Inc.
+ Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
#include "libiberty.h"
#include "debug.h"
#include "budbg.h"
+#include "filenames.h"
/* This structure holds an entry on the block stack. */
}
ieee_error (info, *pp - 1, _("invalid number"));
- return false;
+ return false;
}
/* Read a required string from an IEEE file. */
ieee_error (info, start, _("unknown section"));
return false;
}
-
+
if (esp - expr_stack >= EXPR_STACK_SIZE)
{
ieee_error (info, start, _("expression stack overflow"));
case builtin_bcd_float:
ieee_error (info, p, _("BCD float type not supported"));
- return false;
+ return DEBUG_TYPE_NULL;
}
if (name != NULL)
/*ARGSUSED*/
static boolean
ieee_init_buffer (info, buflist)
- struct ieee_handle *info;
+ struct ieee_handle *info ATTRIBUTE_UNUSED;
struct ieee_buflist *buflist;
{
buflist->head = NULL;
/*ARGSUSED*/
static boolean
ieee_append_buffer (info, mainbuf, newbuf)
- struct ieee_handle *info;
+ struct ieee_handle *info ATTRIBUTE_UNUSED;
struct ieee_buflist *mainbuf;
struct ieee_buflist *newbuf;
{
r->next = info->pending_ranges;
info->pending_ranges = r;
return true;
-}
+}
/* Finish a range started by ieee_start_range. */
{
struct ieee_handle *info = (struct ieee_handle *) p;
const char *modname;
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+ const char *backslash;
+#endif
char *c, *s;
unsigned int nindx;
info->filename = filename;
modname = strrchr (filename, '/');
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+ /* We could have a mixed forward/back slash case. */
+ backslash = strrchr (filename, '\\');
+ if (modname == NULL || (backslash != NULL && backslash > modname))
+ modname = backslash;
+#endif
+
if (modname != NULL)
++modname;
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+ else if (filename[0] && filename[1] == ':')
+ modname = filename + 2;
+#endif
else
- {
- modname = strrchr (filename, '\\');
- if (modname != NULL)
- ++modname;
- else
- modname = filename;
- }
+ modname = filename;
+
c = xstrdup (modname);
s = strrchr (c, '.');
if (s != NULL)
static void
ieee_add_bb11_blocks (abfd, sec, data)
- bfd *abfd;
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
PTR data;
{
else
{
const char *filename, *modname;
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+ const char *backslash;
+#endif
char *c, *s;
/* Start the enclosing BB10 block. */
filename = bfd_get_filename (info->abfd);
modname = strrchr (filename, '/');
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+ backslash = strrchr (filename, '\\');
+ if (modname == NULL || (backslash != NULL && backslash > modname))
+ modname = backslash;
+#endif
+
if (modname != NULL)
++modname;
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+ else if (filename[0] && filename[1] == ':')
+ modname = filename + 2;
+#endif
else
- {
- modname = strrchr (filename, '\\');
- if (modname != NULL)
- ++modname;
- else
- modname = filename;
- }
+ modname = filename;
+
c = xstrdup (modname);
s = strrchr (c, '.');
if (s != NULL)
/*ARGSUSED*/
static boolean
ieee_start_source (p, filename)
- PTR p;
- const char *filename;
+ PTR p ATTRIBUTE_UNUSED;
+ const char *filename ATTRIBUTE_UNUSED;
{
return true;
}
PTR p;
bfd_signed_vma low;
bfd_signed_vma high;
- boolean stringp;
+ boolean stringp ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
unsigned int eleindx;
static boolean
ieee_set_type (p, bitstringp)
PTR p;
- boolean bitstringp;
+ boolean bitstringp ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
boolean localp;
which seems pretty important. I'm going to punt this for now. */
return ieee_int_type (p, 4, true);
-}
+}
/* Make a method type. */
static boolean
ieee_tag (p, name)
PTR p;
- const char *name;
+ const char *name ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
static boolean
ieee_int_constant (p, name, val)
- PTR p;
- const char *name;
- bfd_vma val;
+ PTR p ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
+ bfd_vma val ATTRIBUTE_UNUSED;
{
/* FIXME. */
return true;
static boolean
ieee_float_constant (p, name, val)
- PTR p;
- const char *name;
- double val;
+ PTR p ATTRIBUTE_UNUSED;
+ const char *name ATTRIBUTE_UNUSED;
+ double val ATTRIBUTE_UNUSED;
{
/* FIXME. */
return true;
static boolean
ieee_typed_constant (p, name, val)
PTR p;
- const char *name;
- bfd_vma val;
+ const char *name ATTRIBUTE_UNUSED;
+ bfd_vma val ATTRIBUTE_UNUSED;
{
struct ieee_handle *info = (struct ieee_handle *) p;
return false;
++info->fnargcount;
- return true;
+ return true;
}
/* Output pending function parameters. */