Help with the Guile debugger

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Help with the Guile debugger

Trevor D-2
I've got to the stage in writing code where I need
to use the Guile debugger, but I find the instructions
in the CG:

http://kainhofer.com/~lilypond/Documentation/contributor/debugging-lilypond.html#debugging-lilypond

don't work for me.  Here's what happens.

Compiling a ly program with debugging info is fine,
and after I've added \include "guile-debugger.ly"
to my test program it drops into the guile prompt
as it should.  So far so good.  But when I enter
the (break! ...) command the response is:

GNU LilyPond 2.13.10
Processing `test1.ly'
Parsing...guile> (break! tab-duration-formatter)
ERROR: Unbound variable: break!
ABORT: (unbound-variable)
guile>

But if I enter the commands contained in
guile-debugger.ly manually at the guile prompt
everything works as it should and I can set
breakpoints.

I guess I'm doing something silly or missing
something obvious, but I can't see it.  Can anyone
help?

TIA, Trevor
 



---
----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Ian Hulin
Hi Trevor,

On 18/12/09 00:35, Trevor Daniels wrote:
I've got to the stage in writing code where I need
to use the Guile debugger, but I find the instructions
in the CG:

http://kainhofer.com/~lilypond/Documentation/contributor/debugging-lilypond.html#debugging-lilypond

don't work for me.  Here's what happens.

Compiling a ly program with debugging info is fine,
and after I've added \include "guile-debugger.ly"
to my test program it drops into the guile prompt
as it should.  So far so good.  But when I enter
the (break! ...) command the response is:

GNU LilyPond 2.13.10
Processing `test1.ly'
Parsing...guile> (break! tab-duration-formatter)
ERROR: Unbound variable: break!
ABORT: (unbound-variable)
guile>

But if I enter the commands contained in
guile-debugger.ly manually at the guile prompt
everything works as it should and I can set
breakpoints.

I guess I'm doing something silly or missing
something obvious, but I can't see it.  Can anyone
help?

TIA, Trevor


1) Can reproduce your findings
2) I'm investigating
3) I'm looking at a 0.2 of this using a module in scm

This would mean you could do
<In file your-source.ly>
lily code
\include "guile-debugger.ly"

<In file your-scheme.scm>
#(set-break! your-procedure)
#(set-trace-subtree! your-procedure
scheme code


Then you'd do

$ lilypond your-source.ly
Parsing...
guile> (quit)
This is the Guile debugger -- for help, type `help'.
There are nn frames on the stack.

Frame nn at your-source.ly:xx:y
        [your-procedure args]
debug>

Please could you log a tracker (or ask Valentin to do it) so we can log that I'm working on this?

Cheers,
Ian

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Carl Sorensen



On 12/27/09 10:09 AM, "Ian Hulin" <[hidden email]> wrote:

> Hi Trevor,
>
> On 18/12/09 00:35, Trevor Daniels wrote:
>> I've got to the stage in writing code where I need
>> to use the Guile debugger, but I find the instructions
>> in the CG:
>>  
>>
http://kainhofer.com/~lilypond/Documentation/contributor/debugging-lilypond.h>>
t

>> ml#debugging-lilypond
>>  
>> don't work for me.  Here's what happens.
>>  
>>  
>> I guess I'm doing something silly or missing
>> something obvious, but I can't see it.  Can anyone
>> help?
>>  
>> TIA, Trevor
>>  
>>  
> 1) Can reproduce your findings
> 2) I'm investigating
> 3) I'm looking at a 0.2 of this using a module in scm
>
> This would mean you could do
> <In file your-source.ly>
> lily code
> \include "guile-debugger.ly"
>
> <In file your-scheme.scm>
> #(set-break! your-procedure)
> #(set-trace-subtree! your-procedure
> scheme code
>
>
> Then you'd do
>
> $ lilypond your-source.ly
> Parsing...
> guile> (quit)
> This is the Guile debugger -- for help, type `help'.
> There are nn frames on the stack.
>
> Frame nn at your-source.ly:xx:y
>         [your-procedure args]
> debug>
>
> Please could you log a tracker (or ask Valentin to do it) so we can log that
> I'm working on this?

Very cool, Ian.

I've copied to bug-lilypond, so it should get a tracker.

Thanks,

Carl


---
----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Trevor D-2
In reply to this post by Ian Hulin
Hi Ian

Thanks for this - I'll give your suggestions a spin later today.
And
thanks for  confirming the problem is a general one, not down to
my incompetence.

Carl's already copied your note to -bug, so presumably Valentin
will pick it up and add it to the tracker.

Trevor

----- Original Message -----
From: "Ian Hulin" <[hidden email]>
To: "Trevor Daniels" <[hidden email]>
Cc: <[hidden email]>
Sent: Sunday, December 27, 2009 5:09 PM
Subject: Re: [frogs] Help with the Guile debugger


