diff options
author | Sverker Eriksson <[email protected]> | 2011-11-30 16:51:44 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2012-02-09 17:07:02 +0100 |
commit | 49c136df375a5c9a831f044eb2e3fb3352429cee (patch) | |
tree | 13ce2dccc56eb690bed8de94dcf1ec7361f64d63 /erts | |
parent | 0b45f106f19756bcef0ee51a8f5d4147dc253bcb (diff) | |
download | otp-49c136df375a5c9a831f044eb2e3fb3352429cee.tar.gz otp-49c136df375a5c9a831f044eb2e3fb3352429cee.tar.bz2 otp-49c136df375a5c9a831f044eb2e3fb3352429cee.zip |
erts: Make erts_printf accept internal match states
This is useful during debugging to prevent erts_printf from crashing
when passed a match state term.
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/erl_printf_term.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_printf_term.c b/erts/emulator/beam/erl_printf_term.c index 34da9cab84..2320b64295 100644 --- a/erts/emulator/beam/erl_printf_term.c +++ b/erts/emulator/beam/erl_printf_term.c @@ -437,7 +437,10 @@ print_term(fmtfn_t fn, void* arg, Eterm obj, long *dcount, } break; case BINARY_DEF: - { + if (header_is_bin_matchstate(*boxed_val(wobj))) { + PRINT_STRING(res, fn, arg, "#MatchState"); + } + else { ProcBin* pb = (ProcBin *) binary_val(wobj); if (pb->size == 1) PRINT_STRING(res, fn, arg, "<<1 byte>>"); |