auto toVA = [m](uint8_t *addr) { return toVirtualAddress(addr, m); };
and then later the code uses
toVA(m->pc_ptr)
It's just a short way of writing toVirtualAddress(m->pc_ptr, m). By moving the virtual adress conversion into a module function we can do something like m->toVirtualAddress(addr) which is a bit better and doesn't use the lambda.
Currently the debugger uses a lambda
and then later the code uses
It's just a short way of writing
toVirtualAddress(m->pc_ptr, m)
. By moving the virtual adress conversion into a module function we can do something likem->toVirtualAddress(addr)
which is a bit better and doesn't use the lambda.