> Hi Trevor,
>
> On 18/12/09 00:35, Trevor Daniels wrote:
>> I've got to the stage in writing code where I need
>> to use the Guile debugger, but I find the instructions
>> in the CG:
>>
>> http://kainhofer.com/~lilypond/Documentation/contributor/debugging-lilypond.html#debugging-lilypond
>>
>>
>> don't work for me.  Here's what happens.
>>
>> Compiling a ly program with debugging info is fine,
>> and after I've added \include "guile-debugger.ly"
>> to my test program it drops into the guile prompt
>> as it should.  So far so good.  But when I enter
>> the (break! ...) command the response is:
>>
>> GNU LilyPond 2.13.10
>> Processing `test1.ly'
>> Parsing...guile> (break! tab-duration-formatter)
>> ERROR: Unbound variable: break!
>> ABORT: (unbound-variable)
>> guile>
>>
>> But if I enter the commands contained in
>> guile-debugger.ly manually at the guile prompt
>> everything works as it should and I can set
>> breakpoints.
>>
>> I guess I'm doing something silly or missing
>> something obvious, but I can't see it.  Can anyone
>> help?
>>
>> TIA, Trevor
>>
>>
> 1) Can reproduce your findings
> 2) I'm investigating
> 3) I'm looking at a 0.2 of this using a module in scm
>
> This would mean you could do
> <In file your-source.ly>
> lily code
> \include "guile-debugger.ly"
>
> <In file your-scheme.scm>
> #(set-break! your-procedure)
> #(set-trace-subtree! your-procedure
> scheme code
>
>
> Then you'd do
>
> $ lilypond your-source.ly
> Parsing...
> guile> (quit)
> This is the Guile debugger -- for help, type `help'.
> There are nn frames on the stack.
>
> Frame nn at your-source.ly:xx:y
>         [your-procedure args]
> debug>
>
> Please could you log a tracker (or ask Valentin to do it) so we
> can log
> that I'm working on this?
>
> Cheers,
> Ian
>



---
----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Ian Hulin
Hi Trevor,
Firstly a Happy New Year/ Glückliches NeuJahr/ Bonne Nouvelle Année/ een
vrolijke nieuwe jaar/ un feliz año nuevo

to all on the Frogs List.

Attached is a patch with some changes to the guile debugger code and the
documentation (CG Chapter 8).

Please test-drive and review.

Cheers,

Ian

On 28/12/09 12:53, Trevor Daniels wrote:

> Hi Ian
>
> Thanks for this - I'll give your suggestions a spin later today. And
> thanks for  confirming the problem is a general one, not down to
> my incompetence.
>
> Carl's already copied your note to -bug, so presumably Valentin
> will pick it up and add it to the tracker.
>
> Trevor
>
> ----- Original Message ----- From: "Ian Hulin" <[hidden email]>
> To: "Trevor Daniels" <[hidden email]>
> Cc: <[hidden email]>
> Sent: Sunday, December 27, 2009 5:09 PM
> Subject: Re: [frogs] Help with the Guile debugger
>
>
>> Hi Trevor,
>>
>> On 18/12/09 00:35, Trevor Daniels wrote:
>>> I've got to the stage in writing code where I need
>>> to use the Guile debugger, but I find the instructions
>>> in the CG:
>>>
>>> http://kainhofer.com/~lilypond/Documentation/contributor/debugging-lilypond.html#debugging-lilypond 
>>>
>>>
>>>
>>> don't work for me.  Here's what happens.
>>>
>>> Compiling a ly program with debugging info is fine,
>>> and after I've added \include "guile-debugger.ly"
>>> to my test program it drops into the guile prompt
>>> as it should.  So far so good.  But when I enter
>>> the (break! ...) command the response is:
>>>
>>> GNU LilyPond 2.13.10
>>> Processing `test1.ly'
>>> Parsing...guile> (break! tab-duration-formatter)
>>> ERROR: Unbound variable: break!
>>> ABORT: (unbound-variable)
>>> guile>
>>>
>>> But if I enter the commands contained in
>>> guile-debugger.ly manually at the guile prompt
>>> everything works as it should and I can set
>>> breakpoints.
>>>
>>> I guess I'm doing something silly or missing
>>> something obvious, but I can't see it.  Can anyone
>>> help?
>>>
>>> TIA, Trevor
>>>
>>>
>> 1) Can reproduce your findings
>> 2) I'm investigating
>> 3) I'm looking at a 0.2 of this using a module in scm
>>
>> This would mean you could do
>> <In file your-source.ly>
>> lily code
>> \include "guile-debugger.ly"
>>
>> <In file your-scheme.scm>
>> #(set-break! your-procedure)
>> #(set-trace-subtree! your-procedure
>> scheme code
>>
>>
>> Then you'd do
>>
>> $ lilypond your-source.ly
>> Parsing...
>> guile> (quit)
>> This is the Guile debugger -- for help, type `help'.
>> There are nn frames on the stack.
>>
>> Frame nn at your-source.ly:xx:y
>>         [your-procedure args]
>> debug>
>>
>> Please could you log a tracker (or ask Valentin to do it) so we can log
>> that I'm working on this?
>>
>> Cheers,
>> Ian
>>
>
>
>
> ______________________________________________        This email has
> been scanned by Netintelligence        
> http://www.netintelligence.com/email
>
>


