bugGNU Octave - Bugs: bug #47575, MXE-octave "dbstop...

 
 

bug #47575: MXE-octave "dbstop @ftp/dir" fails

Submitter:  Avinoam Kalma <avinoam>
Submitted:  Wed 30 Mar 2016 06:44:04 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  lachlan
Originator Name:  Avinoam Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 18 Apr 2016 01:45:48 AM UTC, comment #17: 

I tested the patch and it works for me as well.  I pushed it here http://hg.savannah.gnu.org/hgweb/octave/rev/37a44d8af461.  Closing report.

Rik <rik5>
Group administrator
Sun 10 Apr 2016 01:06:37 AM UTC, comment #16: 

Just to confirm that it works for me as expected after applying that patch.

Markus Mützel <mmuetzel>
Group administrator
Sun 10 Apr 2016 12:25:50 AM UTC, comment #15: 

Thanks, Markus.  That sounds like the behaviour we want, doesn't it?

I've attached a final patch (v3), without the diagnostic output, and with a commit message.  It is now ready for a maintainer to review.

(file #36882)

Lachlan Andrew <lachlan>
Sat 09 Apr 2016 08:15:26 PM UTC, comment #14: 

With your patch v2, I get the following result in Octave for Windows:

>> dbstop @ftp/dir
Trying to find @ftp\dir
ans =  27
>> dbclear all
Trying to find @ftp\dir
>> dbstop @ftp\dir
Trying to find @ftp\dir
ans =  27


The forward slash is correctly converted to a backslash, the function file opens in the editor of the GUI and the stop point is set to the first line of the function. This works for both forward and backslash.

Markus Mützel <mmuetzel>
Group administrator
Fri 08 Apr 2016 11:16:13 PM UTC, comment #13: 

Markus, I think your comment #11 was right.  (I had forgotten to save the .cc file before exporting the patch...)

Did you actually try inverting the translation?  If so, was it like  v2  of the patch (attached)?

(file #36870)

Lachlan Andrew <lachlan>
Fri 08 Apr 2016 08:41:01 PM UTC, comment #12: 

Please ignore the last comment. Nothing has to be inverted...

Markus Mützel <mmuetzel>
Group administrator
Fri 08 Apr 2016 07:51:09 PM UTC, comment #11: 

I think the replacement of the filesep should be inverted in your patch. Building with this change at the moment.

Markus Mützel <mmuetzel>
Group administrator
Fri 08 Apr 2016 05:31:48 PM UTC, comment #10: 


@Lachlan:

I have checked you patch on Win-7,
now both


dbstop @ftp/dir
dbstop @ftp\dir


are NOT working :-(

Avinoam Kalma <avinoam>
Group Member
Fri 08 Apr 2016 05:53:04 AM UTC, comment #9: 

Thanks Markus.  Can you also try the attached patch?

It explicitly converts @.../... to @...\... on Windows for dbstop and related commands.

If it works, someone will have to decide whether that should be done explicitly for the dbstop family, or whether symbol_table::find_function () should do it automatically.  I'm not sure what sort of performance hit there would be for that.  It has to do a linear scan of the string, but I don't think that  find_function  is called on regular function calls -- just during parsing and when "referring" to a function, as dbstop does.

(file #36861)

Lachlan Andrew <lachlan>
Thu 07 Apr 2016 08:58:18 AM UTC, comment #8: 

On an Octave mxe-build from mid march, I see the following:

>> which @ftp/dir
'@ftp/dir' is the file D:\test\octave-2016-03-22-19
-10\share\octave\4.1.0+\m\@ftp\dir.m
>> dbstop @ftp/dir
error: add_breakpoint: unable to find function '@ftp/dir'
>> dbstop @ftp\dir
ans =  27


Markus Mützel <mmuetzel>
Group administrator
Thu 07 Apr 2016 08:30:24 AM UTC, comment #7: 

I checked with Octave 4.0.1 on Windows 7:

>> which @ftp/dir
'@ftp/dir' is the file C:\Octave\Octave-4.0.1\share\octave\4.0
.1\m\@ftp\dir.m
>> dbstop @ftp/dir
error: add_breakpoint: unable to find the requested function
>> dbstop @ftp\dir
ans =  27


"which" does not seem to have a problem with "/" on Windows.

Markus Mützel <mmuetzel>
Group administrator
Thu 07 Apr 2016 07:17:51 AM UTC, comment #6: 

What does Windows do for


which @ftp/dir


Also, note that you are using an out-of-date build.  The warning is now "add_breakpoint: unable to find function '<name>'".

Lachlan Andrew <lachlan>
Thu 31 Mar 2016 04:07:16 PM UTC, comment #5: 

Just tested this with Matlab on Windows: it accepts both forward slash '/' and back slash '\' in arguments for dbstop.

Markus Mützel <mmuetzel>
Group administrator
Thu 31 Mar 2016 03:18:33 PM UTC, comment #4: 

I think we need to know what the Matlab behavior is in this regard in order to fix it.  It may be that Matlab accepts either '/' or '\' in which case the fix should be in the C++ code.  Or it may be that Matlab really wants a file path which means '@class\method.m' for Windows and '@aclass/method.m' for Linux.  If this is the case then we just need to alter the BIST test to have an ispc() clause to decide which filesep to use.

Rik <rik5>
Group administrator
Thu 31 Mar 2016 10:26:09 AM UTC, comment #3: 

@Rik (comment #1)

This test was added in http://hg.savannah.gnu.org/hgweb/octave/rev/b248c28d9a7b.
I did not check it, but brobably failed always in Windows.

Avinoam Kalma <avinoam>
Group Member
Wed 30 Mar 2016 08:55:45 PM UTC, comment #2: 

Second question: Does Matlab allow the '/' as a separator for "@class/method.m".  Or does it too want "@class\method.m" on Windows?

Rik <rik5>
Group administrator
Wed 30 Mar 2016 08:51:08 PM UTC, comment #1: 

Sure looks like a path separator problem.  Did this use to work, i.e., this is a regression, or has it always failed?

Rik <rik5>
Group administrator
Wed 30 Mar 2016 06:44:04 PM UTC, original submission:  


Checking in MXE-Octave under Win-7


>>  dbstop @ftp/dir
error: add_breakpoint: unable to find the requested function


This error causes failure in test libinterp\corefcn\debug.cc-tst

note:

>>  dbstop @ftp\dir


works fine

Avinoam Kalma <avinoam>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lachlan (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by avinoam (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-18 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2016-04-10 lachlan Attached File- Added bug_47575_windows_class_dbstop_v3.cset, #36882
        StatusNeed Info Patch Submitted
        Assigned toNone lachlan
    2016-04-08 lachlan Attached File- Added bug_47575_Windows_class_dbstop_v2.cset, #36870
    2016-04-08 lachlan Attached File- Added bug_47575_Windows_class_dbstop.cset, #36861
    2016-03-31 rik5 StatusNone Need Info
    2016-03-30 rik5 SummaryMXE-octave dbstop @ftp/dir fails MXE-octave "dbstop @ftp/dir" fails

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code