Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I also had this problem, but I use gdb in KDevelop sparsely enough that hadn't bothered me yet. Here's my log of trying to fix it:</p> <p>Grepping through the GDB 7.3.1 source code reveals that this message is printed when GDB tries to set its master TTY to a newly-created pseudo-tty (see gdb/inflow.c, lines 683-740). In particular, a call to ioctl with request TIOCSCTTY fails with a permissions error.</p> <p>With this in mind, I took a look at the Linux kernel source code to see what could cause a failure. A bit of searching shows that it will eventually degenerate into a call to tiocsctty(). The comment from tiocsctty that is important here:</p> <pre><code>/* * The process must be a session leader and * not have a controlling tty already. */ </code></pre> <p>Since the only other reason it can fail with EPERM is if the tty that GDB creates is actually a controlling tty for <em>another</em> process (which seems highly unlikely), I thought it reasonable to assume that GDB is not a session leader. Fair enough, it's launched by KDevelop after all!</p> <p>So: I tried <em>not</em> launching the GDB session in an external terminal, and it works. Problem narrowed down.</p> <p>Originally, the external terminal line was set to <code>konsole --noclose --workdir %workdir -e %exe</code>. Changing this to <code>terminator -e %exe</code> made a slight difference: KDevelop warned me that</p> <pre><code>GDB cannot use the tty* or pty* devices. Check the settings on /dev/tty* and /dev/pty* As root you may need to "chmod ug+rw" tty* and pty* devices and/or add the user to the tty group using "usermod -G tty username". </code></pre> <p>I checked my permissions; my user was part of the tty group and all relevant files were readable and writable.</p> <p>Grepping through the KDevelop source code reveals how KDevelop actually sets up the terminal. It runs the shell script</p> <pre><code>tty &gt; FIFO_PATH ; trap "" INT QUIT TSTP ; exec&lt;&amp;-; exec&gt;&amp;-; while :; do sleep 3600;done </code></pre> <p>and then sets up GDB to use the terminal device it reads from FIFO_PATH. (My name, by the way, not the one that KDevelop uses.) The problem (as best I can tell) is that gdb is not launched as a child of the shell script, and thus cannot use it as its main tty.</p> <p>I'm not feeling up to patching KDevelop to make this work properly as of yet (or finding what actually caused this to stop working in the first place . . .), so the best I can suggest at the moment is to simply not use an external terminal for debugging purposes.</p> <p>Good luck! I'll update if I find anything useful.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload