Writing a Linux Debugger Part 2: Breakpoints
blog.tartanllama.xyz
blog.tartanllama.xyz
auto is_enabled() const -> bool { return m_enabled; }
Please write this instead bool is_enabled() const { return m_enabled; }
There is nothing to gain by writing function trailing return types in this case.Leave them to complex lambdas declarations or template meta-programming.
auto is_enabled() const { return m_enabled; }On personal note, I don't think it is really worthwhile to use auto there.
https://software.intel.com/en-us/intel-vtune-amplifier-xe
There's also PAPI and TAU:
>"When the processor executes the int 3 instruction, control is passed to the breakpoint interrupt handler, which – in the case of Linux – signals the process with a SIGTRAP. You can see this process in the diagram below, where we overwrite the first byte of the mov instruction with 0xcc,"
0xCC is not 3 in decimal however it is 204. AM I missing something or is the actual number 3 obscured in the encoding somewhere?
The general encoding for "INT <X>" is 0xCD <X>