On PPC64le architecture, a function may have two entry points:
Global Entry Point (GEP)
Local Entry Point (LEP)
When entered though GEP, it executes extra instructions, which, in most cases, adjusts the TOC pointer.
The LEP comes right after these extra instructions.
When called locally (through LEP), this code is not executed, so when creating a breakpoint with the function
name, these instructions must be avoided, using the LEP instead of the GEP.
All of these else ifs make the logic here hard to follow. Could you factor this out into a function like ComputeBreakpointAddress or something?