projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gas: run the hwcaps-bump tests with 64-bit sparc objects only.
[deliverable/binutils-gdb.git]
/
binutils
/
stabs.c
diff --git
a/binutils/stabs.c
b/binutils/stabs.c
index 9534d6616acac2e8be7ab78fb2e2faa42bccfecd..d209094d03130283be9440a91c5f59c75b1fc746 100644
(file)
--- a/
binutils/stabs.c
+++ b/
binutils/stabs.c
@@
-1,6
+1,5
@@
/* stabs.c -- Parse stabs debugging information
/* stabs.c -- Parse stabs debugging information
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-2016 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@
-837,8
+836,6
@@
parse_stab_string (void *dhandle, struct stab_handle *info, int stabtype,
case 'G':
{
case 'G':
{
- char leading;
- long c;
asymbol **ps;
/* A global symbol. The value must be extracted from the
asymbol **ps;
/* A global symbol. The value must be extracted from the
@@
-847,19
+844,27
@@
parse_stab_string (void *dhandle, struct stab_handle *info, int stabtype,
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
return FALSE;
(debug_type **) NULL);
if (dtype == DEBUG_TYPE_NULL)
return FALSE;
- leading = bfd_get_symbol_leading_char (info->abfd);
- for (c = info->symcount, ps = info->syms; c > 0; --c, ++ps)
+ if (name != NULL)
{
{
- const char *n;
+ char leading;
+ long c;
- n = bfd_asymbol_name (*ps);
- if (leading != '\0' && *n == leading)
- ++n;
- if (*n == *name && strcmp (n, name) == 0)
- break;
+ leading = bfd_get_symbol_leading_char (info->abfd);
+ for (c = info->symcount, ps = info->syms; c > 0; --c, ++ps)
+ {
+ const char *n;
+
+ n = bfd_asymbol_name (*ps);
+ if (leading != '\0' && *n == leading)
+ ++n;
+ if (*n == *name && strcmp (n, name) == 0)
+ break;
+ }
+
+ if (c > 0)
+ value = bfd_asymbol_value (*ps);
}
}
- if (c > 0)
- value = bfd_asymbol_value (*ps);
+
if (! stab_record_variable (dhandle, info, name, dtype, DEBUG_GLOBAL,
value))
return FALSE;
if (! stab_record_variable (dhandle, info, name, dtype, DEBUG_GLOBAL,
value))
return FALSE;
@@
-1769,7
+1774,7
@@
parse_stab_range_type (void *dhandle, struct stab_handle *info, const char *type
else if (n3 == (bfd_signed_vma) 0xffffffff)
return debug_make_int_type (dhandle, 4, TRUE);
#ifdef BFD64
else if (n3 == (bfd_signed_vma) 0xffffffff)
return debug_make_int_type (dhandle, 4, TRUE);
#ifdef BFD64
- else if (n3 == (
(((bfd_signed_vma) 0xffffffff) << 32) | 0xffffffff)
)
+ else if (n3 == (
bfd_signed_vma) 0xffffffffffffffffLL
)
return debug_make_int_type (dhandle, 8, TRUE);
#endif
}
return debug_make_int_type (dhandle, 8, TRUE);
#endif
}
@@
-2758,9
+2763,8
@@
parse_stab_members (void *dhandle, struct stab_handle *info,
argtypes string is the mangled form of the argument
types, and the full type and the physical name must be
extracted from them. */
argtypes string is the mangled form of the argument
types, and the full type and the physical name must be
extracted from them. */
- if (! stub)
- physname = argtypes;
- else
+ physname = argtypes;
+ if (stub)
{
debug_type class_type, return_type;
{
debug_type class_type, return_type;
@@
-2879,9
+2883,7
@@
parse_stab_argtypes (void *dhandle, struct stab_handle *info,
|| CONST_STRNEQ (argtypes, "__dt"));
is_v3 = argtypes[0] == '_' && argtypes[1] == 'Z';
|| CONST_STRNEQ (argtypes, "__dt"));
is_v3 = argtypes[0] == '_' && argtypes[1] == 'Z';
- if (is_destructor || is_full_physname_constructor || is_v3)
- *pphysname = argtypes;
- else
+ if (!(is_destructor || is_full_physname_constructor || is_v3))
{
unsigned int len;
const char *const_prefix;
{
unsigned int len;
const char *const_prefix;
@@
-3430,6
+3432,7
@@
stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info,
case 9:
name = "unsigned";
rettype = debug_make_int_type (dhandle, 4, TRUE);
case 9:
name = "unsigned";
rettype = debug_make_int_type (dhandle, 4, TRUE);
+ break;
case 10:
name = "unsigned long";
rettype = debug_make_int_type (dhandle, 4, TRUE);
case 10:
name = "unsigned long";
rettype = debug_make_int_type (dhandle, 4, TRUE);
@@
-5169,6
+5172,11
@@
stab_demangle_v3_arglist (void *dhandle, struct stab_handle *info,
return NULL;
}
return NULL;
}
+ /* PR 13925: Cope if the demangler returns an empty
+ context for a function with no arguments. */
+ if (dc->u.s_binary.left == NULL)
+ break;
+
arg = stab_demangle_v3_arg (dhandle, info, dc->u.s_binary.left,
NULL, &varargs);
if (arg == NULL)
arg = stab_demangle_v3_arg (dhandle, info, dc->u.s_binary.left,
NULL, &varargs);
if (arg == NULL)
This page took
0.025054 seconds
and
4
git commands to generate.