I have some trouble with gdb. This is my code in a single file named main.cpp
#include
void myfunc();
int main(){
char msg[] = \"Hello
Thank you for your answers. I found what is wrong. As jcm says my gcc is relatively new. I have update gdb to the last current version which is GNU gdb (GDB) 7.6. Now this works perfectly.
By the way, with the version g++ (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04) 4.6.4, gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04 works perfectly.
Thank you for all of you.