Let A be a unital primitive C*-algebra. This paper studies the spectral theories of B-Weyl elements and B-Browder elements in A, including the spectral mapping theorem and a characterization of B-Weyl spectrum. In addition, we characterize the generalized Weyl's theorem and the generalized Browder's theorem for an element a is an element of A and f(a), where f is a complex-valued function analytic on a neighborhood of sigma(a). What's more, the perturbations of the generalized Weyl's theorem under the socle of A and quasinilpotent element are illustrated.