Re: [hatari-devel] Tracing constraints

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 21.11.2023 20.13, J.Young wrote:
Well for my use case, I am tracing fixed blocks of code for game reverse-engineering so it's quite a limited sandbox. Probably an after-trace parser will work best for that since a general-purpose algorithm in hatari seems too much overhead with possible ambiguous/non-resolvable situations.

Instead of tracing, you could try profiling.

From profiler disassembly output you can see executed instructions, how many times each subroutine gets called (regardless of whether it was exception handler or not), and you can also do some deductions about jumps based on the per-instruction run counts.

For every address that you have provided a symbol, profiler keeps track from where it's called, and profiler post-processor can provide call-graphs of that.


I need the jmp/jsr (a0) to show the address though :).

Often statistical data provided by profiler is enough, one does not necessarily need to know how a specific execution round happened to work. Exceptions can happen at fairly random places, unless one does enough runs and checks from profiler what happened on average.


Or if one wants to know whether specific exception (handler) was ever called during specific part of code, one can set breakpoint to trigger for the particular exception exception only at start of critical section of the code, and remove breakpoint at end of critical section.

(I.e. have breakpoints at start and end, which set and remove breakpoint for the exception handler.)


	- Eero




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/