diff options
author | Jim Blandy <jimb@codesourcery.com> | 2001-07-05 16:45:48 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2001-07-05 16:45:48 +0000 |
commit | af703f96203b5320baec426e5864cff71735a071 (patch) | |
tree | cb6070af4726e004b4f486b81aa3affa0700dc1f /gdb | |
parent | e087d0d6ee0354396a1b54fc48fe39fbbf3fa9b2 (diff) | |
download | gdb-af703f96203b5320baec426e5864cff71735a071.zip gdb-af703f96203b5320baec426e5864cff71735a071.tar.gz gdb-af703f96203b5320baec426e5864cff71735a071.tar.bz2 |
* dwarf2read (dwarf2_build_psymtabs_hard): Doc fix.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4b2c4fc..da28812 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2001-07-05 Jim Blandy <jimb@redhat.com> + + * dwarf2read (dwarf2_build_psymtabs_hard): Doc fix. + 2001-07-05 Mark Kettenis <kettenis@gnu.org> * config/i386/xm-go32.h (HOST_I386): Removed. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index f398686..a3ca771 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -980,6 +980,19 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline) obstack_init (&dwarf2_tmp_obstack); back_to = make_cleanup (dwarf2_free_tmp_obstack, NULL); + /* Since the objects we're extracting from dwarf_info_buffer vary in + length, only the individual functions to extract them (like + read_comp_unit_head and read_partial_die) can really know whether + the buffer is large enough to hold another complete object. + + At the moment, they don't actually check that. If + dwarf_info_buffer holds just one extra byte after the last + compilation unit's dies, then read_comp_unit_head will happily + read off the end of the buffer. read_partial_die is similarly + casual. Those functions should be fixed. + + For this loop condition, simply checking whether there's any data + left at all should be sufficient. */ while (info_ptr < dwarf_info_buffer + dwarf_info_size) { struct comp_unit_head cu_header; |