* Corefile Host was (Re: frysk-core/frysk/proc IsaFactory.java TestIsa.)
[not found] <20070323212539.20974.qmail@sourceware.org>
@ 2007-03-23 22:22 ` Phil Muldoon
0 siblings, 0 replies; only message in thread
From: Phil Muldoon @ 2007-03-23 22:22 UTC (permalink / raw)
To: frysk
I've checked in an initial first base of Corefile analysis code. A lot
of this code is built on top of the considerable Frysk Java Elf bindings
work that I and others have worked on for several months. It's good to
finally see daylight ;)
The next task is to write an arbitary get(memory address) ->
(translation) -> read from core file wrapper.
Corefile host/proc/tasks extend the abstract host/core/task pattern that
Frysk is built on, and access is achieved through these interfaces. This
allows us to "slot in" a LinuxCoreFileTask in many places without
modification to the code-base (like unwinding and source view) where a
LinuxPtraceTask would have been used before. Access to a core file via
api is simple and is illustrated in several ways via the test classes,
also checked in with this code. But to illustrate briefly:
Host coreHost = new LinuxCoreFileHost(Manager.eventLoop,File("your-core-file"));
{Run event loop}
Access to that corefile's procs/tasks is via the normal ways, via observers, finders or simply like:
Proc proc = coreHost.getProc(new ProcId(31497));
getting the main task something like:
Task task = proc.getMainTask();
and as usual all tasks via the getTasks() interface.
to look at a corefile task's registers you might do something like
Isa isa = task.getIsa();
long ebx = isa.getRegisterByName("ebx").get(task))
All of these interfaces are exactly the same as live ptrace procs.
Regards
Phil
pmuldoon@sourceware.org wrote:
> CVSROOT: /cvs/frysk
> Module name: frysk-core
> Changes by: pmuldoon@sourceware.org 2007-03-23 21:25:39
>
> Modified files:
> frysk/proc : IsaFactory.java TestIsa.java ChangeLog
> Added files:
> frysk/proc : LinuxCoreFileHost.java
> LinuxCoreFileHostState.java
> LinuxCoreFileProc.java
> LinuxCoreFileProcState.java
> LinuxCoreFileTask.java
> LinuxCoreFileTaskState.java TestLinuxCore.java
>
> Log message:
> 2007-03-23 Phil Muldoon <pmuldoon@redjat.com>
>
> * TestLinuxCore.java: New.
> * LinuxCoreFileTaskState.java: New.
> * LinuxCoreFileTask.java:New.
> * LinuxCoreFileHostState.java: New.
> * LinuxCoreFileHost.java:New.
> * LinuxCoreFileProcState.java: New.
> * LinuxCoreFileProc.java: New.
>
> * TestIsa.java: Changed to call getIsaForCoreFile.
> * IsaFactory.java (getIsaByElfType): Renamed to
> getIsaForCoreFile. Also, modified to always return
> the architecture of the core file, regardless of
> 32on64 ISA situations.
>
> Patches:
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/LinuxCoreFileHost.java.diff?cvsroot=frysk&r1=1.1&r2=1.2
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/LinuxCoreFileHostState.java.diff?cvsroot=frysk&r1=NONE&r2=1.1
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/LinuxCoreFileProc.java.diff?cvsroot=frysk&r1=NONE&r2=1.1
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/LinuxCoreFileProcState.java.diff?cvsroot=frysk&r1=NONE&r2=1.1
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/LinuxCoreFileTask.java.diff?cvsroot=frysk&r1=NONE&r2=1.1
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/LinuxCoreFileTaskState.java.diff?cvsroot=frysk&r1=NONE&r2=1.1
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/TestLinuxCore.java.diff?cvsroot=frysk&r1=NONE&r2=1.1
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/IsaFactory.java.diff?cvsroot=frysk&r1=1.15&r2=1.16
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/TestIsa.java.diff?cvsroot=frysk&r1=1.11&r2=1.12
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/proc/ChangeLog.diff?cvsroot=frysk&r1=1.641&r2=1.642
>
>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-23 22:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20070323212539.20974.qmail@sourceware.org>
2007-03-23 22:22 ` Corefile Host was (Re: frysk-core/frysk/proc IsaFactory.java TestIsa.) 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).