[Changeset] make symbol_table:; find_function also find class specific functions

David Bateman dbateman at dbateman.org
Mon Sep 29 17:37:10 CDT 2008


John W. Eaton wrote:
> On 28-Sep-2008, David Bateman wrote:
> 
> | Matlab allows thing like
> | 
> | help @myclass/myfunc
> | type @myclass/myfunc
> | dbstop @myclas/myfunc
> | 
> | to work and give the help, text and set the breakpoints in the class 
> | specific version of a function. The obvious change to allow this is tho 
> | change the symbol_table::find_function methods such that if the first 
> | character of the function name being looked for is "@" then it is 
> | assumed to be a class specific method that is requested and return that 
> | regardless of the arguments passed to the function.
> | 
> | This works for the help, type etc command and sets the breakpoints 
> | correctly, as dbstatus returns the positions of the newly set 
> | breakpoints. However the code doesn't break correctly yet in the class 
> | specific method, and I'm not sure why. Any ideas?
> 
> I applied the changeset.
> 
> Setting breakpoints in class methods worked for me, but not class
> constructors.  I think the following change should fix that problem.
> 
> Thanks,
> 
> jwe
> 
> 
> 

In fact I was trying to stop in the subsref method and that apparently 
still doesn't work. I thought the issue was general but as you pointed 
out it isn't.

Other methods that I can't set a breakpoint in include subsasgn, 
vertcat, horzcat (even called directly and not through the [] operator). 
basically any operator. I can stop in methods like reshape, size, any, 
all, etc.

So I think there are still some issues to address here. Though at least 
its partly working :-)

Cheers
David


-- 
David Bateman                                dbateman at dbateman.org
35 rue Gambetta                              +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE            +33 6 72 01 06 33 (Mob)


More information about the Octave-maintainers mailing list