Author Topic: debugger is not passing fully qualified filepath to gdb  (Read 1939 times)

jvert

  • Community Member
  • Posts: 30
  • Hero Points: 2
debugger is not passing fully qualified filepath to gdb
« on: October 23, 2014, 07:04:29 pm »
v19.0.0.9 64-bit, Ubuntu 14.04 x64

I am using debug-executable to debug my app. I pass it a fully-qualifed executable name and working dir (Executable=/data/steamlinux/client/ubuntu12_32/steam, Working dir=/data/steamlinux/client/ubuntu12_32). Somewhere along the way, the path gets dropped and VS tells gdb to debug "steam" which ends up trying to debug /usr/bin/steam and failing.

Attached is the debug log generated from set_var def_debug_logging 1

Also for some reason I get a 30-second hang anytime I try to start a debug session. I used to see that with the older version as well, but the path problem is new to v19.

jvert

  • Community Member
  • Posts: 30
  • Hero Points: 2
Re: debugger is not passing fully qualified filepath to gdb
« Reply #1 on: October 23, 2014, 09:41:17 pm »
Fixed my own problem. debug.e:debug_executable() turns the supplied program name into a relative name unless you're using windbg.

Code: [Select]
   if (use_relative_name) {
      program_name = relative(strip(program_name));
   }

I'm not sure why the code is there but removing it fixes things.

I tracked my 30 second hang down to loop_until_on_last_process_buffer_command() which always hangs for 30 seconds when called by debug_pkg_initialize().

Done debugging the debugger now, on to my own problems!
    -John

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2860
  • Hero Points: 434
Re: debugger is not passing fully qualified filepath to gdb
« Reply #2 on: October 24, 2014, 03:35:26 pm »
We send relative paths because that was the only to make GDB (all past versions) reliably handle paths containing spaces.  debug-executable had a bug in how it constructed the relative path.  I believe that has been fixed for the next drop.