This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] Fix ANOFFSET problems
- To: ezannoni at cygnus dot com (Elena Zannoni)
- Subject: Re: [PATCH] Fix ANOFFSET problems
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Sat, 26 Aug 2000 01:24:31 -0400 (EDT)
- Cc: gdb-patches at sources dot redhat dot com
Elena,
With the patch, the gdb build is successful. However, have you tried
the testsuite under hpux? Previously, I got many FAILs under hpux
(many more than i686 linux). Now, the testsuite seems to hang at
this point:
make[1]: Entering directory `/xxx/gnu/gdb-5.0/bfd'
Making check in doc
make[2]: Entering directory `/xxx/gnu/gdb-5.0/bfd/doc'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/xxx/gnu/gdb-5.0/bfd/doc'
Making check in po
make[2]: Entering directory `/xxx/gnu/gdb-5.0/bfd/po'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/xxx/gnu/gdb-5.0/bfd/po'
make[2]: Entering directory `/xxx/gnu/gdb-5.0/bfd'
make[2]: Nothing to be done for `check-am'.
make[2]: Leaving directory `/xxx/gnu/gdb-5.0/bfd'
make[1]: Leaving directory `/xxx/gnu/gdb-5.0/bfd'
make[1]: Entering directory `/xxx/gnu/gdb-5.0/etc'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/xxx/gnu/gdb-5.0/etc'
make[1]: Entering directory `/xxx/gnu/gdb-5.0/intl'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/xxx/gnu/gdb-5.0/intl'
make[1]: Entering directory `/xxx/gnu/gdb-5.0/libiberty'
make[2]: Entering directory `/xxx/gnu/gdb-5.0/libiberty/testsuite'
echo 'int prepends_underscore = 0;' > test-us.c
gcc -DHAVE_CONFIG_H -O3 -I.. -I./../../include -o test-filter -DMAIN -DVERSION='"none"' -DHAVE_CONFIG_H \
./../cplus-dem.c test-us.c -L.. -liberty
/bin/sh ./regress-demangle ./demangle-expected
All 620 tests passed
make[2]: Leaving directory `/xxx/gnu/gdb-5.0/libiberty/testsuite'
make[1]: Leaving directory `/xxx/gnu/gdb-5.0/libiberty'
make[1]: Entering directory `/xxx/gnu/gdb-5.0/opcodes'
Making check in po
make[2]: Entering directory `/xxx/gnu/gdb-5.0/opcodes/po'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/xxx/gnu/gdb-5.0/opcodes/po'
make[2]: Entering directory `/xxx/gnu/gdb-5.0/opcodes'
make[2]: Nothing to be done for `check-am'.
make[2]: Leaving directory `/xxx/gnu/gdb-5.0/opcodes'
make[1]: Leaving directory `/xxx/gnu/gdb-5.0/opcodes'
make[1]: Entering directory `/xxx/gnu/gdb-5.0/readline'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/xxx/gnu/gdb-5.0/readline'
make[1]: Entering directory `/xxx/gnu/gdb-5.0/sim'
make[1]: Leaving directory `/xxx/gnu/gdb-5.0/sim'
make[1]: Entering directory `/xxx/gnu/gdb-5.0/gdb'
make[2]: Entering directory `/xxx/gnu/gdb-5.0/gdb/testsuite'
Making a new config file...
Nothing to be done for all...
rootme=`pwd`; export rootme; \
srcdir=. ; export srcdir ; \
EXPECT=`if [ -f ${rootme}/../../expect/expect ] ; then echo ${rootme}/../../expect/expect ; else echo expect ; fi` ; export EXPECT ; \
SHLIB_PATH=$rootme/../../expect:$rootme/../../libstdc++:$rootme/../../tk/unix:$rootme/../../tcl/unix:$rootme/../../bfd:$rootme/../../opcodes:$SHLIB_PATH; \
export SHLIB_PATH; \
if [ -f ${rootme}/../../expect/expect ] ; then \
TCL_LIBRARY=${srcdir}/../../tcl/library ; \
export TCL_LIBRARY ; fi ; \
runtest
Test Run By dave on Fri Aug 25 23:32:41 2000
Native configuration is hppa1.1-hp-hpux10.20
=== gdb tests ===
Schedule of variations:
unix
Running target unix
Using /usr/local/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/local/share/dejagnu/config/unix.exp as generic interface file for target.
Using ./config/unix.exp as tool-and-target-specific interface file.
Running ./gdb.asm/asm-source.exp ...
Running ./gdb.base/a2-run.exp ...
Running ./gdb.base/all-bin.exp ...
Running ./gdb.base/annota1.exp ...
FAIL: gdb.base/annota1.exp: run until main breakpoint
FAIL: gdb.base/annota1.exp: continue to printf
FAIL: gdb.base/annota1.exp: backtrace from shlibrary
FAIL: gdb.base/annota1.exp: delete bp 1 (timeout)
FAIL: gdb.base/annota1.exp: delete bp 2 (timeout)
FAIL: gdb.base/annota1.exp: delete bp 3 (timeout)
FAIL: gdb.base/annota1.exp: break at 28 (timeout)
FAIL: gdb.base/annota1.exp: set up display (timeout)
FAIL: gdb.base/annota1.exp: re-run (timeout)
FAIL: gdb.base/annota1.exp: break at 46 (timeout)
FAIL: gdb.base/annota1.exp: ignore 5 4 (timeout)
FAIL: gdb.base/annota1.exp: annotate ignore count change (timeout)
FAIL: gdb.base/annota1.exp: next to exit loop
FAIL: gdb.base/annota1.exp: breakpoint ignore count (timeout)
FAIL: gdb.base/annota1.exp: signal sent (timeout)
Running ./gdb.base/arithmet.exp ...
Running ./gdb.base/assign.exp ...
Running ./gdb.base/async.exp ...
Running ./gdb.base/attach.exp ...
Running ./gdb.base/bitfields.exp ...
Running ./gdb.base/bitops.exp ...
Running ./gdb.base/break.exp ...
FAIL: gdb.base/break.exp: set catch vfork, never expected to trigger
FAIL: gdb.base/break.exp: backtrace while in called function
Running ./gdb.base/call-ar-st.exp ...
FAIL: gdb.base/call-ar-st.exp: print print_small_structs, pattern 4
FAIL: gdb.base/call-ar-st.exp: print print_small_structs from print_long_arg_list, pattern 4 (timeout)
FAIL: gdb.base/call-ar-st.exp: tbreakpoint line 1300
FAIL: gdb.base/call-ar-st.exp: continue to 1300
Regards,
Dave
>
>
> Dave, please try these fixes.
> Sorry about that.
>
> Will commit tomorrow.
>
> Elena
>
>
> 2000-08-25 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
>
> * pa64solib.c (pa64_solib_load_symbols): Don't use ANOFFSET as an
> lvalue.
> * xcoffread.c (xcoff_symfile_offsets): Ditto
> * somsolib.c (som_solib_section_offsets): Ditto.
> * somread.c (som_symfile_offsets): Ditto.
> * rs6000-nat.c (vmap_symtab): Ditto.
> * remote-vx.c (vx_add_symbols): Ditto.
> * remote-os9k.c (rombug_wait): Ditto.
>
> Index: pa64solib.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/pa64solib.c,v
> retrieving revision 1.6
> diff -c -u -p -r1.6 pa64solib.c
> --- pa64solib.c 2000/08/09 20:09:01 1.6
> +++ pa64solib.c 2000/08/26 01:25:07
> @@ -319,9 +319,9 @@ pa64_solib_load_symbols (struct so_list
> return;
> }
>
> - ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT (so->objfile))
> + (so->objfile->section_offsets)->offsets[SECT_OFF_TEXT (so->objfile)]
> = so->pa64_solib_desc.text_base;
> - ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA (so->objfile))
> + (so->objfile->section_offsets)->offsets[SECT_OFF_DATA (so->objfile)]
> = so->pa64_solib_desc.data_base;
>
> /* Relocate all the sections based on where they got loaded. */
> Index: remote-os9k.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/remote-os9k.c,v
> retrieving revision 1.4
> diff -c -u -p -r1.4 remote-os9k.c
> --- remote-os9k.c 2000/07/30 01:48:26 1.4
> +++ remote-os9k.c 2000/08/26 01:25:07
> @@ -493,8 +493,8 @@ rombug_wait (int pid, struct target_wait
> new_symfile_objfile (obj_sec->objfile, 1, 0);
> offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
> memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
> - ANOFFSET (offs, SECT_OFF_DATA (symfile_objfile)) = addr;
> - ANOFFSET (offs, SECT_OFF_BSS (symfile_objfile)) = addr;
> + offs->offsets[SECT_OFF_DATA (symfile_objfile)] = addr;
> + offs->offsets[SECT_OFF_BSS (symfile_objfile)] = addr;
>
> objfile_relocate (symfile_objfile, offs);
> }
> Index: remote-vx.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/remote-vx.c,v
> retrieving revision 1.6
> diff -c -u -p -r1.6 remote-vx.c
> --- remote-vx.c 2000/08/02 14:52:10 1.6
> +++ remote-vx.c 2000/08/26 01:25:08
> @@ -685,9 +685,9 @@ vx_add_symbols (char *name, int from_tty
> bfd_map_over_sections (objfile->obfd, find_sect, &ss);
>
> /* Both COFF and b.out frontends use these SECT_OFF_* values. */
> - ANOFFSET (offs, SECT_OFF_TEXT (objfile)) = text_addr - ss.text_start;
> - ANOFFSET (offs, SECT_OFF_DATA (objfile)) = data_addr - ss.data_start;
> - ANOFFSET (offs, SECT_OFF_BSS (objfile)) = bss_addr - ss.bss_start;
> + offs->offsets[SECT_OFF_TEXT (objfile)] = text_addr - ss.text_start;
> + offs->offsets[SECT_OFF_DATA (objfile)] = data_addr - ss.data_start;
> + offs->offsets[SECT_OFF_BSS (objfile)] = bss_addr - ss.bss_start;
> objfile_relocate (objfile, offs);
> }
>
> Index: rs6000-nat.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/rs6000-nat.c,v
> retrieving revision 1.8
> diff -c -u -p -r1.8 rs6000-nat.c
> --- rs6000-nat.c 2000/08/11 01:30:11 1.8
> +++ rs6000-nat.c 2000/08/26 01:25:08
> @@ -609,13 +609,13 @@ vmap_symtab (struct vmap *vp)
> new_offsets = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
>
> for (i = 0; i < objfile->num_sections; ++i)
> - ANOFFSET (new_offsets, i) = ANOFFSET (objfile->section_offsets, i);
> + new_offsets->offsets[i] = ANOFFSET (objfile->section_offsets, i);
>
> /* The symbols in the object file are linked to the VMA of the section,
> relocate them VMA relative. */
> - ANOFFSET (new_offsets, SECT_OFF_TEXT (objfile)) = vp->tstart - vp->tvma;
> - ANOFFSET (new_offsets, SECT_OFF_DATA (objfile)) = vp->dstart - vp->dvma;
> - ANOFFSET (new_offsets, SECT_OFF_BSS (objfile)) = vp->dstart - vp->dvma;
> + new_offsets->offsets[SECT_OFF_TEXT (objfile)] = vp->tstart - vp->tvma;
> + new_offsets->offsets[SECT_OFF_DATA (objfile)] = vp->dstart - vp->dvma;
> + new_offsets->offsets[SECT_OFF_BSS (objfile)] = vp->dstart - vp->dvma;
>
> objfile_relocate (objfile, new_offsets);
> }
> Index: somread.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/somread.c,v
> retrieving revision 1.6
> diff -c -u -p -r1.6 somread.c
> --- somread.c 2000/07/30 01:48:27 1.6
> +++ somread.c 2000/08/26 01:25:08
> @@ -477,7 +477,7 @@ som_symfile_offsets (struct objfile *obj
> text_addr = addrs->other[i].addr;
>
> for (i = 0; i < SECT_OFF_MAX; i++)
> - ANOFFSET (objfile->section_offsets, i) = text_addr;
> + (objfile->section_offsets)->offsets[i] = text_addr;
> }
> }
>
> Index: somsolib.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/somsolib.c,v
> retrieving revision 1.5
> diff -c -u -p -r1.5 somsolib.c
> --- somsolib.c 2000/07/30 01:48:27 1.5
> +++ somsolib.c 2000/08/26 01:25:09
> @@ -1378,10 +1378,10 @@ som_solib_section_offsets (struct objfil
> asection *private_section;
>
> /* The text offset is easy. */
> - ANOFFSET (offsets, SECT_OFF_TEXT (objfile))
> + offsets->offsets[SECT_OFF_TEXT (objfile)]
> = (so_list->som_solib.text_addr
> - so_list->som_solib.text_link_addr);
> - ANOFFSET (offsets, SECT_OFF_RODATA (objfile))
> + offsets->offsets[SECT_OFF_RODATA (objfile)]
> = ANOFFSET (offsets, SECT_OFF_TEXT (objfile));
>
> /* We should look at presumed_dp in the SOM header, but
> @@ -1391,13 +1391,13 @@ som_solib_section_offsets (struct objfil
> if (!private_section)
> {
> warning ("Unable to find $PRIVATE$ in shared library!");
> - ANOFFSET (offsets, SECT_OFF_DATA (objfile)) = 0;
> - ANOFFSET (offsets, SECT_OFF_BSS (objfile)) = 0;
> + offsets->offsets[SECT_OFF_DATA (objfile)] = 0;
> + offsets->offsets[SECT_OFF_BSS (objfile)] = 0;
> return 1;
> }
> - ANOFFSET (offsets, SECT_OFF_DATA (objfile))
> + offsets->offsets[SECT_OFF_DATA (objfile)]
> = (so_list->som_solib.data_start - private_section->vma);
> - ANOFFSET (offsets, SECT_OFF_BSS (objfile))
> + offsets->offsets[SECT_OFF_BSS (objfile)]
> = ANOFFSET (offsets, SECT_OFF_DATA (objfile));
> return 1;
> }
> Index: xcoffread.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/xcoffread.c,v
> retrieving revision 1.8
> diff -c -u -p -r1.8 xcoffread.c
> --- xcoffread.c 2000/08/07 15:16:15 1.8
> +++ xcoffread.c 2000/08/26 01:25:09
> @@ -2744,7 +2744,7 @@ xcoff_symfile_offsets (struct objfile *o
> sensibly), so just ignore the addr parameter and use 0.
> rs6000-nat.c will set the correct section offsets via
> objfile_relocate. */
> - ANOFFSET (objfile->section_offsets, i) = 0;
> + (objfile->section_offsets)->offsets[i] = 0;
> }
> }
>
>
>
>
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)