dwarf-frame.c question

Andrew Cagney ac131313@redhat.com
Thu May 29 23:13:00 GMT 2003


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



More information about the Gdb mailing list