From: Compro P. <com...@gm...> - 2017-06-19 10:41:01
|
1) symbol_bit_o and symbol_bit_t are not defined anywhere in the source tree but still checking for it and defining other things using it is useless. Will it be defined in future or is a portability option(which I don't think so). If none of them are true then it should be removed. I found them using "grep symbol_bit -rn src/". The #+BEGIN_SRC contains the block of code which has to be reduced. #+BEGIN_SRC c -i /* Test for Symbol */ #ifdef TYPECODES #if defined(symbol_bit_o) /* define symbolp(obj) (as_oint(obj) & wbit(symbol_bit_o)) */ #define symbolp(obj) (wbit_test(as_oint(obj),symbol_bit_o)) #ifdef WIDE_STRUCT #undef symbolp #define symbolp(obj) (typecode(obj) & bit(symbol_bit_t)) #endif #else #define symbolp(obj) (typecode(obj) == symbol_type) #endif #else #define symbolp(obj) \ (varobjectp(obj) && (Record_type(obj) == Rectype_Symbol)) #endif #+END_SRC 2) How to print a symbol's name from gdb? Is it through pname? But how to get the actual (char *) out of it? 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. 4) I was considering to provide each symbol with a mutex so that they could be locked when any function tries to change the value of the symbol. And this has to be done in the function itself. For example, if struct symbol_ { /* other contents */ xmutex_raw_t mut; } is the definition of a symbol_ then mut can be used to lock it for writing purposes or even deletion too. |