Is there a way to get a function's end address other than `disassemble`?

Simon Sobisch
Mon Nov 22 14:54:18 GMT 2021

`info address func_name` will show the *start address* of the given 
function, but is there any built-in way to get the *end address* other 
than executing the `disassemble` command?

The use case here is "if the size of the current function is too big, 
don't use `disassemble` but limit to N instructions around $pc";
using a fixed calculation like
     disassemble $pc - 50, $pc + 150
may get "over" the last instruction of the function...


More information about the Gdb mailing list