Olivier, thanks for being so gracious.
So here's the situation. I've tried this on both NT with MSVC 5.0 and
Linux with gcc/gdb using 21.2b36 and 21.2b37.
In src/indent.c there is the following:
void
vars_of_indent (void)
{
DEFVAR_BOOL ("indent-tabs-mode", &indent_tabs_mode /*
*Indentation can insert tabs if this is non-nil.
Setting this variable automatically makes it local to the current buffer.
*/ );
indent_tabs_mode = 1;
}
When the portable dumper is enabled, setting or clearing this variable has
no
effect. It's almost like the portable dumper loads it into memory but never
wires up the appropriate forwarding information so that the lisp code knows
how to find the variable. I suspect this is true of other such opaque
variables,
but haven't proven that conclusively yet.
I do know that if I set "watch indent_tabs_mode" the only time it ever gets
set throughout the lifetime of my debug session is at startup time. Any
subsequent
calls to (setq-default indent-tabs-mode nil) or (setq indent-tabs-mode nil)
have no effect. If I stop the debugger (CTRL-C) and do "p indent_tabs_mode"
it's
always 1. Here's where it gets set initially:
Old value = 0
New value = 1
0x4034e4b3 in memcpy (dstpp=0x8331f7c, srcpp=0x40580f34, len=4)
at ../sysdeps/generic/memcpy.c:61
61 ../sysdeps/generic/memcpy.c: No such file or directory.
(gdb) bt
#0 0x4034e4b3 in memcpy (dstpp=0x8331f7c, srcpp=0x40580f34, len=4)
at ../sysdeps/generic/memcpy.c:61
#1 0x80c8407 in pdump_load_finish () at dumper.c:1041
#2 0x80c891d in pdump_load (
argv0=0xbfffe517 "/usr2/tnoble/build/xemacs-21.2.36/src/./xemacs") at
dumper.c:1358
#3 0x80b15e2 in xemacs_21_2_b36_i686_pc_linux (argc=1, argv=0xbfffe284,
envp=0xbfffe28c, restart=0) at emacs.c:1164
#4 0x80b3bd1 in main (argc=1, argv=0xbfffe284, envp=0xbfffe28c) at
emacs.c:2595
So am wondering if there is an additional step that might need to be added
after the opaques are loaded in pdump_load_finish to make them visible to
lisp. The code in question is:
dumper.c, Line 1041:
/* Put back the opaques */
for (i=0; i<((dump_header *)pdump_start)->nb_opaquedmp; i++)
{
struct pdump_dumpopaqueinfo di = PDUMP_READ (p, struct
pdump_dumpopaqueinfo);
memcpy (di.data, p, di.size);
p += di.size;
}
Interestingly, when I turn off the portable dumper... I always get a watch
breakpoint
at the following location whenever I (setq-default indent-tabs-mode
<whatever>):
symbols.c, Line 1255:
case SYMVAL_BOOLEAN_FORWARD:
if (magicfun)
magicfun (sym, &newval, Qnil, 0);
*((int *) symbol_value_forward_forward (fwd))
= !NILP (newval);
return;
So do these opaques need to be added to the pdump_reloc_table (presumably
in pdump_dump_rtable and then again when the rtable gets read back in) so
they get manipulated in pdump_reorganize_hash_table, or is there something
else that needs to happen?
dumper.c, line 1089 and following:
/* Final cleanups */
/* reorganize hash tables */
p = pdump_rt_list;
for (;;)
{
pdump_reloc_table rt = PDUMP_READ (p, pdump_reloc_table);
if (!rt.desc)
break;
if (rt.desc == hash_table_description)
{
for (i=0; i < rt.count; i++)
pdump_reorganize_hash_table (PDUMP_READ (p, Lisp_Object));
break;
} else
p += sizeof (Lisp_Object) * rt.count;
}
I don't mind doing the legwork, just not sure what direction to head
at the moment since I've only just started crawling into the code.
Thanks in advance for any direction, Troy
-----Original Message-----
From: Olivier Galibert [mailto:galibert@pobox.com]
Sent: Wednesday, November 15, 2000 11:03 AM
To: 'xemacs-beta(a)xemacs.org'
Subject: Re: Who is the portable dumper expert? 21.2.37 Portable dumper
still broken.
On Wed, Nov 15, 2000 at 09:27:21AM -0700, Troy Noble wrote:
Who's the portable dump expert, and are there plans to fix this
anytime
soon?
Theorically, that's me. Theorically, because I've not been working on
XEmacs for far too long to be qualified as currently active.
I will answer any of your questions (or from whoever else who wants to
work on the dumper), be it on xemacs-beta or by private mail.
OG.