For running python in GdbMode you need to set the pdb-path variable in .emacs or wherever.
The advice defaults to the current buffer name when invoking M-x pdb, and comes from here:
The rest worked automagically in 22.2.1
;;pdb setup, note the python version (setq pdb-path '/usr/lib/python2.5/pdb.py gud-pdb-command-name (symbol-name pdb-path)) (defadvice pdb (before gud-query-cmdline activate) "Provide a better default command line when called interactively." (interactive (list (gud-query-cmdline pdb-path (file-name-nondirectory buffer-file-name)))))