parameters: (self, target, buffers)
docstring: Decorates buffer with signs corresponding to breakpoints in target.
docstring_summary: Decorates buffer with signs corresponding to breakpoints in target.
docstring_tokens: Decorates buffer with signs corresponding to breakpoints in target .
function: def update_breakpoints(self, target, buffers):
          """ Decorates buffer with signs corresponding to breakpoints in target. """
  
          def GetBreakpointLocations(bp):
              """ Returns a list of tuples (resolved, filename, line) where a breakpoint was resolved. """
              if not bp.IsValid():
                  sys.stderr.write("breakpoint is invalid, no locations")
                  return []
  
              ret = []
              numLocs = bp.GetNumLocations()
              for i in range(numLocs):
                  loc = bp.GetLocationAtIndex(i)
                  desc = get_description(loc, lldb.eDescriptionLevelFull)
                  match = re.search('at\ ([^:]+):([\d]+)', desc)
                  try:
                      lineNum = int(match.group(2).strip())
                      ret.append((loc.IsResolved(), match.group(1), lineNum))
                  except ValueError as e:
                      sys.stderr.write(
                          "unable to parse breakpoint location line number: '%s'" %
                          match.group(2))
                      sys.stderr.write(str(e))
  
              return ret
  
          if target is None or not target.IsValid():
              return
  
          needed_bps = {}
          for bp_index in range(target.GetNumBreakpoints()):
              bp = target.GetBreakpointAtIndex(bp_index)
              locations = GetBreakpointLocations(bp)
              for (is_resolved, file, line) in GetBreakpointLocations(bp):
                  for buf in buffers:
                      if file in buf.name:
                          needed_bps[(buf, line, is_resolved)] = bp
  
          # Hide any signs that correspond with disabled breakpoints
          del_list = []
          for (b, l, r) in self.breakpointSigns:
              if (b, l, r) not in needed_bps:
                  self.breakpointSigns[(b, l, r)].hide()
                  del_list.append((b, l, r))
          for d in del_list:
              del self.breakpointSigns[d]
  
          # Show any signs for new breakpoints
          for (b, l, r) in needed_bps:
              bp = needed_bps[(b, l, r)]
              if self.haveBreakpoint(b.name, l):
                  self.markedBreakpoints[(b.name, l)].append(bp)
              else:
                  self.markedBreakpoints[(b.name, l)] = [bp]
  
              if (b, l, r) not in self.breakpointSigns:
                  s = BreakpointSign(b, l, r)
                  self.breakpointSigns[(b, l, r)] = s
function_tokens: def update_breakpoints ( self , target , buffers ) : def GetBreakpointLocations ( bp ) : """ Returns a list of tuples (resolved, filename, line) where a breakpoint was resolved. """ if not bp . IsValid ( ) : sys . stderr . write ( "breakpoint is invalid, no locations" ) return [ ] ret = [ ] numLocs = bp . GetNumLocations ( ) for i in range ( numLocs ) : loc = bp . GetLocationAtIndex ( i ) desc = get_description ( loc , lldb . eDescriptionLevelFull ) match = re . search ( 'at\ ([^:]+):([\d]+)' , desc ) try : lineNum = int ( match . group ( 2 ) . strip ( ) ) ret . append ( ( loc . IsResolved ( ) , match . group ( 1 ) , lineNum ) ) except ValueError as e : sys . stderr . write ( "unable to parse breakpoint location line number: '%s'" % match . group ( 2 ) ) sys . stderr . write ( str ( e ) ) return ret if target is None or not target . IsValid ( ) : return needed_bps = { } for bp_index in range ( target . GetNumBreakpoints ( ) ) : bp = target . GetBreakpointAtIndex ( bp_index ) locations = GetBreakpointLocations ( bp ) for ( is_resolved , file , line ) in GetBreakpointLocations ( bp ) : for buf in buffers : if file in buf . name : needed_bps [ ( buf , line , is_resolved ) ] = bp # Hide any signs that correspond with disabled breakpoints del_list = [ ] for ( b , l , r ) in self . breakpointSigns : if ( b , l , r ) not in needed_bps : self . breakpointSigns [ ( b , l , r ) ] . hide ( ) del_list . append ( ( b , l , r ) ) for d in del_list : del self . breakpointSigns [ d ] # Show any signs for new breakpoints for ( b , l , r ) in needed_bps : bp = needed_bps [ ( b , l , r ) ] if self . haveBreakpoint ( b . name , l ) : self . markedBreakpoints [ ( b . name , l ) ] . append ( bp ) else : self . markedBreakpoints [ ( b . name , l ) ] = [ bp ] if ( b , l , r ) not in self . breakpointSigns : s = BreakpointSign ( b , l , r ) self . breakpointSigns [ ( b , l , r ) ] = s