0001-Make-Guile-Debugger-less-flaky.patch (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Trevor D-2
Hi Ian

Many thanks for this!  It looks good,  but I've not been able to
try it out in detail as the patch didn't apply:

> fatal: git-apply: bad git-diff - expected dev/null on line 260

and it was too tricky to extricate all the instructions from the
patch itself.

There were also a few lines with trailing white space.

I did notice the following:

Patch line 95: should be ddd

but otherwise the gdb instructions look fine.

Could you try to make a patch again, please, or alternatively
send me the complete .itexi file?

Trevor


----- Original Message -----
From: "Ian Hulin" <[hidden email]>
To: "Trevor Daniels" <[hidden email]>
Cc: <[hidden email]>
Sent: Wednesday, January 06, 2010 9:38 AM
Subject: Re: [frogs] Help with the Guile debugger


Hi Trevor,
Firstly a Happy New Year/ Glückliches NeuJahr/ Bonne Nouvelle Année/
een
vrolijke nieuwe jaar/ un feliz año nuevo

to all on the Frogs List.

Attached is a patch with some changes to the guile debugger code and
the
documentation (CG Chapter 8).

Please test-drive and review.

Cheers,

Ian

On 28/12/09 12:53, Trevor Daniels wrote:

> Hi Ian
>
> Thanks for this - I'll give your suggestions a spin later today.
> And
> thanks for  confirming the problem is a general one, not down to
> my incompetence.
>
> Carl's already copied your note to -bug, so presumably Valentin
> will pick it up and add it to the tracker.
>
> Trevor
>
> ----- Original Message ----- From: "Ian Hulin" <[hidden email]>
> To: "Trevor Daniels" <[hidden email]>
> Cc: <[hidden email]>
> Sent: Sunday, December 27, 2009 5:09 PM
> Subject: Re: [frogs] Help with the Guile debugger
>
>
>> Hi Trevor,
>>
>> On 18/12/09 00:35, Trevor Daniels wrote:
>>> I've got to the stage in writing code where I need
>>> to use the Guile debugger, but I find the instructions
>>> in the CG:
>>>
>>> http://kainhofer.com/~lilypond/Documentation/contributor/debugging-lilypond.html#debugging-lilypond
>>>
>>>
>>>
>>> don't work for me.  Here's what happens.
>>>
>>> Compiling a ly program with debugging info is fine,
>>> and after I've added \include "guile-debugger.ly"
>>> to my test program it drops into the guile prompt
>>> as it should.  So far so good.  But when I enter
>>> the (break! ...) command the response is:
>>>
>>> GNU LilyPond 2.13.10
>>> Processing `test1.ly'
>>> Parsing...guile> (break! tab-duration-formatter)
>>> ERROR: Unbound variable: break!
>>> ABORT: (unbound-variable)
>>> guile>
>>>
>>> But if I enter the commands contained in
>>> guile-debugger.ly manually at the guile prompt
>>> everything works as it should and I can set
>>> breakpoints.
>>>
>>> I guess I'm doing something silly or missing
>>> something obvious, but I can't see it.  Can anyone
>>> help?
>>>
>>> TIA, Trevor
>>>
>>>
>> 1) Can reproduce your findings
>> 2) I'm investigating
>> 3) I'm looking at a 0.2 of this using a module in scm
>>
>> This would mean you could do
>> <In file your-source.ly>
>> lily code
>> \include "guile-debugger.ly"
>>
>> <In file your-scheme.scm>
>> #(set-break! your-procedure)
>> #(set-trace-subtree! your-procedure
>> scheme code
>>
>>
>> Then you'd do
>>
>> $ lilypond your-source.ly
>> Parsing...
>> guile> (quit)
>> This is the Guile debugger -- for help, type `help'.
>> There are nn frames on the stack.
>>
>> Frame nn at your-source.ly:xx:y
>>         [your-procedure args]
>> debug>
>>
>> Please could you log a tracker (or ask Valentin to do it) so we
>> can log
>> that I'm working on this?
>>
>> Cheers,
>> Ian
>>
>
>
>
> ______________________________________________        This email
> has
> been scanned by Netintelligence
> http://www.netintelligence.com/email
>
>




---
----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Ian Hulin
In reply to this post by Ian Hulin
Hi all,
Please use this amended patch attached.  Apologies for the noise.

Cheers,

Ian

On 06/01/10 09:38, Ian Hulin wrote:

> Hi Trevor,
> Firstly a Happy New Year/ Glückliches NeuJahr/ Bonne Nouvelle Année/
> een vrolijke nieuwe jaar/ un feliz año nuevo
>
> to all on the Frogs List.
>
> Attached is a patch with some changes to the guile debugger code and
> the documentation (CG Chapter 8).
>
> Please test-drive and review.
>
> Cheers,
>
> Ian
>
> On 28/12/09 12:53, Trevor Daniels wrote:
>> Hi Ian
>>
>> Thanks for this - I'll give your suggestions a spin later today. And
>> thanks for  confirming the problem is a general one, not down to
>> my incompetence.
>>
>> Carl's already copied your note to -bug, so presumably Valentin
>> will pick it up and add it to the tracker.
>>
>> Trevor
>>
>> ----- Original Message ----- From: "Ian Hulin" <[hidden email]>
>> To: "Trevor Daniels" <[hidden email]>
>> Cc: <[hidden email]>
>> Sent: Sunday, December 27, 2009 5:09 PM
>> Subject: Re: [frogs] Help with the Guile debugger
>>
>>
>>> Hi Trevor,
>>>
>>> On 18/12/09 00:35, Trevor Daniels wrote:
>>>> I've got to the stage in writing code where I need
>>>> to use the Guile debugger, but I find the instructions
>>>> in the CG:
>>>>
>>>> http://kainhofer.com/~lilypond/Documentation/contributor/debugging-lilypond.html#debugging-lilypond 
>>>>
>>>>
>>>>
>>>> don't work for me.  Here's what happens.
>>>>
>>>> Compiling a ly program with debugging info is fine,
>>>> and after I've added \include "guile-debugger.ly"
>>>> to my test program it drops into the guile prompt
>>>> as it should.  So far so good.  But when I enter
>>>> the (break! ...) command the response is:
>>>>
>>>> GNU LilyPond 2.13.10
>>>> Processing `test1.ly'
>>>> Parsing...guile> (break! tab-duration-formatter)
>>>> ERROR: Unbound variable: break!
>>>> ABORT: (unbound-variable)
>>>> guile>
>>>>
>>>> But if I enter the commands contained in
>>>> guile-debugger.ly manually at the guile prompt
>>>> everything works as it should and I can set
>>>> breakpoints.
>>>>
>>>> I guess I'm doing something silly or missing
>>>> something obvious, but I can't see it.  Can anyone
>>>> help?
>>>>
>>>> TIA, Trevor
>>>>
>>>>
>>> 1) Can reproduce your findings
>>> 2) I'm investigating
>>> 3) I'm looking at a 0.2 of this using a module in scm
>>>
>>> This would mean you could do
>>> <In file your-source.ly>
>>> lily code
>>> \include "guile-debugger.ly"
>>>
>>> <In file your-scheme.scm>
>>> #(set-break! your-procedure)
>>> #(set-trace-subtree! your-procedure
>>> scheme code
>>>
>>>
>>> Then you'd do
>>>
>>> $ lilypond your-source.ly
>>> Parsing...
>>> guile> (quit)
>>> This is the Guile debugger -- for help, type `help'.
>>> There are nn frames on the stack.
>>>
>>> Frame nn at your-source.ly:xx:y
>>>         [your-procedure args]
>>> debug>
>>>
>>> Please could you log a tracker (or ask Valentin to do it) so we can log
>>> that I'm working on this?
>>>
>>> Cheers,
>>> Ian
>>>
>>
>>
>>
>> ______________________________________________        This email has
>> been scanned by Netintelligence        
>> http://www.netintelligence.com/email
>>
>>
>
>
>
> ______________________________________________        This email has
> been scanned by Netintelligence        
> http://www.netintelligence.com/email


0001-Make-Guile-Debugger-less-flaky.patch (14K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Trevor D-2
Hi Ian

This looks to be a big improvement so I've pushed your patch
to origin/master.  This will make it easier to check out fully.
I'll finish checking out the details tomorrow.

Many thanks!

Trevor

----- Original Message -----
From: "Ian Hulin" <[hidden email]>
To: "Trevor Daniels" <[hidden email]>
Cc: <[hidden email]>
Sent: Wednesday, January 06, 2010 7:43 PM
Subject: Re: [frogs] Help with the Guile debugger


Hi all,
Please use this amended patch attached.  Apologies for the noise.

Cheers,

Ian

On 06/01/10 09:38, Ian Hulin wrote:

> Hi Trevor,
> Firstly a Happy New Year/ Glückliches NeuJahr/ Bonne Nouvelle
> Année/
> een vrolijke nieuwe jaar/ un feliz año nuevo
>
> to all on the Frogs List.
>
> Attached is a patch with some changes to the guile debugger code
> and
> the documentation (CG Chapter 8).
>
> Please test-drive and review.
>
> Cheers,
>
> Ian
>
> On 28/12/09 12:53, Trevor Daniels wrote:
>> Hi Ian
>>
>> Thanks for this - I'll give your suggestions a spin later today.
>> And
>> thanks for  confirming the problem is a general one, not down to
>> my incompetence.
>>
>> Carl's already copied your note to -bug, so presumably Valentin
>> will pick it up and add it to the tracker.
>>
>> Trevor
>>
>> ----- Original Message ----- From: "Ian Hulin" <[hidden email]>
>> To: "Trevor Daniels" <[hidden email]>
>> Cc: <[hidden email]>
>> Sent: Sunday, December 27, 2009 5:09 PM
>> Subject: Re: [frogs] Help with the Guile debugger
>>
>>
>>> Hi Trevor,
>>>
>>> On 18/12/09 00:35, Trevor Daniels wrote:
>>>> I've got to the stage in writing code where I need
>>>> to use the Guile debugger, but I find the instructions
>>>> in the CG:
>>>>
>>>> http://kainhofer.com/~lilypond/Documentation/contributor/debugging-lilypond.html#debugging-lilypond
>>>>
>>>>
>>>>
>>>> don't work for me.  Here's what happens.
>>>>
>>>> Compiling a ly program with debugging info is fine,
>>>> and after I've added \include "guile-debugger.ly"
>>>> to my test program it drops into the guile prompt
>>>> as it should.  So far so good.  But when I enter
>>>> the (break! ...) command the response is:
>>>>
>>>> GNU LilyPond 2.13.10
>>>> Processing `test1.ly'
>>>> Parsing...guile> (break! tab-duration-formatter)
>>>> ERROR: Unbound variable: break!
>>>> ABORT: (unbound-variable)
>>>> guile>
>>>>
>>>> But if I enter the commands contained in
>>>> guile-debugger.ly manually at the guile prompt
>>>> everything works as it should and I can set
>>>> breakpoints.
>>>>
>>>> I guess I'm doing something silly or missing
>>>> something obvious, but I can't see it.  Can anyone
>>>> help?
>>>>
>>>> TIA, Trevor
>>>>
>>>>
>>> 1) Can reproduce your findings
>>> 2) I'm investigating
>>> 3) I'm looking at a 0.2 of this using a module in scm
>>>
>>> This would mean you could do
>>> <In file your-source.ly>
>>> lily code
>>> \include "guile-debugger.ly"
>>>
>>> <In file your-scheme.scm>
>>> #(set-break! your-procedure)
>>> #(set-trace-subtree! your-procedure
>>> scheme code
>>>
>>>
>>> Then you'd do
>>>
>>> $ lilypond your-source.ly
>>> Parsing...
>>> guile> (quit)
>>> This is the Guile debugger -- for help, type `help'.
>>> There are nn frames on the stack.
>>>
>>> Frame nn at your-source.ly:xx:y
>>>         [your-procedure args]
>>> debug>
>>>
>>> Please could you log a tracker (or ask Valentin to do it) so we
>>> can log
>>> that I'm working on this?
>>>
>>> Cheers,
>>> Ian
>>>
>>
>>
>>
>> ______________________________________________        This email
>> has
>> been scanned by Netintelligence
>> http://www.netintelligence.com/email
>>
>>
>
>
>
> ______________________________________________        This email
> has
> been scanned by Netintelligence
> http://www.netintelligence.com/email




---
----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Patrick McCarty
In reply to this post by Ian Hulin
On Wed, Jan 6, 2010 at 11:43 AM, Ian Hulin <[hidden email]> wrote:
> Hi all,
> Please use this amended patch attached.  Apologies for the noise.

Hi Ian,

Were you able to test this patch before submitting it for review?

I haven't tested myself, but looking at scm/guile-debugger.scm,
(define-module ...) is closed too early, so I suspect this file will
exit with errors when using this module.

Also, please take a second look at the extraneous whitespace,
especially in scm/guile-debugger.scm.  The indentation in that file
can also be improved.

-Patrick

---
----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Trevor D-2

Patrick McCarty wrote Thursday, January 07, 2010 2:43 AM


On Wed, Jan 6, 2010 at 11:43 AM, Ian Hulin <[hidden email]> wrote:

>> Please use this amended patch attached. Apologies for the noise.

> Were you able to test this patch before submitting it for review?

> I haven't tested myself, but looking at scm/guile-debugger.scm,
> (define-module ...) is closed too early, so I suspect this file
> will
> exit with errors when using this module.

I've tried this now.  It does indeed exit with

  unbound variable: set-break!

Can either you or Ian suggest a fix for this please?

> Also, please take a second look at the extraneous whitespace,
> especially in scm/guile-debugger.scm.

I removed trailing whitespace before pushing.

> The indentation in that file can also be improved.

I can deal with this, but I'd like to have working code first.

Trevor



---
----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Patrick McCarty
On 2010-01-07, Trevor Daniels wrote:

>
> Patrick McCarty wrote Thursday, January 07, 2010 2:43 AM
>
>
> On Wed, Jan 6, 2010 at 11:43 AM, Ian Hulin <[hidden email]> wrote:
>
> >>Please use this amended patch attached. Apologies for the noise.
>
> >Were you able to test this patch before submitting it for review?
>
> >I haven't tested myself, but looking at scm/guile-debugger.scm,
> >(define-module ...) is closed too early, so I suspect this file
> >will
> >exit with errors when using this module.
>
> I've tried this now.  It does indeed exit with
>
>  unbound variable: set-break!
>
> Can either you or Ian suggest a fix for this please?

I just pushed a fix, which hopefully works as Ian intends.

Thanks,
Patrick

---
----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Patrick McCarty
In reply to this post by Ian Hulin
On Wed, Jan 6, 2010 at 11:43 AM, Ian Hulin <[hidden email]> wrote:
> Hi all,
> Please use this amended patch attached.  Apologies for the noise.

Hi Ian,

After fixing the compilation of the new guile-debugger module, I tried
using it, but I noticed that none of its bindings were available at
the Guile prompt.

The attached patch seems to fix the loading of guile-debugger, but I
don't know if this works the way you intended.  What do you think?

Thanks,
Patrick

0001-Fix-module-loading-in-guile-debugger.scm.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Patrick McCarty
On Thu, Jan 7, 2010 at 10:58 AM, Patrick McCarty <[hidden email]> wrote:

> On Wed, Jan 6, 2010 at 11:43 AM, Ian Hulin <[hidden email]> wrote:
>> Hi all,
>> Please use this amended patch attached.  Apologies for the noise.
>
> Hi Ian,
>
> After fixing the compilation of the new guile-debugger module, I tried
> using it, but I noticed that none of its bindings were available at
> the Guile prompt.
>
> The attached patch seems to fix the loading of guile-debugger, but I
> don't know if this works the way you intended.  What do you think?

Never mind.  The patch I just sent doesn't work after all.  My
experimenting got in the way of producing an accurate patch.  :-)

At the prompt, if I manually invoke "(use-modules (scm
guile-debugger))", then the bindings (set-break!, etc.) become
visible.

