skaller wrote:
BTW: what happens on ia64 which has two? stacks?
You have to search both stacks for GC roots. Only one stack is visible to normal user code, the regular program stack, and __builtin_frame_address(0) will point there.
For the other stack, the backing store, you need some IA-64 specific code to get to it. You can use the __builtin_ia64_bsp() function, or you could write some assembly language code to read the ar.bsp register. Taking a quick look at boehm-gc, I see that there is a glibc hook it uses first, and then if that isn't available it tries to get the value from /proc/self/maps. Those are obviously linux specific solutions.
-- Jim Wilson, GNU Tools Support, http://www.specifix.com