Hi, I'm not really an expert in gdb (and comint-mode) but it seems that 'M-x gdb' does not save its history. Here is a patch that fix this.