Somehow `lilypond-module' needs to remember that it is using the
guile-debugger module *before* `top-repl' is invoked.

Thanks,
Patrick

---
----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Trevor D-2

Patrick McCarty wrote Thursday, January 07, 2010 7:10 PM


> At the prompt, if I manually invoke "(use-modules (scm
> guile-debugger))", then the bindings (set-break!, etc.) become
> visible.

This seems to be a viable way to debug Scheme code.  I'd be happy
to amend the CG to say this, but there may be more problems.
If I set a break-point and enter (quit) the debugger is entered at
the
break-point as it should be.  All the debug commands seem to work
fine, except for finish.  This produces the error:

Internal debugger error:
usr/share/guile/1.8/ice-9/debugger/command-loop.scm:51:6:
In procedure throw in expression (apply throw key ...):
usr/share/guile/1.8/ice-9/debugger/command-loop.scm:51:6:
Unbound variable: trace-trap

Not sure if this is relevant or due to my lack of familiarity with
the guile debugger.

> Somehow `lilypond-module' needs to remember that it is using the
> guile-debugger module *before* `top-repl' is invoked.

This would be better if you can figure out a way to do it.

Thanks,
Trevor



---
----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Ian Hulin
Hi Trevor,

On 07/01/10 23:55, Trevor Daniels wrote:

