From: Hannes Domani via Gdb-patches <gdb-patches@sourceware.org>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [PING^4] [PATCH] Also compare frame_id_is_next in frapy_richcompare
Date: Sat, 30 Jan 2021 14:16:02 +0000 (UTC) [thread overview]
Message-ID: <648862269.5845140.1612016162852@mail.yahoo.com> (raw)
In-Reply-To: <648862269.5845140.1612016162852.ref@mail.yahoo.com>
Ping.
Am Donnerstag, 21. Januar 2021, 19:07:33 MEZ hat Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> Folgendes geschrieben:
> Ping.
>
>
> Am Samstag, 9. Januar 2021, 16:36:13 MEZ hat Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> Folgendes geschrieben:
>
> > Ping.
> >
> >
> > Am Samstag, 2. Januar 2021, 14:19:07 MEZ hat Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> Folgendes geschrieben:
> >
> > > Ping.
> > >
> > >
> > > Am Freitag, 18. Dezember 2020, 18:25:41 MEZ hat Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> Folgendes geschrieben:
> > >
> > > > The last frame in a corrupt stack stores the frame_id of the next frame,
> > > > so these two frames currently compare as equal.
> > > >
> > > > So if you have a backtrace where the oldest frame is corrupt, this happens:
> > > >
> > > > (gdb) py
> > > > >f = gdb.selected_frame()
> > > > >while f.older():
> > > > > f = f.older()
> > > > >print(f == f.newer())
> > > > >end
> > > > True
> > > >
> > > > With this change, that same example returns False.
> > > >
> > > > gdb/ChangeLog:
> > > >
> > > > 2020-12-18 Hannes Domani <ssbssa@yahoo.de>
> > > >
> > > > * python/py-frame.c (frapy_richcompare): Compare frame_id_is_next.
> > > > ---
> > > > gdb/python/py-frame.c | 7 +++++--
> > > > 1 file changed, 5 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/gdb/python/py-frame.c b/gdb/python/py-frame.c
> > > > index 6b2b29d786..f3086f4bd2 100644
> > > > --- a/gdb/python/py-frame.c
> > > > +++ b/gdb/python/py-frame.c
> > > > @@ -658,8 +658,11 @@ frapy_richcompare (PyObject *self, PyObject *other, int op)
> > > > return Py_NotImplemented;
> > > > }
> > > >
> > > > - if (frame_id_eq (((frame_object *) self)->frame_id,
> > > > - ((frame_object *) other)->frame_id))
> > > > + frame_object *self_frame = (frame_object *) self;
> > > > + frame_object *other_frame = (frame_object *) other;
> > > > +
> > > > + if (self_frame->frame_id_is_next == other_frame->frame_id_is_next
> > > > + && frame_id_eq (self_frame->frame_id, other_frame->frame_id))
> > > > result = Py_EQ;
> > > > else
> > > > result = Py_NE;
> > > > --
> > > > 2.29.2
next parent reply other threads:[~2021-01-30 14:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <648862269.5845140.1612016162852.ref@mail.yahoo.com>
2021-01-30 14:16 ` Hannes Domani via Gdb-patches [this message]
2021-02-06 22:38 ` Tom Tromey
2021-02-06 22:41 ` Hannes Domani via Gdb-patches
2021-02-07 14:22 ` Tom Tromey
2021-02-07 18:17 ` Hannes Domani via Gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=648862269.5845140.1612016162852@mail.yahoo.com \
--to=gdb-patches@sourceware.org \
--cc=ssbssa@yahoo.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox