Hi Philip, Thanks for your detailed explanation!
Maybe a stupid question, as you have mentioned, "so the in-tree gdb is rapidly declining in utility already.", and egdb seems a better gdb, why does OpenBSD still keep old in-tree gdb rather than replacing it will new egdb? Thanks in advance! Best Regards Nan Xiao On Thu, Oct 12, 2017 at 1:45 PM, Philip Guenther <guent...@gmail.com> wrote: > On Wed, Oct 11, 2017 at 5:55 PM, Nan Xiao <xiaonan830...@gmail.com> wrote: >> >> I find there are binutils and binutils-2.17 in gnu/usr.bin/ dirctory >> of OpenBSD source code. What's the difference between them? When I use >> binutils command, such as "ar", it comes from binutils or >> binutils-2.17? > > > If you examine the output from building OpenBSD you'll see that the only > files installed from the gnu/usr.bin/binutils directory (which is binutils > version 2.15) are gdb and its documentation. That same build output will > show that gas, GNU ld, strings, objdump, readelf, and the other 'binary > utilities' are installed from the gnu/usr.bin/binutils-2.17 directory. > > > If someone made gdb (a GPLv2 licensed version) build against binutils-2.17 > and submitted a diff to do so in tree and thus eliminate the need for the > old 2.15 binutils directory, that would be a moderately useful chunk of > work. I saw "moderately" because the old GPLv2 versions of gdb don't > understand newer versions of DWARF debugging information generated by clang > and new gcc's, so the in-tree gdb is rapidly declining in utility already. > Such a project, however, may be a good project for understanding tool chain, > ELF, and build issue. Not an easy task, but even if the attempt fails > whoever tries will almost certainly learn in proportion to their tenacity in > the attempt. > > On the other hand, you really need to have access to most of the archs on > which OpenBSD builds in order to test the change. An examination of the cvs > logs for the gdb bits may be a first step to seeing what didn't work the > last time someone (probably miod) tried to do that. > > > Philip Guenther >