>
> Patrick McCarty wrote Thursday, January 07, 2010 7:10 PM
>
>
>> At the prompt, if I manually invoke "(use-modules (scm
>> guile-debugger))", then the bindings (set-break!, etc.) become
>> visible.
>
> This seems to be a viable way to debug Scheme code.  I'd be happy
> to amend the CG to say this, but there may be more problems.
> If I set a break-point and enter (quit) the debugger is entered at the
> break-point as it should be.  All the debug commands seem to work
> fine, except for finish.  This produces the error:
>
> Internal debugger error:
> usr/share/guile/1.8/ice-9/debugger/command-loop.scm:51:6:
> In procedure throw in expression (apply throw key ...):
> usr/share/guile/1.8/ice-9/debugger/command-loop.scm:51:6:
> Unbound variable: trace-trap
>
work-round - use quit or continue at the debug> prompt instead.
> Not sure if this is relevant or due to my lack of familiarity with
> the guile debugger.
>
>> Somehow `lilypond-module' needs to remember that it is using the
>> guile-debugger module *before* `top-repl' is invoked.
>
> This would be better if you can figure out a way to do it.

Attached patch should do this.

Cheers,
Ian



0001-Make-Guile-Debugger-less-flaky.patch (29K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Trevor D-2
Ian

Thanks, but I can't apply this as it would remove many recent
changes
to the CG.  Could you please rebase your branch onto a fresh git
pull of master and make a new patch for me.

Trevor

----- Original Message -----
From: "Ian Hulin" <[hidden email]>
To: "Trevor Daniels" <[hidden email]>
Cc: "Patrick McCarty" <[hidden email]>; <[hidden email]>
Sent: Friday, January 08, 2010 12:14 AM
Subject: Re: [frogs] Help with the Guile debugger


> Hi Trevor,
>
> On 07/01/10 23:55, Trevor Daniels wrote:
>>
>> Patrick McCarty wrote Thursday, January 07, 2010 7:10 PM
>>
>>
>>> At the prompt, if I manually invoke "(use-modules (scm
>>> guile-debugger))", then the bindings (set-break!, etc.) become
>>> visible.
>>
>> This seems to be a viable way to debug Scheme code.  I'd be happy
>> to amend the CG to say this, but there may be more problems.
>> If I set a break-point and enter (quit) the debugger is entered
>> at the
>> break-point as it should be.  All the debug commands seem to work
>> fine, except for finish.  This produces the error:
>>
>> Internal debugger error:
>> usr/share/guile/1.8/ice-9/debugger/command-loop.scm:51:6:
>> In procedure throw in expression (apply throw key ...):
>> usr/share/guile/1.8/ice-9/debugger/command-loop.scm:51:6:
>> Unbound variable: trace-trap
>>
> work-round - use quit or continue at the debug> prompt instead.
>> Not sure if this is relevant or due to my lack of familiarity
>> with
>> the guile debugger.
>>
>>> Somehow `lilypond-module' needs to remember that it is using the
>>> guile-debugger module *before* `top-repl' is invoked.
>>
>> This would be better if you can figure out a way to do it.
>
> Attached patch should do this.
>
> Cheers,
> Ian
>
>
>



