aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-02-23 18:24:15 +0100
committerSverker Eriksson <[email protected]>2017-03-22 15:27:17 +0100
commitb9388df82dd1149fd603371c6ee12f5d7dbcec30 (patch)
tree6e241d7974a445bb0d847bad15d70543c60ee4de /erts/emulator/beam
parentb174a38c5f09859d3714fe5a81773aa5f2d19417 (diff)
downloadotp-b9388df82dd1149fd603371c6ee12f5d7dbcec30.tar.gz
otp-b9388df82dd1149fd603371c6ee12f5d7dbcec30.tar.bz2
otp-b9388df82dd1149fd603371c6ee12f5d7dbcec30.zip
erts: Print table id as ref in crashdump and break menu
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_db.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_db.c b/erts/emulator/beam/erl_db.c
index 24de21cc24..7faec9a057 100644
--- a/erts/emulator/beam/erl_db.c
+++ b/erts/emulator/beam/erl_db.c
@@ -4261,7 +4261,19 @@ static Eterm table_info(Process* p, DbTable* tb, Eterm What)
static void print_table(fmtfn_t to, void *to_arg, int show, DbTable* tb)
{
- erts_print(to, to_arg, "Table: %T\n", tb->common.id);
+ Eterm tid;
+ Eterm heap[ERTS_MAGIC_REF_THING_SIZE];
+
+ if (is_atom(tb->common.id)) {
+ tid = tb->common.id;
+ } else {
+ ErlOffHeap oh;
+ ERTS_INIT_OFF_HEAP(&oh);
+ write_magic_ref_thing(heap, &oh, (ErtsMagicBinary *) tb->common.btid);
+ tid = make_internal_ref(heap);
+ }
+
+ erts_print(to, to_arg, "Table: %T\n", tid);
erts_print(to, to_arg, "Name: %T\n", tb->common.the_name);
tb->common.meth->db_print(to, to_arg, show, tb);