diff --git a/gdbsupport/print-utils.cc b/gdbsupport/print-utils.cc index da47d1b45b5..d5a91ba0f83 100644 --- a/gdbsupport/print-utils.cc +++ b/gdbsupport/print-utils.cc @@ -28,8 +28,8 @@ char * get_print_cell (void) { - static char buf[NUMCELLS][PRINT_CELL_SIZE]; - static int cell = 0; + static thread_local char buf[NUMCELLS][PRINT_CELL_SIZE]; + static thread_local int cell = 0; if (++cell >= NUMCELLS) cell = 0;