[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: abort() in query-replace

From: Richard Stallman
Subject: Re: abort() in query-replace
Date: Fri, 30 Jul 2004 22:57:27 -0400

    2581      newpoint = search_regs.start[sub] + SCHARS (newtext);
    2583      if (case_action == all_caps)
    2584        Fupcase_region (make_number (search_regs.start[sub]),
    2585                        make_number (newpoint));
    (gdb) br 2581 if newpoint == 0

At line 2581, newpoint is not yet computed, so testing its value
there won't do the job.  At line 2582 it should work.
So I am surprised that this stopped at the right time.
But it appears to have done so.

    If newpoint == 0 is wrong, then it seems at this point it seems that
    search_regs is simply wrong.

I agree.

search_regs contains the match data.  It is set by search functions
and by set-match-data.

When this is a position in a buffer, it should not be zero.  It is
certainly possible to use set-match-data to store a value of zero, but
it is erroneous to do so.

So where did that value of search_regs come from?
You can probably debug this at the Lisp level.

    Detaching after fork from child process 31746.
    Detaching after fork from child process 31747.
    Detaching after fork from child process 31755.
    Error in testing breakpoint condition:
    Variable "newpoint" is not available.

I don't know what that means.  Maybe it is a bug in GDB.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]