remote process debugging incompatible with gdb 7.4


I have a fairly unique problem where I am developing on a system that is constrained to Ubuntu 12.04.  I installed Pycharm 2016 just fine and it appears as though this is a supported architecture for it, but when I attempt to attach to a local process I get the error "stderr: gdb: unrecognized option '--nh'"  Looking into this I see that the --nh flag (indicating 'Do not execute commands found in ~/.gdbinit, the init file in your home directory') is not available in gdb 7.4 yet 7.7 is not available to Ubuntu 12.04.  Looking around online I cannot find an alternate ppa for a version of 7.7 that is supported on 12.04 nor was I able to compile this from 7.7 source on my system (granted this sort of thing is definitely not my forte).

Searching these forums and the bugtracker it does not appear that anyone else has run into this.  Does anyone have any suggestions as to what I might be able to do?  upgrading to 14.04 (and thus gdb 7.7) does not seem to be an option at this juncture... is there any way to simply modify the flags being passed to the debugger?

Comment actions Permalink

Hi Kyle! You can go to your PyCharm installation and after that find file <PyCharm folder>/helpers/pydev/pydevd_attach_to_process/ and change flags passed to gdb (it's near the line 429). Does it help? 

Comment actions Permalink

that solved my situation. Thx :)


Please sign in to leave a comment.