module Byebug::ThreadFunctions

def thread_arguments(context, should_show_top_frame = true)

def thread_arguments(context, should_show_top_frame = true)
  status_flag = if context.suspended?
                  '$'
                else
                  context.thread == Thread.current ? '+' : ' '
                end
  debug_flag = context.ignored? ? '!' : ' '
  if should_show_top_frame
    if context == Byebug.current_context
      file_line = "#{@state.file}:#{@state.line}"
    else
      backtrace = context.thread.backtrace_locations
      if backtrace && backtrace[0]
        file_line = "#{backtrace[0].path}:#{backtrace[0].lineno}"
      end
    end
  end
  {
    status_flag: status_flag,
    debug_flag: debug_flag,
    id: context.thnum,
    thread: context.thread.inspect,
    file_line: file_line || ''
  }
end