142 |
unmark_port (SCM port) |
unmark_port (SCM port) |
143 |
{ |
{ |
144 |
SCM stream, string; |
SCM stream, string; |
145 |
port_mark_p = SCM_GCMARKP (port); |
port_mark_p = SCM_GC_MARK_P (port); |
146 |
SCM_CLRGCMARK (port); |
SCM_CLEAR_GC_MARK (port); |
147 |
stream = SCM_PACK (SCM_STREAM (port)); |
stream = SCM_PACK (SCM_STREAM (port)); |
148 |
stream_mark_p = SCM_GCMARKP (stream); |
stream_mark_p = SCM_GC_MARK_P (stream); |
149 |
SCM_CLRGCMARK (stream); |
SCM_CLEAR_GC_MARK (stream); |
150 |
string = SCM_CDR (stream); |
string = SCM_CDR (stream); |
151 |
string_mark_p = SCM_GCMARKP (string); |
string_mark_p = SCM_GC_MARK_P (string); |
152 |
SCM_CLRGCMARK (string); |
SCM_CLEAR_GC_MARK (string); |
153 |
} |
} |
154 |
|
|
155 |
|
|
158 |
{ |
{ |
159 |
SCM stream = SCM_PACK (SCM_STREAM (port)); |
SCM stream = SCM_PACK (SCM_STREAM (port)); |
160 |
SCM string = SCM_CDR (stream); |
SCM string = SCM_CDR (stream); |
161 |
if (string_mark_p) SCM_SETGCMARK (string); |
if (string_mark_p) |
162 |
if (stream_mark_p) SCM_SETGCMARK (stream); |
SCM_SET_GC_MARK (string); |
163 |
if (port_mark_p) SCM_SETGCMARK (port); |
if (stream_mark_p) |
164 |
|
SCM_SET_GC_MARK (stream); |
165 |
|
if (port_mark_p) |
166 |
|
SCM_SET_GC_MARK (port); |
167 |
} |
} |
168 |
|
|
169 |
|
|
170 |
int |
int |
171 |
gdb_maybe_valid_type_p (SCM value) |
gdb_maybe_valid_type_p (SCM value) |
172 |
{ |
{ |
173 |
return SCM_IMP (value) || scm_cellp (value); |
return SCM_IMP (value) || scm_in_heap_p (value); |
174 |
} |
} |
175 |
|
|
176 |
|
|
214 |
scm_truncate_file (gdb_input_port, SCM_UNDEFINED); |
scm_truncate_file (gdb_input_port, SCM_UNDEFINED); |
215 |
scm_seek (gdb_input_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET)); |
scm_seek (gdb_input_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET)); |
216 |
/* Read one object */ |
/* Read one object */ |
217 |
tok_buf_mark_p = SCM_GCMARKP (tok_buf); |
tok_buf_mark_p = SCM_GC_MARK_P (tok_buf); |
218 |
SCM_CLRGCMARK (tok_buf); |
SCM_CLEAR_GC_MARK (tok_buf); |
219 |
ans = scm_lreadr (&tok_buf, gdb_input_port, &ans); |
ans = scm_lreadr (&tok_buf, gdb_input_port, &ans); |
220 |
if (SCM_GC_P) |
if (SCM_GC_P) |
221 |
{ |
{ |
232 |
scm_permanent_object (ans); |
scm_permanent_object (ans); |
233 |
exit: |
exit: |
234 |
if (tok_buf_mark_p) |
if (tok_buf_mark_p) |
235 |
SCM_SETGCMARK (tok_buf); |
SCM_SET_GC_MARK (tok_buf); |
236 |
remark_port (gdb_input_port); |
remark_port (gdb_input_port); |
237 |
SCM_END_FOREIGN_BLOCK; |
SCM_END_FOREIGN_BLOCK; |
238 |
return status; |
return status; |