break sur strcpy ne fonctionne pas
bonjour
je debute avec gdb et je ne trouve pas de doc maidant.
je veux juste faire un break sur la fonction strcpy
gdb previent que la lib n'est pas encore chargée et qu'il trouvera le break au chargement du programme:
gekos@gekos-desktop:~/Bureau$ gdb ./a
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
./a: No such file or directory.
(gdb) q
gekos@gekos-desktop:~/Bureau$ gdb -q a.out
(gdb) list
1 #include <stdio.h>
2 #include <string.h>
3
4 int main(){
5 char str_a[20];
6
7 strcpy(str_a, "Hello, world!\n");
8 printf(str_a);
9 }
10
(gdb) break strcpy
Function "strcpy" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (strcpy) pending.
(gdb) show breakpoint
auto-hw pending
(gdb) show breakpoint pending
Debugger's behavior regarding pending breakpoints is auto.
(gdb) run
Starting program: /home/gekos/Bureau/a.out
Hello, world!
Program exited with code 016.
(gdb)
mais aucun break ne se produit
jai fouillé des docs et forums mais a part utiliser les commandes changant breakpoints en auto et on , je n'ai rien trouve
en on ou auto , aucun break
si quelquin a une direction a me conseiller pr que je comprenne, merci d'avance.
Gekos ;)