Jump to content

gdb does not resolve bp. at strcpy()

- - - - -

  • Please log in to reply
2 replies to this topic

#1
azm

azm

    Newbie

  • Members
  • Pip
  • 2 posts
Hi. Im tryin to learn some debugging and asm.
I have problem when I set a breakpoint at strcpy().
gdb ask me if I want to set bp. after loading the library
but It does not resolve the breakpoint and skip func so I cant examine it.
Enough rant. Think the log is quite clear: #591381 - Pastie

first par is my problem and second is how it should looks.
So, where is my mistake? Do I miss some library?
I run last gcc from Debian repo.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,822 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Are you trying to view inside the strcpy function, or inside main at line 8?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
azm

azm

    Newbie

  • Members
  • Pip
  • 2 posts
Thanks for reply. I was tryin to view inside the function and already have solution.
When I compile it with just -g parameter the code is optimized so strcpy() is memcpy()
and printf is puts. C code - 31 lines - codepad -fno-builtin param is needed to examine strcpy function.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users