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: Mike Thomas
Subject: RE: [Gcl-devel] HEAD Maxima and HEAD trad GCL
Date: Thu, 8 Jan 2004 09:41:41 +1000

Hi Camm.

Stuff deleted...

| > $ gdb --directory ../o --directory ../lsp --directory ../mod --directory
| > ../cmp
| > new --directory ../gmp3 --directory ../h --directory
| ../unixport --directory
| > ..
| > /clcs ../unixport/saved_gcl.exe
| > GNU gdb 6.0
| > Copyright 2003 Free Software Foundation, Inc.
| > GDB is free software, covered by the GNU General Public
| License, and you are
| > welcome to change it and/or distribute copies of it under certain
| > conditions.
| > Type "show copying" to see the conditions.
| > There is absolutely no warranty for GDB.  Type "show warranty"
| for details.
| > This GDB was configured as "i686-pc-mingw32"...
| > (gdb) b funlink.c:71
| > Breakpoint 1 at 0x4314a4: file funlink.c, line 71.
| > (gdb) cond 1 fun->cf.cf_self == 0x1030c130
| > (gdb) r
| > Starting program: c:\cvs\head\gcl\pcl/../unixport/saved_gcl.exe
| >         0x005407A0 BSS start in memory.
| >         0x004e0000 BSS offset in saved executable.
| >         0x00113710 BSS size in bytes.
| >         0x00113710 bytes read.
| >         0x10100000 Heap start in memory.
| >         0x00400000 Heap offset in executable.
| >         0x000e0000 Heap size in bytes.
| >         0x10100000 file base.
| > GCL (GNU Common Lisp)  (2.7.0) Mon Jan  5 18:01:01 EAST 2004
| > Licensed under GNU Library General Public License
| > Dedicated to the memory of W. Schelter
| >
| > Use (help) to get some basic information on how to use GCL.
| >
| > >(load "../clcs/package.lisp")
| >
| > Loading ../clcs/package.lisp
| > Finished loading ../clcs/package.lisp
| >
| > .. blah blah ..
| >
| > Loading binary of PCL_FAST_INIT...
| > Loading binary of PCL_BRAID...
| >
| > Breakpoint 1, call_or_link (sym=0x1022c3a8, link=0x1031d57c) at
| funlink.c:71
| > 71                  ( *(void (*)()) (fun->cf.cf_self)) ();
| > (gdb) p fun->cf.cf_name->st
| > $1 = {t = 8 '\b', flag = 0 '\0', s = 0 '\0', m = 0 '\0',
| st_displaced = 0x0,
| >   st_hasfillp = 4784, st_adjustable = 84,
| >   st_self = 0x103ce800
| "GET-DFUN-CONSTRUCTORWRAPPER1WRAPPER0ACCESSOR-TYPE",
| >   st_fillp = 20, st_dim = 270352720}
| > (gdb) b *0x1030c130
| > Breakpoint 2 at 0x1030c130
| > (gdb) c
| > Continuing.
| >
| > Breakpoint 2, 0x1030c130 in ?? ()
| > (gdb) disassemble
| > No function contains program counter for selected frame.
| >




|
| OK, I had forgotten that this would not work as the loaded function
| has no treatment of its .stabs section yet.  It would be nice to
| figure out how to do this in a running program someday.
|
| I need to see (at breakpoint 1)
|
| p fun->cf.cf_name->st



============================================================================
Loading binary of PCL_BRAID...
Breakpoint 1, call_or_link (sym=0x1022c3a8, link=0x1031d57c) at funlink.c:71
71                  ( *(void (*)()) (fun->cf.cf_self)) ();
(gdb) p fun->cf.cf_name->st
$10 = {t = 8 '\b', flag = 0 '\0', s = 0 '\0', m = 0 '\0', st_displaced =
0x0,
  st_hasfillp = 4784, st_adjustable = 84,
  st_self = 0x103ce800 "GET-DFUN-CONSTRUCTORWRAPPER1WRAPPER0ACCESSOR-TYPE",
  st_fillp = 20, st_dim = 270352720}
