Hi Keqin, > You are right. It works. But sometimes it is slow, I guess there also > has some > information mess up the GDB protocal. Thank you very much.
congratulations that you got it working! Regarding the slowness, I can partially explain the current state. The main reason lies in the way how GDB monitor peeks and pokes in the target's address space. For each individual memory access, we traverse the target's memory-mapping structures, locally map the corresponding memory into the GDB monitor's address space, perform the access, and revert the mapping. When doing a debug operation such as a backtrace or memory dump, this sequence is performed over and over again. Consequently a lot of superfluous (and costly) map and unmap operations are performed. Obviously, there is the opportunity to optimize those memory accesses by the means of caching. I actually started to implement this optimization via a so-called 'Memory_model' in GDB monitor: https://github.com/genodelabs/genode/blob/master/ports/src/app/gdb_monitor/gdbserver/genode-low.cc However, the implementation is not complete, yet. I.e., the cache gets not flushed when needed, which leads to coherency problems. For this reason, I have set NUM_MAPPED_REGIONS to just 1, effectively disabling the optimization. If you like to pick up the work where I left, you are more than welcome to increase the value and try to fix the remaining inconsistency issues. ;-) Cheers Norman -- Dr.-Ing. Norman Feske Genode Labs http://www.genode-labs.com · http://genode.org Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr _______________________________________________ Genode-main mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/genode-main
