[m-dev.] Please help... once more

Erwan Jahier Erwan.Jahier at irisa.fr
Fri Oct 13 22:35:53 AEDT 2000


| On 22-Sep-2000, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
| > Ok, I think I have finally find the rigth magic incantations; to make it 
| > work, I need to wrap the call to MR_COLLECT_filter() with:
| > 
| >         [set event_info.MR_max_mr_num to the rigth value]
| > 	MR_copy_regs_to_saved_regs(event_info.MR_max_mr_num, saved_regs);
| >         MR_COLLECT_filter();
| > 	MR_copy_regs_to_saved_regs(event_info.MR_max_mr_num, saved_regs);
| 
| Why are those calls needed?

Well, I'm not really sure. I have just guessed from the code:

(1) MR_trace_real() calls MR_trace_event() which calls MR_trace_event_external()
which was calling MR_COLLECT_filter().

(2) I moved the call to  MR_COLLECT_filter() from MR_trace_event_external() to 
 MR_trace_real().

(3) MR_copy_regs_to_saved_regs() and MR_copy_saved_regs_to_regs() were wrapping
the call to MR_trace_event_external(), so I make them wrap the call to
MR_COLLECT_filter() and it solved the segv problem... This change works for sparc
and i386, but I have no idea if it is rigth for all architectures. 

My plan was to submit that change one of these days. I can show you the diff if
you really want the see the whole change, but I can't do it now, since the last
version of those files is at home.

| Surely the second call there should be to MR_copy_saved_regs_to_regs()
| rather than to MR_copy_regs_to_saved_regs() again?

Yes. That's what I did, indeed. That was a cut and paste error (in my mail, not
in the change).


-- 
R1.


--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list