============================================================================




The above was included in the last email - also in the last email is some
output from looking at the args at that breakpoint

|
| p/x *(int *)fun->address@hidden

============================================================================
(gdb) p/x *(int *)fun->address@hidden
$11 = {0x53565755, 0x8b1cec83, 0x5b0ba035, 0x100d8b00, 0x10298bf4,
0xd3b1846,
  0x5a7dd0, 0x18247489, 0x14244489, 0x46b830f, 0xc8890000, 0xf8c1f029,
  0xfc08502, 0x4468e, 0x4c68300, 0x1824548b, 0x2a8bf139, 0xba03589,
0x1c7005b,
  0x5412b0, 0x870fcb89, 0x404, 0x1424448b, 0x5a7810a3, 0xcda8a100,
0x4c8b1031,
  0x78811824, 0x5412b004, 0x4798b00, 0x1d8b3074, 0x1031cdac, 0x12b0fb81,
  0x22740054, 0xff08ec83, 0xe8550873, 0xf014c360, 0x8510c483, 0x3e850fc0,
  0x8b000003, 0xfb81045b, 0x5412b0, 0xa0a1de75, 0x8b1031cd, 0xb03d0440,
  0x74005412, 0x768d19, 0x3b08508b, 0x840f086a, 0x300, 0x3d04408b, 0x5412b0,
  0x44c7ea75, 0x12b01024, 0x448b0054, 0x588b1024, 0xb0fb8104, 0x74005412,
  0x768d30, 0x8b08ec83, 0x70ff0843, 0x81e85708, 0x83f014c5, 0xc08510c4,
  0x438b0c74, 0x12b03d08, 0xc2890054, 0x5b8b1075, 0xb0fb8104, 0x75005412,
  0x12b0bad3, 0x94a10054, 0x811031cd, 0x12b00478, 0x840f0054, 0x1f8,
  0x8b04428b, 0xb03d0840, 0x74005412, 0x24548b25, 0x89d68918, 0x10c683d1,
  0x8914c183, 0x35891042, 0x5b0ba0, 0x78100d89, 0xc483005a, 0x5f5e5b1c,
  0x4c8bc35d, 0xcb891824, 0x8b14c383, 0x89142444, 0x10a31469, 0x89005a78,
  0x5b0ba01d, 0xcf79e800, 0xa0a1f015, 0x8b005b0b, 0x8b182454, 0xb0ff8100,
  0x89005412, 0xd9891042, 0x1d89fa89, 0x5a7810, 0x428b1974, 0x8b018908,
  0xc1830452, 0xb0fa8104, 0x75005412, 0x100d89ed, 0x8b005a78, 0x8b18244c,
  0x108a1041, 0x8915fa80, 0x5b0ba01d, 0x3b840f00, 0x80000001, 0x840f14fa,
  0x12a, 0x500cec83, 0x1127b9e8, 0x10c483f0, 0x5b0ba0a1, 0x10158b00,
  0x39005a78, 0xf4830fd0, 0x8d000000, 0x88b0470, 0x4c89d639, 0x35890c24,
  0x5b0ba0, 0xcb820f, 0x448b0000, 0x10a31424, 0xbe005a78, 0x5412b0,
  0x1824448b, 0x89107889, 0x10c783c7, 0xba03d89, 0x1d89005b, 0x5a7810,
---Type <return> to continue, or q <return> to quit---
  0x13666de8, 0x24548bf0, 0x10158914, 0xba005a78, 0x5412b0, 0x5b0ba0a1,
  0x8bd63900, 0x837b7400, 0x52560cec, 0x202474ff, 0xe8046a50, 0xf0133b45,
  0x8120c483, 0xb010247c, 0x74005412, 0x8ec833d, 0x18244c8b, 0x500471ff,
  0xf84afe8, 0x24548bf0, 0x4428920, 0x8b10c483, 0x8b18244c, 0x8b0c2444,
  0x89142454, 0x71891041, 0xa03d8914, 0x89005b0b, 0x5a781015, 0xfea8e900,
  0x5053ffff, 0xe8026a55, 0xf0133af1, 0xa01d8b5a, 0x591031cd, 0x500473ff,
  0xf8467e8, 0x44389f0, 0x158bbaeb, 0x1031cdb4, 0xffff7ae9, 0x24548bff,
  0x4708b14, 0x78101589, 0x31e9005a, 0x8bffffff, 0x8914244c, 0x5a78100d,
  0x2444c700, 0x5412b00c, 0xff15e900, 0x50ffffff, 0xfedae908, 0x488bffff,
  0xfc98518, 0xfffeba84, 0xcec83ff, 0x850ff51, 0xfffec0e9...}
