This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
GDB build is broken, when HAVE_ZLIB_H is not defined.
- From: Maxim Grigoriev <maxim at tensilica dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>, csilvers at google dot com
- Date: Mon, 21 Apr 2008 14:13:56 -0700
- Subject: GDB build is broken, when HAVE_ZLIB_H is not defined.
Hello, everybody,
Am I missing something here ?
My build is broken:
xtensa_dc232b-linux-uclibc-gcc -c -g -O2 -I.
-I/home/maxim/GDB/CVS/src/gdb -I/home/maxim/GDB/CVS/src/gdb/config
-DLOCALEDIR="\"/opt/local/maxim/LINUX_ROOT/maxim/native_gdb/share/locale\""
-DHAVE_CONFIG_H -I/home/maxim/GDB/CVS/src/gdb/../include/opcode
-I/home/maxim/GDB/CVS/src/gdb/../readline/.. -I../bfd
-I/home/maxim/GDB/CVS/src/gdb/../bfd
-I/home/maxim/GDB/CVS/src/gdb/../include -I../libdecnumber
-I/home/maxim/GDB/CVS/src/gdb/../libdecnumber -I./../intl
-I/home/maxim/GDB/CVS/src/gdb/gnulib -Ignulib -DMI_OUT=1 -Wall
-Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral
-Wno-pointer-sign -Wno-unused -Wno-switch -Wno-char-subscripts -Werror
/home/maxim/GDB/CVS/src/gdb/dwarf2read.c
/home/maxim/GDB/CVS/src/gdb/dwarf2read.c: In function
'zlib_decompress_section':
/home/maxim/GDB/CVS/src/gdb/dwarf2read.c:5301: error: 'abfd' undeclared
(first use in this function)
/home/maxim/GDB/CVS/src/gdb/dwarf2read.c:5301: error: (Each undeclared
identifier is reported only once
/home/maxim/GDB/CVS/src/gdb/dwarf2read.c:5301: error: for each function
it appears in.)
make[2]: *** [dwarf2read.o] Error 1
* * * * *
in dwarf2read.c, should not it look like this :
static void
zlib_decompress_section (struct objfile *objfile, asection *sectp,
gdb_byte **outbuf, bfd_size_type *outsize)
{
bfd *abfd = objfile->obfd;
#ifndef HAVE_ZLIB_H
error (_("Support for zlib-compressed DWARF data (from '%s') "
"is disabled in this copy of GDB"),
bfd_get_filename (abfd));
#else
bfd_size_type compressed_size = bfd_get_section_size (sectp);
. . . .
-- Maxim