diff -r 2c34ab15e3eb -r 7c5a877b0f8e src/Pure/Tools/debugger.scala --- a/src/Pure/Tools/debugger.scala Mon Aug 24 11:45:26 2015 +0200 +++ b/src/Pure/Tools/debugger.scala Mon Aug 24 19:49:17 2015 +0200 @@ -7,6 +7,9 @@ package isabelle +import scala.collection.immutable.SortedMap + + object Debugger { /* context */ @@ -46,12 +49,14 @@ /* global state */ + type Threads = SortedMap[String, List[Debug_State]] + sealed case class State( session: Session = new Session(Resources.empty), // implicit session active: Int = 0, // active views break: Boolean = false, // break at next possible breakpoint active_breakpoints: Set[Long] = Set.empty, // explicit breakpoint state - threads: Map[String, List[Debug_State]] = Map.empty, // thread name ~> stack of debug states + threads: Threads = SortedMap.empty, // thread name ~> stack of debug states focus: Map[String, Context] = Map.empty, // thread name ~> focus output: Map[String, Command.Results] = Map.empty) // thread name ~> output messages { @@ -222,7 +227,7 @@ }) } - def threads(): Map[String, List[Debug_State]] = global_state.value.threads + def threads(): Threads = global_state.value.threads def focus(): List[Context] = global_state.value.focus.toList.map(_._2) def set_focus(c: Context)