Author Topic: SOS .. cound't debug with xterm or gnome-terminal..  (Read 4907 times)

Offline nanyu

  • Almost regular
  • **
  • Posts: 188
  • nanyu
SOS .. cound't debug with xterm or gnome-terminal..
« on: November 15, 2012, 03:16:41 am »
OS: VMWare  + RHLinux 5 64bit
Code::Blocks : night build 8500
===
I have installed xterm.
and run program with RELEASE from c::b everthin ok . but If I debug program in the c::b, the xterm (or gnome-terminal)'s windows  shown, but debuger was stopped.
========
here is the debuger log:
Code
LD_LIBRARY_PATH=.:/usr/local/lib:/home/user/dlane/bin/Debug:
Command-line: /usr/bin/gdb -nx -fullname  -quiet -args ../bin/Debug/tcp_server_proxy
Working dir : /home/user/dlane/tcp_server_proxy/
> set prompt >>>>>>cb_gdb:
Executing: gnome-terminal -t 'Program Console' --zoom=1.2 - --disable-factory -x sleep 85338
Executing: ps x -o tty,pid,command
Reading symbols from /home/user/dlane/bin/Debug/tcp_server_proxy...done.
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-32.el5)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
PS result: ?         5413 ps x -o tty,pid,command
PS result: ?         5412 gnome-terminal -t Program Console  --disable-factory -x sleep 85338
TTY is[/dev/?]
GetConsoleTTY[/dev/?]ConsolePid[5412]
Queued:[tty /dev/?]
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set disassembly-flavor intel
>>>>>>cb_gdb:
> catch throw
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source /usr/local/share/codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> directory /home/user/dlane/tcp_server_proxy/
>>>>>>cb_gdb:
> break "/home/user/dlane/tcp_server_proxy/main.cpp:8"
Breakpoint 2 at 0x405474: file /home/user/dlane/tcp_server_proxy/main.cpp, line 8.
>>>>>>cb_gdb:
> tty /dev/?
>>>>>>cb_gdb:
> run
/dev/?: no found this file or directory.
During startup program exited with code 1.
>>>>>>cb_gdb:

It seems these lines have some wrong?
ps x -o tty,pid,command
..
PS result: ?         5413 ps x -o tty,pid,command
PS result: ?         5412 gnome-terminal -t Program Console  - --disable-factory -x sleep 85338
TTY is[/dev/?]      //<<------------why?
..
/dev/?: no found this file or directory.
During startup program exited with code 1.
===============
I try exec :
gnome-terminal -t Program Console  - --disable-factory -x sleep 85338 &
ps -o tty,pid,command
...
I got :
PTS/3        5413 ps x -o tty,pid,command
PTS/s        5412 gnome-terminal -t Program Console  - --disable-factory -x sleep 85338


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: SOS .. cound't debug with xterm or gnome-terminal..
« Reply #1 on: November 16, 2012, 12:33:05 am »
This is pretty strange, because this has not been changed for quite a long time.
Does some old build of C::B work as expected?

I'm running C::B daily on a CentOS 5.x, which should be the same as RHEL (if this is what you mean by RHLinux) 5.x and there are no problems with debugging console programs.
Can you give me the output of "ps --version"?

(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 nanyu

  • Almost regular
  • **
  • Posts: 188
  • nanyu
Re: SOS .. cound't debug with xterm or gnome-terminal..
« Reply #2 on: November 17, 2012, 08:49:41 am »
This is pretty strange, because this has not been changed for quite a long time.
Does some old build of C::B work as expected?

I'm running C::B daily on a CentOS 5.x, which should be the same as RHEL (if this is what you mean by RHLinux) 5.x and there are no problems with debugging console programs.
Can you give me the output of "ps --version"?


here is ps --version output:
procps version 3.2.7
btw, i run RHEL in a VM deststop (vmware)
=====>
hi, everything become ok after i restart the Linux OS...:) ... :(.