gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] HEAD Maxima and HEAD trad GCL


From: Camm Maguire
Subject: Re: [Gcl-devel] HEAD Maxima and HEAD trad GCL
Date: 15 Jan 2004 10:57:46 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!

"Mike Thomas" <address@hidden> writes:

> Hi Camm.
> 
> | Hi Mike!  OK, I think we have something.
> 
> You are right - your skill with a semi-skilled monkey controlled remote
> debugger on a system you have never personally used is remarkable!!!
> 

Hardly!  It is your persistence which is paying off, IMHO.

> (gdb) l
> 96          if ( type_of ( fun ) == t_cclosure && ( fun->cc.cc_turbo ) ) {
> 97              if ( Rset ) {
> 98                  (void) vpush_extend ( link, sLAlink_arrayA->s.s_dbind );
> 99                  (void) vpush_extend ( *link,
> sLAlink_arrayA->s.s_dbind );
> 100                 *ptr = (void *) ( fun->cc.cc_turbo );
> 101                 *link = (void *) ( fun->cf.cf_self );
> 102                 MMccall (fun, fun->cc.cc_turbo);
> 103             } else {
> 104                 MMccall ( fun, fun->cc.cc_turbo );
> 105             }
> (gdb) p ptr
> $15 = (void **) 0x10317140
> (gdb) p *ptr
> $16 = (void *) 0x102c1654

OK, at this point we need

p sym->s

This should be one of the Lclptr variables of pcl_braid.c, either

Lclptr240
Lclptr219
Lclptr217
Lclptr175
Lclptr174
Lclptr173
Lclptr172

These are declared as 

static object *Lclptr240;

in pcl_braid.h, and unlike the function pointers, are kept in the .bss
section of the object file.  You should be able to confirm this with

objdump -x pcl_braid.o | grep Lclptr

and 

objdump -x pcl_braid.o | grep Lnk

One of these (at least) is getting mis-relocated into the memory area
of the previously loaded pcl_dfun.o, so I suspect there is a problem
with the bss relocation code in sfasl.c.  Once you determine which ptr
is at 0x10317140, then you should set 

b set_symbol_address

(after the breakpoint at fasload for pcl_braid.o) and conditionalize
it to get the symbol you want, maybe with something like

cond ? ! strcmp(sym->s_my_string_table,"Lclptr???")

There appears to be a lot of debugging dprintfs in sfasl.c -- perhaps
you could turn them on at this point.  Perhaps before setting the
break point above, you may want to break at sfasl.c:365 (call_init)
(after reaching fasload with pcl_braid.o) and

p memory->cfd

All relocations of Lclptr??? variables performed by set_symbol_address
should surely wind up between memory->cfd.cfd_start and
memory->cfd.cfd_start+memory->cfd.cfd_size.

I think we're close!

Take care,

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]