Freeze Your Pants.
I would put my pants in the freezer and try to crack off the gum. Or you can do the better safer method and take it to be professionally dry cleaned
Place Dawn liquid detergent directly on affected area. Wet a scrub brush and brush vertical, horizontal, diagonal up and diagonal down. Turn material over, repeat, then wash in machine use hot water...