[RTcmix-discuss] y.tab.c context

Brad Garton brad at music.columbia.edu
Fri Jan 7 12:08:28 EST 2005


On Thu, 6 Jan 2005, David Topper wrote:

> Now *that's* a good point.  Brad, you have some pull with those guys, 
> no?

Oh I wish!  I'm not sure that Luke even has full source -- there are still 
a bunch of legal entanglements with *IRCAM*, but I think they may be (or 
soon will be) expired.

> Maybe you can ask them for a gdb compiled version?  They don't have 
> to compile -g for their code (cause you know ... we'll all take it and 
> make millions).  But if they at least compile it ... then externals 
> compiled with gcc and -g ... should be ok.

I think this came up on the mailing-list in the past... not sure what the 
response was.  Maybe I'll search around, but am in the middle of having 
great fun (seriously!) right now with the wonderful new PField stuff.

> Or, I find it hard to believe that Code Warrior doesn't have some 
> mechanism to support gdb linking?

That I don't know -- in fact I haven't learned a whole lot about Code 
Warrior.  I borrowed a project template from Dan Trueman and basically use 
it as a glorified editor.  I'm still an old-fashioned makefile kinda guy. 
:-)

brad

>
> DT
> 
> Brad Garton wrote:
> 
> >Problem is that I can't figure how to run max/msp under gdb.
> >
> >brad
> >
> >On Thu, 6 Jan 2005, Douglas Scott wrote:
> >
> >  
> >
> >>Once again, you should let gdb come to the rescue.  Set a breakpoint in main.  After your RTcmix object is created, print the value of the address of app->SR.  Then, right before you go into yyparse, and type "watch 0xXXXXXXXX", where you substitute the address you got above for the X's.  The debugger should break if and when the value of SR changes.  It might be slow going, but worth a try.
> >>
> >>-DS
> >>
> >>
> >>Brad Garton <brad at music.columbia.edu> wrote:
> >>
> >>    
> >>
> >>>Gang --
> >>>
> >>>I've got rtcmix~ running if I call "parse_dispatch" directly from max/msp 
> >>>(i.e. no fun minc score parsing), but I'm running into a strange situation 
> >>>with the parser.  I have the parser parsing, but when it calls the 
> >>>dispatch function, it seems to be invoking a new RTcmix context with no 
> >>>initialized state -- the symptom I test is that SR is 0 in the dispatch 
> >>>function.
> >>>
> >>>So I hacked around a little, and found this weird behavior:
> >>>
> >>>1.  I call the "parse_score()" function in src/parser/parse_with_minc.c,
> >>>no problem.  To test, I modified it just to do this:
> >>>
> >>>   extern double parse_dispatch(char*, double*, int, void**);
> >>>   parse_dispatch("makegen", pp, 4, NULL);
> >>>
> >>>(filling in the pp[] array properly, of course).  When parse_dispatch is 
> >>>invoked (it lives in src/rtcmix/dispatch.cpp), context is fine, SR is 
> >>>44100.0.
> >>>
> >>>2.  So I change "parse_score()" back to call yyparse(), and I set up 
> >>>yyparse() (in src/parser/minc/y.tab.c) to do exactly (and only) the same 
> >>>two lines above.  This time when parse_dispatch is invoked it shows SR set 
> >>>to 0.0.
> >>>
> >>>What changed?  It's a C function (parse_score) calling a C function 
> >>>(yyparse)!  I'm flabbergasted.
> >>>
> >>>Also, where exactly (which Makefile) is libminc.a loaded into the finished 
> >>>executable?
> >>>
> >>>brad
> >>>
> >>>PS:  The parser is actually working well, as far as I can tell.  All the 
> >>>params get passed in to the appropriate functions intact from max/msp.  
> >>>And like I said, calling parse_dispatch() directly from max/msp makes 
> >>>sound sound sound, yay!
> >>>
> >>>PPS:  I changed the Makefile not to regenerate my y.tab.c file, so that 
> >>>isn't screwing it up either.
> >>>
> >>>_______________________________________________
> >>>RTcmix-discuss mailing list
> >>>RTcmix-discuss at music.columbia.edu
> >>>http://music.columbia.edu/mailman/listinfo/rtcmix-discuss
> >>>
> >>>      
> >>>
> >>
> >>    
> >>
> >
> >_______________________________________________
> >RTcmix-discuss mailing list
> >RTcmix-discuss at music.columbia.edu
> >http://music.columbia.edu/mailman/listinfo/rtcmix-discuss
> >  
> >
> 
> 



More information about the RTcmix-discuss mailing list