In a large skillet, heat butter over medium heat. Add onion and cook until translucent. Stir in garlic and rosemary, then add mushrooms. Cook until mushrooms start to release their juices, then add chicken stock. Season to taste and simmer briskly for about 10 minutes. Remove from heat and keep warm.