Re: Dead code found, some questions and suggestions
Sam Steingold <[email protected]>
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <[email protected]> |
> * Compro Prasad <[email protected]> [2017-06-19 16:10:53 +0500]: > > 2) How to print a symbol's name from gdb? Is it through pname? But how > to get the actual (char *) out of it? Please see zout and xout in clisp/src/.gbinit. zout uses lisp prin1 and thus works for all objects, but it conses so may cause GC-safety crashes. xout uses nobject_out thus does not cons, but it does not print all possible objects. > 3) As for now I can't understand the memory layout of gcv_object_t > which seems to contain type information along with address of some > other objects in the memory. It would be quite beneficial if you could > point out some information to get it clear. See comments in lispbibl.d: The type `gcv_object_t' denotes a GC visible object, i.e. a slot inside a heap-allocated object or a STACK slot. If its value is not an immediate object, any call that can trigger GC can modify the pointer value. NEVER write "var gcv_object_t foo;" - this is forbidden! You can write "var gcunsafe_object_t foo;" instead - but then you must not trigger GC during the entire lifetime of the variable 'foo'! it contains type information as well gc bits and data - immediate or pointer(s). I hope Bruno will clarify this. -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net http://camera.org http://islamexposedonline.com http://no2bds.org http://jij.org https://ffii.org Before telling the Truth, make sure you know it. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ clisp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-devel