octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Changeset] make symbol_table:; find_function also find class specif


From: John W. Eaton
Subject: Re: [Changeset] make symbol_table:; find_function also find class specific functions
Date: Tue, 30 Sep 2008 12:45:34 -0400

On 30-Sep-2008, David Bateman wrote:

| John W. Eaton wrote:
| > On 30-Sep-2008, David Bateman wrote:
| >
| > | 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.
| >
| > Hmm.  It seems to work for me with subsasgn in a simple class I have.
| > Can you send an example of a constructor and a subsasgn method for a
| > class where it fails?
| >
| > jwe
| >   
| Here is my test class I'm using, and the output I'm seeing from a just 
| built version of Octave.
| 
| octave:2> a = gf(1:4, 4), b = gf(4:-1:1, 4)
| a =
| GF(2^4) array. Primitive Polynomial = D^4+D+1 (decimal 19)
| 
| Array elements =
| 
|    1   2   3   4
| 
| b =
| GF(2^4) array. Primitive Polynomial = D^4+D+1 (decimal 19)
| 
| Array elements =
| 
|    4   3   2   1
| 
| octave:3> dbstop @gf/subsasgn
| ans =  2
| octave:4> a(1) = 1
| a =
| GF(2^4) array. Primitive Polynomial = D^4+D+1 (decimal 19)
| 
| Array elements =
| 
|    1   2   3   4
| 
| octave:5> dbstop @gf/subsref
| ans =  2
| octave:6> a(1)
| ans =
| GF(2^4) array. Primitive Polynomial = D^4+D+1 (decimal 19)
| 
| Array elements =
| 
|  1
| 
| octave:7> dbstop @gf/plus
| ans =  2
| octave:8> a + b
| ans =
| GF(2^4) array. Primitive Polynomial = D^4+D+1 (decimal 19)
| 
| Array elements =
| 
|    5   1   1   5
| 
| octave:9> dbstop @gf/reshape
| ans =  2
| octave:10> reshape(a,2,2)
| reshape: line 2, column 5
| y = g
| keyboard: stopped in 
| /home/adb014/nobackup/perso/octave/galois/@gf/reshape.m at line 2
| debug> dbcont
| ans =
| GF(2^4) array. Primitive Polynomial = D^4+D+1 (decimal 19)
| 
| Array elements =
| 
|    1   3
|    2   4

OK.  The breakpoints seem to be failing because they are set on switch
statements or other locations that are not handled properly by the
debug code.  I tried a few quick things to fix it but wasn't
successful.  I don't understand the breakpoint/debug code very well
and don't have more time at the moment to debug it.  But you can see
that the breakpoints can work in methods and constructors if you do

  dbstop @gf/subsasgn 5

for example.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]