Author Topic: Debugger doesn't run on SAMBA share  (Read 290 times)

Offline Leyland

  • Single posting newcomer
  • *
  • Posts: 7
Debugger doesn't run on SAMBA share
« on: November 03, 2017, 07:11:43 pm »
Hi All,
I've searched the forum to see if anyone else has experienced this issue but have not found any posts so far.

Here's the problem:
When my project is saved on a SAMBA share the debugger won't work. The debugger runs but won't stop at the cursor nor any breakpoints. It simply run to the end and reports that it completed successfully. If the project is saved on the local file system, the debugger works as expected.

There are no spaces in the SAMBA share path nor in the project file names. The project runs and compiles perfectly but it just won't debug. Has anyone else experienced this issue. Should it be reported as a bug?

Here's my environment:
Centos 7
Code::Blocks 16.01
gdb

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1540
Re: Debugger doesn't run on SAMBA share
« Reply #1 on: November 03, 2017, 08:20:21 pm »
Does it work with only gdb on command line?

Offline Leyland

  • Single posting newcomer
  • *
  • Posts: 7
Re: Debugger doesn't run on SAMBA share
« Reply #2 on: November 03, 2017, 08:32:24 pm »
Yes it does

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10356
Re: Debugger doesn't run on SAMBA share
« Reply #3 on: November 03, 2017, 08:40:24 pm »
Can you show us the full debugger's log?
You should enable it in the settings of the debugger.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Leyland

  • Single posting newcomer
  • *
  • Posts: 7
Re: Debugger doesn't run on SAMBA share
« Reply #4 on: November 03, 2017, 09:33:58 pm »
Here's the debugger log when project is saved on share (when debugger doesn't work):
Code: [Select]
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /run/user/1000/gvfs/smb-share:server=192.168.1.1,share=public/CodeBlocksProjects/debugTest/
Adding source dir: /run/user/1000/gvfs/smb-share:server=192.168.1.1,share=public/CodeBlocksProjects/debugTest/
Adding file: /run/user/1000/gvfs/smb-share:server=192.168.1.1,share=public/CodeBlocksProjects/debugTest/bin/Debug/debugTest
Changing directory to: /run/user/1000/gvfs/smb-share:server=192.168.1.1,share=public/CodeBlocksProjects/debugTest/.
Set variable: LD_LIBRARY_PATH=.:
[debug]Command-line: /bin/gdb -nx -fullname -quiet  -args /run/user/1000/gvfs/smb-share:server=192.168.1.1,share=public/CodeBlocksProjects/debugTest/bin/Debug/debugTest
[debug]Working dir : /run/user/1000/gvfs/smb-share:server=192.168.1.1,share=public/CodeBlocksProjects/debugTest
Starting debugger: /bin/gdb -nx -fullname -quiet  -args /run/user/1000/gvfs/smb-share:server=192.168.1.1,share=public/CodeBlocksProjects/debugTest/bin/Debug/debugTest
done
[debug]> set prompt >>>>>>cb_gdb:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
[debug]Reading symbols from /run/user/1000/gvfs/smb-share:server=192.168.1.1,share=public/CodeBlocksProjects/debugTest/bin/Debug/debugTest...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7
[debug]Copyright (C) 2013 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "x86_64-redhat-linux-gnu".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]Using terminal's PID as console PID 29034, TTY /dev/pts/1
[debug]Queued:[tty /dev/pts/1]
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor intel
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Function "__cxa_throw" not defined.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source /usr/share/codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory /run/user/1000/gvfs/smb-share:server=192.168.1.1,share=public/CodeBlocksProjects/debugTest/
[debug]Source directories searched: /run/user/1000/gvfs/smb-share:/run/user/1000/gvfs/smb-share:server=192.168.1.1,share=public/CodeBlocksProjects/debugTest/server=192.168.1.1,share=public/CodeBlocksProjects/debugTest:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> tty /dev/pts/1
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: /run/user/1000/gvfs/smb-share:server=192.168.1.1,share=public/CodeBlocksProjects/debugTest/bin/Debug/debugTest
[debug][Inferior 1 (process 29036) exited normally]
[debug]Missing separate debuginfos, use: debuginfo-install glibc-2.17-106.el7_2.8.x86_64 libgcc-4.8.5-4.el7.x86_64 libstdc++-4.8.5-4.el7.x86_64
[debug]>>>>>>cb_gdb:
[Inferior 1 (process 29036) exited normally]
[debug]> quit
Debugger finished with status 0

