Update README.md
This commit is contained in:
parent
a6f716c8a2
commit
386a4320bf
1 changed files with 21 additions and 0 deletions
21
README.md
21
README.md
|
@ -26,6 +26,27 @@ If a release build is desired, use `cmake -S <project_dir> -B buildRelease
|
|||
Note that some memory will always be shown as having been not `free`ed (e.g.
|
||||
initializing heap stuff for the program at start).
|
||||
|
||||
## With gdb
|
||||
|
||||
1. Start the debugger
|
||||
|
||||
gdb ./my_program
|
||||
|
||||
2. Set the env variable to use AnotherMemCheck.
|
||||
|
||||
set environment LD_PRELOAD ./path/to/libAnotherMemCheck.so
|
||||
|
||||
3. Set debug breakpoints if you want to step through things
|
||||
|
||||
b my_source_file.c:123
|
||||
|
||||
4. Run it
|
||||
|
||||
r --my-arg-one --my-arg-two
|
||||
|
||||
AnotherMemCheck should output when memory is handled as the debugger runs, even
|
||||
when stepping through from breakpoints.
|
||||
|
||||
## Other Notes
|
||||
|
||||
As mentioned earlier, there probably is memory that is always allocated at the
|
||||
|
|
Loading…
Reference in a new issue