2 Samuel 16:10-13

ISV(i) 10 But the king responded, “What do I have in common with you sons of Zeruiah? If he continues to curse—and if the LORD has told him, ‘Curse David!’—then who are you to be demanding to know ‘Why have you done this?’”
11 So David ordered Abishai and all of his staff: “Look! My own son wants to kill me! How much more now is this descendant of Benjamin? Leave him alone and let him go on cursing, because the LORD has ordered him to do this. 12 Perhaps the LORD will take note of my troubles and return good to me instead of curses today!”
13 So David and his entourage went on their way, and Shimei walked along the hillside with him, cursing, throwing rocks, and tossing dirt at David as they went along.