---
----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Ian Hulin
In reply to this post by Trevor D-2
On 07/01/10 23:55, Trevor Daniels wrote:

>
> Patrick McCarty wrote Thursday, January 07, 2010 7:10 PM
>
>
>> At the prompt, if I manually invoke "(use-modules (scm
>> guile-debugger))", then the bindings (set-break!, etc.) become
>> visible.
>
> This seems to be a viable way to debug Scheme code.  I'd be happy
> to amend the CG to say this, but there may be more problems.
> If I set a break-point and enter (quit) the debugger is entered at the
> break-point as it should be.  All the debug commands seem to work
> fine, except for finish.  This produces the error:
>
> Internal debugger error:
> usr/share/guile/1.8/ice-9/debugger/command-loop.scm:51:6:
> In procedure throw in expression (apply throw key ...):
> usr/share/guile/1.8/ice-9/debugger/command-loop.scm:51:6:
> Unbound variable: trace-trap
>
> Not sure if this is relevant or due to my lack of familiarity with
> the guile debugger.

It's a guile bug:
Line 41 of
/usr/share/guile/1.8/ice-9/debugging/ice-9-debugger-extensions.scm
should say

(use-modules (ice-9 debugging steps) (ice-9 debugging trace))

This fixes the crash for finish.

Cheers,

