From f3809af0d68b7b38f7916a8914515536552095fc Mon Sep 17 00:00:00 2001 From: jimb Date: Mon, 25 Nov 2002 20:11:33 +0000 Subject: [PATCH] * symfile.c (syms_from_objfile): Adjust indentation. --- gdb/ChangeLog | 2 ++ gdb/symfile.c | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b48f346e35..5123d698d0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2002-11-25 Jim Blandy + * symfile.c (syms_from_objfile): Adjust indentation. + * symfile.c (symbol_file_add): Flush gdb_stdout even if from_tty || info_verbose isn't true. diff --git a/gdb/symfile.c b/gdb/symfile.c index 5e0bf8c872..aa457b258a 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -652,25 +652,27 @@ syms_from_objfile (struct objfile *objfile, struct section_addr_info *addrs, else lower_offset = 0; - /* Calculate offsets for the loadable sections. + /* Calculate offsets for the loadable sections. FIXME! Sections must be in order of increasing loadable section so that contiguous sections can use the lower-offset!!! - Adjust offsets if the segments are not contiguous. - If the section is contiguous, its offset should be set to + Adjust offsets if the segments are not contiguous. + If the section is contiguous, its offset should be set to the offset of the highest loadable section lower than it (the loadable section directly below it in memory). this_offset = lower_offset = lower_addr - lower_orig_addr */ - /* Calculate offsets for sections. */ + /* Calculate offsets for sections. */ for (i=0 ; i < MAX_SECTIONS && addrs->other[i].name; i++) { if (addrs->other[i].addr != 0) { - sect = bfd_get_section_by_name (objfile->obfd, addrs->other[i].name); + sect = bfd_get_section_by_name (objfile->obfd, + addrs->other[i].name); if (sect) { - addrs->other[i].addr -= bfd_section_vma (objfile->obfd, sect); + addrs->other[i].addr + -= bfd_section_vma (objfile->obfd, sect); lower_offset = addrs->other[i].addr; /* This is the index used by BFD. */ addrs->other[i].sectindex = sect->index ; -- 2.11.0