pwndbg/pwndbg

send gdb a patch to expose the frame id

Aperta

#3513 aperta il 18 dic 2025

 (1 commento) (0 reazioni) (0 assegnatari)Python (776 fork)batch import
help wantedupstream-bug

Metriche repository

Star
 (5820 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

They use it for equality comparisons, we would also like to have it for hashing.

The relevant thing is defined in gdb/python/py-frame.c:(struct frame_object). It should be good to expose a frame.id() api that returns

(frame_obj.frame_id << 1) + frame_obj.frame_id_is_next

In my opinion the tuple (number of stops, thread index, frame index) should guarantee frame uniqueness, but if they literarly have a frame id thing it makes much more sense to just use that.

Guida contributor