X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=binutils%2Fprdbg.c;fp=binutils%2Fprdbg.c;h=d6988dc41ffef2f87821278c84da347c6ff6ddbe;hp=098bd58c3d4337f7acdbab59151cd7d536bb9f8d;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 diff --git a/binutils/prdbg.c b/binutils/prdbg.c index 098bd58..d6988dc 100644 --- a/binutils/prdbg.c +++ b/binutils/prdbg.c @@ -1,5 +1,5 @@ /* prdbg.c -- Print out generic debugging information. - Copyright 1995, 1996, 1999, 2002, 2003, 2004, 2006, 2007 + Copyright 1995, 1996, 1999, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Written by Ian Lance Taylor . Tags style generation written by Salvador E. Tropea . @@ -303,7 +303,7 @@ print_debugging_info (FILE *f, void *dhandle, bfd *abfd, asymbol **syms, info.filename = NULL; info.abfd = abfd; info.syms = syms; - info.demangler = demangler; + info.demangler = (char * (*)(struct bfd *, const char *, int)) demangler; if (as_tags) { @@ -499,6 +499,26 @@ print_vma (bfd_vma vma, char *buf, bfd_boolean unsignedp, bfd_boolean hexp) else sprintf (buf, "%ld", (long) vma); } +#if BFD_HOST_64BIT_LONG_LONG + else if (sizeof (vma) <= sizeof (unsigned long long)) + { +#ifndef __MSVCRT__ + if (hexp) + sprintf (buf, "0x%llx", (unsigned long long) vma); + else if (unsignedp) + sprintf (buf, "%llu", (unsigned long long) vma); + else + sprintf (buf, "%lld", (long long) vma); +#else + if (hexp) + sprintf (buf, "0x%I64x", (unsigned long long) vma); + else if (unsignedp) + sprintf (buf, "%I64u", (unsigned long long) vma); + else + sprintf (buf, "%I64d", (long long) vma); +#endif + } +#endif else { buf[0] = '0'; @@ -723,7 +743,7 @@ pr_function_type (void *p, int argcount, bfd_boolean varargs) /* Now the return type is on the top of the stack. */ - s = xmalloc (len); + s = (char *) xmalloc (len); LITSTRCPY (s, "(|) ("); if (argcount < 0) @@ -1297,7 +1317,7 @@ pr_class_static_member (void *p, const char *name, const char *physname, /* Add a base class to a class. */ static bfd_boolean -pr_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean virtual, +pr_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean is_virtual, enum debug_visibility visibility) { struct pr_handle *info = (struct pr_handle *) p; @@ -1323,7 +1343,7 @@ pr_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean virtual, if (! push_type (info, t)) return FALSE; - if (virtual) + if (is_virtual) { if (! prepend_type (info, "virtual ")) return FALSE; @@ -1931,8 +1951,6 @@ tg_start_compilation_unit (void * p, const char *filename ATTRIBUTE_UNUSED) { struct pr_handle *info = (struct pr_handle *) p; - fprintf (stderr, "New compilation unit: %s\n", filename); - free (info->filename); /* Should it be relative? best way to do it here?. */ info->filename = strdup (filename); @@ -2152,7 +2170,7 @@ tg_class_static_member (void *p, const char *name, len_var = strlen (name); len_class = strlen (info->stack->next->type); - full_name = xmalloc (len_var + len_class + 3); + full_name = (char *) xmalloc (len_var + len_class + 3); if (! full_name) return FALSE; sprintf (full_name, "%s::%s", info->stack->next->type, name); @@ -2183,7 +2201,7 @@ tg_class_static_member (void *p, const char *name, static bfd_boolean tg_class_baseclass (void *p, bfd_vma bitpos ATTRIBUTE_UNUSED, - bfd_boolean virtual, enum debug_visibility visibility) + bfd_boolean is_virtual, enum debug_visibility visibility) { struct pr_handle *info = (struct pr_handle *) p; char *t; @@ -2203,7 +2221,7 @@ tg_class_baseclass (void *p, bfd_vma bitpos ATTRIBUTE_UNUSED, if (! push_type (info, t)) return FALSE; - if (virtual) + if (is_virtual) { if (! prepend_type (info, "virtual ")) return FALSE;