============================================================================



| Then if you could please find the function name so reported (as a
| comment) in one of the pcl C files, and give me objdump -d on that
| file's .o file.

The object dump of pcl_dfun.o is attached.

The function name GET-DFUN-CONSTRUCTORWRAPPER1WRAPPER0ACCESSOR-TYPE seems to
be a bogus overwriting of several names in pcl_dfun - something is going
badly wrong with string handling?

Keep in mind when reflecting on this that on Windows, uninitialised
variables do not get automatically set to 0, they are set to whatever is
sitting in memory when they are instantiated.




============================================================================
address@hidden /c/cvs/head/gcl/pcl
$ fgrep -r -i GET-DFUN-CONSTRUCTORWRAPPER1WRAPPER0ACCESSOR-TYPE *.c

address@hidden /c/cvs/head/gcl/pcl
$ fgrep -r -i GET-DFUN-CONSTRUCTOR *.c
pcl_dfun.c:/*   function definition for GET-DFUN-CONSTRUCTOR    */
pcl_dfun.c:static void LnkT189(){ call_or_link(VV[189],(void **)(void
*)&Lnk189)
;} /* GET-DFUN-CONSTRUCTOR */

address@hidden /c/cvs/head/gcl/pcl
$ fgrep -r -i WRAPPER1 *.c
pcl_braid.c:/*  local entry for function BUILT-IN-OR-STRUCTURE-WRAPPER1 */
pcl_dfun.c:/*   macro definition for DFUN-INFO-WRAPPER1 */

address@hidden /c/cvs/head/gcl/pcl
$ fgrep -r -i WRAPPER0 *.c
pcl_dfun.c:/*   macro definition for DFUN-INFO-WRAPPER0 */

address@hidden /c/cvs/head/gcl/pcl
$ fgrep -r -i ACCESSOR-TYPE *.c
pcl_dfun.c:/*   macro definition for DFUN-INFO-ACCESSOR-TYPE    */

============================================================================



| Lastly, if you could please break at fasload,
| conditionalize this to when the pcl file you found is being loaded,
| then break at call_init, and report back to me the init_address.

init_address is 0 see below:

============================================================================
Loading binary of PCL_DFUN...

Breakpoint 1, fasload (faslfile=0x1024cfc0) at sfasl.c:178
178         int init_address=0;
(gdb) p faslfile->s
$11 = {t = 13 '\r', flag = 0 '\0', s = 0 '\0', m = 0 '\0', s_dbind =
0x5412b0,
  s_sfdef = 0,
  st_self = 0x103b5a2c "c:/cvs/head/gcl/unixport/../pcl/pcl_dfun.o",
  st_fillp = 42, s_gfdef = 0x2a, s_plist = 0xd, s_hpack = 0x5412b0,
  s_stype = 0, s_mflag = 0}
(gdb) break call_init
Breakpoint 2 at 0x418fa3: file cmpaux.c, line 315.
(gdb) c
Continuing.

Breakpoint 2, call_init (init_address=0, memory=0x102d6294,
    fasl_vec=0x10112ab8, fptr=0) at cmpaux.c:315
315       check_type(fasl_vec,t_vector);
(gdb)
============================================================================

| Hopefully we should be able to see things more clearly from here.

Thanks Camm,

Mike Thomas.

Attachment: pcl_dfun.o.dump
Description: Binary data


reply via email to

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