Greetings!
"Mike Thomas" <[EMAIL PROTECTED]> writes:
> Hi Camm.
>
> | > Following your overnight advice I set base in unexnt.c to
> | > DBEGIN+PAGESIZE*500 rather than DBEGIN which puts DBEGIN below the
> | > DBEGIN+start
> | > of the heap sufficiently to avoid that early call to GBC.
> | >
> |
> | Great!
> |
> | > raw_pre_gcl.exe then barfs in the first find_package due to
> | a problem
> | > in the check_package_designator() macro.
> | >
> |
> | I've seen this before too, but have forgotten the cause. It
> | is simple if memory serves.
>
>
> Would you agee that the sequence below is wrong, specifically the part
> where set_type_of alters the value of *(object*) obj.
>
> The new value of 0x80090000 is above the immediate fixnum configuration
> constant and so causes the later problem with find_package.
>
Is it possible the endianness of your system is being incorrectly
determined by configure? This is goeverned by the LITTLE_END C macro.
Briefly, cvs head now determines the object type from the first word
indirected by each object pointer. Cons are even, 8 byte aligned
valid addresses in the heap, or immediate fixnums. All other types
are odd integers, indicating that they should be interpreted as a
special type word which has a type field enumerating the actual type.
I.e. if *(unsigned *)obj is odd (and not an imm fixnum), then the type is
obj->d.t
otherwise
obj->c.c_cdr
is either another object, or an imm fixnum.
You can look at obj->d in gdb. obj->d.e should be set for non-cons
objects as is the case here. This should be the least significant
bit, but it appears that the most significant is set in your case.
Take care,
> ==========================================================
> Breakpoint 3, alloc_object (t=t_string) at alloc.c:364
> 364 if ((obj=maybe_alloc_on_stack(tm->tm_size,t))) {
> (gdb) s
> 370 CHECK_INTERRUPT;
> (gdb) n
> 372 obj = tm->tm_free;
> (gdb) n
> 373 if (obj == OBJNULL) {
> (gdb) n
> 389 tm->tm_free = OBJ_LINK(obj);
> (gdb) s
> 390 --(tm->tm_nfree);
> (gdb) obj->c.c_cdr
> Undefined command: "obj-". Try "help".
> (gdb) p obj->c.c_cdr
> $1 = 0xa0170000
> (gdb) p *(object *) obj
> $2 = 0xa0170000
> (gdb) n
> 391 (tm->tm_nused)++;
> (gdb) n
> 392 set_type_of(obj,t);/*FIXME try removing this*/
> (gdb) s
> 393 return(obj);
> (gdb) p *(object *) obj
> $3 = 0x80090000
> (gdb) p obj->c.c_cdr
> $4 = 0x80090000
> (gdb)
> ==========================================================
>
> Cheers
>
> Mike Thomas
>
>
> _______________________________________________
> Gcl-devel mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/gcl-devel
>
>
>
--
Camm Maguire [EMAIL PROTECTED]
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
_______________________________________________
Gcl-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gcl-devel