28 Commits

Author SHA1 Message Date
Tobias Frost
871a79f35b mremap handling in case of error and creating a duplicate mapping.
- mremap can fail, in this case the old mapping is retained.
- mremap, when oldsize is 0, a new mapping is created without freeing
the old one.

See mremap(2) for details.
2022-06-22 15:17:48 +02:00
Tobias Frost
f090e95e83 munmap can fail.
According to munmap(2), the call can fail, e.g if the adress given is
not at a page boundary.
2022-06-22 15:15:14 +02:00
Tobias Frost
61a32cf95e Consider page size in report_mmap / report_unmap.
mmaps are full of quirks ;-)

- mmap(2) will always allocate whole memory pages, even if the
  caller only reuqests a partial page.
  This is considered by calculating the "real" size of the mmap.

- munmap(2) also operates on pages, unmapping every page it "touches.",
  so the size parameter is adjusted if needed.
2022-06-22 15:13:56 +02:00
Stefani Seibold
87f73f3220 fixes 2018-04-16 09:10:19 +02:00
Stefani Seibold
a6c7ba8fcc code cleanup 2018-04-12 13:03:16 +02:00
Stefani Seibold
b58a41680a fix copyright 2018-04-12 11:11:58 +02:00
Stefani Seibold
e1e243e25a various bug fixes 2018-04-12 11:00:20 +02:00
Stefani Seibold
0155d789b4 bump to version 0.8
tons of fixes. On the way to a final release 1.0
2018-04-06 22:10:20 +02:00
Stefani Seibold
3b7a0d0552 clean up, option for invalid free releases 2016-05-24 10:01:41 +02:00
Stefani Seibold
cf997a7dc9 accurate single step, c++ 11 support, optimizations 2016-05-22 09:50:18 +02:00
Stefani Seibold
e50dccecb3 fix realloc 2016-05-19 18:12:09 +02:00
Stefani Seibold
3f7f77d105 fixes for prelink 2016-05-19 13:24:15 +02:00
Stefani Seibold
95b0d7b7b8 better kill behaviour 2015-11-27 11:27:21 +01:00
Stefani Seibold
3aed8a6e6b new version 0.5
performance improvements and optimizations
bug fixes
advanced monitoring
2015-11-22 10:24:06 +01:00
Stefani Seibold
ae85b3e514 rename tool in mtrace-ng and new long dump option
remame the toll in mtrace-ng
add new long dump optios, which shows also the libraries
minor fixes
2015-11-03 14:27:36 +01:00
Stefani Seibold
802a1a3b22 introduce new features
- disable hardware breakpoints
  useful for running mtrace inside a virtual machine
- sanity check
  check new/new[] against mismatch operation
  and all c allocation functions against c++ allocation functions and
  visa versa.
2015-10-28 07:57:53 +01:00
Stefani Seibold
589d790789 fix for 32 bit new methods
32 bit new methods have different symbols, due size_t is unsigned int
instead of unsigned long
2015-10-14 09:12:22 +02:00
Stefani Seibold
d517c6fceb Version 0.2
Lots of performance improvement
Better stack unwind
Bug fixes
2015-10-13 10:18:37 +02:00
Stefani Seibold
16a5aed0c8 fix file headers 2015-05-06 09:57:40 +02:00
Stefani Seibold
bd061133db revamp code, the way to the first stable release 0.2
reference counting for breakpoints and tasks
fix non interactive mode
eliminate dead code
new option --nocpp, useful when tracing c++ programs linked against
libstdc++
fix verbose mode
fix about exit and exit
2015-05-05 17:11:20 +02:00
Stefani Seibold
fbd3db7645 more generic c++ support 2015-05-04 12:45:59 +02:00
Stefani Seibold
68697f0d09 handle symbol aliases 2015-05-04 12:06:39 +02:00
Stefani Seibold
66c24caa72 Header cleanup 2015-05-04 11:46:29 +02:00
Stefani Seibold
e3652d8901 fix attach for 64 bit processes
init the backtrace for the cloned threads after the leader is
initialized
2015-04-29 15:58:53 +02:00
Stefani Seibold
201ac47155 trace cfree, vfree and mremap + code cleanuo
add aditinal functions for trace: cfree(), vfree() and mremap()
do some code cleanups
2015-04-29 10:17:07 +02:00
Stefani Seibold
0259e186ab the way to the first working release
improve hw bp support
add -k kill option
improve book keeping error handling
support for gperftools tcmalloc
aditional fallback backtracing
2015-04-28 13:17:17 +02:00
Stefani Seibold
92e40e9ec5 fixes 2015-04-26 16:08:45 +02:00
Stefani Seibold
0a26d61e70 initial commit
This is the first public release of the ptrace based mtrace utility, a dynamic
memory allocation debuger and analyzer.
2015-04-20 09:08:14 +02:00