This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
segv and function descriptors
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb at sources dot redhat dot com
- Date: Mon, 05 Apr 2004 15:10:58 -0400
- Subject: segv and function descriptors
Hello,
I'm trying to come up with a robust test for GDB backtracing through a
NULL function pointer vis:
segv_handler
<signal trampoline>
0
main
ABIs using function descriptors unfortunatly end up with the stack:
segv_handler
<signal trampoline>
main
This is because the call ((*)())0 turns into a data (the descriptor)
access at 0 rather than a code access.
Can anyone think of a way to detect a descriptor abi? If I know that, I
can fudge a null descriptor and hence always cause the correct segv.
Andrew