diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-07-12 21:14:57 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2006-07-12 21:14:57 +0000 |
commit | 99bcc461a52376e6b5c0fb0fa488964f8ff18b1a (patch) | |
tree | 98780e528c1166485d0bace1733eaa7be1009b4b | |
parent | cb587d836a976e82fd7e59cecbf8d9d29b3eb721 (diff) | |
download | gdb-99bcc461a52376e6b5c0fb0fa488964f8ff18b1a.zip gdb-99bcc461a52376e6b5c0fb0fa488964f8ff18b1a.tar.gz gdb-99bcc461a52376e6b5c0fb0fa488964f8ff18b1a.tar.bz2 |
* dwarf2read.c (dwarf2_symbol_mark_computed): Handle corrupted
or missing location list information. Suggested by Jan
Kratochvil <lace@jankratochvil.net>.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 22d2bb0..3652bd2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com> + * dwarf2read.c (dwarf2_symbol_mark_computed): Handle corrupted + or missing location list information. Suggested by Jan + Kratochvil <lace@jankratochvil.net>. + +2006-07-12 Daniel Jacobowitz <dan@codesourcery.com> + * Makefile.in (arm_linux_tdep_h): New variable. (arm-linux-nat.o, arm-linux-tdep.o): Update. * arm-linux-nat.c: Include "arm-linux-tdep.h". diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index bcd796f..934ee01 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -9324,7 +9324,11 @@ static void dwarf2_symbol_mark_computed (struct attribute *attr, struct symbol *sym, struct dwarf2_cu *cu) { - if (attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + if ((attr->form == DW_FORM_data4 || attr->form == DW_FORM_data8) + /* ".debug_loc" may not exist at all, or the offset may be outside + the section. If so, fall through to the complaint in the + other branch. */ + && DW_UNSND (attr) < dwarf2_per_objfile->loc_size) { struct dwarf2_loclist_baton *baton; |