This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA 3/6] Comment out some unused overlay code
- From: Tom Tromey <tom at tromey dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tom at tromey dot com>
- Date: Mon, 6 Jun 2016 15:33:29 -0600
- Subject: [RFA 3/6] Comment out some unused overlay code
- Authentication-results: sourceware.org; auth=none
- References: <1465248812-23902-1-git-send-email-tom at tromey dot com>
This patch comments out some unneeded initializations in overlay code
in symfile.c. Normally I would not comment out code like this, but
the uses of "size" in these functions are commented out. If you'd
prefer I could just delete the comments.
2016-06-06 Tom Tromey <tom@tromey.com>
* symfile.c (simple_overlay_update_1): Comment out initialization
of "size".
(simple_overlay_update): Likewise.
---
gdb/ChangeLog | 6 ++++++
gdb/symfile.c | 8 ++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fbd7051..9839c55 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2016-06-06 Tom Tromey <tom@tromey.com>
+ * symfile.c (simple_overlay_update_1): Comment out initialization
+ of "size".
+ (simple_overlay_update): Likewise.
+
+2016-06-06 Tom Tromey <tom@tromey.com>
+
* tui/tui-winsource.c (tui_show_source_line): Use
ATTRIBUTE_UNUSED.
* tui/tui-io.c (tui_puts): Use ATTRIBUTE_UNUSED.
diff --git a/gdb/symfile.c b/gdb/symfile.c
index b244332..5de2cbf 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -3630,14 +3630,14 @@ simple_read_overlay_table (void)
static int
simple_overlay_update_1 (struct obj_section *osect)
{
- int i, size;
+ int i;
bfd *obfd = osect->objfile->obfd;
asection *bsect = osect->the_bfd_section;
struct gdbarch *gdbarch = get_objfile_arch (osect->objfile);
int word_size = gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT;
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
- size = bfd_get_section_size (osect->the_bfd_section);
+ /* size = bfd_get_section_size (osect->the_bfd_section); */
for (i = 0; i < cache_novlys; i++)
if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect)
&& cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect)
@@ -3706,11 +3706,11 @@ simple_overlay_update (struct obj_section *osect)
ALL_OBJSECTIONS (objfile, osect)
if (section_is_overlay (osect))
{
- int i, size;
+ int i;
bfd *obfd = osect->objfile->obfd;
asection *bsect = osect->the_bfd_section;
- size = bfd_get_section_size (bsect);
+ /* size = bfd_get_section_size (bsect); */
for (i = 0; i < cache_novlys; i++)
if (cache_ovly_table[i][VMA] == bfd_section_vma (obfd, bsect)
&& cache_ovly_table[i][LMA] == bfd_section_lma (obfd, bsect)
--
2.5.5