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


Andrew Cagney <ac131313@redhat.com> writes:

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).


I don't understand this. Could you explain the idea in more detail?

A similar technique to the line number information where there are two line number entries for the start of function so that GDB can find the end of the function prologue given:


int foo (int i) { int j = i * i; return j; }

In this case there would be two CFI entries covering the code at "1:" (assuming its possible):

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

- [1:, 1:): describing the lost return instruction - [1:, end-of-function) describing the real code

GDB could pick 'n' choose.

The other thing to do is to test this on an alternative compiler that generates CFI.

Andrew



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