[rtems-tools commit] rtems-tld: Add configuration support for libc head tracing.
Chris Johns
chrisj at rtems.org
Thu Dec 18 04:09:44 UTC 2014
Module: rtems-tools
Branch: master
Commit: 7fc1edba20d5f54c9517071a2b999c492a69ee83
Changeset: http://git.rtems.org/rtems-tools/commit/?id=7fc1edba20d5f54c9517071a2b999c492a69ee83
Author: Chris Johns <chrisj at rtems.org>
Date: Thu Dec 18 15:07:59 2014 +1100
rtems-tld: Add configuration support for libc head tracing.
These files allow you to trace malloc, calloc, realloc and free.
With a simple script you can see what is allocated and never freed.
---
linkers/libc-heap.ini | 25 +++++++++++++++++++++++++
linkers/libc.ini | 17 +++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/linkers/libc-heap.ini b/linkers/libc-heap.ini
new file mode 100755
index 0000000..bb7589a
--- /dev/null
+++ b/linkers/libc-heap.ini
@@ -0,0 +1,25 @@
+;
+; RTEMS C Library Trace Configurations
+;
+[libc-heap]
+headers = libc-heap-headers
+defines = libc-heap-defines
+signatures = libc-heap-signatures
+
+[libc-heap-all]
+trace = malloc
+trace = calloc
+trace = realloc
+trace = free
+
+[libc-heap-headers]
+header = "#include <stdlib.h>"
+
+[libc-heap-defines]
+; Currently empty
+
+[libc-heap-signatures]
+malloc = void*, size_t
+calloc = void*, size_t, size_t
+realloc = void*, void*, size_t
+free = void, void*
diff --git a/linkers/libc.ini b/linkers/libc.ini
new file mode 100755
index 0000000..012f82e
--- /dev/null
+++ b/linkers/libc.ini
@@ -0,0 +1,17 @@
+;
+; RTEMS C Library Trace Configurations
+;
+[libc]
+headers = libc-headers
+defines = libc-defines
+; Heap
+include = libc-heap.ini
+signatures = libc-heap-signatures
+
+[libc-headers]
+header = "#include <stddef.h>"
+header = "#include <stdlib.h>"
+header = "#include <stdio.h>"
+
+[libc-defines]
+; Currently empty
More information about the vc
mailing list