Re: pointers to variables ?

new topic     » goto parent     » topic index » view thread      » older message » newer message
jimcbrown said...

Actually, this is not quite right. This access does exist through the debugger API. You can see for details

I'm hesitant to suggest that as an answer here. Mostly I don't want to encourage the use of debugging features outside of a debugging context. But also using any debug routine except call_stack() requires the debugger to be initialized and debug features are only available in the interpreter so translated code will not work. I also noticed that inlining will hide symbols so they won't be found with symbol_lookup(). Using without inline resolves this but at a (small) performance cost. But that's another reason to keep this as debug-only since performance isn't a priority when debugging.

jimcbrown said...

But it's not complete - what seems to be missing is the ability to set a value through the API, right now it only offers a read-only view.

I'm not sure we should want to set a value this way. I guess I don't see a problem using it as a more direct pass-by-reference feature (instead of eumem) but I'm worried one could clobber the wrong data and bring the whole thing crashing down. Hopefully we can agree that doing any modification to the symbol table itself is a bad idea. The symbol table should be static at runtime. There may come a time when we can manipulate the symbol table as we like but today is not that day.


new topic     » goto parent     » topic index » view thread      » older message » newer message


Quick Links

User menu

Not signed in.

Misc Menu