aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-07-12 20:59:03 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-07-12 20:59:03 +0000
commitd07ed419cf333c92f5b7376c2f97a899b7359161 (patch)
tree8f1e73c1561f67087c22a421436fef9e9fc306a5 /gdb/dwarf2read.c
parent10915d9a18d105de7a923061b07a2d932d64ae48 (diff)
downloadgdb-d07ed419cf333c92f5b7376c2f97a899b7359161.zip
gdb-d07ed419cf333c92f5b7376c2f97a899b7359161.tar.gz
gdb-d07ed419cf333c92f5b7376c2f97a899b7359161.tar.bz2
gdb/
Fix occasional crash of CTRL-C during DWARF read in. * dwarf2read.c (dwarf2_mark_helper): Return on NULL CU.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index a5bf1f7..fde5b6a 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -15455,6 +15455,13 @@ dwarf2_mark_helper (void **slot, void *data)
struct dwarf2_per_cu_data *per_cu;
per_cu = (struct dwarf2_per_cu_data *) *slot;
+
+ /* cu->dependencies references may not yet have been ever read if QUIT aborts
+ reading of the chain. As such dependencies remain valid it is not much
+ useful to track and undo them during QUIT cleanups. */
+ if (per_cu->cu == NULL)
+ return 1;
+
if (per_cu->cu->mark)
return 1;
per_cu->cu->mark = 1;