12345678910111213
// Author: QianChenglong <qian_cheng_long@163.com>// Create: 2016-09-01 17:51:59#include <iostream>#define STR "Hello world!\n"int main(int argc, char* argv[]){ std::cout << STR; return 0;}
1234567891011121314151617
gcc main.cpp -ggdb3gdb a.out(gdb) list1 // Author: QianChenglong <qian_cheng_long@163.com>2 // Create: 2016-09-01 17:51:593 4 #include <iostream>5 6 #define STR "Hello world!\n"7 8 int main(int argc, char* argv[])9 {10 std::cout << STR;(gdb) print STR$1 = "Hello world!\n"(gdb) macro expand STRexpands to: "Hello world!\n"