Drilling and thread cutting by same machine