[hatari-devel] Best way to get next address from CPU core? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi Nicolas,
I just worked around WinUAE CPU core disassembler segfault when profiler
asks it for a next PC address (while profiling ScummVm, which has very
long C++ symbol names [1]).
Is there some better way to get (memory-wise, not execution-wise) next
instruction address for given address, other than asking CPU core to
disassemble that address:
https://git.tuxfamily.org/hatari/hatari.git/tree/src/debug/68kDisass.c#n290
?
Does e.g. CPU core instruction decoder nowadays offer function to query
size of an instruction at given address?
- Eero
[1] C++ code symbols can be pretty much any size after demangling. This
was the ScummVm symbol triggering the segfault:
------------------------------------------
$ echo
_ZNK6Common7HashMapINS_6StringEiNS_4HashIS1_EENS_7EqualToIS1_EEE6lookupERKS1_
| c++filt
Common::HashMap<Common::String, int, Common::Hash<Common::String>,
Common::EqualTo<Common::String> >::lookup(Common::String const&) const
------------------------------------------
Note: Hatari debugger does not support demangling yet, but that could be
added:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/ext_demangling.html