Skip to content

Instantly share code, notes, and snippets.

@y-fedorov
Created December 4, 2017 15:24
Show Gist options
  • Save y-fedorov/46785b77414738bb331373cbeac00533 to your computer and use it in GitHub Desktop.
Save y-fedorov/46785b77414738bb331373cbeac00533 to your computer and use it in GitHub Desktop.
GDB usage example
-bash-4.1$ gdb
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-75.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) file pdftool
Reading symbols from /usr/bin/pdftool...(no debugging symbols found)...done.
(gdb) run -m get-hyperlinks -s C1.pdf
Starting program: /usr/bin/pdftool -m get-hyperlinks -s C1.pdf
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffd000
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x00000033273cf261 in LDF::DFNameDictionary::getAllJavaScript() const () from /usr/lib64/libldfcore.so
Missing separate debuginfos, use: debuginfo-install pdftool-0.4.15-1.x86_64
(gdb) bt
#0 0x00000033273cf261 in LDF::DFNameDictionary::getAllJavaScript() const () from /usr/lib64/libldfcore.so
#1 0x00000033281343a4 in MyCompany::Documents::LinkExtractor::Impl::createLink(std::shared_ptr<LDF::DFPdfDoc> const&, LDF::DFLinkAnnotation const&, unsigned long) const ()
from /usr/lib/libpdftool.so
#2 0x000000332813583b in MyCompany::Documents::LinkExtractor::Impl::getLinksFromPage(unsigned long) () from /usr/lib/libpdftool.so
#3 0x00000033281384d2 in MyCompany::Documents::LinkExtractor::Impl::getLinksFromPDF(std::shared_ptr<MyCompany::Documents::IPDFiumDocument>) () from /usr/lib/libpdftool.so
#4 0x00000033280f4a8b in MyCompany::Documents::LinkExtractor::getLinksFromPDF(std::shared_ptr<MyCompany::Documents::IPDFiumDocument>) () from /usr/lib/libpdftool.so
#5 0x00000033280dbc09 in MyCompany::GetHyperlinksCommand::exec() () from /usr/lib/libpdftool.so
#6 0x000000000041e008 in main ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment