this function is mainly (purely?) for obtaining stack address information, but we also provide the detach state since it's easy to do anyway.