longjmp Support

GDB has support for figuring out that the target is doing a longjmp and for stopping at the target of the jump, if we are stepping. This is done with a few specialized internal breakpoints, which are visible in the output of the maint info breakpoint command.

To make this work, you need to define a function called gdbarch_get_longjmp_target, which will examine the jmp_buf structure and extract the longjmp target address. Since jmp_buf is target specific and typically defined in a target header not available to GDB, you will need to determine the offset of the PC manually and return that; many targets define a jb_pc_offset field in the tdep structure to save the value once calculated.

None: Internals/longjmp Support (last edited 2015-02-15 02:46:07 by SimonMarchi)

All content (C) 2008 Free Software Foundation. For terms of use, redistribution, and modification, please see the WikiLicense page.