How do I debug a Arduino Uno with gdb on a Linux pc?
You can find the compiler artifacts by holding down the shift key when clicking the compile button in older version of the IDE (read &lt; 1.0). In newer versions (read >= 1.0) there's an option under the preferences dialog for displaying verbose output during compilation (see screenshot). With verbose output the folder where all the compiler outputs end up is printed (repeatedly) in the console. That should get you started at least. 



On a side note, there was all sorts of chatter on this subject on Arduino developers list earlier in June 2012 and somebody posted an announcement to the Arduino developers list on an improved / integrated way of GDB debugging for Arduino, but I haven't investigated it much further. I guess the project is called VisualMicro (?). It looks like it's been built as a Visual Studio plugin so might not be helpful to you in a linux environment, and it's in beta on top of that, but I'll let you decide.