public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [RFA] Add rs6000-core.c/.o to the list of optional backend files...
@ 2010-11-24 23:52 Joel Brobecker
  2010-11-24 23:57 ` Joel Brobecker
  2010-11-25  0:59 ` Alan Modra
  0 siblings, 2 replies; 4+ messages in thread
From: Joel Brobecker @ 2010-11-24 23:52 UTC (permalink / raw)
  To: binutils; +Cc: Joel Brobecker

I just spent a couple of hours trying to figure out why my debugger
would no longer load core files properly on powerpc-aix.  I had just
updated the sources and done a rebuild.

It turns out that there was a change in struct bfd_section since the
last time I did an update, and that change affects rs6000-core.c.
So that file should have been recompiled, but it did not, leading
rs6000-core to have a different view of that structure than the
rest of the BFD world.  This in turn caused rs6000-core to store
the section file offset at the wrong location in the struct. We then
ended up loading the section from the wrong location in the core file,
etc...

This makes sure that rs6000-core.c gets recompiled whenever any of its
dependencies get changed.  I am not very familiar with automake, but
it seemed to have done the trick.

bfd/ChangeLog:

        * Makefile.am (OPTIONAL_BACKENDS): Add rs6000-core.lo.
        (OPTIONAL_BACKENDS_CFILES): Add rs6000-core.c.
        * Makefile.in: Regenerate.

I tested this on x86_64-linux by rebuilding BFD and GDB.  I think that
the most important part is to verify that the generated Makefile.in
not has the include of rs6000-core.Plo.

OK to commit?

---
 bfd/Makefile.am |    2 ++
 bfd/Makefile.in |    3 +++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 03c5fc7..da14d57 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -651,6 +651,7 @@ OPTIONAL_BACKENDS = \
 	irix-core.lo \
 	lynx-core.lo \
 	osf-core.lo \
+	rs6000-core.lo \
 	sco5-core.lo \
 	trad-core.lo
 
@@ -661,6 +662,7 @@ OPTIONAL_BACKENDS_CFILES = \
 	irix-core.c \
 	lynx-core.c \
 	osf-core.c \
+	rs6000-core.c \
 	sco5-core.c \
 	trad-core.c
 
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 7d3dfab..c452dd7 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -950,6 +950,7 @@ OPTIONAL_BACKENDS = \
 	irix-core.lo \
 	lynx-core.lo \
 	osf-core.lo \
+	rs6000-core.lo \
 	sco5-core.lo \
 	trad-core.lo
 
@@ -960,6 +961,7 @@ OPTIONAL_BACKENDS_CFILES = \
 	irix-core.c \
 	lynx-core.c \
 	osf-core.c \
+	rs6000-core.c \
 	sco5-core.c \
 	trad-core.c
 
@@ -1460,6 +1462,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reloc.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reloc16.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/riscix.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs6000-core.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sco5-core.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/section.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Plo@am__quote@
-- 
1.7.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA] Add rs6000-core.c/.o to the list of optional backend files...
  2010-11-24 23:52 [RFA] Add rs6000-core.c/.o to the list of optional backend files Joel Brobecker
@ 2010-11-24 23:57 ` Joel Brobecker
  2010-11-25  0:59 ` Alan Modra
  1 sibling, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2010-11-24 23:57 UTC (permalink / raw)
  To: binutils

> bfd/ChangeLog:
> 
>         * Makefile.am (OPTIONAL_BACKENDS): Add rs6000-core.lo.
>         (OPTIONAL_BACKENDS_CFILES): Add rs6000-core.c.
>         * Makefile.in: Regenerate.

BTW: I should also mention that I did a grep of all .o files in bfd/,
and compared that with the list of include directives in the Makefile.
Only rs6000-core.o showed up as not having its assocated .Plo include.
So, at least for ppc-aix, we should be OK once this patch is installed.

-- 
Joel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA] Add rs6000-core.c/.o to the list of optional backend files...
  2010-11-24 23:52 [RFA] Add rs6000-core.c/.o to the list of optional backend files Joel Brobecker
  2010-11-24 23:57 ` Joel Brobecker
@ 2010-11-25  0:59 ` Alan Modra
  2010-11-25  1:07   ` Joel Brobecker
  1 sibling, 1 reply; 4+ messages in thread
From: Alan Modra @ 2010-11-25  0:59 UTC (permalink / raw)
  To: Joel Brobecker; +Cc: binutils

On Wed, Nov 24, 2010 at 03:51:45PM -0800, Joel Brobecker wrote:
>         * Makefile.am (OPTIONAL_BACKENDS): Add rs6000-core.lo.
>         (OPTIONAL_BACKENDS_CFILES): Add rs6000-core.c.
>         * Makefile.in: Regenerate.

OK.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA] Add rs6000-core.c/.o to the list of optional backend files...
  2010-11-25  0:59 ` Alan Modra
@ 2010-11-25  1:07   ` Joel Brobecker
  0 siblings, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2010-11-25  1:07 UTC (permalink / raw)
  To: binutils

> On Wed, Nov 24, 2010 at 03:51:45PM -0800, Joel Brobecker wrote:
> >         * Makefile.am (OPTIONAL_BACKENDS): Add rs6000-core.lo.
> >         (OPTIONAL_BACKENDS_CFILES): Add rs6000-core.c.
> >         * Makefile.in: Regenerate.
> 
> OK.

Thanks! Checked in.

-- 
Joel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-25  1:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-24 23:52 [RFA] Add rs6000-core.c/.o to the list of optional backend files Joel Brobecker
2010-11-24 23:57 ` Joel Brobecker
2010-11-25  0:59 ` Alan Modra
2010-11-25  1:07   ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).