This would be a global issue, not just Bitcoin related
If someone discovered how to extract the private key from an arbitrary ECDSA public key in an economically viable timeframe, then there would be serious ramifications for many other economies that depend upon that branch of mathematics. For example, international banking, secure data transmission and many other users of cryptography would need to manage the change so it would not just lie on the Bitcoin community to save it.
That said, the response would depend on the nature of the attack. It may be that the attack could be easily mitigated by constantly changing private keys in which case a fairly minor update could be built into the various clients to support this.
If the problem was with the choice of cryptographic algorithm then work would have to take place to find an appropriate replacement that was not subject to the given attack vector, and then to apply that to protecting the integrity of the transactions taking place through the blockchain.
From a community point of view, there is already a process in place to manage these kinds of responses (see BIP) which has had several successful uses when critical bugs or attacks have been uncovered.