Place mushrooms in an oven-proof pan and toss with onion, garlic, thyme, rosemary and olive oil. Add sherry wine and beef stock and season with salt and pepper. Cover and bake in the oven for 30 to 40 minutes at 325 degrees or until mushrooms are tender.