GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  LMDBG-LEAKS (1)

NAME

lmdbg-leaks - extracts memory leaks from lmdbg-run’s output

CONTENTS

Synopsis
Description
Options
Example
Example
See Also
Author

SYNOPSIS

lmdbg-leaks [OPTIONS] [files...]

DESCRIPTION

lmdbg-leaks analyses lmdbg-run’s output and outputs stacktraces with memory leaks.

OPTIONS

-h Display help message.
-V Display the lmdbg version.

EXAMPLE



$ cat test3.c
#include <stdlib.h>

int main () { void *p1 = NULL; void *p2 = NULL;

p1 = malloc (555); p2 = realloc (p2, 666); free (p1);

return 0; } $ cc -O0 -g -o test3 test3.c $ lmdbg-run -o log ./test3 $ cat log info section 0x0xbbace000 0x0xbbbc6000 /lib/libc.so.12.179 info section 0x0xbbbdd000 0x0xbbbe1000 /usr/pkg/lib/liblmdbg.so.0.0 info section 0x0xbbbee000 0x0xbbbfe000 /libexec/ld.elf_so info progname ./test3 malloc ( 555 ) --> 0xbb90a400 num: 1 0xbbbddb7a 0xbbbde53b 0x8048799 0x804866d 0x80486a8 realloc ( NULL , 666 ) --> 0xbb90a800 num: 2 0xbbbddb7a 0xbbbde68c 0x80487b1 0x804866d 0x80486a8 free ( 0xbb90a400 ) num: 3 0xbbbddb7a 0xbbbde785 0x80487c1 0x804866d 0x80486a8 $ lmdbg-leaks log info section 0x0xbbace000 0x0xbbbc6000 /lib/libc.so.12.179 info section 0x0xbbbdd000 0x0xbbbe1000 /usr/pkg/lib/liblmdbg.so.0.0 info section 0x0xbbbee000 0x0xbbbfe000 /libexec/ld.elf_so info progname ./test3 realloc ( NULL , 666 ) --> 0xbb90a800 num: 2 0xbbbddb7a 0xbbbde68c 0x80487b1 0x804866d 0x80486a8 $

EXAMPLE



lmdbg-run -o log ./my_app &&
  lmdbg-leaks log > log_leaks &&
  lmdbg-sym ./my_app log_leaks > log_leaks2 &&
  lmdbg-sysleaks -s log_leaks2 > log_final
lmdbg-run -p ’lmdbg-leaks | lmdbg-sym > log’ ./my_app <args>



SEE ALSO

lmdbg(1) , lmdbg-run(1) , lmdbg-sym(1) , lmdbg-stat(1) , lmdbg-sort(1) , lmdbg-grep(1) , lmdbg-head(1) , lmdbg-sysleaks(1) , lmdbg-strip(1) , lmdbg-modules(1)

AUTHOR

Aleksey Cheusov <vle@gmx.net>
Search for    or go to Top of page |  Section 1 |  Main Index


LMDBG-LEAKS (1) Nov 26, 2011

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.