In a previous article, a parametric study of HBr/O2 and Cl2/O2 resist trimming processes correlated to x-ray photoelectron spectroscopy (XPS) analyses has been performed. The present article confirms the preliminary results obtained by XPS. Mass spectrometry experiments have established that the slow resist erosion rate measured in Cl2/O2 trim chemistries is attributed to a competitive etching of the resist by atomic chlorine and oxygen, while in HBr/O2 trim chemistries, atomic oxygen is the main etching species, bromine playing only a minor role. The etching of the resist by the oxygen species originating from the dissociation of HBr/O2 and Cl2/O2 plasmas generates the formation of volatile resist-etch-by-products such as CO and CO2, while the etching of the resist by halogen (bromine or chlorine) generates less volatile and heavier resist-etch-by-products such as CxHyBrz with bromine and CxHyClz with chlorine. Mass spectrometry has also shown that plasma conditions leading to a higher concentration of halogen-resist-etch-by-products in the plasma gas phase are also the conditions inducing the lower trim rates. This confirms the assumption that the deposition of heavy resist-etch-by-products on the resist sidewalls controls the trim rates.