[PATCH v2 4/6] btrace: Add support for interrupt events.
Metzger, Markus T
markus.t.metzger@intel.com
Mon Sep 23 13:44:40 GMT 2024
Hello Felix,
> /* Update the current function segment at the end of the trace in BTINFO with
> respect to the instruction at PC. This may create new function segments.
>- Return the chronologically latest function segment, never NULL. */
>+ Return the chronologically latest function segment, never NULL.
>+ If VALID_PC is false, skip analyzing whether the function has changed. */
>
> static struct btrace_function *
>-ftrace_update_function (struct btrace_thread_info *btinfo, CORE_ADDR pc)
>+ftrace_update_function (struct btrace_thread_info *btinfo, CORE_ADDR pc,
>+ const bool valid_pc = true)
I would go without the default. If you want to simplify calls, we could add two
overloads:
ftrace_update_function (btrace_thread_info *)
ftrace_update_function (btrace_thread_info *, CORE_ADDR)
This would make it clearer that one is w/o a PC and one is with.
Or we make the PC argument std::optional<CORE_ADDR>. This probably fits
best how we process events.
Regards,
Markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
More information about the Gdb-patches
mailing list