Created
June 30, 2016 16:51
-
-
Save kivikakk/2e021fa5be80a79500c2efd19162de67 to your computer and use it in GitHub Desktop.
find the method referred to by ci->mid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mid = int(gdb.parse_and_eval("ci->mid")) | |
bin_number = mid % int(gdb.parse_and_eval("global_symbols.id_str.num_bins")) | |
next_count = 0 | |
while True: | |
key = int(gdb.parse_and_eval("global_symbols.id_str.as.big.bins[{}]{}.key".format(bin_number, ".next" * next_count))) | |
if key == mid: | |
break | |
next_count += 1 | |
gdb.write("{}\n".format(gdb.parse_and_eval("RSTRING_PTR(global_symbols.id_str.as.big.bins[{}]{}.record)".format(bin_number, ".next" * next_count)).string())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this is way overspecific and horrible i'm sorry