summaryrefslogtreecommitdiff
path: root/absl/base/nullability.h
diff options
context:
space:
mode:
authorGravatar Tom Rybka <trybka@google.com>2023-07-06 09:11:49 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-07-06 09:12:45 -0700
commitc26cd952ae342ac519fd9f98b67e6152f135c6ce (patch)
treed6d2900dbfc0d7b2fd5aad581a2377f0e54ee39c /absl/base/nullability.h
parent512af68a1d397cd2cfa1ac9c6eca7694bf75f2b0 (diff)
symbolize_test: Add an indirection for getting the PC from function ptr.
Don't assume that function ptr == PC. Adds a redirection mechanism, GetPCFromFnPtr, and enables more test cases for Emscripten/Wasm. On many (most?) platforms, the address of a function ptr is the same as its Program Counter (PC) for the purpose of most things, including symbolization. In Emscripten WebAssembly, the function ptr is just an index into a table of functions. However, the name section maps function names to their literal offsets into a Wasm binary. The WasmOffsetConverter is actually capable of both indirections, so we can effectively go from function ptr to offset into the binary (which is typically the "PC" for other Stack dumping things in Wasm, including `emscripten_pc_get_function`). More info: https://www.w3.org/TR/wasm-js-api-2/#exported-function-exotic-objects Also fix Emscripten symbolize handling for `nullptr` now that we have tests for that. PiperOrigin-RevId: 546006678 Change-Id: I0d4015ca9035b004158451b36c933cad009184ba
Diffstat (limited to 'absl/base/nullability.h')
0 files changed, 0 insertions, 0 deletions