From romain.francois at dbmail.com  Sun May 24 16:23:46 2009
From: romain.francois at dbmail.com (Romain Francois)
Date: Sun, 24 May 2009 16:23:46 +0200
Subject: [Rd] Can a function know what other function called it?
In-Reply-To: <4A19366F.5080402@stats.uwo.ca>
References: <c2350ba40905231337u5ead6f97o95ee24f2faea081e@mail.gmail.com>	<4A1862AD.2070600@fhcrc.org>
	<4A19366F.5080402@stats.uwo.ca>
Message-ID: <4A195872.5030507@dbmail.com>

Duncan Murdoch wrote:
> On 23/05/2009 4:55 PM, Robert Gentleman wrote:
>> Kynn Jones wrote:
>>
[snip]
>>
>>   and you have a breakpoint in bar, you could not (easily) 
>> distinguish which of
>> the two calls to bar was active. There is no line counter or anything 
>> of that
>> sort available.
>
> The evaluator doesn't pay any attention to srcref records, so this is 
> still true, but it would be possible to keep the srcref on the stack 
> as well as all the other info there.

Please

>
> I've written code (and I think I sent it to you last year) that can do 
> things like replacing the statement coming from a particular line of a 
> file with whatever code you like; this could be used in writing a nice 
> source-level debugger.

yes

>
> Duncan Murdoch
>
>>
>>  best wishes
>>    Robert
>>
>


-- 
Romain Francois
Independent R Consultant
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr



[Rd] Can a function know what other function called it?
Romain Francois