This means David prayed to Yahweh for an answer about the famine.
Saul had killed many Gibeonites, and Saul's descendants are guilty because of this sin.