diff options
author | Sverker Eriksson <sverker@erlang.org> | 2014-10-29 17:26:48 +0100 |
---|---|---|
committer | Sverker Eriksson <sverker@erlang.org> | 2014-10-29 17:26:48 +0100 |
commit | 64a895f520f85545d931db45106ce220ea348e38 (patch) | |
tree | b23b5c70d91ca2a49ebc6d244c2823b124dab017 | |
parent | ff7739cfae9c2b0915842572284a702d52b2d8db (diff) | |
parent | 3193ae58b922c46b7e81df9e183eb5882e3fd823 (diff) | |
download | otp-64a895f520f85545d931db45106ce220ea348e38.tar.gz otp-64a895f520f85545d931db45106ce220ea348e38.tar.bz2 otp-64a895f520f85545d931db45106ce220ea348e38.zip |
Merge branch 'sverk/etp-check-beam-ranges' into maint
* sverk/etp-check-beam-ranges:
erts: Add gdb command etp-check-beam-ranges
-rw-r--r-- | erts/etc/unix/etp-commands.in | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/erts/etc/unix/etp-commands.in b/erts/etc/unix/etp-commands.in index e22771c582..0190ea613e 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. # |