* Re: frysk-core/frysk hpd/AllPTSet.java hpd/CLI.jav ... [not found] <20070809170656.7895.qmail@sourceware.org> @ 2007-08-09 23:10 ` Phil Muldoon 2007-08-10 0:04 ` Phil Muldoon 0 siblings, 1 reply; 3+ messages in thread From: Phil Muldoon @ 2007-08-09 23:10 UTC (permalink / raw) To: frysk, Tim Moore Tim At first glance, and I could be wrong, but this commit appears to have broken all core file operations in fhpd. [pmuldoon@localhost bindir]$ ./fhpd core.3260 /bin/bash Attached to core file: /home/pmuldoon/frysk_bin/frysk-core/frysk/bindir/core.3260 (fhpd) where java.lang.ClassCastException: frysk.hpd.TaskData cannot be cast to frysk.proc.Task at frysk.hpd.WhereCommand.handle(WhereCommand.java:72) at frysk.hpd.CLI.execCommand(CLI.java:436) at frysk.bindir.fhpd.main(fhpd.java:148) Internal debugger error: frysk.hpd.TaskData cannot be cast to frysk.proc.Task (fhpd) quit java.lang.ClassCastException: frysk.hpd.TaskData cannot be cast to frysk.proc.Task at frysk.hpd.DetachCommand.handle(DetachCommand.java:68) at frysk.hpd.QuitCommand.handle(QuitCommand.java:67) at frysk.hpd.CLI.execCommand(CLI.java:436) at frysk.bindir.fhpd.main(fhpd.java:148) Quitting... Internal debugger error: frysk.hpd.TaskData cannot be cast to frysk.proc.Task moore@sourceware.org wrote: > CVSROOT: /cvs/frysk > Module name: frysk-core > Changes by: moore@sourceware.org 2007-08-09 17:06:56 > > Modified files: > frysk/hpd : AllPTSet.java CLI.java ChangeLog > frysk/rt : ChangeLog > Added files: > frysk/rt : ProcTaskIDManager.java > Removed files: > frysk/hpd : TestSetCreation.java > > Log message: > Infrastructure for ptsets based on real processes and tasks > > frysk-core/frysk/hpd/ChangeLog > 2007-08-08 Tim Moore <timoore@redhat.com> > > * AllPTSet.java: Complete rewrite to reference active Procs and > Tasks via the ProcTaskIDManager. > * CLI.java (idManager): New variable, reference to > ProcTaskIDManager. > (startAttach): Only initialize steppingEngine once. > (CLI): Initialize idManager. > (getCommandPTSet): New method. > * TestSetCreation.java: Remove file because AllPTSet doesn't > support creation of random proc/task numbers anymore. > > frysk-core/frysk/rt/ChangeLog > 2007-08-08 Tim Moore <timoore@redhat.com> > > * ProcTaskIDManager.java: New file. > > Patches: > http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/hpd/AllPTSet.java.diff?cvsroot=frysk&r1=1.1&r2=1.2 > http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/hpd/CLI.java.diff?cvsroot=frysk&r1=1.7&r2=1.8 > http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/hpd/ChangeLog.diff?cvsroot=frysk&r1=1.27&r2=1.28 > http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/hpd/TestSetCreation.java.diff?cvsroot=frysk&r1=1.1&r2=NONE > http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/rt/ProcTaskIDManager.java.diff?cvsroot=frysk&r1=NONE&r2=1.1 > http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/rt/ChangeLog.diff?cvsroot=frysk&r1=1.352&r2=1.353 > > ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: frysk-core/frysk hpd/AllPTSet.java hpd/CLI.jav ... 2007-08-09 23:10 ` frysk-core/frysk hpd/AllPTSet.java hpd/CLI.jav Phil Muldoon @ 2007-08-10 0:04 ` Phil Muldoon 2007-08-10 1:49 ` Phil Muldoon 0 siblings, 1 reply; 3+ messages in thread From: Phil Muldoon @ 2007-08-10 0:04 UTC (permalink / raw) To: frysk, Tim Moore I did a simple adjustment here [pmuldoon@localhost hpd]$ cvs diff WhereCommand.java Index: WhereCommand.java =================================================================== RCS file: /cvs/frysk/frysk-core/frysk/hpd/WhereCommand.java,v retrieving revision 1.4 diff -u -p -r1.4 WhereCommand.java --- WhereCommand.java 9 Aug 2007 17:13:49 -0000 1.4 +++ WhereCommand.java 9 Aug 2007 23:50:07 -0000 @@ -69,7 +69,7 @@ class WhereCommand level = Integer.parseInt((String)params.get(0)); Iterator taskIter = ptset.getTasks(); while (taskIter.hasNext()) { - Task task = (Task)taskIter.next(); + Task task = ((TaskData)taskIter.next()).getTask(); DebugInfoFrame tmpFrame = null; int l = cli.getTaskStackLevel(task); int stopLevel; And that makes it work for corefile tasks, but fail for live tasks with the exception: [pmuldoon@localhost bindir]$ ./fhpd 15630 Attached to process 15630 (fhpd) where Inside where command java.lang.ClassCastException: frysk.proc.live.LinuxTask cannot be cast to frysk.hpd.TaskData at frysk.hpd.WhereCommand.handle(WhereCommand.java:74) at frysk.hpd.CLI.execCommand(CLI.java:436) at frysk.bindir.fhpd.main(fhpd.java:148) Internal debugger error: frysk.proc.live.LinuxTask cannot be cast to frysk.hpd.TaskData Could be a case of weak typing? Plugged green wire into red jack and all that ;) Regards Phil Phil Muldoon wrote: > Tim > > At first glance, and I could be wrong, but this commit appears to have > broken all core file operations in fhpd. > > [pmuldoon@localhost bindir]$ ./fhpd core.3260 /bin/bash > Attached to core file: > /home/pmuldoon/frysk_bin/frysk-core/frysk/bindir/core.3260 > (fhpd) where > java.lang.ClassCastException: frysk.hpd.TaskData cannot be cast to > frysk.proc.Task > at frysk.hpd.WhereCommand.handle(WhereCommand.java:72) > at frysk.hpd.CLI.execCommand(CLI.java:436) > at frysk.bindir.fhpd.main(fhpd.java:148) > Internal debugger error: frysk.hpd.TaskData cannot be cast to > frysk.proc.Task > (fhpd) quit > java.lang.ClassCastException: frysk.hpd.TaskData cannot be cast to > frysk.proc.Task > at frysk.hpd.DetachCommand.handle(DetachCommand.java:68) > at frysk.hpd.QuitCommand.handle(QuitCommand.java:67) > at frysk.hpd.CLI.execCommand(CLI.java:436) > at frysk.bindir.fhpd.main(fhpd.java:148) > Quitting... > Internal debugger error: frysk.hpd.TaskData cannot be cast to > frysk.proc.Task > > > moore@sourceware.org wrote: >> CVSROOT: /cvs/frysk >> Module name: frysk-core >> Changes by: moore@sourceware.org 2007-08-09 17:06:56 >> >> Modified files: >> frysk/hpd : AllPTSet.java CLI.java ChangeLog >> frysk/rt : ChangeLog Added files: >> frysk/rt : ProcTaskIDManager.java Removed files: >> frysk/hpd : TestSetCreation.java >> Log message: >> Infrastructure for ptsets based on real processes and tasks >> >> frysk-core/frysk/hpd/ChangeLog >> 2007-08-08 Tim Moore <timoore@redhat.com> >> >> * AllPTSet.java: Complete rewrite to reference active Procs and >> Tasks via the ProcTaskIDManager. >> * CLI.java (idManager): New variable, reference to >> ProcTaskIDManager. >> (startAttach): Only initialize steppingEngine once. >> (CLI): Initialize idManager. >> (getCommandPTSet): New method. >> * TestSetCreation.java: Remove file because AllPTSet doesn't >> support creation of random proc/task numbers anymore. >> >> frysk-core/frysk/rt/ChangeLog >> 2007-08-08 Tim Moore <timoore@redhat.com> >> >> * ProcTaskIDManager.java: New file. >> >> Patches: >> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/hpd/AllPTSet.java.diff?cvsroot=frysk&r1=1.1&r2=1.2 >> >> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/hpd/CLI.java.diff?cvsroot=frysk&r1=1.7&r2=1.8 >> >> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/hpd/ChangeLog.diff?cvsroot=frysk&r1=1.27&r2=1.28 >> >> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/hpd/TestSetCreation.java.diff?cvsroot=frysk&r1=1.1&r2=NONE >> >> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/rt/ProcTaskIDManager.java.diff?cvsroot=frysk&r1=NONE&r2=1.1 >> >> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/rt/ChangeLog.diff?cvsroot=frysk&r1=1.352&r2=1.353 >> >> >> > > ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: frysk-core/frysk hpd/AllPTSet.java hpd/CLI.jav ... 2007-08-10 0:04 ` Phil Muldoon @ 2007-08-10 1:49 ` Phil Muldoon 0 siblings, 0 replies; 3+ messages in thread From: Phil Muldoon @ 2007-08-10 1:49 UTC (permalink / raw) To: frysk, Tim Moore Think I fixed it. The below patch returns the correct ArrayList iterator in StaticPTSet. Tasks are now returned over TaskData. Index: StaticPTSet.java =================================================================== RCS file: /cvs/frysk/frysk-core/frysk/hpd/StaticPTSet.java,v retrieving revision 1.1 diff -u -p -r1.1 StaticPTSet.java --- StaticPTSet.java 25 Jul 2007 00:37:25 -0000 1.1 +++ StaticPTSet.java 10 Aug 2007 01:48:05 -0000 @@ -98,7 +98,7 @@ class StaticPTSet implements PTSet result.add( ((TaskData) temp.get(j)).getTask() ); } - return temp.iterator(); + return result.iterator(); } public Iterator getTaskData() Phil Muldoon wrote: > I did a simple adjustment here > > [pmuldoon@localhost hpd]$ cvs diff WhereCommand.java > Index: WhereCommand.java > =================================================================== > RCS file: /cvs/frysk/frysk-core/frysk/hpd/WhereCommand.java,v > retrieving revision 1.4 > diff -u -p -r1.4 WhereCommand.java > --- WhereCommand.java 9 Aug 2007 17:13:49 -0000 1.4 > +++ WhereCommand.java 9 Aug 2007 23:50:07 -0000 > @@ -69,7 +69,7 @@ class WhereCommand > level = Integer.parseInt((String)params.get(0)); > Iterator taskIter = ptset.getTasks(); > while (taskIter.hasNext()) { > - Task task = (Task)taskIter.next(); > + Task task = ((TaskData)taskIter.next()).getTask(); > DebugInfoFrame tmpFrame = null; > int l = cli.getTaskStackLevel(task); > int stopLevel; > > And that makes it work for corefile tasks, but fail for live tasks > with the exception: > > [pmuldoon@localhost bindir]$ ./fhpd 15630 > Attached to process 15630 > (fhpd) where > Inside where command > java.lang.ClassCastException: frysk.proc.live.LinuxTask cannot be cast > to frysk.hpd.TaskData > at frysk.hpd.WhereCommand.handle(WhereCommand.java:74) > at frysk.hpd.CLI.execCommand(CLI.java:436) > at frysk.bindir.fhpd.main(fhpd.java:148) > Internal debugger error: frysk.proc.live.LinuxTask cannot be cast to > frysk.hpd.TaskData > > > Could be a case of weak typing? Plugged green wire into red jack and > all that ;) > > > Regards > > Phil > > Phil Muldoon wrote: >> Tim >> >> At first glance, and I could be wrong, but this commit appears to have >> broken all core file operations in fhpd. >> >> [pmuldoon@localhost bindir]$ ./fhpd core.3260 /bin/bash >> Attached to core file: >> /home/pmuldoon/frysk_bin/frysk-core/frysk/bindir/core.3260 >> (fhpd) where >> java.lang.ClassCastException: frysk.hpd.TaskData cannot be cast to >> frysk.proc.Task > >> at frysk.hpd.WhereCommand.handle(WhereCommand.java:72) >> at frysk.hpd.CLI.execCommand(CLI.java:436) >> at frysk.bindir.fhpd.main(fhpd.java:148) >> Internal debugger error: frysk.hpd.TaskData cannot be cast to >> frysk.proc.Task >> (fhpd) quit >> java.lang.ClassCastException: frysk.hpd.TaskData cannot be cast to >> frysk.proc.Task >> at frysk.hpd.DetachCommand.handle(DetachCommand.java:68) >> at frysk.hpd.QuitCommand.handle(QuitCommand.java:67) >> at frysk.hpd.CLI.execCommand(CLI.java:436) >> at frysk.bindir.fhpd.main(fhpd.java:148) >> Quitting... >> Internal debugger error: frysk.hpd.TaskData cannot be cast to >> frysk.proc.Task >> >> >> moore@sourceware.org wrote: >>> CVSROOT: /cvs/frysk >>> Module name: frysk-core >>> Changes by: moore@sourceware.org 2007-08-09 17:06:56 >>> >>> Modified files: >>> frysk/hpd : AllPTSet.java CLI.java ChangeLog >>> frysk/rt : ChangeLog Added files: >>> frysk/rt : ProcTaskIDManager.java Removed files: >>> frysk/hpd : TestSetCreation.java >>> Log message: >>> Infrastructure for ptsets based on real processes and tasks >>> frysk-core/frysk/hpd/ChangeLog >>> 2007-08-08 Tim Moore <timoore@redhat.com> >>> * AllPTSet.java: Complete rewrite to reference active Procs and >>> Tasks via the ProcTaskIDManager. >>> * CLI.java (idManager): New variable, reference to >>> ProcTaskIDManager. >>> (startAttach): Only initialize steppingEngine once. >>> (CLI): Initialize idManager. >>> (getCommandPTSet): New method. >>> * TestSetCreation.java: Remove file because AllPTSet doesn't >>> support creation of random proc/task numbers anymore. >>> frysk-core/frysk/rt/ChangeLog >>> 2007-08-08 Tim Moore <timoore@redhat.com> >>> * ProcTaskIDManager.java: New file. >>> >>> Patches: >>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/hpd/AllPTSet.java.diff?cvsroot=frysk&r1=1.1&r2=1.2 >>> >>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/hpd/CLI.java.diff?cvsroot=frysk&r1=1.7&r2=1.8 >>> >>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/hpd/ChangeLog.diff?cvsroot=frysk&r1=1.27&r2=1.28 >>> >>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/hpd/TestSetCreation.java.diff?cvsroot=frysk&r1=1.1&r2=NONE >>> >>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/rt/ProcTaskIDManager.java.diff?cvsroot=frysk&r1=NONE&r2=1.1 >>> >>> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/rt/ChangeLog.diff?cvsroot=frysk&r1=1.352&r2=1.353 >>> >>> >>> >> >> > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-08-10 1:49 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20070809170656.7895.qmail@sourceware.org> 2007-08-09 23:10 ` frysk-core/frysk hpd/AllPTSet.java hpd/CLI.jav Phil Muldoon 2007-08-10 0:04 ` Phil Muldoon 2007-08-10 1:49 ` Phil Muldoon
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).