The Mesmerist class ability "Painful Stare" reads as follows:
Painful Stare (Su)
When an attack that deals damage [my emphasis] hits the target of a mesmerist’s hypnotic stare, the mesmerist can cause the target to take an amount of additional damage equal to 1/2 the mesmerist’s class level (minimum 1).
The mesmerist can use this ability as a free action, and can use it even if it isn’t his turn. If the mesmerist uses this ability to increase his own damage, the additional damage increases by 1d6 points for every 3 class levels the mesmerist possesses. This damage is precision damage and is not multiplied on a critical hit. A mesmerist can trigger this ability only once per round, but a single creature can take damage from multiple mesmerists’ painful stares in a round.
My question pertains to the first sentence in the entry of this ability. Try as I might, I can't seem to find a specific definition in the Pathfinder core book for what exactly qualifies as "an attack".
Are all spells attacks? Or only the ones that require attack rolls? For that matter, are any spells attacks?
Please include specific sources (page number or link to an SRD, for example).