This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA/commit 2/5] addrmap change disabled print_frame_label_vars???


No change in this patch, compared to the first patch series...

The compiler with -Wunused-function noticed that print_block_frame_labels
is never used.  This is because the code that used it has been commented
out. In fact, the whole body of print_frame_label_vars has been
commented out, and I cannot figure out why.  I found the patch that
introduced this change:

        2007-12-04  Jim Blandy  <jimb@codesourcery.com>
        Support lexical blocks and function bodies that occupy
        non-contiguous address ranges.
        [...]
        * stack.c (print_frame_label_vars): Disable function, which
        depends on the block's index.

Unfortunately, there wasn't much discussion on gdb-patches, and Jim
did not explain why he made that change. Jim? I suspect that this was
meant to be temporary, something for you to come back to. Not sure
what, though.

In the meantime, in order to prepare for the introduction of -Wunused-function,
I have also commented out print_block_frame_labels, with a comment
explaining why.

BTW: This only affects "info catch", which prints a list of exception
     that can be caught in the current stack frame.

gdb/ChangeLog:

        * stack.c (print_block_frame_labels): Comment function out.

I'll commit the change as is for now, and will ask Jim for more info,
if he remembers...

---
 gdb/stack.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/gdb/stack.c b/gdb/stack.c
index 6e198e0..2caf9d2 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -1487,8 +1487,16 @@ print_block_frame_locals (struct block *b, struct frame_info *frame,
   return values_printed;
 }
 
+
 /* Same, but print labels.  */
 
+#if 0
+/* Commented out, as the code using this function has also been
+   commented out.  FIXME:brobecker/2009-01-13: Find out why the code
+   was commented out in the first place.  The discussion introducing
+   this change (2007-12-04: Support lexical blocks and function bodies
+   that occupy non-contiguous address ranges) did not explain why
+   this change was made.  */
 static int
 print_block_frame_labels (struct gdbarch *gdbarch, struct block *b,
 			  int *have_default, struct ui_file *stream)
@@ -1526,6 +1534,7 @@ print_block_frame_labels (struct gdbarch *gdbarch, struct block *b,
 
   return values_printed;
 }
+#endif
 
 /* Print on STREAM all the local variables in frame FRAME, including
    all the blocks active in that frame at its current PC.
-- 
1.6.3.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]