Take a look at this thread: http://www.usingenglish.com/forum/as...35985-hit.html
"He was shot by a pistol" is not an ungrammatical sentence, but it's strange. We don't usually think of a pistol as the agent of shooting. We consider it a tool. You're right that the sentence would mean exactly the same as, "A pistol shot him." We wouldn't say this one either.
Yes, "by" can introduce a method, as in, "He was killed by hanging." But a pistol is not a method--it's a tool!
Student or Learner