2 Samuel 16:10-13

2 Samuel 16:10-13

[10] And the king  said,  What have I to do with you, ye sons  of Zeruiah?  so let him curse,  because the LORD  hath said  unto him, Curse  David.  Who shall then say,  Wherefore hast thou done so?  [11] And David  said  to Abishai,  and to all his servants,  Behold, my son,  which came forth  of my bowels,  seeketh  my life:  how much more now may this Benjamite  do it? let him alone,  and let him curse;  for the LORD  hath bidden  him. [12] It may be that the LORD  will look  and that the LORD  will requite  me good  for his cursing  this day.  [13] And as David  by the way,  Shimei  went along  on the hill's  side  over against  him, and cursed  as he went,  and threw  stones  at  him, and cast  dust. 

What is the context of 2 Samuel 16:10-13?