public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
* frysk.rt.Frame and frysk.debuginfo.DebugInfo
@ 2007-06-07 13:13 Stan Cox
  2007-06-07 13:30 ` Stan Cox
  2007-06-07 14:54 ` Sami Wagiaalla
  0 siblings, 2 replies; 3+ messages in thread
From: Stan Cox @ 2007-06-07 13:13 UTC (permalink / raw)
  To: Sami Wagiaalla, Nurdin Premji; +Cc: Frysk List

This might be Adam's problem, or at least I discovered it
investigating his problem.

frysk.rt.Frame.toPrint
-calls frysk.rt.Frame.getSubprogram()
 -calls the constructor frysk.debuginfo.DebugInfo.DebugInfo
but earlier:
frysk.cli.hpd.CLI.finishAttach
-calls the constructor frysk.debuginfo.DebugInfo.DebugInfo

This causes DebugInfo to get out of sync.  So we need to come up with a
way to have a single shared DebugInfo.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: frysk.rt.Frame and frysk.debuginfo.DebugInfo
  2007-06-07 13:13 frysk.rt.Frame and frysk.debuginfo.DebugInfo Stan Cox
@ 2007-06-07 13:30 ` Stan Cox
  2007-06-07 14:54 ` Sami Wagiaalla
  1 sibling, 0 replies; 3+ messages in thread
From: Stan Cox @ 2007-06-07 13:30 UTC (permalink / raw)
  To: Frysk List

Aha, DebugInfo.debugInfoEvaluator should not have been static.  This
wasn't a problem until frysk.rt.Frame.getSubprogram() started making
its own copy.  We probably don't want multiple copies around, but
meanwhile this is fixed by not making it static.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: frysk.rt.Frame and frysk.debuginfo.DebugInfo
  2007-06-07 13:13 frysk.rt.Frame and frysk.debuginfo.DebugInfo Stan Cox
  2007-06-07 13:30 ` Stan Cox
@ 2007-06-07 14:54 ` Sami Wagiaalla
  1 sibling, 0 replies; 3+ messages in thread
From: Sami Wagiaalla @ 2007-06-07 14:54 UTC (permalink / raw)
  To: Stan Cox; +Cc: Nurdin Premji, Frysk List


> So we need to come up with a
> way to have a single shared DebugInfo.
>   
Factories are a common way of solving this problem. Make the constructor 
of DebugInfo private and DebugInfo objects can only be created through a 
DebugInfoFactory which keeps a cache of DebugInfo objects. 
DebugInfoFactory would take a frame, check the cache and return a 
DebugInfo object.

This by the way also solves the antlr problem. If there is a DebugInfo 
object per frame, then antlr objects called from within that DebugInfo 
object are only concered with that objects Frame.

Sami Wagiaalla

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-07 13:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-07 13:13 frysk.rt.Frame and frysk.debuginfo.DebugInfo Stan Cox
2007-06-07 13:30 ` Stan Cox
2007-06-07 14:54 ` Sami Wagiaalla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).