[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (debug) backtrace: how to show source code at current location.
From: |
Larry Evans |
Subject: |
Re: (debug) backtrace: how to show source code at current location. |
Date: |
Wed, 05 Jan 2011 20:53:17 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Lightning/1.0b1 Thunderbird/3.0.6 |
On 01/05/11 17:31, Tim X wrote:
> Larry Evans <cppljevans@suddenlink.net> writes:
>
>> On 01/05/11 13:06, Drew Adams wrote:
>>>> Please, how can I find out what's causing this error message:
>>>>
>>>> "(wrong-type-argument arrayp tab)"
>>>
>>> From your error message alone, it seems that the symbol `tab' is being
>>> passed to
>>> some function that expects an array. That's not much help yet, but things
>>> might
>>> become clearer when you dig deeper using the debugger.
>>>
>>> (setq debug-on-error t)
>>>
>>> 1. Load source (*.el) files for the library where the error occurred.
>>>
>>> IOW, look at the `debug-on-error' backtrace to see which function(s) were
>>> involved when the error occurred. Then use `C-h f' or `find-func' to find
>>> the
>>> function definition(s) (source file(s)). Load the source file(s) (*.el)
>>> using
>>> `load-file' or `load-library', including the extension `.el' in the name.
>>>
>>> 2. Provoke the error and backtrace again. It should now show more
>>> source-code
>>> entry points instead of byte-code (the `(byte-code "ÁÂÃ...' stuff)
>>>
>>> 3. You can also use `M-x debug-on-entry THE-FUNCTION' to enter the debugger
>>> whenever a problematic function is invoked. Then you can walk through the
>>> invocation to see more about what caused the error.
>>>
>>>
>>>
>> Thank you very much for the help Drew.
>> What I did was started with just:
>>
>> (setq debug-on-error t)
>>
>> as shown in the attachment (a revision of the one posted earlier).
>> The started emacs; however, no backtrace appeared. OTOH, the
>> *Messages* buffer contained:
>>
>>> Loading /home/evansl/.emacs.d/init.common.el (source)...
>>> Loading /home/evansl/.recentf...done
>>> Cleaning up the recentf list...done (0 removed)
>>> Loading /usr/share/emacs/site-lisp/haskell-mode/haskell-site-file.el
>>> (source)...done
>>> Loading /home/evansl/.emacs.d/init.common.el (source)...done
>>> Loading desktop...done
>>> Loading eldoc...done
>>> uncompressing indent.el.gz...done
>>> Note: file is write protected
>>> Loading cc-mode...done
>>> Note: file is write protected
>>> c-tab-stop-my-list message
>>> c++-mode-my-hook message:tabs=
>>> (0 2 4)
>>> c++-mode-my-hook message{
>>> File mode specification error: (wrong-type-argument arrayp tab)
>>> Loading /usr/share/emacs/site-lisp/haskell-mode/haskell-mode.el
>>> (source)...done
>>
>> Is there something else I should do to get a backtrace?
>>
>
> Yep, start emacs as
>
> emacs --debug-init
>
> Tim
>
Thanks, Tim and Drew.
I did gunzip all the *.el.gz files in:
/usr/share/emacs/23.1/lisp
and did:
emacs --debug-init
However, I never could get the emacs debugger to
show me the actual line it was on when I issued the debug
commands, such as d or c.
Anyway, one time the top line in the *Backtrace* buffer
showed a (define-key ...) expression whose tail end included
the args to a (define-key...) from init.common.el file:
(define-key c++-mode-map 'tab 'c-insert-my-tab)
I wondered what 'tab was, and then vaguely remember I had
some trouble hear years ago and, thru trial-and error,
I found:
(define-key c++-mode-map 'tab 'c-insert-my-tab)
worked. However, I guess something has changed and now:
(define-key c++-mode-map "\t" 'c-insert-my-tab)
doesn't produce the error. I just have to figure out the
corresponding correction for:
(define-key c++-mode-map 'iso-left-tab 'c-insert-my-shift-tab)
I remember searching some files in site-lisp for somewhere else
for the symbol:
'tab
'iso-left-tab
however, that was long ago and I can't remember how I found those
symbols.
Thanks for your efforts.
-kind regards,
Larry
- (debug) backtrace: how to show source code at current location., Larry Evans, 2011/01/05
- RE: (debug) backtrace: how to show source code at current location., Drew Adams, 2011/01/05
- Re: (debug) backtrace: how to show source code at current location., Larry Evans, 2011/01/05
- Message not available
- Re: (debug) backtrace: how to show source code at current location., Tim X, 2011/01/05
- Re: (debug) backtrace: how to show source code at current location.,
Larry Evans <=
- Re: (debug) backtrace: how to show source code at current location., Larry Evans, 2011/01/05
- RE: (debug) backtrace: how to show source code at current location., Drew Adams, 2011/01/05
- Re: (debug) backtrace: how to show source code at current location., Larry Evans, 2011/01/05
- RE: (debug) backtrace: how to show source code at current location., Drew Adams, 2011/01/06