This is the mail archive of the gdb-prs@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]

[Bug python/16281] python frame comparison should take inferior into account (including restarted inferior)


https://sourceware.org/bugzilla/show_bug.cgi?id=16281

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |palves at redhat dot com

--- Comment #2 from Pedro Alves <palves at redhat dot com> ---
> python's frame comparison support just calls frame_id_eq, but that can return > true for the "same" frame in different inferiors.

Or different threads of the same inferior, even.  Usually that won't happen
because each thread will have its own stack frame, but it can happen.  E.g., if
previous thread exits, and new thread reuses stack.  Or, if signal/exception
handler runs on its own stack, no matter which thread was current, the same
frame can be seen from both threads.

In a way, returning true for f1 == f2 isn't that much of a stretch.  They are
two different instantiations of the same frame.  You'd want that to be true if
e.g., you were debugging a multi-process program (multiple forks), and wanted
to do something similar to gdb's builtin local watchpoint handling (stop only
on frame XX).  I think it should be up to the higher level code to make sure it
makes sense to compare the frames.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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