This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[ob] Add more comments to infrun.c
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 16 Oct 2003 14:25:26 -0400
- Subject: [ob] Add more comments to infrun.c
Hello,
This adds some more commentary to "infrun.c", adding comments can always
be thought of as obvious :-)
committed,
Andrew
2003-10-16 Andrew Cagney <cagney@redhat.com>
* infrun.c (handle_inferior_event): Add comment about
"frame_id_inner" being too weak.
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.115
diff -u -r1.115 infrun.c
--- infrun.c 2 Oct 2003 20:28:29 -0000 1.115
+++ infrun.c 16 Oct 2003 18:23:12 -0000
@@ -2636,6 +2636,22 @@
/* In the case where we just stepped out of a function into the
middle of a line of the caller, continue stepping, but
step_frame_id must be modified to current frame */
+#if 0
+ /* NOTE: cagney/2003-10-16: I think this frame ID inner test is too
+ generous. It will trigger on things like a step into a frameless
+ stackless leaf function. I think the logic should instead look
+ at the unwound frame ID has that should give a more robust
+ indication of what happened. */
+ if (step-ID == current-ID)
+ still stepping in same function;
+ else if (step-ID == unwind (current-ID))
+ stepped into a function;
+ else
+ stepped out of a function;
+ /* Of course this assumes that the frame ID unwind code is robust
+ and we're willing to introduce frame unwind logic into this
+ function. Fortunatly, those days are nearly upon us. */
+#endif
{
struct frame_id current_frame = get_frame_id (get_current_frame ());
if (!(frame_id_inner (current_frame, step_frame_id)))