aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/unix/etp-commands.in
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-10-29 17:23:46 +0100
committerSverker Eriksson <[email protected]>2014-10-29 17:23:46 +0100
commit3193ae58b922c46b7e81df9e183eb5882e3fd823 (patch)
treeca9c49ef3978e93e37ce9e4658363a4156d7c985 /erts/etc/unix/etp-commands.in
parent743ed31108ee555db18d9833186865e85e34333e (diff)
downloadotp-3193ae58b922c46b7e81df9e183eb5882e3fd823.tar.gz
otp-3193ae58b922c46b7e81df9e183eb5882e3fd823.tar.bz2
otp-3193ae58b922c46b7e81df9e183eb5882e3fd823.zip
erts: Add gdb command etp-check-beam-ranges
Diffstat (limited to 'erts/etc/unix/etp-commands.in')
-rw-r--r--erts/etc/unix/etp-commands.in33
1 files changed, 33 insertions, 0 deletions
diff --git a/erts/etc/unix/etp-commands.in b/erts/etc/unix/etp-commands.in
index bf6eb00314..3972bf01ef 100644
--- a/erts/etc/unix/etp-commands.in
+++ b/erts/etc/unix/etp-commands.in
@@ -1130,6 +1130,39 @@ document etp-cp
%---------------------------------------------------------------------------
end
+define etp-check-beam-ranges
+ set $etp_ci = 0
+ while $etp_ci < 3
+ printf "Checking code index %i...\n", $etp_ci
+ set $etp_j = 0
+ while $etp_j < r[$etp_ci].n
+ set $etp_p = &r[$etp_ci].modules[$etp_j]
+ if $etp_j > 0 && $etp_p->start < (Range*)$etp_p[-1].end.counter
+ printf "r[%i].modules[%i]: ERROR start < previous\n", $etp_ci, $etp_j
+ end
+ if $etp_p->start > (Range*)$etp_p->end.counter
+ printf "r[%i].modules[%i]: ERROR start > end\n", $etp_ci, $etp_j
+ else
+ if $etp_p->start == (Range*)$etp_p->end.counter
+ printf "r[%i].modules[%i]: Purged\n", $etp_ci, $etp_j
+ end
+ end
+ set $etp_j = $etp_j + 1
+ end
+ set $etp_ci = $etp_ci + 1
+ end
+end
+
+document etp-check-beam-ranges
+%---------------------------------------------------------------------------
+% etp-check-beam-ranges
+%
+% Do consistency check of beam_ranges data structure
+% and print errors and empty slots from purged modules.
+%---------------------------------------------------------------------------
+end
+
+
############################################################################
# Commands for special term bunches.
#