On Sat, 2 Oct 2004 01:58:45 -0400, Ken Coleman wrote:
> Hi all,
>
> Just started playing around with cedet more extensively, and ran into a
> problem where edebug breaks when encountering certain data structures
> (alists) and trying to print them. This is with a very recent CVS
> Emacs on both Mac OS X and GNU/Linux, and cedet-1.0beta3b.
>
> Specifically, if you instrument the following code for edebug-ging, and
> then run the kjc-test-defun function to trigger edebug and just hit
> space at each stop point to move to the next one, you'll eventually run
> into an error that's listed below.
>
> (setq kjc-test '(("foo" . "bar")))
>
> (defun kjc-test-defun ()
> (let ((a kjc-test))
> (car a)))
>
> Wrong type argument: listp, "bar"
> error: "Cannot return from the debugger in an error" [4 times]
>
> At this point, edebug has given up, apparently due to it seeing this as
> an internal error.
>
> I'll admit, I find this error pretty strange - I thought that listp
> couldn't actually cause an error if given a non-list argument, but it
> seems to be (or possibly the message I'm seeing is unrelated). I
> couldn't get a stack trace for some reason - perhaps it's because
> edebug has turned off that stuff as it does its internal update to
> print the result into the minibuffer.
>
> If I don't load any of the cedet stuff, I can edebug through this
> function just fine. I've temporarily commented out all of the content
> of cedet-edebug.el and removed its stuff from the autoloads, so it's
> not a disaster, but I expect that others will run into this issue
> eventually.
That sounds familiar. I suspect it has to do with this patch I had
made for Paul K. a while back and haven't had time to check in yet.
Eric
diff -c -r1.27 semantic-tag.el
*** semantic-tag.el 25 Mar 2004 10:43:06 -0000 1.27
--- semantic-tag.el 2 Oct 2004 12:32:24 -0000
***************
*** 248,259 ****
;;
(defsubst semantic-tag-p (tag)
"Return non-nil if TAG is most likely a semantic tag."
! (and (consp tag)
! (stringp (car tag)) ; NAME
! (symbolp (nth 1 tag)) (nth 1 tag) ; TAG-CLASS
! (listp (nth 2 tag)) ; ATTRIBUTES
! (listp (nth 3 tag)) ; PROPERTIES
! ))
(defsubst semantic-tag-of-class-p (tag class)
"Return non-nil if class of TAG is CLASS."
--- 248,262 ----
;;
(defsubst semantic-tag-p (tag)
"Return non-nil if TAG is most likely a semantic tag."
! (condition-case nil
! (and (consp tag)
! (stringp (car tag)) ; NAME
! (symbolp (nth 1 tag)) (nth 1 tag) ; TAG-CLASS
! (listp (nth 2 tag)) ; ATTRIBUTES
! (listp (nth 3 tag)) ; PROPERTIES
! ))
! ;; If an error occurs, then it most certainly is not a tag.
! (error nil))
(defsubst semantic-tag-of-class-p (tag class)
"Return non-nil if class of TAG is CLASS."
|