Author Topic: Error when using GDB in codeblocks  (Read 2705 times)

dracula90

  • Guest
Error when using GDB in codeblocks
« on: December 08, 2015, 09:59:02 pm »
I can't use gdb in  codeblocks.  I'm using centos 7.

Here's the log:

Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /home/user/Desktop/1730sh/1730sh/
Adding source dir: /home/user/Desktop/
Adding file: /home/user/Desktop/1730sh/1730sh/bin/Debug/1730sh
Changing directory to: /home/user/Desktop/1730sh/1730sh/.
Set variable: LD_LIBRARY_PATH=.:

[debug]Command-line: /usr/bin/gdb -nx -fullname  -quiet  -args /home/user/Desktop/1730sh/1730sh/bin/Debug/1730sh
[debug]Working dir : /home/user/Desktop/1730sh/1730sh

Starting debugger: /usr/bin/gdb -nx -fullname  -quiet  -args /home/user/Desktop/1730sh/1730sh/bin/Debug/1730sh
done

[debug]Reading symbols from /home/user/Desktop/1730sh/1730sh/bin/Debug/1730sh...
[debug]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]Queued:[tty /dev/pts/0]
[debug]>>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.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-64.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]>>>>>>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/local/share/codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory /home/user/Desktop/1730sh/1730sh/
[debug]Source directories searched: /home/user/Desktop/1730sh/1730sh:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> directory /home/user/Desktop/
[debug]Source directories searched: /home/user/Desktop:/home/user/Desktop/1730sh/1730sh:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> tty /dev/pts/0
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: /home/user/Desktop/1730sh/1730sh/bin/Debug/1730sh
[debug]Program received signal SIGTTIN, Stopped (tty input).
[debug]0x00007ffff72308a7 in kill () at ../sysdeps/unix/syscall-template.S:81
[debug]/usr/src/debug/glibc-2.17-c758a686/sysdeps/unix/syscall-template.S:81:3374:beg:0x7ffff72308a7
[debug]>>>>>>cb_gdb:

Program received signal SIGTTIN, Stopped (tty input).
At /usr/src/debug/glibc-2.17-c758a686/sysdeps/unix/syscall-template.S:81

[debug]> bt 30
[debug]#0  0x00007ffff72308a7 in kill () at ../sysdeps/unix/syscall-template.S:81
[debug]#1  0x0000000000405ba0 in main () at /home/user/Desktop/Project 3 Rosalie(1)/shell.cpp:221
[debug]>>>>>>cb_gdb:
[debug]> quit

Debugger finished with status 0
Selecting target:
Debug
Adding source dir: /home/user/Desktop/1730sh/1730sh/
Adding source dir: /home/user/Desktop/
Adding file: /home/user/Desktop/1730sh/1730sh/bin/Debug/1730sh
Changing directory to: /home/user/Desktop/1730sh/1730sh/.
Set variable: LD_LIBRARY_PATH=.:

[debug]Command-line: /usr/bin/gdb -nx -fullname  -quiet  -args /home/user/Desktop/1730sh/1730sh/bin/Debug/1730sh
[debug]Working dir : /home/user/Desktop/1730sh/1730sh

Starting debugger: /usr/bin/gdb -nx -fullname  -quiet  -args /home/user/Desktop/1730sh/1730sh/bin/Debug/1730sh
done

[debug]Reading symbols from /home/user/Desktop/1730sh/1730sh/bin/Debug/1730sh...
[debug]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]Queued:[tty /dev/pts/0]
[debug]>>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.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-64.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]>>>>>>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/local/share/codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory /home/user/Desktop/1730sh/1730sh/
[debug]Source directories searched: /home/user/Desktop/1730sh/1730sh:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> directory /home/user/Desktop/
[debug]Source directories searched: /home/user/Desktop:/home/user/Desktop/1730sh/1730sh:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> tty /dev/pts/0
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: /home/user/Desktop/1730sh/1730sh/bin/Debug/1730sh
[debug]Program received signal SIGTTIN, Stopped (tty input).
[debug]0x00007ffff72308a7 in kill () at ../sysdeps/unix/syscall-template.S:81
[debug]/usr/src/debug/glibc-2.17-c758a686/sysdeps/unix/syscall-template.S:81:3374:beg:0x7ffff72308a7
[debug]>>>>>>cb_gdb:

Program received signal SIGTTIN, Stopped (tty input).
At /usr/src/debug/glibc-2.17-c758a686/sysdeps/unix/syscall-template.S:81

[debug]> bt 30
[debug]#0  0x00007ffff72308a7 in kill () at ../sysdeps/unix/syscall-template.S:81
[debug]#1  0x0000000000405ba0 in main () at /home/user/Desktop/Project 3 Rosalie(1)/shell.cpp:221
[debug]>>>>>>cb_gdb:
[debug]> quit

Debugger finished with status 0
« Last Edit: December 08, 2015, 10:06:57 pm by dracula90 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Error when using GDB in codeblocks
« Reply #1 on: December 09, 2015, 01:35:31 am »
Is this a minimal hello world kind of program?
I guess your doing something terminal related and in this case you don't have a terminal running and so
you're getting a signal that is not caught by your application and your application is being terminated.
Read what this signal does and how to prevent it from happening.
(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!]