Why GDB jumps unpredictably between lines and prints variables as “”?

To debug optimized code, learn assembly/machine language. Use the GDB TUI mode. My copy of GDB enables it when I type the minus and Enter. Then type C-x 2 (that is hold down Control and press X, release both and then press 2). That will put it into split source and disassembly display. Then use … Read more

Profiling the C++ compilation process

For GCC there are debugging options to find how much time is spent within each of the phases of C++ compilation? -Q Makes the compiler print out each function name as it is compiled, and print some statistics about each pass when it finishes. -ftime-report Makes the compiler print some statistics about the time consumed … Read more

How to compile a .NET application to native code?

Microsoft has an article describing how you can Compile MSIL to Native Code You can use Ngen. The Native Image Generator (Ngen.exe) is a tool that improves the performance of managed applications. Ngen.exe creates native images, which are files containing compiled processor-specific machine code, and installs them into the native image cache on the local … Read more

Splitting a Clojure namespace over multiple files

Overview Certainly you can, in fact clojure.core namespace itself is split up this way and provides a good model which you can follow by looking in src/clj/clojure: core.clj core_deftype.clj core_print.clj core_proxy.clj ..etc.. All these files participate to build up the single clojure.core namespace. Primary File One of these is the primary file, named to match … Read more

How do I run Java .class files?

If your class does not have a package, you only need to set the classpath to find your compiled class: java -cp C:\Users\Matt\workspace\HelloWorld2\bin HelloWorld2 If your class has a package, then it needs to be in a directory corresponding to the package name, and the classpath must be set to the root of the directory … Read more

java compiled classes contain dollar signs

Inner classes, if any present in your class, will be compiled and the class file will be ClassName$InnerClassName. In case of Anonymous inner classes, it will appear as numbers. Size of the Class (Java Code) doesn’t lead to generation of multiple classes. E.g. given this piece of code: public class TestInnerOuterClass { class TestInnerChild{ } … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)