Bug 14818 - R_Srcref not updated when entering function
R_Srcref not updated when entering function
Status: RESOLVED FIXED
Product: R
Classification: Unclassified
Component: Misc
R 2.14.1 patched
All All
: P5 normal
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-16 13:42 UTC by Stephan Wahlbrink
Modified: 2012-02-17 17:16 UTC (History)
1 user (show)

See Also:


Attachments
Patch (1.69 KB, application/octet-stream)
2012-02-16 13:42 UTC, Stephan Wahlbrink
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Wahlbrink 2012-02-16 13:42:21 UTC
Created attachment 1271 [details]
Patch

When entering a function which is marked to debug, the srcref of the function body is printed to the console but global variable R_Srcref is not updated. R_Srcref should be updated too, so that other code like GUIs can access and show the current source position as well.

The relevant code is in applyClosure and R_execClosure in eval.c; a patch is attached.
Comment 1 Duncan Murdoch 2012-02-16 16:58:05 UTC
Please check out r58367 or later of R-devel to confirm that this gives you the information you need.
Comment 2 Stephan Wahlbrink 2012-02-17 17:16:31 UTC
Yes, it works. Thanks.