[1] Search for function
/GetSeriesUIDs
[2] Follow tag
g]
Prints places in source code where you find instances of the function on the
line you were on. Select the number of the instance you would like to look
at and press enter.
[3] Goes to last tagged instance.
CNTL-t

(gdb) bt
#0 nifti_image_write (nim=0x4b51870) at /opt/apps/ITK/InsightToolkit-4.6.0/Modules/ThirdParty/NIFTI/src/nifti/niftilib/nifti1_io.c:5879
#1 0x0000000000770b04 in itk::NiftiImageIO::Write (this=0x4b55190, buffer=0x7ffff1c35010) at /opt/apps/ITK/InsightToolkit-4.6.0/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx:1854
#2 0x00000000005dcfaa in itk::ImageFileWriter<itk::Image<short, 3u> >::GenerateData (this=0x476e0c0) at >/opt/apps/ITK/InsightToolkit-4.6.0/Modules/IO/ImageBase/include/itkImageFileWriter.hxx:421
#3 0x00000000005db21f in itk::ImageFileWriter<itk::Image<short, 3u> >::Write (this=0x476e0c0) at >/opt/apps/ITK/InsightToolkit-4.6.0/Modules/IO/ImageBase/include/itkImageFileWriter.hxx:355
#4 0x00000000005d843d in itk::ImageFileWriter<itk::Image<short, 3u> >::Update (this=0x476e0c0) at >/opt/apps/ITK/InsightToolkit-4.6.0/Modules/IO/ImageBase/include/itkImageFileWriter.h:166
#5 0x00000000005d51ae in main (argc=3, argv=0x7fffffffe5c8) at /opt/apps/ITK/InsightToolkit-4.6.0/Examples/IO/DicomSeriesReadImageWrite2.cxx:316
up/down move in the stack frame. Just remember that the higher
number called the routine in the frame below it. Or (#7 called #6, #6 called
#5, #5 called #4, and so on).

Regular Expression Breakpoint:

rbreak regex
Set breakpoints on all functions matching the regular expression regex. This command sets an unconditional
breakpoint on all matches, printing a list of all breakpoints it set. Once these breakpoints are set, they
are treated just like the breakpoints set with the break command. You can delete them, disable them, or make
them conditional the same way as any other breakpoint.
The syntax of the regular expression is the standard one used with tools like grep. Note that this is different
from the syntax used by shells, so for instance foo* matches all functions that include an fo followed by zero
or more os. There is an implicit .* leading and trailing the regular expression you supply, so to match only
functions that begin with foo, use ^foo.
When debugging C++ programs, rbreak is useful for setting breakpoints on overloaded functions that are not
members of any special classes.
The rbreak command can be used to set breakpoints in all the functions in a class vtkExodusIIWriter, like this:
(gdb) rbreak ^vtkExodusIIWriter::
rbreak file:regex
If rbreak is called with a filename qualification, it limits the search for functions matching the given regular expression
to the specified file. This can be used, for example, to set breakpoints on every function in a given file:
(gdb) rbreak file.c:.
The colon separating the filename qualifier from the regex may optionally be surrounded by spaces.