projects
/
platform
/
upstream
/
binutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d4e037
)
* dwarf2read.c (dw2_find_symbol_file): Don't crash if there are no files.
author
Doug Evans
<dje@google.com>
Thu, 3 May 2012 05:27:36 +0000
(
05:27
+0000)
committer
Doug Evans
<dje@google.com>
Thu, 3 May 2012 05:27:36 +0000
(
05:27
+0000)
gdb/ChangeLog
patch
|
blob
|
history
gdb/dwarf2read.c
patch
|
blob
|
history
diff --git
a/gdb/ChangeLog
b/gdb/ChangeLog
index 89c92f464823c96cff491944a40d1ea7aa5833a0..a929237dde1ded857df2ccb68f1bf8c8e3096047 100644
(file)
--- a/
gdb/ChangeLog
+++ b/
gdb/ChangeLog
@@
-1,3
+1,8
@@
+2012-05-03 Doug Evans <dje@google.com>
+
+ * dwarf2read.c (dw2_find_symbol_file): Don't crash if there are no
+ files.
+
2012-05-03 Yao Qi <yao@codesourcery.com>
* i386-tdep.c (i386_fetch_pointer_argument): Remove extra
diff --git
a/gdb/dwarf2read.c
b/gdb/dwarf2read.c
index 0caa5f99bdb597d3c399e605c3d9a952515fdb23..412fe5be4742152ea5e8eb0e23d6db892a335689 100644
(file)
--- a/
gdb/dwarf2read.c
+++ b/
gdb/dwarf2read.c
@@
-2833,7
+2833,8
@@
dw2_find_symbol_file (struct objfile *objfile, const char *name)
per_cu = dw2_get_cu (MAYBE_SWAP (vec[1]));
file_data = dw2_get_file_names (objfile, per_cu);
- if (file_data == NULL)
+ if (file_data == NULL
+ || file_data->num_file_names == 0)
return NULL;
return file_data->file_names[file_data->num_file_names - 1];