Home  Easy-Code   Forum    Updater 


Not signed in (Sign In)
    • CommentAuthorbrother2
    • CommentTimeApr 2nd 2012
     
    Do the following steps to identify memoryleaks using librtc gdb
    1. execute the exe with LD_PRELOAD of librtc
    LD_PRELOAD=/opt/langtools/lib/hpux64/librtc.so <executable> <arguments>
    2. run gdb on the pid of the exe
    gdb –leaks pid
    3. length of the stack trace/ function trace is set using the following command.
    (gdb)set heap-check frame-count
    4. insert break point if required,
    (gdb)b funtion-name
    5. execute till breakpoint
    (gdb)run
    6. run the following command in gdb to list the leaks
    (gdb)info leaks