• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisionbda22572abf4a7aac66c07bdb7549ee8c03b58f5 (tree)
Time2003-12-27 22:52:51
AuthorMark Kettenis <kettenis@gnu....>
CommiterMark Kettenis

Log Message

Merge from mainline:

2003-10-31 Jim Blandy <jimb@redhat.com>

* elfread.c (elf_symtab_read): Allocate correct number of tail
elements to sectinfo structure. (Fix from Woody LaRue.)

Change Summary

Incremental Difference

--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
11 2003-12-27 Mark Kettenis <kettenis@gnu.org>
22
3+ Merge from mainline:
4+
5+ 2003-10-31 Jim Blandy <jimb@redhat.com>
6+
7+ * elfread.c (elf_symtab_read): Allocate correct number of tail
8+ elements to sectinfo structure. (Fix from Woody LaRue.)
9+
10+2003-12-27 Mark Kettenis <kettenis@gnu.org>
11+
312 * config/sparc/nbsd64.mh (NATDEPFILES): Add sparc64-nat.o.
413
514 * Makefile.in (sparc64fbsd-tdep.o): Update dependencies.
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -398,9 +398,17 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
398398 = max (SECT_OFF_BSS (objfile),
399399 max (SECT_OFF_DATA (objfile),
400400 SECT_OFF_RODATA (objfile)));
401+
402+ /* max_index is the largest index we'll
403+ use into this array, so we must
404+ allocate max_index+1 elements for it.
405+ However, 'struct stab_section_info'
406+ already includes one element, so we
407+ need to allocate max_index aadditional
408+ elements. */
401409 size = (sizeof (struct stab_section_info)
402410 + (sizeof (CORE_ADDR)
403- * (max_index - 1)));
411+ * max_index));
404412 sectinfo = (struct stab_section_info *)
405413 xmmalloc (objfile->md, size);
406414 memset (sectinfo, 0, size);