aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2loc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r--gdb/dwarf2loc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 8b6eb66..2879ead 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -761,8 +761,9 @@ chain_candidate (struct gdbarch *gdbarch, struct call_site_chain **resultp,
* (length - 1));
result->length = length;
result->callers = result->callees = length;
- memcpy (result->call_site, VEC_address (call_sitep, chain),
- sizeof (*result->call_site) * length);
+ if (!VEC_empty (call_sitep, chain))
+ memcpy (result->call_site, VEC_address (call_sitep, chain),
+ sizeof (*result->call_site) * length);
*resultp = result;
if (entry_values_debug)