News for hackers. Stuff that matters.
Re:Inspector – A drop-anywhere C++ REPL by Asooka on Monday February 12, 2018 @05:44PM (#16363082)
1. GDB can instantiate classes, but it's a bit wonky, I agree. You have to evaluate malloc manually and then cast the pointer to the right type and call the constructor. You can write python scripts to automate this.

2. That's good.

3. You can generally compile with -Og -g for faster execution while preserving enough of the program's structure to make sense of what's happening.

I can see how it can be useful though. Do you have to prebuild every cpp file, or just the one you put "#include INSPECTOR" in? Can you include inspector in more than one file?

Re:Inspector – A drop-anywhere C++ REPL by Mic92 on Tuesday February 13, 2018 @02:46AM (#16365434)
You only need to prebuild files, where the include statement is included. Ideally this task would be also automatically done in future by sneaking into the build system.