I've updated the version of the GCC that I'm using from 4.2.1 to 8.1.0. (This is the only thing that I've changed)
The problem is that after I did it the debug symbols were gone.
I'm running GDB only with "-g" option.
With gcc v8.1.0, there are no debug symbols when running gdb:
(gdb) br test
Breakpoint 1 at 0xa5fa053
(gdb) bt
0 0x09fa2303 in test_func()
1 0x097cecc7 in test_func_2 ()
2 0x097cf314 in test_func_3 ()
with v4.2.1 was like this:
(gdb) br test_func
Breakpoint 1 at 0xaa2fc7a: file /projects/gabriela/test/test.c, line 3
(gdb) r
Breakpoint 1, test_func(unit=0, flags=0, test1=0xffff95e0, test2=0xffff9b9c) at /projects/gabriela/test/test.c, line 3
(gdb) bt
0 test_func (unit=0, flags=0, test1=0xffff95e0, test2=0xffff9b9c) at /projects/gabriela/test/test.c, line 3
1 0x099ad349 in test_func_2 (unit=0, flags=0, test1=0x0, test2=0x0) at /projects/gabriela/test/test.c:10
2 0x099ada04 in test_func_3 (unit=0, flags=0, test1=0x0) at /projects/gabriela/test/test.c:20
How can I make the dbg symbols of gcc8.1.0 to be like gcc4.2.1?