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]

Re: dwarf-frame.c question


Discussed this with AlexO (of gcc). Let us ruin your day.

This problem can occure even without recursion. Consider the C snippet:

foo ()
{
	if (i)
	  abort (with, lots, of parameters)
	do; normal; stuff;
}

it can be turned into:

	branch !i, 1:
	push with
	push lots
	push of
	push parameters
	call abort
1:
	do
	normal
	stuff

The return address can end up pointing at the ``do'' / 1: line and that's CFI info is definitly not correct for unwinding from abort().

One idea (the origins of which are unknown) is for the compiler to generate CFI info containing no addresses and have GDB look for that dependant on the PC address being obtained using return or resume (sigtramp, sentinel).

However, first, does anyone know if the DWARF 2 spec has something to say abou this?

Andrew


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