forked from Imagelibrary/binutils-gdb
Compare commits
112 Commits
gdb-7.10-r
...
gdb-7.10.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2bb526a22 | ||
|
|
9234ef44bf | ||
|
|
92e6983be1 | ||
|
|
bdaeeefd84 | ||
|
|
87a8c81ef0 | ||
|
|
01382ffd00 | ||
|
|
c8b5fa335e | ||
|
|
1fdd609138 | ||
|
|
121ed3f9e2 | ||
|
|
9a2752c7f0 | ||
|
|
49037e4a12 | ||
|
|
d65faac094 | ||
|
|
99eda040d8 | ||
|
|
fde0a3e549 | ||
|
|
1dc1927e25 | ||
|
|
c4c83242ea | ||
|
|
bab694b7f9 | ||
|
|
70341a0320 | ||
|
|
757295aed8 | ||
|
|
866aba2f3f | ||
|
|
8a71ab1dd3 | ||
|
|
99f3bd8149 | ||
|
|
8bcab5edb2 | ||
|
|
c17e7b9386 | ||
|
|
1cc835f4ed | ||
|
|
2739eb3359 | ||
|
|
89f5b69dd8 | ||
|
|
8b593a34ee | ||
|
|
28098f2c59 | ||
|
|
483ec498cb | ||
|
|
47400476a2 | ||
|
|
978461c7af | ||
|
|
dc544175c0 | ||
|
|
15aa89a588 | ||
|
|
64ab977fde | ||
|
|
59925580b7 | ||
|
|
0e3adc94fa | ||
|
|
40430ae983 | ||
|
|
890a027361 | ||
|
|
c0fab01b98 | ||
|
|
e000bd2af2 | ||
|
|
c0b6cd5664 | ||
|
|
dcb213fcbe | ||
|
|
bec257f7ce | ||
|
|
949b9ae781 | ||
|
|
d418c8ed93 | ||
|
|
8bbeb88b59 | ||
|
|
052e52d302 | ||
|
|
abde461669 | ||
|
|
4f0e1f7fa3 | ||
|
|
7659a298ef | ||
|
|
e9257300e8 | ||
|
|
bf9576cdae | ||
|
|
249f762ce4 | ||
|
|
b84c2850fe | ||
|
|
ac55db1af8 | ||
|
|
98280491b1 | ||
|
|
a491a09897 | ||
|
|
77871966bf | ||
|
|
d407cdc9f4 | ||
|
|
359d19073c | ||
|
|
bb7c63525c | ||
|
|
9d97bbb2ca | ||
|
|
5bc9d9735f | ||
|
|
92d9638ed7 | ||
|
|
c364c793db | ||
|
|
f0bd542bb3 | ||
|
|
67ab3de484 | ||
|
|
7fa30cf041 | ||
|
|
1eda0a43df | ||
|
|
31f601b9d5 | ||
|
|
8b064c652d | ||
|
|
fb28718376 | ||
|
|
fb961a3831 | ||
|
|
13ee570ecf | ||
|
|
ff720a983b | ||
|
|
d67b05090b | ||
|
|
14fbc6b96d | ||
|
|
42e294dd10 | ||
|
|
99c84c8f4d | ||
|
|
169bcce707 | ||
|
|
935fcae11a | ||
|
|
924c868252 | ||
|
|
883ab1278b | ||
|
|
b37fa5a2cf | ||
|
|
32733b89ed | ||
|
|
78fc1068f0 | ||
|
|
8b518c24e9 | ||
|
|
2dfdc67d32 | ||
|
|
9c53c9a4a2 | ||
|
|
487bf2f706 | ||
|
|
8f1d470248 | ||
|
|
a8c636cb54 | ||
|
|
2928b1844d | ||
|
|
8011d680c8 | ||
|
|
b5eaa25e19 | ||
|
|
d9018fcbe4 | ||
|
|
fb1645ee60 | ||
|
|
b310d39dd7 | ||
|
|
b4c34d6c3d | ||
|
|
ed23c559e8 | ||
|
|
e59f2de1ac | ||
|
|
f0696724f9 | ||
|
|
2ed19d6656 | ||
|
|
a2be137bb6 | ||
|
|
15134533af | ||
|
|
d3908ed37f | ||
|
|
627b650e78 | ||
|
|
7778100946 | ||
|
|
2e106bef86 | ||
|
|
731da5a0b3 | ||
|
|
e79ede2a14 |
@@ -1,4 +1,4 @@
|
||||
#define BFD_VERSION_DATE 20150828
|
||||
#define BFD_VERSION_DATE 20151205
|
||||
#define BFD_VERSION @bfd_version@
|
||||
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
|
||||
#define REPORT_BUGS_TO @report_bugs_to@
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
2015-12-05 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* version.in: Set GDB version number to 7.10.1.
|
||||
|
||||
2014-11-28 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* cp-name-parser.y (conversion_op): Use
|
||||
DEMANGLE_COMPONENT_CONVERSION instead of DEMANGLE_COMPONENT_CAST.
|
||||
|
||||
2015-11-26 Markus Metzger <markus.t.metzger@intel.com>
|
||||
|
||||
PR 19297
|
||||
* btrace.c (btrace_enable): Check whether HAVE_LIBIPT is defined.
|
||||
|
||||
2015-09-14 Peter Bergner <bergner@vnet.ibm.com>
|
||||
|
||||
PR gdb/18957
|
||||
* nat/linux-namespaces.c (setns): Rename from this ...
|
||||
(do_setns): ... to this. Support calling setns if it exists.
|
||||
(mnsh_handle_setns): Call do_setns.
|
||||
|
||||
2015-08-28 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* version.in: Set GDB version number to 7.10.0.DATE-cvs.
|
||||
|
||||
2015-08-28 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
GDB 7.10 released.
|
||||
|
||||
2015-08-28 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* version.in: Set GDB version number to 7.10.
|
||||
|
||||
@@ -1020,6 +1020,11 @@ btrace_enable (struct thread_info *tp, const struct btrace_config *conf)
|
||||
if (tp->btrace.target != NULL)
|
||||
return;
|
||||
|
||||
#if !defined (HAVE_LIBIPT)
|
||||
if (conf->format == BTRACE_FORMAT_PT)
|
||||
error (_("GDB does not support Intel(R) Processor Trace."));
|
||||
#endif /* !defined (HAVE_LIBIPT) */
|
||||
|
||||
if (!target_supports_btrace (conf->format))
|
||||
error (_("Target does not support branch tracing."));
|
||||
|
||||
|
||||
@@ -528,7 +528,7 @@ oper : OPERATOR NEW
|
||||
since it's not clear that it's parseable. */
|
||||
conversion_op
|
||||
: OPERATOR typespec_2
|
||||
{ $$ = fill_comp (DEMANGLE_COMPONENT_CAST, $2, NULL); }
|
||||
{ $$ = fill_comp (DEMANGLE_COMPONENT_CONVERSION, $2, NULL); }
|
||||
;
|
||||
|
||||
conversion_op_name
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
2015-09-15 Pedro Alves <palves@redhat.com>
|
||||
|
||||
PR remote/18965
|
||||
* gdb.texinfo (Stop Reply Packets): Revert previous change to
|
||||
the vforkdone description.
|
||||
|
||||
2015-09-15 Pedro Alves <palves@redhat.com>
|
||||
|
||||
PR remote/18965
|
||||
* gdb.texinfo (Stop Reply Packets): Explain that vforkdone's 'r'
|
||||
part indicates the thread ID of the parent process.
|
||||
|
||||
2015-07-20 Doug Evans <dje@google.com>
|
||||
|
||||
* Makefile.in (STABS_DOC_BUILD_INCLUDES): Add gdb-cfg.texi, GDBvn.texi.
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
2015-09-15 Pedro Alves <palves@redhat.com>
|
||||
|
||||
PR remote/18965
|
||||
* remote-utils.c (prepare_resume_reply): Merge
|
||||
TARGET_WAITKIND_VFORK_DONE switch case with the
|
||||
TARGET_WAITKIND_FORKED case.
|
||||
|
||||
2015-08-19 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* hostio.c (handle_pread): Do not attempt to read more data
|
||||
|
||||
@@ -1116,6 +1116,7 @@ prepare_resume_reply (char *buf, ptid_t ptid,
|
||||
case TARGET_WAITKIND_STOPPED:
|
||||
case TARGET_WAITKIND_FORKED:
|
||||
case TARGET_WAITKIND_VFORKED:
|
||||
case TARGET_WAITKIND_VFORK_DONE:
|
||||
{
|
||||
struct thread_info *saved_thread;
|
||||
const char **regp;
|
||||
@@ -1133,6 +1134,12 @@ prepare_resume_reply (char *buf, ptid_t ptid,
|
||||
buf = write_ptid (buf, status->value.related_pid);
|
||||
strcat (buf, ";");
|
||||
}
|
||||
else if (status->kind == TARGET_WAITKIND_VFORK_DONE && report_vfork_events)
|
||||
{
|
||||
enum gdb_signal signal = GDB_SIGNAL_TRAP;
|
||||
|
||||
sprintf (buf, "T%02xvforkdone:;", signal);
|
||||
}
|
||||
else
|
||||
sprintf (buf, "T%02x", status->value.sig);
|
||||
|
||||
@@ -1248,16 +1255,6 @@ prepare_resume_reply (char *buf, ptid_t ptid,
|
||||
else
|
||||
sprintf (buf, "X%02x", status->value.sig);
|
||||
break;
|
||||
case TARGET_WAITKIND_VFORK_DONE:
|
||||
if (report_vfork_events)
|
||||
{
|
||||
enum gdb_signal signal = GDB_SIGNAL_TRAP;
|
||||
|
||||
sprintf (buf, "T%02xvforkdone:;", signal);
|
||||
}
|
||||
else
|
||||
sprintf (buf, "T%02x", GDB_SIGNAL_0);
|
||||
break;
|
||||
default:
|
||||
error ("unhandled waitkind");
|
||||
break;
|
||||
|
||||
@@ -34,18 +34,18 @@ int debug_linux_namespaces;
|
||||
|
||||
/* Handle systems without setns. */
|
||||
|
||||
#ifndef HAVE_SETNS
|
||||
static int
|
||||
setns (int fd, int nstype)
|
||||
static inline int
|
||||
do_setns (int fd, int nstype)
|
||||
{
|
||||
#ifdef __NR_setns
|
||||
#ifdef HAVE_SETNS
|
||||
return setns (fd, nstype);
|
||||
#elif defined __NR_setns
|
||||
return syscall (__NR_setns, fd, nstype);
|
||||
#else
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Handle systems without MSG_CMSG_CLOEXEC. */
|
||||
|
||||
@@ -495,7 +495,7 @@ mnsh_recv_message (int sock, enum mnsh_msg_type *type,
|
||||
static ssize_t
|
||||
mnsh_handle_setns (int sock, int fd, int nstype)
|
||||
{
|
||||
int result = setns (fd, nstype);
|
||||
int result = do_setns (fd, nstype);
|
||||
|
||||
return mnsh_return_int (sock, result, errno);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2015-12-02 Yao Qi <yao.qi@linaro.org>
|
||||
|
||||
* gdb.arch/thumb-singlestep.exp: Do one more single step.
|
||||
|
||||
2015-08-21 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* gdb.trace/pending.exp: Cope with remote transfer warnings.
|
||||
|
||||
@@ -34,5 +34,8 @@ if ![runto_main] then {
|
||||
return -1
|
||||
}
|
||||
|
||||
# GDB doesn't skip prologue for asm files, so do one single step to
|
||||
# pass instruction "push".
|
||||
gdb_test "si" "blx foo.*" "single step"
|
||||
gdb_test "si" "foo \\(\\) at .*${srcfile}.*mov r0,#42.*" "step into foo"
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
7.10
|
||||
7.10.1
|
||||
|
||||
@@ -379,6 +379,10 @@ enum demangle_component_type
|
||||
/* A typecast, represented as a unary operator. The one subtree is
|
||||
the type to which the argument should be cast. */
|
||||
DEMANGLE_COMPONENT_CAST,
|
||||
/* A conversion operator, represented as a unary operator. The one
|
||||
subtree is the type to which the argument should be converted
|
||||
to. */
|
||||
DEMANGLE_COMPONENT_CONVERSION,
|
||||
/* A nullary expression. The left subtree is the operator. */
|
||||
DEMANGLE_COMPONENT_NULLARY,
|
||||
/* A unary expression. The left subtree is the operator, and the
|
||||
@@ -442,6 +446,8 @@ enum demangle_component_type
|
||||
DEMANGLE_COMPONENT_PACK_EXPANSION,
|
||||
/* A name with an ABI tag. */
|
||||
DEMANGLE_COMPONENT_TAGGED_NAME,
|
||||
/* A transaction-safe function type. */
|
||||
DEMANGLE_COMPONENT_TRANSACTION_SAFE,
|
||||
/* A cloned function. */
|
||||
DEMANGLE_COMPONENT_CLONE
|
||||
};
|
||||
|
||||
@@ -1,3 +1,54 @@
|
||||
2015-11-28 Pedro Alves <palves@redhat.com>
|
||||
|
||||
PR other/61321
|
||||
PR other/61233
|
||||
* demangle.h (enum demangle_component_type)
|
||||
<DEMANGLE_COMPONENT_CONVERSION>: New value.
|
||||
* cp-demangle.c (d_demangle_callback, d_make_comp): Handle
|
||||
DEMANGLE_COMPONENT_CONVERSION.
|
||||
(is_ctor_dtor_or_conversion): Handle DEMANGLE_COMPONENT_CONVERSION
|
||||
instead of DEMANGLE_COMPONENT_CAST.
|
||||
(d_operator_name): Return a DEMANGLE_COMPONENT_CONVERSION
|
||||
component if handling a conversion.
|
||||
(d_count_templates_scopes, d_print_comp_inner): Handle
|
||||
DEMANGLE_COMPONENT_CONVERSION.
|
||||
(d_print_comp_inner): Handle DEMANGLE_COMPONENT_CONVERSION instead
|
||||
of DEMANGLE_COMPONENT_CAST.
|
||||
(d_print_cast): Rename as ...
|
||||
(d_print_conversion): ... this. Adjust comments.
|
||||
(d_print_cast): Rewrite - simply print the left subcomponent.
|
||||
* cp-demint.c (cplus_demangle_fill_component): Handle
|
||||
DEMANGLE_COMPONENT_CONVERSION.
|
||||
|
||||
* testsuite/demangle-expected: Add tests.
|
||||
|
||||
2015-11-28 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* cp-demangle.c (d_cv_qualifiers): Dx means transaction_safe.
|
||||
(cplus_demangle_type): Let d_cv_qualifiers handle it.
|
||||
(d_dump, d_make_comp, has_return_type, d_encoding)
|
||||
(d_count_templates_scopes, d_print_comp_inner)
|
||||
(d_print_mod_list, d_print_mod, d_print_function_type)
|
||||
(is_ctor_or_dtor): Handle DEMANGLE_COMPONENT_TRANSACTION_SAFE.
|
||||
|
||||
2015-11-28 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* cp-demangle.c (d_abi_tags): Preserve di->last_name across any
|
||||
ABI tags.
|
||||
|
||||
2015-11-28 Mikhail Maltsev <maltsevm@gmail.com>
|
||||
|
||||
* cp-demangle.c (d_dump): Fix syntax error.
|
||||
(d_identifier): Adjust type of len to match d_source_name.
|
||||
(d_expression_1): Fix out-of-bounds access. Check code variable for
|
||||
NULL before dereferencing it.
|
||||
(d_find_pack): Do not recurse for FIXED_TYPE, DEFAULT_ARG and NUMBER.
|
||||
(d_print_comp_inner): Add NULL pointer check.
|
||||
* cp-demangle.h (d_peek_next_char): Define as inline function when
|
||||
CHECK_DEMANGLER is defined.
|
||||
(d_advance): Likewise.
|
||||
* testsuite/demangle-expected: Add new testcases.
|
||||
|
||||
2015-06-01 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* cp-demangle.c (cplus_demangle_type): Handle arguments to vendor
|
||||
|
||||
@@ -93,7 +93,11 @@
|
||||
CP_DEMANGLE_DEBUG
|
||||
If defined, turns on debugging mode, which prints information on
|
||||
stdout about the mangled string. This is not generally useful.
|
||||
*/
|
||||
|
||||
CHECK_DEMANGLER
|
||||
If defined, additional sanity checks will be performed. It will
|
||||
cause some slowdown, but will allow to catch out-of-bound access
|
||||
errors earlier. This macro is intended for testing and debugging. */
|
||||
|
||||
#if defined (_AIX) && !defined (__GNUC__)
|
||||
#pragma alloca
|
||||
@@ -419,7 +423,7 @@ static struct demangle_component *d_source_name (struct d_info *);
|
||||
|
||||
static long d_number (struct d_info *);
|
||||
|
||||
static struct demangle_component *d_identifier (struct d_info *, int);
|
||||
static struct demangle_component *d_identifier (struct d_info *, long);
|
||||
|
||||
static struct demangle_component *d_operator_name (struct d_info *);
|
||||
|
||||
@@ -538,8 +542,10 @@ d_print_array_type (struct d_print_info *, int,
|
||||
static void
|
||||
d_print_expr_op (struct d_print_info *, int, const struct demangle_component *);
|
||||
|
||||
static void
|
||||
d_print_cast (struct d_print_info *, int, const struct demangle_component *);
|
||||
static void d_print_cast (struct d_print_info *, int,
|
||||
const struct demangle_component *);
|
||||
static void d_print_conversion (struct d_print_info *, int,
|
||||
const struct demangle_component *);
|
||||
|
||||
static int d_demangle_callback (const char *, int,
|
||||
demangle_callbackref, void *);
|
||||
@@ -682,6 +688,9 @@ d_dump (struct demangle_component *dc, int indent)
|
||||
case DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS:
|
||||
printf ("rvalue reference this\n");
|
||||
break;
|
||||
case DEMANGLE_COMPONENT_TRANSACTION_SAFE:
|
||||
printf ("transaction_safe this\n");
|
||||
break;
|
||||
case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL:
|
||||
printf ("vendor type qualifier\n");
|
||||
break;
|
||||
@@ -715,7 +724,7 @@ d_dump (struct demangle_component *dc, int indent)
|
||||
case DEMANGLE_COMPONENT_FIXED_TYPE:
|
||||
printf ("fixed-point type, accum? %d, sat? %d\n",
|
||||
dc->u.s_fixed.accum, dc->u.s_fixed.sat);
|
||||
d_dump (dc->u.s_fixed.length, indent + 2)
|
||||
d_dump (dc->u.s_fixed.length, indent + 2);
|
||||
break;
|
||||
case DEMANGLE_COMPONENT_ARGLIST:
|
||||
printf ("argument list\n");
|
||||
@@ -729,6 +738,9 @@ d_dump (struct demangle_component *dc, int indent)
|
||||
case DEMANGLE_COMPONENT_CAST:
|
||||
printf ("cast\n");
|
||||
break;
|
||||
case DEMANGLE_COMPONENT_CONVERSION:
|
||||
printf ("conversion operator\n");
|
||||
break;
|
||||
case DEMANGLE_COMPONENT_NULLARY:
|
||||
printf ("nullary operator\n");
|
||||
break;
|
||||
@@ -938,6 +950,7 @@ d_make_comp (struct d_info *di, enum demangle_component_type type,
|
||||
case DEMANGLE_COMPONENT_IMAGINARY:
|
||||
case DEMANGLE_COMPONENT_VENDOR_TYPE:
|
||||
case DEMANGLE_COMPONENT_CAST:
|
||||
case DEMANGLE_COMPONENT_CONVERSION:
|
||||
case DEMANGLE_COMPONENT_JAVA_RESOURCE:
|
||||
case DEMANGLE_COMPONENT_DECLTYPE:
|
||||
case DEMANGLE_COMPONENT_PACK_EXPANSION:
|
||||
@@ -966,6 +979,7 @@ d_make_comp (struct d_info *di, enum demangle_component_type type,
|
||||
case DEMANGLE_COMPONENT_RESTRICT_THIS:
|
||||
case DEMANGLE_COMPONENT_VOLATILE_THIS:
|
||||
case DEMANGLE_COMPONENT_CONST_THIS:
|
||||
case DEMANGLE_COMPONENT_TRANSACTION_SAFE:
|
||||
case DEMANGLE_COMPONENT_REFERENCE_THIS:
|
||||
case DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS:
|
||||
case DEMANGLE_COMPONENT_ARGLIST:
|
||||
@@ -1208,6 +1222,7 @@ has_return_type (struct demangle_component *dc)
|
||||
case DEMANGLE_COMPONENT_CONST_THIS:
|
||||
case DEMANGLE_COMPONENT_REFERENCE_THIS:
|
||||
case DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS:
|
||||
case DEMANGLE_COMPONENT_TRANSACTION_SAFE:
|
||||
return has_return_type (d_left (dc));
|
||||
}
|
||||
}
|
||||
@@ -1229,7 +1244,7 @@ is_ctor_dtor_or_conversion (struct demangle_component *dc)
|
||||
return is_ctor_dtor_or_conversion (d_right (dc));
|
||||
case DEMANGLE_COMPONENT_CTOR:
|
||||
case DEMANGLE_COMPONENT_DTOR:
|
||||
case DEMANGLE_COMPONENT_CAST:
|
||||
case DEMANGLE_COMPONENT_CONVERSION:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1264,6 +1279,7 @@ d_encoding (struct d_info *di, int top_level)
|
||||
while (dc->type == DEMANGLE_COMPONENT_RESTRICT_THIS
|
||||
|| dc->type == DEMANGLE_COMPONENT_VOLATILE_THIS
|
||||
|| dc->type == DEMANGLE_COMPONENT_CONST_THIS
|
||||
|| dc->type == DEMANGLE_COMPONENT_TRANSACTION_SAFE
|
||||
|| dc->type == DEMANGLE_COMPONENT_REFERENCE_THIS
|
||||
|| dc->type == DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS)
|
||||
dc = d_left (dc);
|
||||
@@ -1280,6 +1296,7 @@ d_encoding (struct d_info *di, int top_level)
|
||||
while (dcr->type == DEMANGLE_COMPONENT_RESTRICT_THIS
|
||||
|| dcr->type == DEMANGLE_COMPONENT_VOLATILE_THIS
|
||||
|| dcr->type == DEMANGLE_COMPONENT_CONST_THIS
|
||||
|| dcr->type == DEMANGLE_COMPONENT_TRANSACTION_SAFE
|
||||
|| dcr->type == DEMANGLE_COMPONENT_REFERENCE_THIS
|
||||
|| dcr->type == DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS)
|
||||
dcr = d_left (dcr);
|
||||
@@ -1302,7 +1319,12 @@ d_encoding (struct d_info *di, int top_level)
|
||||
static struct demangle_component *
|
||||
d_abi_tags (struct d_info *di, struct demangle_component *dc)
|
||||
{
|
||||
struct demangle_component *hold_last_name;
|
||||
char peek;
|
||||
|
||||
/* Preserve the last name, so the ABI tag doesn't clobber it. */
|
||||
hold_last_name = di->last_name;
|
||||
|
||||
while (peek = d_peek_char (di),
|
||||
peek == 'B')
|
||||
{
|
||||
@@ -1311,6 +1333,9 @@ d_abi_tags (struct d_info *di, struct demangle_component *dc)
|
||||
tag = d_source_name (di);
|
||||
dc = d_make_comp (di, DEMANGLE_COMPONENT_TAGGED_NAME, dc, tag);
|
||||
}
|
||||
|
||||
di->last_name = hold_last_name;
|
||||
|
||||
return dc;
|
||||
}
|
||||
|
||||
@@ -1656,7 +1681,7 @@ d_number_component (struct d_info *di)
|
||||
/* identifier ::= <(unqualified source code identifier)> */
|
||||
|
||||
static struct demangle_component *
|
||||
d_identifier (struct d_info *di, int len)
|
||||
d_identifier (struct d_info *di, long len)
|
||||
{
|
||||
const char *name;
|
||||
|
||||
@@ -1677,7 +1702,7 @@ d_identifier (struct d_info *di, int len)
|
||||
/* Look for something which looks like a gcc encoding of an
|
||||
anonymous namespace, and replace it with a more user friendly
|
||||
name. */
|
||||
if (len >= (int) ANONYMOUS_NAMESPACE_PREFIX_LEN + 2
|
||||
if (len >= (long) ANONYMOUS_NAMESPACE_PREFIX_LEN + 2
|
||||
&& memcmp (name, ANONYMOUS_NAMESPACE_PREFIX,
|
||||
ANONYMOUS_NAMESPACE_PREFIX_LEN) == 0)
|
||||
{
|
||||
@@ -1785,11 +1810,16 @@ d_operator_name (struct d_info *di)
|
||||
{
|
||||
struct demangle_component *type;
|
||||
int was_conversion = di->is_conversion;
|
||||
struct demangle_component *res;
|
||||
|
||||
di->is_conversion = ! di->is_expression;
|
||||
type = cplus_demangle_type (di);
|
||||
if (di->is_conversion)
|
||||
res = d_make_comp (di, DEMANGLE_COMPONENT_CONVERSION, type, NULL);
|
||||
else
|
||||
res = d_make_comp (di, DEMANGLE_COMPONENT_CAST, type, NULL);
|
||||
di->is_conversion = was_conversion;
|
||||
return d_make_comp (di, DEMANGLE_COMPONENT_CAST, type, NULL);
|
||||
return res;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2269,7 +2299,8 @@ cplus_demangle_type (struct d_info *di)
|
||||
names. */
|
||||
|
||||
peek = d_peek_char (di);
|
||||
if (peek == 'r' || peek == 'V' || peek == 'K')
|
||||
if (peek == 'r' || peek == 'V' || peek == 'K'
|
||||
|| (peek == 'D' && d_peek_next_char (di) == 'x'))
|
||||
{
|
||||
struct demangle_component **pret;
|
||||
|
||||
@@ -2580,7 +2611,7 @@ cplus_demangle_type (struct d_info *di)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* <CV-qualifiers> ::= [r] [V] [K] */
|
||||
/* <CV-qualifiers> ::= [r] [V] [K] [Dx] */
|
||||
|
||||
static struct demangle_component **
|
||||
d_cv_qualifiers (struct d_info *di,
|
||||
@@ -2591,7 +2622,8 @@ d_cv_qualifiers (struct d_info *di,
|
||||
|
||||
pstart = pret;
|
||||
peek = d_peek_char (di);
|
||||
while (peek == 'r' || peek == 'V' || peek == 'K')
|
||||
while (peek == 'r' || peek == 'V' || peek == 'K'
|
||||
|| (peek == 'D' && d_peek_next_char (di) == 'x'))
|
||||
{
|
||||
enum demangle_component_type t;
|
||||
|
||||
@@ -2610,13 +2642,19 @@ d_cv_qualifiers (struct d_info *di,
|
||||
: DEMANGLE_COMPONENT_VOLATILE);
|
||||
di->expansion += sizeof "volatile";
|
||||
}
|
||||
else
|
||||
else if (peek == 'K')
|
||||
{
|
||||
t = (member_fn
|
||||
? DEMANGLE_COMPONENT_CONST_THIS
|
||||
: DEMANGLE_COMPONENT_CONST);
|
||||
di->expansion += sizeof "const";
|
||||
}
|
||||
else
|
||||
{
|
||||
t = DEMANGLE_COMPONENT_TRANSACTION_SAFE;
|
||||
di->expansion += sizeof "transaction_safe";
|
||||
d_advance (di, 1);
|
||||
}
|
||||
|
||||
*pret = d_make_comp (di, t, NULL, NULL);
|
||||
if (*pret == NULL)
|
||||
@@ -2682,7 +2720,7 @@ d_ref_qualifier (struct d_info *di, struct demangle_component *sub)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* <function-type> ::= F [Y] <bare-function-type> [<ref-qualifier>] E */
|
||||
/* <function-type> ::= F [Y] <bare-function-type> [<ref-qualifier>] [T] E */
|
||||
|
||||
static struct demangle_component *
|
||||
d_function_type (struct d_info *di)
|
||||
@@ -3166,6 +3204,8 @@ d_expression_1 (struct d_info *di)
|
||||
struct demangle_component *type = NULL;
|
||||
if (peek == 't')
|
||||
type = cplus_demangle_type (di);
|
||||
if (!d_peek_next_char (di))
|
||||
return NULL;
|
||||
d_advance (di, 2);
|
||||
return d_make_comp (di, DEMANGLE_COMPONENT_INITIALIZER_LIST,
|
||||
type, d_exprlist (di, 'E'));
|
||||
@@ -3240,6 +3280,8 @@ d_expression_1 (struct d_info *di)
|
||||
struct demangle_component *left;
|
||||
struct demangle_component *right;
|
||||
|
||||
if (code == NULL)
|
||||
return NULL;
|
||||
if (op_is_new_cast (op))
|
||||
left = cplus_demangle_type (di);
|
||||
else
|
||||
@@ -3267,7 +3309,9 @@ d_expression_1 (struct d_info *di)
|
||||
struct demangle_component *second;
|
||||
struct demangle_component *third;
|
||||
|
||||
if (!strcmp (code, "qu"))
|
||||
if (code == NULL)
|
||||
return NULL;
|
||||
else if (!strcmp (code, "qu"))
|
||||
{
|
||||
/* ?: expression. */
|
||||
first = d_expression_1 (di);
|
||||
@@ -3881,6 +3925,7 @@ d_count_templates_scopes (int *num_templates, int *num_scopes,
|
||||
case DEMANGLE_COMPONENT_CONST_THIS:
|
||||
case DEMANGLE_COMPONENT_REFERENCE_THIS:
|
||||
case DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS:
|
||||
case DEMANGLE_COMPONENT_TRANSACTION_SAFE:
|
||||
case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL:
|
||||
case DEMANGLE_COMPONENT_POINTER:
|
||||
case DEMANGLE_COMPONENT_COMPLEX:
|
||||
@@ -3894,6 +3939,7 @@ d_count_templates_scopes (int *num_templates, int *num_scopes,
|
||||
case DEMANGLE_COMPONENT_TEMPLATE_ARGLIST:
|
||||
case DEMANGLE_COMPONENT_INITIALIZER_LIST:
|
||||
case DEMANGLE_COMPONENT_CAST:
|
||||
case DEMANGLE_COMPONENT_CONVERSION:
|
||||
case DEMANGLE_COMPONENT_NULLARY:
|
||||
case DEMANGLE_COMPONENT_UNARY:
|
||||
case DEMANGLE_COMPONENT_BINARY:
|
||||
@@ -4196,6 +4242,9 @@ d_find_pack (struct d_print_info *dpi,
|
||||
case DEMANGLE_COMPONENT_CHARACTER:
|
||||
case DEMANGLE_COMPONENT_FUNCTION_PARAM:
|
||||
case DEMANGLE_COMPONENT_UNNAMED_TYPE:
|
||||
case DEMANGLE_COMPONENT_FIXED_TYPE:
|
||||
case DEMANGLE_COMPONENT_DEFAULT_ARG:
|
||||
case DEMANGLE_COMPONENT_NUMBER:
|
||||
return NULL;
|
||||
|
||||
case DEMANGLE_COMPONENT_EXTENDED_OPERATOR:
|
||||
@@ -4399,6 +4448,7 @@ d_print_comp_inner (struct d_print_info *dpi, int options,
|
||||
&& typed_name->type != DEMANGLE_COMPONENT_VOLATILE_THIS
|
||||
&& typed_name->type != DEMANGLE_COMPONENT_CONST_THIS
|
||||
&& typed_name->type != DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS
|
||||
&& typed_name->type != DEMANGLE_COMPONENT_TRANSACTION_SAFE
|
||||
&& typed_name->type != DEMANGLE_COMPONENT_REFERENCE_THIS)
|
||||
break;
|
||||
|
||||
@@ -4431,10 +4481,16 @@ d_print_comp_inner (struct d_print_info *dpi, int options,
|
||||
local_name = d_right (typed_name);
|
||||
if (local_name->type == DEMANGLE_COMPONENT_DEFAULT_ARG)
|
||||
local_name = local_name->u.s_unary_num.sub;
|
||||
if (local_name == NULL)
|
||||
{
|
||||
d_print_error (dpi);
|
||||
return;
|
||||
}
|
||||
while (local_name->type == DEMANGLE_COMPONENT_RESTRICT_THIS
|
||||
|| local_name->type == DEMANGLE_COMPONENT_VOLATILE_THIS
|
||||
|| local_name->type == DEMANGLE_COMPONENT_CONST_THIS
|
||||
|| local_name->type == DEMANGLE_COMPONENT_REFERENCE_THIS
|
||||
|| local_name->type == DEMANGLE_COMPONENT_TRANSACTION_SAFE
|
||||
|| (local_name->type
|
||||
== DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS))
|
||||
{
|
||||
@@ -4770,6 +4826,7 @@ d_print_comp_inner (struct d_print_info *dpi, int options,
|
||||
case DEMANGLE_COMPONENT_POINTER:
|
||||
case DEMANGLE_COMPONENT_COMPLEX:
|
||||
case DEMANGLE_COMPONENT_IMAGINARY:
|
||||
case DEMANGLE_COMPONENT_TRANSACTION_SAFE:
|
||||
modifier:
|
||||
{
|
||||
/* We keep a list of modifiers on the stack. */
|
||||
@@ -5019,9 +5076,9 @@ d_print_comp_inner (struct d_print_info *dpi, int options,
|
||||
d_print_comp (dpi, options, dc->u.s_extended_operator.name);
|
||||
return;
|
||||
|
||||
case DEMANGLE_COMPONENT_CAST:
|
||||
case DEMANGLE_COMPONENT_CONVERSION:
|
||||
d_append_string (dpi, "operator ");
|
||||
d_print_cast (dpi, options, dc);
|
||||
d_print_conversion (dpi, options, dc);
|
||||
return;
|
||||
|
||||
case DEMANGLE_COMPONENT_NULLARY:
|
||||
@@ -5458,6 +5515,7 @@ d_print_mod_list (struct d_print_info *dpi, int options,
|
||||
|| mods->mod->type == DEMANGLE_COMPONENT_VOLATILE_THIS
|
||||
|| mods->mod->type == DEMANGLE_COMPONENT_CONST_THIS
|
||||
|| mods->mod->type == DEMANGLE_COMPONENT_REFERENCE_THIS
|
||||
|| mods->mod->type == DEMANGLE_COMPONENT_TRANSACTION_SAFE
|
||||
|| (mods->mod->type
|
||||
== DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS))))
|
||||
{
|
||||
@@ -5516,6 +5574,7 @@ d_print_mod_list (struct d_print_info *dpi, int options,
|
||||
|| dc->type == DEMANGLE_COMPONENT_VOLATILE_THIS
|
||||
|| dc->type == DEMANGLE_COMPONENT_CONST_THIS
|
||||
|| dc->type == DEMANGLE_COMPONENT_REFERENCE_THIS
|
||||
|| dc->type == DEMANGLE_COMPONENT_TRANSACTION_SAFE
|
||||
|| dc->type == DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS)
|
||||
dc = d_left (dc);
|
||||
|
||||
@@ -5552,6 +5611,9 @@ d_print_mod (struct d_print_info *dpi, int options,
|
||||
case DEMANGLE_COMPONENT_CONST_THIS:
|
||||
d_append_string (dpi, " const");
|
||||
return;
|
||||
case DEMANGLE_COMPONENT_TRANSACTION_SAFE:
|
||||
d_append_string (dpi, " transaction_safe");
|
||||
return;
|
||||
case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL:
|
||||
d_append_char (dpi, ' ');
|
||||
d_print_comp (dpi, options, d_right (mod));
|
||||
@@ -5642,6 +5704,7 @@ d_print_function_type (struct d_print_info *dpi, int options,
|
||||
case DEMANGLE_COMPONENT_CONST_THIS:
|
||||
case DEMANGLE_COMPONENT_REFERENCE_THIS:
|
||||
case DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS:
|
||||
case DEMANGLE_COMPONENT_TRANSACTION_SAFE:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -5754,11 +5817,20 @@ d_print_expr_op (struct d_print_info *dpi, int options,
|
||||
|
||||
static void
|
||||
d_print_cast (struct d_print_info *dpi, int options,
|
||||
const struct demangle_component *dc)
|
||||
const struct demangle_component *dc)
|
||||
{
|
||||
d_print_comp (dpi, options, d_left (dc));
|
||||
}
|
||||
|
||||
/* Print a conversion operator. */
|
||||
|
||||
static void
|
||||
d_print_conversion (struct d_print_info *dpi, int options,
|
||||
const struct demangle_component *dc)
|
||||
{
|
||||
struct d_print_template dpt;
|
||||
|
||||
/* For a cast operator, we need the template parameters from
|
||||
/* For a conversion operator, we need the template parameters from
|
||||
the enclosing template in scope for processing the type. */
|
||||
if (dpi->current_template != NULL)
|
||||
{
|
||||
@@ -6174,6 +6246,7 @@ is_ctor_or_dtor (const char *mangled,
|
||||
case DEMANGLE_COMPONENT_CONST_THIS:
|
||||
case DEMANGLE_COMPONENT_REFERENCE_THIS:
|
||||
case DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS:
|
||||
case DEMANGLE_COMPONENT_TRANSACTION_SAFE:
|
||||
default:
|
||||
dc = NULL;
|
||||
break;
|
||||
|
||||
@@ -135,12 +135,37 @@ struct d_info
|
||||
- call d_check_char(di, '\0')
|
||||
Everything else is safe. */
|
||||
#define d_peek_char(di) (*((di)->n))
|
||||
#define d_peek_next_char(di) ((di)->n[1])
|
||||
#define d_advance(di, i) ((di)->n += (i))
|
||||
#ifndef CHECK_DEMANGLER
|
||||
# define d_peek_next_char(di) ((di)->n[1])
|
||||
# define d_advance(di, i) ((di)->n += (i))
|
||||
#endif
|
||||
#define d_check_char(di, c) (d_peek_char(di) == c ? ((di)->n++, 1) : 0)
|
||||
#define d_next_char(di) (d_peek_char(di) == '\0' ? '\0' : *((di)->n++))
|
||||
#define d_str(di) ((di)->n)
|
||||
|
||||
#ifdef CHECK_DEMANGLER
|
||||
static inline char
|
||||
d_peek_next_char (const struct d_info *di)
|
||||
{
|
||||
if (!di->n[0])
|
||||
abort ();
|
||||
return di->n[1];
|
||||
}
|
||||
|
||||
static inline void
|
||||
d_advance (struct d_info *di, int i)
|
||||
{
|
||||
if (i < 0)
|
||||
abort ();
|
||||
while (i--)
|
||||
{
|
||||
if (!di->n[0])
|
||||
abort ();
|
||||
di->n++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Functions and arrays in cp-demangle.c which are referenced by
|
||||
functions in cp-demint.c. */
|
||||
#ifdef IN_GLIBCPP_V3
|
||||
|
||||
@@ -110,6 +110,7 @@ cplus_demangle_fill_component (struct demangle_component *p,
|
||||
case DEMANGLE_COMPONENT_IMAGINARY:
|
||||
case DEMANGLE_COMPONENT_VENDOR_TYPE:
|
||||
case DEMANGLE_COMPONENT_CAST:
|
||||
case DEMANGLE_COMPONENT_CONVERSION:
|
||||
if (right != NULL)
|
||||
return 0;
|
||||
break;
|
||||
|
||||
@@ -4091,6 +4091,36 @@ void g<1>(A<1>&, B<static_cast<bool>(1)>&)
|
||||
_ZNKSt7complexIiE4realB5cxx11Ev
|
||||
std::complex<int>::real[abi:cxx11]() const
|
||||
#
|
||||
# Some more crashes revealed by fuzz-testing:
|
||||
# Check for NULL pointer when demangling trinary operators
|
||||
--format=gnu-v3
|
||||
_Z1fAv32_f
|
||||
_Z1fAv32_f
|
||||
# Do not overflow when decoding identifier length
|
||||
--format=gnu-v3
|
||||
_Z11111111111
|
||||
_Z11111111111
|
||||
# Check out-of-bounds access when decoding braced initializer list
|
||||
--format=gnu-v3
|
||||
_ZDTtl
|
||||
_ZDTtl
|
||||
# Check for NULL pointer when demangling DEMANGLE_COMPONENT_LOCAL_NAME
|
||||
--format=gnu-v3
|
||||
_ZZN1fEEd_lEv
|
||||
_ZZN1fEEd_lEv
|
||||
# Handle DEMANGLE_COMPONENT_FIXED_TYPE in d_find_pack
|
||||
--format=gnu-v3
|
||||
_Z1fDpDFT_
|
||||
_Z1fDpDFT_
|
||||
# Likewise, DEMANGLE_COMPONENT_DEFAULT_ARG
|
||||
--format=gnu-v3
|
||||
_Z1fIDpZ1fEd_E
|
||||
_Z1fIDpZ1fEd_E
|
||||
# Likewise, DEMANGLE_COMPONENT_NUMBER
|
||||
--format=gnu-v3
|
||||
_Z1fDpDv1_c
|
||||
f((char __vector(1))...)
|
||||
#
|
||||
# Ada (GNAT) tests.
|
||||
#
|
||||
# Simple test.
|
||||
@@ -4359,3 +4389,35 @@ f(std::string[abi:foo], std::string[abi:foo])
|
||||
--format=gnu-v3
|
||||
_Z18IndirectExternCallIPU7stdcallU7regparmILi3EEFviiEiEvT_T0_S3_
|
||||
void IndirectExternCall<void ( regparm<3> stdcall*)(int, int), int>(void ( regparm<3> stdcall*)(int, int), int, void ( regparm<3> stdcall*)(int, int))
|
||||
#
|
||||
# ABI tags used to confuse the constructor name calculation.
|
||||
--format=gnu-v3 --no-params
|
||||
_ZNSt8ios_base7failureB5cxx11C1EPKcRKSt10error_code
|
||||
std::ios_base::failure[abi:cxx11]::failure(char const*, std::error_code const&)
|
||||
std::ios_base::failure[abi:cxx11]::failure
|
||||
--format=gnu-v3
|
||||
_Z1fPDxFvvES0_
|
||||
f(void (*)() transaction_safe, void (*)() transaction_safe)
|
||||
#
|
||||
# These two are from gcc PR61321, and gcc PR61233 / gdb PR16957
|
||||
#
|
||||
--format=gnu-v3
|
||||
_Z13function_tempIiEv1AIXszcvT_Li999EEE
|
||||
void function_temp<int>(A<sizeof ((int)(999))>)
|
||||
#
|
||||
--format=gnu-v3
|
||||
_Z7ZipWithI7QStringS0_5QListZN4oral6detail16AdaptCreateTableI7AccountEES0_RKNS3_16CachedFieldsDataEEUlRKS0_SA_E_ET1_IDTclfp1_cvT__EcvT0__EEEERKT1_ISC_ERKT1_ISD_ET2_
|
||||
QList<decltype ({parm#3}((QString)(), (QString)()))> ZipWith<QString, QString, QList, QString oral::detail::AdaptCreateTable<Account>(oral::detail::CachedFieldsData const&)::{lambda(QString const&, QString const&)#1}>(QList<QString oral::detail::AdaptCreateTable<Account>(oral::detail::CachedFieldsData const&)::{lambda(QString const&, QString const&)#1}> const&, QList<QList> const&, QString oral::detail::AdaptCreateTable<Account>(oral::detail::CachedFieldsData const&)::{lambda(QString const&, QString const&)#1})
|
||||
#
|
||||
# These three are symbols generated by g++'s testsuite, which triggered the same bug as above.
|
||||
--format=gnu-v3
|
||||
_Z14int_if_addableI1YERiP1AIXszpldecvPT_Li0EdecvS4_Li0EEE
|
||||
int& int_if_addable<Y>(A<sizeof ((*((Y*)(0)))+(*((Y*)(0))))>*)
|
||||
#
|
||||
--format=gnu-v3
|
||||
_Z3bazIiEvP1AIXszcl3foocvT__ELCf00000000_00000000EEEE
|
||||
void baz<int>(A<sizeof (foo((int)(), (floatcomplex )00000000_00000000))>*)
|
||||
#
|
||||
--format=gnu-v3
|
||||
_Z3fooI1FEN1XIXszdtcl1PclcvT__EEE5arrayEE4TypeEv
|
||||
X<sizeof ((P(((F)())())).array)>::Type foo<F>()
|
||||
|
||||
Reference in New Issue
Block a user