"""Map the category success notifier already instrumented at 0x18017aa80.

The checkpoint hook can passively record ctx+0x88 and the +0x58..+0x60 handler
vector. Establish where this notifier sits relative to request ownership transfer and
whether it is the concrete receiver-side publication path we need to observe live.
"""
import traceback

try:
    target = 0x18017aa80
    print("=== notifier 0x18017aa80 ===")
    print(dec(target))
    print("\n=== notifier callers ===")
    for ent, name in callers(target):
        print("  %#x %s" % (ent, name))
        print(dec(ent))
    print("\n=== notifier xrefs ===")
    for frm, typ, name, ent in xrefs_to(target):
        print("  from=%#x type=%s fn=%s entry=%#x" % (frm, typ, name, ent))

    # Adjacent category request methods often expose the notifier through a vtable
    # or callback descriptor; inspect nearby functions and data references.
    for a in (0x18017aa80, 0x18017aaf0, 0x18017ab80, 0x18017b1c0):
        f = func(a)
        print("\n=== %#x %s ===" % (a, f.getName() if f else "?"))
        print(dec(a))

except Exception:
    traceback.print_exc()
