Swift: print() vs println() vs NSLog()

A few differences: print vs println:The print function prints messages in the Xcode console when debugging apps.The println is a variation of this that was removed in Swift 2 and is not used any more. If you see old code that is using println, you can now safely replace it with print.Back in Swift 1.x, print did not add newline characters at the end of … Read more

GDB no such file or directory

I’m following these lessons from OpenSecurityTraining. I’ve reached the lab part where I’ve to train myself on a CMU Bomb. They provide a x86_64 compiled CMU Bomb that you can find here to train on : CMU Bomb x86-64 originally from a 32-bit bomb from CMU Labs for Computer Systems: A Programmer’s Perspective (CS:APP) 1st … Read more

gdb: No symbol “i” in current context

It has probably been optimised out of your compiled code as you only use feature_mask[i] within the loop. Did you specify an optimization level when you called your compiler? If you were using gcc, then just omit any -O options and try again.

In which cases does program exit with 0x40010004 code?

On the theoretical side it could be anything, since TerminateProcess has an exit code parameter. On the practical side, it’s most likely due to system shutdown. When Windows shuts down, it tries to exit running programs gracefully (more on that here). If they refuse to quit, they might be terminated by the system with the exit code 0x40010004. For … Read more