Re: Reporting of "program no longer exists"

Nick Roberts
2006-10-15T19:47:34Z

Daniel Jacobowitz writes:
> On Sun, Oct 15, 2006 at 06:13:15PM +1300, Nick Roberts wrote:
> > Currently if I run Emacs under GDB and type CTRL-C I get:
> >
> > (gdb) r
> > Starting program: /home/nickrob/emacs/src/emacs -geometry 80x40+0+0
> > [Thread debugging using libthread_db enabled]
> > [New Thread -1208174912 (LWP 7704)]
> > [Switching to Thread -1208174912 (LWP 7704)]
> > Breakpoint 3 at 0x80f654b: file xterm.c, line 7833.
> > Couldn't get registers: No such process.
>
> I assume this is a prerelease. The emacs21 I've got doesn't use
> pthreads at all.

Yes.

> > If I apply the patch below (from gdb-6.3-ia64-sigill-20051115.patch, a patch
> > for Fedora Core 5) I get:
> >
> > (gdb) r
> > Starting program: /home/nickrob/emacs/src/emacs -geometry 80x40+0+0
> > [Thread debugging using libthread_db enabled]
> > [New Thread -1208269120 (LWP 8067)]
> > [Switching to Thread -1208269120 (LWP 8067)]
> > Breakpoint 3 at 0x80f654b: file xterm.c, line 7833.
> >
> > Program terminated with signal SIGINT, Interrupt.
> > The program no longer exists.
> > (gdb)
>
> If you type Control-C, why did it kill emacs? Shouldn't it break in
> the debugger, and then let you resume?

Emacs uses Control-C to for keyboard-quit (at least in the terminal version) so
its .gdbinit has the line:

handle 2 noprint pass

> > Assuming this patch is appropriate, it's frustrating that patches by the
> > distributions don't get fed back (especially those from RedHat!).
>
> Yes, I know - but every distribution is guilty of this to some extent;
> it takes so much effort to get patches merged. We all do what we can.

It's in everyones interest that the versions don't diverge more than
necessary.

> For big patches I prefer to have the author submit them; I recently
> asked Jeff to resubmit one of the other patches from that SRPM, but
> haven't heard back from him yet. But this is a nice small one, so
> the usual copyright concerns don't matter.
>
> > 2005-11-15 Jeff Johnston <jjohnstn@redhat.com>
> >
> > * thread-db.c (thread_db_wait): Don't bother continuing if
> > the wait result indicates the program terminated with a signal.
>
> So, if you want to update the changelog to linux-thread-db.c, I think
> it'd be OK to apply this patch; it makes good sense.

OK, I've done this with Jeff's name on the ChangeLog. I've not added
(tiny change) as we do in Emacs as his name appears numerous times
previously and I assume his assignment hasn't been revoked.

--
Nick http://www.inet.net.nz/~nickrob