I've downloaded the GDB source:

git clone git://sourceware.org/git/binutils-gdb.git

now how do I generate the documentation from source as can be downloaded from: https://sourceware.org/gdb/current/onlinedocs/ ?

I'm especially interested in the HTML documentation, especially if it is possible to build a single page version of it.

I'm at GDB master f47998d69f8d290564c022b010e63d5886a1fd7d after gdb-8.2-release.

cd binutils-gdb/gdb
cd doc
make html MAKEINFO=makeinfo MAKEINFOFLAGS='--no-split'
ls *.html

This assumes that you have makeinfo installed; that should be something like apt-get install texinfo on debian-like systems.

  • Thanks for this, but it failed with make: *** No rule to make target 'html'. Stop.. Any clues? GDB master f47998d69f8d290564c022b010e63d5886a1fd7d Ubuntu 16.04. – Ciro Santilli 新疆改造中心法轮功六四事件 Oct 23 '18 at 16:25
  • Make sure you're in the doc directory and you had run ./configure before. – mosvy Oct 23 '18 at 16:26
  • Yes, I had done that, so you don't reproduce at that commit? make html on toplevel does run however, but is taking a while for some reason. Wonder if you don't have to run it on toplevel, and then maybe there is a way to select just gdb. – Ciro Santilli 新疆改造中心法轮功六四事件 Oct 23 '18 at 16:29
  • I've updated the answer from memory; I'll just try it myself it if I don't get it right this time ;-) – mosvy Oct 23 '18 at 16:31
  • It works!!!!!!! The devs should put that on the website instead of the crappy one paragraph per page thing!!!! – Ciro Santilli 新疆改造中心法轮功六四事件 Oct 23 '18 at 16:33

If you run:

cd binutils-gdb
make html MAKEINFO=makeinfo MAKEINFOFLAGS='--no-split'
find . -name '*.html'

then it takes a while, but generates single page HTML docs for all Binutils projects, which is also convenient.

-j $(nproc) does not work unfortunately.

I found that GAS docs for example could not be easily built as GDB by themselves. If you try to:

cd gas
cd doc
make html

then it fails with:

as.texi:23: @include: could not find bfdver.texi

so there seems to be a BFD dependency.

Tested on Ubuntu 18.04.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.