On Wed, 13 Dec 2006 23:11:11 +0100, Jan Kratochvil wrote: > On Wed, 13 Dec 2006 22:52:52 +0100, Mark Kettenis wrote: > ... > > No, sorry, it is me who is confused. I didn't actually look at Jan's patch > > and assumed it did the the right thing of marking the return address as > > undefined. > > Therefore what should the patch do? Currently `.cfi_undefined' looks as too > radical. Read all the past threads and I hope this patch complies with all the parties. I would like if the `.cfi_undefined' patch http://sourceware.org/ml/libc-alpha/2006-11/msg00082.html could stay in the development glibc with the unwinder patched by Jakub Jelinek http://sources.redhat.com/ml/gdb/2006-12/msg00100.html as with such CFI patch gdb does not show any bogus 0x0 unwind of `clone'. On the other hand as a legacy compatibility I wrote the attached patch to fix the GDB excessive non-CFI amd64 `clone' unwind as 0x0. Other platforms (and functions?) could be carbon-copied from this one. I consider it the same approach as the way GDB currently on amd64 detects signal frames by checking the instructions - the CFI for signal frames has been also recently checked to the development glibc as was the `clone' CFI. Tested for regressions by the gdb testsuite, it is the most conservative way so it should not have any sideeffects. The 0x0 unwinding of any non-`clone' functions remains the same so Mark should have no objections, I hope. Regards, Jan