Heat a heavy saucepan over moderate heat with the butter and oil. When the butter has melted, stir in the onions, cover, and cook slowly until tender and translucent, about 10 minutes. Blend in the salt and sugar, increase the heat to medium high, and let the onions brown, stirring frequently until they are a dark walnut color, 25 to 30 minutes.
Sprinkle the flour and cook slowly, stirring, for another 3 to 4 minutes. Remove from heat, let cool a moment, then whisk in 2 cups of hot stock. When well blended, bring to the simmer, adding the rest of the stock, Cognac, and wine. Cover loosely, and simmer very slowly 1 1/2 hours, adding a little water if the liquid reduces too much. Taste for seasoning
Divide the soup among 4 ovenproof bowls. Arrange toast on top of soup and sprinkle generously with grated cheese. Place bowls on a cookie sheet and place under a preheated broiler until cheese melts and forms a crust over the tops of the bowls. Serve immediately.
Recipe adapted from Julia Child, "The Way to Cook"