Firstly, if the cryptography is compromised the least of my worries is remaining anonymous; you would have alot of other things to worry about.
Secondly, there is something called "stealth address" oh and of-course if that cryptography is broken well then sir you have more more to worry about than remaining anonymous.
Thirdly, see 1 and 2 and oh yeah why not send a note to Satoshi about it whilst you was as it about how dumb his idea was of creating a crypto currency.
That is a very common fallacy. Or maybe you just have nothing to hide?
When the cryptography securing on chain anonymity is broken, everything in there will be revealed. New algorithms will be implemented to secure everything else from future attacks like your coins so they can't be stolen, but what has been put into the chain will be there and can't be made anymore secure.
In order to "reveal everything" you would have to break both unlinkability and untracability. These come from two entirely different cryptographic methods (ring signatures based on EdDSA, and ECDH). If one or the other were broken there would be some degree of leakage but far from a total reveal.
In the event that one or the other were broken, it would be replaced, coins could be moved around some more and linkages to the past severed. Only a double-break would expose everything.
Furthermore there is always some degree of off-chain mixing that occurs naturally in an economy as coins move through merchants, exchanges, p2p casual transactions, gambling sites, lending, etc. much as happens naturally with cash. Are you aware that some (?) banks now record the serial numbers of cash going in and out for each customer using a scanner? Yet because cash moves around "off-chain" in the normal economy, cash transactions between private parties are still fairly private. Likewise even total exposure of the blockchain would still leave a lot of questions unanswered. This is true of Bitcoin as well of course.