Subject: Re: bug#22012: 25.1.50; gdb broken by (json-string-format "doesn't start with `\"'!")

From: Dmitry Gutov <[email-masked]>
Date: Thu, 26 Nov 2015 19:36:38 +0200

On 11/26/2015 06:58 PM, martin rudalics wrote:

> Debugging the debugger while debugging?

Just debugging the debugger, I'd say.

> You mean there's none?

json.el is written in Lisp, so there are many ways you can get the 
needed information. All of them are relatively easy, IMHO.

> But what is the use of the above signal when it doesn't tell me where to
> find the source of the problem?

I agree that it can be improved.

>  >> should report the current buffer and its value of point.
>  >
>  > I wouldn't mind if it did. Though that would need to be done in all
> such places.
>
> Which places?

Every place in json.el that contains "(signal 'json-", probably. We 
should be consistent.

>  > But for the purposes of debugging, you can modify just that
> function's definition to report what's required.
>
> I do so already.  Now it stopped complaining.  Yet another Heisenbug.

Too bad.

>  >> Anyway, if I understand the backtrace correctly, the current buffer
>  >> should have been "*breakpoints of emacs.exe*".
>  >
>  > I'm not sure what that implies. Does it have JSON content?
>
> What is JSON content?

String in JSON format.

Basically, the question is whether we're calling json-read in a wrong 
buffer, or if the buffer is right but contains unparseable content, or 
if we fail to parse valid JSON.