Here's the log when project is saved locally (when debugger works):
Code: [Select]
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /home/cb_projects/TestBreakpoint2/
Adding source dir: /home/cb_projects/TestBreakpoint2/
Adding file: /home/cb_projects/TestBreakpoint2/bin/Debug/TestBreakpoint2
Changing directory to: /home/cb_projects/TestBreakpoint2/.
Set variable: LD_LIBRARY_PATH=.:
[debug]Command-line: /bin/gdb -nx -fullname -quiet  -args /home/cb_projects/TestBreakpoint2/bin/Debug/TestBreakpoint2
[debug]Working dir : /home/cb_projects/TestBreakpoint2
Starting debugger: /bin/gdb -nx -fullname -quiet  -args /home/cb_projects/TestBreakpoint2/bin/Debug/TestBreakpoint2
done
[debug]Reading symbols from /home/cb_projects/TestBreakpoint2/bin/Debug/TestBreakpoint2...done.
[debug](gdb)
[debug]> set prompt >>>>>>cb_gdb:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
[debug]>>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7
[debug]Copyright (C) 2013 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "x86_64-redhat-linux-gnu".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]Using terminal's PID as console PID 29650, TTY /dev/pts/1
[debug]Queued:[tty /dev/pts/1]
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor intel
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Function "__cxa_throw" not defined.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source /usr/share/codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory /home/cb_projects/TestBreakpoint2/
[debug]Source directories searched: /home/cb_projects/TestBreakpoint2:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> tty /dev/pts/1
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: /home/cb_projects/TestBreakpoint2/bin/Debug/TestBreakpoint2
[debug][Inferior 1 (process 29652) exited normally]
[debug]Missing separate debuginfos, use: debuginfo-install glibc-2.17-106.el7_2.8.x86_64 libgcc-4.8.5-4.el7.x86_64 libstdc++-4.8.5-4.el7.x86_64
[debug]>>>>>>cb_gdb:
[Inferior 1 (process 29652) exited normally]
[debug]> quit
Debugger finished with status 0

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1540
Re: Debugger doesn't run on SAMBA share
« Reply #5 on: November 03, 2017, 11:08:26 pm »
can you post a debug log, where you try to hit a breakpoint?

Offline Leyland

  • Single posting newcomer
  • *
  • Posts: 7
Re: Debugger doesn't run on SAMBA share
« Reply #6 on: November 03, 2017, 11:59:28 pm »
Here you go:
Code: [Select]
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/
Adding source dir: /run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/
Adding file: /run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/bin/Debug/debugTest
Changing directory to: /run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/.
Set variable: LD_LIBRARY_PATH=.:

[debug]Command-line: /bin/gdb -nx -fullname -quiet  -args /run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/bin/Debug/debugTest
[debug]Working dir : /run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest

Starting debugger: /bin/gdb -nx -fullname -quiet  -args /run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/bin/Debug/debugTest
done

[debug]> set prompt >>>>>>cb_gdb:

Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints

[debug]Reading symbols from /run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/bin/Debug/debugTest...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7
[debug]Copyright (C) 2013 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "x86_64-redhat-linux-gnu".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7

[debug]Using terminal's PID as console PID 2692, TTY /dev/pts/1
[debug]Queued:[tty /dev/pts/1]
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor intel
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Function "__cxa_throw" not defined.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source /usr/share/codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory /run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/
[debug]Source directories searched: /run/user/1000/gvfs/smb-share:/run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/server=192.168.1.5,share=public/CodeBlocksProjects/debugTest:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "/run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/main.c:6"
[debug]No source file named /run/user/1000/gvfs/smb-share.
[debug]Breakpoint 2 ("/run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/main.c:6") pending.
[debug]>>>>>>cb_gdb:
[debug]> tty /dev/pts/1
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: /run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/bin/Debug/debugTest
[debug][Inferior 1 (process 2694) exited normally]
[debug]Missing separate debuginfos, use: debuginfo-install glibc-2.17-106.el7_2.8.x86_64 libgcc-4.8.5-4.el7.x86_64 libstdc++-4.8.5-4.el7.x86_64
[debug]>>>>>>cb_gdb:

[Inferior 1 (process 2694) exited normally]

[debug]> quit

Debugger finished with status 0

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10356
Re: Debugger doesn't run on SAMBA share
« Reply #7 on: November 04, 2017, 12:44:30 am »
And can you show the log from command line debugger where the breakpoints really work?
But please use fuller paths for the break commands.

In general I'm really surprised you're able to get this far when using paths like this one
Code: [Select]
/run/user/1000/gvfs/smb-share:server=192.168.1.5,share=
There are so many special characters, which might confuse programs in some many different ways.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Leyland

  • Single posting newcomer
  • *
  • Posts: 7
Re: Debugger doesn't run on SAMBA share
« Reply #8 on: November 04, 2017, 01:14:19 am »
Quote
And can you show the log from command line debugger where the breakpoints really work?
But please use fuller paths for the break commands

I'm not sure how to do that. I just Googled it but didn't see anything helpful

Quote
In general I'm really surprised you're able to get this far when using paths like this one

The path is provided to Code:Blocks by the Linux Mint desktop.

I suspect that you are correct and the debugger doesn't like some of the characters in the path. I don't want to introduce possible additional bugs into my code by using a suspect path so I'll move the projects on to the local file system

Thanks for all your help.

Regards,

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10356
Re: Debugger doesn't run on SAMBA share
« Reply #9 on: November 04, 2017, 07:04:19 am »
I'm not sure how to do that. I just Googled it but didn't see anything helpful
All the commands are available in the log you're posting so you need to just execute them in the terminal.

Generally it is better to share projects with vcs like (git, svn, hg, etc) and not using file sharing software.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1540
Re: Debugger doesn't run on SAMBA share
« Reply #10 on: November 04, 2017, 10:56:22 pm »
the commands for gdb appear with a single ">" in the log.
not all commands are really necessary

Quote
/bin/gdb -nx -fullname -quiet  -args /run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/bin/Debug/debugTest
starts gdb (i am amazed that this works right away)

Quote
show version
shows version (not necessary)

so this should be the commands you need:
Code: [Select]
/bin/gdb -nx -fullname -quiet  -args /run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/bin/Debug/debugTest
set confirm off
 set breakpoint pending on
set unwindonsignal on
catch throw
directory /run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/
break "/run/user/1000/gvfs/smb-share:server=192.168.1.5,share=public/CodeBlocksProjects/debugTest/main.c:6"
run