I've seen a similar thread here on stackoverflow
By the moment the accepted answer does not solve my problem.
What I do is to set a breakpoint at the main-function
(gdb) break main
Breakpoint 1 at 0x6fe
(gdb) run
Starting program: /home/bjorn/printprog
Breakpoint 1, 0x00005555555546fe in main ()
(gdb)
so far so god but when I start stepping I get the following:
(gdb) s
Single stepping until exit from function main,
which has no line number information.
hell world!!!!
Number of characters in the string are 14
__libc_start_main (main=0x5555555546fa <main>, argc=1, argv=0x7fffffffdef8, init=<optimized
out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffdee8) at ../csu/libc-start.c:344
344 ../csu/libc-start.c: Filen eller katalogen finns inte.
"Filen eller katalogen finns inte." means "the file or catalog does not exist"
What could the problem be?
Something seems to be missing, is that the cause - start.c, do I need that file?
that versions differ between gcc and gdb?
GDB
GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
GCC
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
- or could it be that my makefile is wrong or missing something?
makefile
CC=gcc
CFLAGS=-I.
printprog: main.o print.o
$(CC) -g -o printprog main.o print.o -I.