gdbinit.rc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # This is a suggested ~/.gdbinit
  2. # originally from Ray Dassen for efence, now modified for duma.
  3. # it enables you to use DUMA from within gdb,
  4. # without using DUMA for gdb itself
  5. # without having to recompile or relink the binary.
  6. # See the gdb docs for more information.
  7. define duma
  8. set environment DUMA_ALLOW_MALLOC_0 1
  9. set environment LD_PRELOAD /usr/lib/libduma.so.0.0.0
  10. echo Enabled DUMA\n
  11. end
  12. document duma
  13. Enable memory allocation debugging through DUMA (duma(3)).
  14. See also noduma, underduma and overduma.
  15. end
  16. define noduma
  17. unset environment LD_PRELOAD
  18. echo Disabled DUMA\n
  19. end
  20. document noduma
  21. Disable memory allocation debugging through DUMA (duma(3)).
  22. end
  23. define overduma
  24. set environment DUMA_PROTECT_BELOW 0
  25. echo set DUMA to detect overflows\n
  26. end
  27. document overduma
  28. Set DUMA to detect buffer overflow errors (duma(3)).
  29. See also duma, noduma and underduma.
  30. end
  31. define underduma
  32. set environment DUMA_PROTECT_BELOW 1
  33. echo set DUMA to detect underflows\n
  34. end
  35. document underduma
  36. Set DUMA to detect buffer underflow errors (duma(3)).
  37. See also duma, noduma and overduma.
  38. end