Go to file
Tom Tromey e0a874120a Fix two buglets in .debug_names dumping
While working on gdb's .debug_names writer, I found a couple of small
bugs in binutils .debug_names dumping.

First, the DWARF spec (section 6.1.1.4.6 Name Table) says:

    These two arrays are indexed starting at 1, [...]

I think it is clearer for binutils to follow this, particularly
because DW_IDX_parent refers to this number.

Second, I think the handling of an empty hash table is slightly wrong.
Currently the dumping code assumes there is always an array of hashes.
However, section 6.1.1.4.5 Hash Lookup Table says:

    The optional hash lookup table immediately follows the list of
    type signatures.

and then:

    The hash lookup table is actually two separate arrays: an array of
    buckets, followed immediately by an array of hashes.

My reading of this is that the hash table as a whole is optional, and
so the hashes will not exist in this case.  (This also makes sense
because the hashes are not useful without the buckets anyway.)

This patch fixes both of these problems.  FWIW I have some gdb patches
in progress that change gdb both to omit the hash table and to use
DW_IDX_parent.

2023-12-04  Tom Tromey  <tom@tromey.com>

	* dwarf.c (display_debug_names): Handle empty .debug_names hash
	table.  Name entries start at 1.
2023-12-04 11:20:44 -07:00
bfd Automatic date update in version.in 2023-12-04 00:00:11 +00:00
binutils Fix two buglets in .debug_names dumping 2023-12-04 11:20:44 -07:00
config libiberty: Disable hwcaps for sha1.o 2023-11-30 10:14:30 +01:00
contrib
cpu
elfcpp
etc
gas gas: drop unused fields from struct segment_info_struct 2023-12-01 08:29:33 +01:00
gdb gdb: add Ciaran Woodward to gdb/MAINTAINERS 2023-12-04 18:15:08 +00:00
gdbserver Update fall-through comment in gdbserver 2023-12-04 08:23:34 -07:00
gdbsupport gdb: Enable early init of thread pool size 2023-12-04 14:23:17 +00:00
gnulib gnulib: mark configure +x 2023-11-28 12:55:29 -05:00
gold
gprof
gprofng gprofng: support GNU option syntax in gp-display-html, plus various fixes 2023-11-29 10:18:35 -08:00
include s390: Support for jump visualization in disassembly 2023-12-04 17:13:33 +00:00
ld Fix ld/x86: reduce testsuite dependency on system object files 2023-12-01 18:55:14 -08:00
libbacktrace
libctf libctf: adding CU mappings should be idempotent 2023-11-20 12:31:41 +00:00
libdecnumber
libiberty libiberty: Disable hwcaps for sha1.o 2023-11-30 10:14:30 +01:00
libsframe
opcodes s390: Support for jump visualization in disassembly 2023-12-04 17:13:33 +00:00
readline
sim Fix right shifts in mcore simulator on 64 bit hosts. 2023-12-01 07:19:50 -07:00
texinfo
zlib
.cvsignore
.editorconfig
.gitattributes
.gitignore
ar-lib
ChangeLog
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
depcomp
djunpack.bat
install-sh
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
README-maintainer-mode
SECURITY.txt
setup.com
src-release.sh
symlink-tree
test-driver
ylwrap

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.