From: Sam S. <sd...@gn...> - 2017-06-19 14:16:40
|
> * Compro Prasad <pbzcebcenfnq@tznvy.pbz> [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. |