curl-library
Re: Problem with PROGRESSFUNCTION
Date: Sun, 10 Mar 2002 10:13:02 +0000
kapheine_at_hypa.net wrote:
> I've only used the very basic functions of gdb so if you could tell me how
> to set a breakpoint for a library that is linked to, that'd be helpful. I
> tried just putting an fprintf(stderr, ...) inside of the function at line
> 300, and nothing was printed, but I'd be happy to do better tests and try
> to trace where the problem is if you could help me with how to do the
> breakpoints. Thanks for your help.
If the library is statically linked (.a) you simply set the breakpoint
(gdb) break progress.c:300
(gdb) run
If the library is dynamically linked (.so), it must be loaded before
you can set the breakpoint. You can do this by something like this
(disclaimer: off the top of my head)
(gdb) set env LD_BIND_NOW 1
(gdb) tbreak main
(gdb) commands 1
> break progress.c:300
> continue
> end
(gdb) run
If the above does not show anything, you could set a breakpoint in
Curl_pgrsUpdate and single-step through this function, to see if it
calls the data->set.fprogress callback function.
(gdb) break Curl_pgrsUpdate
(gdb) run
(gdb) next
Received on 2002-03-10