This is the mail archive of the mailing list for the GCC 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: How to insert dynamic code? (continued)

Andrew Haley wrote:

The way you do not reply to mails replying to your questions doesn't
encourage people to help you.  Please try harder to answer.

I did answer last time but directly to the poster that replied, and forgot to CC the list.
Excuse me for that.

I suspect that the gcc unwinder is relying on __dl_iterate_phdr to
scan the loaded libraries and isn't using the region that you have

But this is odd, becasue when I look at _Unwind_Find_FDE in
unwind-dw2-fde-glibc.c, I see:

ret = _Unwind_Find_registered_FDE (pc, bases);


if (dl_iterate_phdr (_Unwind_IteratePhdrCallback, &data) < 0)
return NULL;

So, it looks to me as though we do call _Unwind_Find_registered_FDE
first.  If you have registered your EH data, it should be found.

OK, so I have to look there then. Actually this is good news because
figuring out how to mess with the dynamic loader data is not something
for the faint of heart :-)

So, what happens when _Unwind_Find_registered_FDE is called?  Does it
find the EH data you have registered?

Yes but then it stops there instead of going upwards and finding the catch!
It is as my insertion left the list of registered routines in a bad state.

I will look again at this part (the registering part) and will try to find out what
is going on.

Thanks for yourt answer. If you are right this is a very GOOD news!


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