Ian

---
----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Ian Hulin
In reply to this post by Trevor D-2
Hi Trevor,
On 08/01/10 00:38, Trevor Daniels wrote:
> Ian
>
> Thanks, but I can't apply this as it would remove many recent changes
> to the CG.  Could you please rebase your branch onto a fresh git
> pull of master and make a new patch for me.
>
> Trevor

Attached is a patch after a rebase.

Cheers,

Ian


>
> ----- Original Message ----- From: "Ian Hulin" <[hidden email]>
> To: "Trevor Daniels" <[hidden email]>
> Cc: "Patrick McCarty" <[hidden email]>; <[hidden email]>
> Sent: Friday, January 08, 2010 12:14 AM
> Subject: Re: [frogs] Help with the Guile debugger
>
>
>> Hi Trevor,
>>
>> On 07/01/10 23:55, Trevor Daniels wrote:
>>>
>>> Patrick McCarty wrote Thursday, January 07, 2010 7:10 PM
>>>
>>>
>>>> At the prompt, if I manually invoke "(use-modules (scm
>>>> guile-debugger))", then the bindings (set-break!, etc.) become
>>>> visible.
>>>
>>> This seems to be a viable way to debug Scheme code.  I'd be happy
>>> to amend the CG to say this, but there may be more problems.
>>> If I set a break-point and enter (quit) the debugger is entered at the
>>> break-point as it should be.  All the debug commands seem to work
>>> fine, except for finish.  This produces the error:
>>>
>>> Internal debugger error:
>>> usr/share/guile/1.8/ice-9/debugger/command-loop.scm:51:6:
>>> In procedure throw in expression (apply throw key ...):
>>> usr/share/guile/1.8/ice-9/debugger/command-loop.scm:51:6:
>>> Unbound variable: trace-trap
>>>
>> work-round - use quit or continue at the debug> prompt instead.
>>> Not sure if this is relevant or due to my lack of familiarity with
>>> the guile debugger.
>>>
>>>> Somehow `lilypond-module' needs to remember that it is using the
>>>> guile-debugger module *before* `top-repl' is invoked.
>>>
>>> This would be better if you can figure out a way to do it.
>>
>> Attached patch should do this.
>>
>> Cheers,
>> Ian
>>
>>
>>
>
>
>
> ______________________________________________        This email has
> been scanned by Netintelligence        
> http://www.netintelligence.com/email
>
>


