Skip to content

Commit

Permalink
[RM] fixup gdb-pretty-print
Browse files Browse the repository at this point in the history
  • Loading branch information
fknorr committed Sep 15, 2023
1 parent 5885f39 commit a6c7260
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
2 changes: 1 addition & 1 deletion test/debug/pretty-print-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import subprocess
import sys

EXPECTED = b'''// tell GDB to break here so we can examine locals
EXPECTED = b'''__builtin_trap();
tid = 10
bid = 11
nid = 12
Expand Down
41 changes: 19 additions & 22 deletions test/debug/pretty_printables.cc
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
#include <csignal>
#include <iostream>
#include <string>

#include <celerity.h>
#include <region_map.h>

int main() {
celerity::detail::task_id tid = 10;
celerity::detail::buffer_id bid = 11;
celerity::detail::node_id nid = 12;
celerity::detail::command_id cid = 13;
celerity::detail::collective_group_id cgid = 14;
celerity::detail::reduction_id rid = 15;
celerity::detail::host_object_id hoid = 16;
celerity::detail::hydration_id hyid = 17;
celerity::detail::transfer_id trid = 18;
[[maybe_unused]] celerity::detail::task_id tid = 10;
[[maybe_unused]] celerity::detail::buffer_id bid = 11;
[[maybe_unused]] celerity::detail::node_id nid = 12;
[[maybe_unused]] celerity::detail::command_id cid = 13;
[[maybe_unused]] celerity::detail::collective_group_id cgid = 14;
[[maybe_unused]] celerity::detail::reduction_id rid = 15;
[[maybe_unused]] celerity::detail::host_object_id hoid = 16;
[[maybe_unused]] celerity::detail::hydration_id hyid = 17;
[[maybe_unused]] celerity::detail::transfer_id trid = 18;

celerity::id<3> id(1, 2, 3);
celerity::range<3> range(1, 2, 3);
celerity::subrange<3> subrange(celerity::id(1, 2, 3), celerity::range(4, 5, 6));
celerity::chunk<3> chunk(celerity::id(1, 2, 3), celerity::range(4, 5, 6), celerity::range(7, 8, 9));
celerity::nd_range<3> nd_range(celerity::range(2, 4, 6), celerity::range(1, 2, 3), celerity::id(7, 8, 9));
celerity::detail::box<3> box(celerity::id(1, 2, 3), celerity::id(4, 5, 6));
celerity::detail::region<3> region({
[[maybe_unused]] celerity::id<3> id(1, 2, 3);
[[maybe_unused]] celerity::range<3> range(1, 2, 3);
[[maybe_unused]] celerity::subrange<3> subrange(celerity::id(1, 2, 3), celerity::range(4, 5, 6));
[[maybe_unused]] celerity::chunk<3> chunk(celerity::id(1, 2, 3), celerity::range(4, 5, 6), celerity::range(7, 8, 9));
[[maybe_unused]] celerity::nd_range<3> nd_range(celerity::range(2, 4, 6), celerity::range(1, 2, 3), celerity::id(7, 8, 9));
[[maybe_unused]] celerity::detail::box<3> box(celerity::id(1, 2, 3), celerity::id(4, 5, 6));
[[maybe_unused]] celerity::detail::region<3> region({
celerity::detail::box(celerity::id(1, 2, 3), celerity::id(4, 5, 6)),
celerity::detail::box(celerity::id(11, 2, 3), celerity::id(14, 5, 6)),
celerity::detail::box(celerity::id(21, 2, 3), celerity::id(24, 5, 6)),
});

celerity::detail::region_map<int> region_map(celerity::range<3>(10, 10, 10), 3);
[[maybe_unused]] celerity::detail::region_map<int> region_map(celerity::range<3>(10, 10, 10), 3);
region_map.update_region(celerity::detail::box<3>({1, 1, 1}, {5, 5, 5}), 42);
region_map.update_region(celerity::detail::box<3>({1, 1, 1}, {3, 3, 3}), 69);
region_map.update_region(celerity::detail::box<3>({1, 1, 1}, {2, 2, 2}), 1337);

__builtin_trap(); // tell GDB to break here so we can examine locals
// tell GDB to break here so we can examine locals
__builtin_trap();
}

0 comments on commit a6c7260

Please sign in to comment.