Re: Memory write tracing/logging of an application / Watchpoints in Genode/Fiasco.OC

2018-02-28 Thread Martin Stein
Hi Josef, During the last weeks I was out of office which is why this answer is a bit delayed. El 26/02/18 a las 21:26, Josef Stark escribió: > Hello, > > I circumvented the problem of finding the correct dataspace by letting > the pagefault handler open another ROM connection to the binary at

Re: Memory write tracing/logging of an application / Watchpoints in Genode/Fiasco.OC

2018-02-26 Thread Josef Stark
Hello, I circumvented the problem of finding the correct dataspace by letting the pagefault handler open another ROM connection to the binary at its instantiation. The ELF file contains the VM address of the code section, which allows me to fetch the correct instruction when a pagefault happens.

Re: Memory write tracing/logging of an application / Watchpoints in Genode/Fiasco.OC

2018-02-08 Thread Josef Stark
Hi Martin, No, continue_after_resolved_fault DOES continue execution (although the IP isn't yet the one you need), what I meant is that you can't do this in vanilla Genode from userland (not core) without attaching an appropriate dataspace. So, you have already extended the RM session by an RPC

Re: Memory write tracing/logging of an application / Watchpoints in Genode/Fiasco.OC

2018-02-08 Thread Martin Stein
Hi Josef, El 29/01/18 a las 15:22, Stark, Josef escribió: >> At least in the current Genode release, the 'unresolved_page_fault' flag >> is set in [1] hence in [2] when giving up resolving the fault in core >> and consigning to the userland handler. I assume you're using a patched >> fork of an

Re: Memory write tracing/logging of an application / Watchpoints in Genode/Fiasco.OC

2018-02-04 Thread Josef Stark
Hey Martin, the next problem that I'm facing now is that I don't know how to access the instruction that caused the pagefault. I have the instruction pointer but not the instruction itself (opcode and operands). Your vinit code [1] uses an imprint to identify the corresponding Rm_client and

Re: Memory write tracing/logging of an application / Watchpoints in Genode/Fiasco.OC

2018-01-29 Thread Stark, Josef
Hello Martin, > At least in the current Genode release, the 'unresolved_page_fault' flag > is set in [1] hence in [2] when giving up resolving the fault in core > and consigning to the userland handler. I assume you're using a patched > fork of an older Genode version so maybe things are

Re: Memory write tracing/logging of an application / Watchpoints in Genode/Fiasco.OC

2018-01-26 Thread Martin Stein
Hi Josef, El 25/01/18 a las 18:28, Stark, Josef escribió: >> As you should be the parent of the traced component, you can intercept >> the CPU session and remember all thread capabilities created by the >> component. On a fault you iterate through all threads to select those >> that are currently

Re: Memory write tracing/logging of an application / Watchpoints in Genode/Fiasco.OC

2018-01-25 Thread Stark, Josef
Hi, > As you should be the parent of the traced component, you can intercept > the CPU session and remember all thread capabilities created by the > component. On a fault you iterate through all threads to select those > that are currently in a page fault. A good example for this is the GDB >

Re: Memory write tracing/logging of an application / Watchpoints in Genode/Fiasco.OC

2018-01-22 Thread Martin Stein
Hi Josef, El 12/01/18 a las 16:51, Stark, Josef escribió: > Step 4 is relatively easy and already working, so I now have an app that > pagefaults > and gets resumed repeatedly at the same address and ip since I couldn't > implement > the rest of the steps so far. The reason is that I can't

Re: Memory write tracing/logging of an application / Watchpoints in Genode/Fiasco.OC

2018-01-12 Thread Stark, Josef
Hi all, hello Martin, first of all, thank you for the rapid fix. So since I only need a tiny fraction of Vinit (the device emulator), some time ago I decided that it would be easier for my project to only 'reintegrate' the stuff I need from Vinit into Genode 16.08 instead of porting the

Re: Memory write tracing/logging of an application / Watchpoints in Genode/Fiasco.OC

2017-12-07 Thread Martin Stein
Hi Josef, Am 07.12.2017 um 21:57 schrieb Stark, Josef: > ... > Program core/pbxa9/core > COMPILE environ.o > COMPILE err.o > COMPILE file.o > In file included from > /home/josef/git/ptc_hdl_env/os/src/drivers/timer/hw/pbxa9/../platform_timer.h:21:0, > from >

Re: Memory write tracing/logging of an application / Watchpoints in Genode/Fiasco.OC

2017-12-07 Thread Stark, Josef
Hi again, so I contacted the author, Martin Stein, who gave me quite some insight and he convinced me to use [1] as a starting point instead of [2] for several reasons: * The whereabouts of the older code from [2] are unknown due to a switch from svn to git. * [2] uses the now obsolete base-mb

Re: Memory write tracing/logging of an application / Watchpoints in Genode/Fiasco.OC

2017-12-05 Thread Stark, Josef
Hello Norman, >this question reminds me on the student project of Martin Stein several >years ago. Martin's goal was to emulate I/O devices backed by an >on-target VHDL simulation. Both the driver and the simulated I/O device >would be hosted on the same machine. Each time the driver accesses a

Re: Memory write tracing/logging of an application / Watchpoints in Genode/Fiasco.OC

2017-11-30 Thread Norman Feske
Hi Josef, > I want to be able to 'trace' every memory write access of an arbitrary > target application, in order to 'duplicate' those writes into another > memory location. > ... > Sadly, only now I have read that watchpoints are not implemented in > Genode, and most probably neither are they