0154-Make-Guile-Debugger-less-flaky.patch (29K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Trevor D-2
Ian

This looks much like the last patch.  If you look at lines c. 314 to
c. 630 in the patch you'll see it would remove much of Carl's recent
work on the CG (I think it was Carl's).

Did you rebase to a fresh pull of master?

However ...

I have extracted the new versions of guile-debugger.scm and
guile-debugger.ly from this patch and applied them locally by
hand.  They seem to work :) so I'll try them out more carefully and
if it all seems good I'll push them to master.  I won't attempt to
extract the corresponding changes to the CG by hand though,
so if you can prepare a correct patch for those that would be
helpful; otherwise I'll check out the documentation when I'm
more familiar with debugging and make any tweaks which seem
necessary.

Many thanks for all your work on this!

Trevor

----- Original Message -----
From: "Ian Hulin" <[hidden email]>
To: "Trevor Daniels" <[hidden email]>
Cc: "Patrick McCarty" <[hidden email]>; <[hidden email]>
Sent: Friday, January 08, 2010 2:38 PM
Subject: Re: [frogs] Help with the Guile debugger


> Hi Trevor,
> On 08/01/10 00:38, Trevor Daniels wrote:
>> Ian
>>
>> Thanks, but I can't apply this as it would remove many recent
>> changes
>> to the CG.  Could you please rebase your branch onto a fresh git
>> pull of master and make a new patch for me.
>>
>> Trevor
>
> Attached is a patch after a rebase.
>
> Cheers,
>
> Ian
>
>
>>
>> ----- Original Message ----- From: "Ian Hulin" <[hidden email]>
>> To: "Trevor Daniels" <[hidden email]>
>> Cc: "Patrick McCarty" <[hidden email]>; <[hidden email]>
>> Sent: Friday, January 08, 2010 12:14 AM
>> Subject: Re: [frogs] Help with the Guile debugger
>>
>>
>>> Hi Trevor,
>>>
>>> On 07/01/10 23:55, Trevor Daniels wrote:
>>>>
>>>> Patrick McCarty wrote Thursday, January 07, 2010 7:10 PM
>>>>
>>>>
>>>>> At the prompt, if I manually invoke "(use-modules (scm
>>>>> guile-debugger))", then the bindings (set-break!, etc.) become
>>>>> visible.
>>>>
>>>> This seems to be a viable way to debug Scheme code.  I'd be
>>>> happy
>>>> to amend the CG to say this, but there may be more problems.
>>>> If I set a break-point and enter (quit) the debugger is entered
>>>> at the
>>>> break-point as it should be.  All the debug commands seem to
>>>> work
>>>> fine, except for finish.  This produces the error:
>>>>
>>>> Internal debugger error:
>>>> usr/share/guile/1.8/ice-9/debugger/command-loop.scm:51:6:
>>>> In procedure throw in expression (apply throw key ...):
>>>> usr/share/guile/1.8/ice-9/debugger/command-loop.scm:51:6:
>>>> Unbound variable: trace-trap
>>>>
>>> work-round - use quit or continue at the debug> prompt instead.
>>>> Not sure if this is relevant or due to my lack of familiarity
>>>> with
>>>> the guile debugger.
>>>>
>>>>> Somehow `lilypond-module' needs to remember that it is using
>>>>> the
>>>>> guile-debugger module *before* `top-repl' is invoked.
>>>>
>>>> This would be better if you can figure out a way to do it.
>>>
>>> Attached patch should do this.
>>>
>>> Cheers,
>>> Ian
>>>
>>>
>>>
>>
>>
>>
>> ______________________________________________        This email
>> has
>> been scanned by Netintelligence
>> http://www.netintelligence.com/email
>>
>>
>
>



---
----
Join the Frogs!

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Help with the Guile debugger

Ian Hulin
HI Trevor,

On 08/01/10 16:26, Trevor Daniels wrote:
> Ian
>
> This looks much like the last patch.  If you look at lines c. 314 to
> c. 630 in the patch you'll see it would remove much of Carl's recent
> work on the CG (I think it was Carl's).
>
Was this the stuff in the "LilyPond Miscellany" section
> Did you rebase to a fresh pull of master?
>
Yeah, but I've had another go and resolved some merge conflicts and it
looks like the main thing taken out is the LilyPond Miscellany stuff above.

I'll try restoring it.
I've attached the updated patch, this includes the bits you've already
extracted.

Cheers,
Ian Hulin

0001-Make-Guile-Debugger-less-flaky.patch (12K) Download Attachment
12
Loading...