This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: usability: exiting from GDB

On Mon, Nov 27, 2006 at 04:37:57PM +1100, John Pye wrote:
> What I would like is that (a) the 'ctrl-C' behaviour from the gdb prompt
> was changed so that instead of (I think uselessly) outputting 'Quit' and
> bringing up another prompt line, it actually *did* quit GDB.

As Eli explained, that's not a good idea.  You could accidentally quit
GDB while trying to interrupt your program.  Does C-c quit shells?  No,
it just kills the current input line.

> Or,
> alternatively, (b) that the following prompted could somehow be
> persistently disabled: "The program is running. Exit anyway? (y or n)".
> I often find that in exiting GDB, which requires ctrl-D to be pressed
> twice, I press ctrl-D three times and end up also logging out of my
> terminal program, which is annoying.

I don't know about you, but my shell prints a warning message if I try
to C-d while there are background jobs running.  GDB's behaving
exactly the same :-)

You can't disable just that one prompt, but you could disable
prompts with "set confirm off".

> Another issue is that after exiting GDB via ctrl-D-ctrl-D, GDB doesn't
> output a newline, which causes the following bash input line to be
> messed up.

This has been reported as a bug before; it ought to be easy to fix.

Daniel Jacobowitz

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]