Stack traces arising in pcode do not include line numbers

1 回表示 (過去 30 日間)
Rakesh Karia
Rakesh Karia 2019 年 7 月 26 日
編集済み: Shivam Sardana 2019 年 7 月 31 日
Consider the following code:
% doThings.m
i = 1;
j = 2;
k = 3;
l = seven; %seven is deliberately undefined
I pcode compile doThings.m to give me the following:
doThings.p
If I now run doThings in Matlab 2018a, I see this:
>> doThings
Undefined function or variable 'seven'.
Error in doThings
The same code, when run in Matlab 2013a gives me this:
>> doThings
Undefined function or variable 'seven'.
Error in
/home/rk/doThings.p>doThings
(line 4)
Notice that I get a line number in the stack trace from 2013a, but no line numbers from the stack trace in 2018a.
  • Why are line numbers no longer visible in error traces of pcode-compiled matlab?
  • Is there a configuration option to switch line numbering on for pcode-compiled matlab?
  • If so, how can I set this option, assuming a headless installation?

回答 (2 件)

Hari Krishna Ravuri
Hari Krishna Ravuri 2019 年 7 月 30 日
編集済み: Hari Krishna Ravuri 2019 年 7 月 31 日
I understand that, line numbers are not being displayed in pcode error traces in your MATLAB 2018a.Please update your MATLAB to MATLAB 2019a.
  1 件のコメント
Rakesh Karia
Rakesh Karia 2019 年 7 月 30 日
Are you able to link to any release notes / commentary from Mathworks that makes the removal and re-add explicit?
I can't see anything in the release notes or 2019a bugfix reports that point to this.

サインインしてコメントする。


Shivam Sardana
Shivam Sardana 2019 年 7 月 31 日
編集済み: Shivam Sardana 2019 年 7 月 31 日
The issue with pcode has been brought to the notice of developers. They will investigate the matter further.

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by