[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] coerce_to_pathname
From: |
Aurelien Chanudet |
Subject: |
[Gcl-devel] coerce_to_pathname |
Date: |
Sat, 28 Feb 2004 17:19:28 +0100 |
Hi all,
I've just run across a problem in coerce_to_pathname when trying to
build Maxima on Mac OS X using the local BFD tree. My first thought
was that the issue might originate from a side-effet of a bug lurking
somewhere in my BFD relocation code. However, I fail to see the
connection. coerce_to_pathname is called from read_fasl_vector, which
in turn is called from sfaslbfd.c. As you know, Maxima is built by
compiling lisp files into object files and subsequently loading them.
The breakpoint I set in coerce_to_pathame (see below) was reached only
once. This breakpoint demonstrates that x->sm.sm_object1 was
incorrectly set to null below. This might be because, towards the
beginning of fasload in sfaslbfd.c, we have a line saying :
dum.sm.sm_object0=dum.sm.sm_object1=OBJNULL;
By contrast, towards the end of open_stream in file.d, we have a line
saying :
x->sm.sm_object1 = fn;
Any idea ?
Thanks,
Aurelien
---
-bash2.05b /src/src/gcl-2.7.0 $ gdb attach 3960
GNU gdb 5.3-20030128 (Apple version gdb-309) (Thu Dec 4 15:41:30 GMT
2003)
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 "powerpc-apple-darwin".
attach: No such file or directory.
/src/src/gcl-2.7.0/3960: No such file or directory.
Attaching to process 3960.
Reading symbols for shared libraries . done
Reading symbols for shared libraries ....... done
0x0001b750 in insert_contblock (p=0x1ec6000 "", s=4096) at alloc.c:556
556 if ((*cbpp)->cb_size >= s) {
(gdb) list coerce_to_pathname
196 }
197
198 object
199 coerce_to_pathname(x)
200 object x;
201 {
202 object y;
203 int e;
204
205 L:
(gdb)
206 switch (type_of(x)) {
207 case t_symbol:
208 case t_string:
209 /* !!!!! Bug Fix. NLG */
210 y = parse_namestring(x, 0, x->st.st_fillp, &e);
211 if (y == OBJNULL || e != x->st.st_fillp)
212 goto CANNOT_COERCE;
213 return(y);
214
215 case t_pathname:
(gdb)
216 return(x);
217
218 case t_stream:
219 switch (x->sm.sm_mode) {
220 case smm_input:
221 case smm_output:
222 case smm_probe:
223 case smm_io:
224 x = x->sm.sm_object1;
225 /*
(gdb)
226 The file was stored in
sm.sm_object1.
227 See open.
228 */
229 goto L;
230
231 case smm_synonym:
232 x = symbol_value(x->sm.sm_object0);
233 goto L;
234
235 default:
(gdb) b 224
Breakpoint 3 at 0xa4040: file pathname.d, line 224.
(gdb) c
Continuing.
Breakpoint 3, coerce_to_pathname (x=0x4fa55c) at pathname.d:224
224 x = x->sm.sm_object1;
(gdb) list
219 switch (x->sm.sm_mode) {
220 case smm_input:
221 case smm_output:
222 case smm_probe:
223 case smm_io:
224 x = x->sm.sm_object1;
225 /*
226 The file was stored in
sm.sm_object1.
227 See open.
228 */
(gdb)
229 goto L;
230
231 case smm_synonym:
232 x = symbol_value(x->sm.sm_object0);
233 goto L;
234
235 default:
236 goto CANNOT_COERCE;
237 }
238
(gdb) n
229 goto L;
(gdb) p x
$2 = 0x0
(gdb) n
206 switch (type_of(x)) {
(gdb) p x
$3 = 0x0
(gdb) n
Program received signal EXC_BAD_ACCESS, Could not access memory.
0x000a3f5c in coerce_to_pathname (x=0x0) at pathname.d:206
206 switch (type_of(x)) {
- [Gcl-devel] coerce_to_pathname,
Aurelien Chanudet <=