This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]