I'm trying to debug the following program:
I set a breakpoint in strcpy, but I can't reach it. Why?
Thanks for the help!
Code:
#include <stdio.h>
#include <string.h>
int main() {
char str_a[20];
strcpy(str_a, "Hello World!\n");
printf(str_a);
}
I set a breakpoint in strcpy, but I can't reach it. Why?
Code:
ishayahu@zabbix-agent-9:~ % gdb -q ca2
(gdb) break strcpy
Function "strcpy" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (strcpy) pending.
(gdb) r
Starting program: /usr/home/ishayahu/ca2
Breakpoint 2 at 0x28168800
Pending breakpoint "strcpy" resolved
Hello World!
Program exited with code 015.
(gdb)
Thanks for the help!
Last edited by a moderator: