summaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index d51b67db64d..515531f17ab 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1074,7 +1074,7 @@ value_push (sp, arg)
value_ptr arg;
{
register int len = TYPE_LENGTH (VALUE_ENCLOSING_TYPE (arg));
- register int container_len;
+ register int container_len = len;
register int offset;
/* How big is the container we're going to put this value in? */
@@ -2677,6 +2677,14 @@ find_overload_match (arg_types, nargs, name, method, lax, obj, fsym, valp, symp,
int i = -1;
func_name = cplus_demangle (SYMBOL_NAME (fsym), DMGL_NO_OPTS);
+ /* If the name is NULL this must be a C-style function.
+ Just return the same symbol. */
+ if (!func_name)
+ {
+ *symp = fsym;
+ return 0;
+ }
+
oload_syms = make_symbol_overload_list (fsym);
while (oload_syms[++i])
num_fns++;