Here "David" is a synecdoche for himself and his soldiers. Alternate translation: "David and his soldiers killed" (See: [[rc://en/ta/man/jit/figs-synecdoche]])
This can be stated in active form. Alternate translation: "The Israelites wounded Shobak the commander of the Aramean army, and he died there" (See: [[rc://en/ta/man/jit/figs-activepassive]])