public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [patch 2/2] Fix linking on non-x86* after libgdb.a removal
@ 2012-01-04 20:43 Jan Kratochvil
  2012-01-05 14:46 ` Ulrich Weigand
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Kratochvil @ 2012-01-04 20:43 UTC (permalink / raw)
  To: gdb-patches

Hi,

this is the second part for solving corelow after the s390x regression:
	[patch 2/2] Do not build libgdb.a by default
	http://sourceware.org/ml/gdb-patches/2011-12/msg00716.html
->
	corelow.o:(.bss+0x0): multiple definition of `core_gdbarch'
	corelow.o:(.bss+0x0): first defined here
	corelow.o: In function `deprecated_add_core_fns':
	corelow.c:(.text+0x0): multiple definition of `deprecated_add_core_fns'
	corelow.o:corelow.c:(.text+0x0): first defined here


For targets using new set_gdbarch_regset_from_core_section it would not be
a problem, just put corelow.o into the right entry of gdb/configure.tgt.

But for legacy targets still using deprecated_add_core_fns (like
sparc-solaris2.6 etc.) the addition to gdb/configure.tgt would enable
corelow.o even for cross-targeted GDBs where there is unfortunately still no
core files support.

Created the original configuration, just avoiding a duplicate corelow.o entry.
A better idea is welcome.

(s390x not available now for a test but it should work I hope.)


Sorry,
Jan


2012-01-04  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Fix duplicate .o files after omitting libbfd.a.
	* Makefile.in (CORELOW_O): New definition.
	(ALL_TARGET_OBS): Remove corelow.o.
	(DEPFILES): Add $(CORELOW_O).
	* config/alpha/alpha-linux.mh (NATDEPFILES): Remove corelow.o.
	(CORELOW_O): New definition.
	* config/alpha/alpha-osf3.mh: Likewise.
	* config/alpha/fbsd.mh: Likewise.
	* config/arm/nbsdaout.mh: Likewise.
	* config/arm/nbsdelf.mh: Likewise.
	* config/i386/i386gnu.mh: Likewise.
	* config/ia64/hpux.mh: Likewise.
	* config/ia64/linux.mh: Likewise.
	* config/m32r/linux.mh: Likewise.
	* config/m68k/linux.mh: Likewise.
	* config/mips/irix5.mh: Likewise.
	* config/mips/irix6.mh: Likewise.
	* config/pa/hpux.mh: Likewise.
	* config/pa/linux.mh: Likewise.
	* config/powerpc/aix.mh: Likewise.
	* config/s390/s390.mh: Likewise.
	* config/sparc/linux.mh: Likewise.
	* config/sparc/linux64.mh: Likewise.
	* config/sparc/sol2.mh: Likewise.
	* config/vax/vax.mh: Likewise.
	* configure: Regenerate.
	* configure.ac (CORELOW_O): New variable.
	(gdb_target_obs): Exclude corelow.o and set CORELOW_O instead.
	(all_targets): Set CORELOW_O.
	(CORELOW_O): AC_SUBST it.

--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -512,6 +512,12 @@ SIM_OBS = @SIM_OBS@
 # Target-dependent object files.
 TARGET_OBS = @TARGET_OBS@
 
+# corelow.o may be requested by either config/*/*.mh file or for ALL_TARGET_OBS
+# or for specific target(s) from configure.tgt.  Avoid duplicating it.
+# CORELOW_O may get overriden (set to corelow.o) by 'host_makefile_frag' below.
+# CORELOW_O is assumed to be corelow.o for ALL_TARGET_OBS.
+CORELOW_O := @CORELOW_O@
+
 # All target-dependent objects files that require 64-bit CORE_ADDR
 # (used with --enable-targets=all --enable-64-bit-bfd).
 ALL_64_TARGET_OBS = \
@@ -581,7 +587,6 @@ ALL_TARGET_OBS = \
 	remote-m32r-sdi.o remote-mips.o \
 	xcoffread.o \
 	symfile-mem.o \
-	corelow.o \
 	windows-tdep.o \
 	linux-record.o
 
@@ -843,7 +848,7 @@ REMOTE_EXAMPLES = m68k-stub.c i386-stub.c sparc-stub.c rem-multi.shar
 # variables analogous to SER_HARDWIRE which get defaulted in this
 # Makefile.in
 
-DEPFILES = $(TARGET_OBS) $(SER_HARDWIRE) $(NATDEPFILES) \
+DEPFILES = $(TARGET_OBS) $(SER_HARDWIRE) $(NATDEPFILES) $(CORELOW_O) \
 	   $(REMOTE_OBS) $(SIM_OBS)
 
 SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) $(CONFIG_SRCS)
--- a/gdb/config/alpha/alpha-linux.mh
+++ b/gdb/config/alpha/alpha-linux.mh
@@ -1,8 +1,9 @@
 # Host: Little-endian Alpha running Linux
 NAT_FILE= config/nm-linux.h
-NATDEPFILES= inf-ptrace.o corelow.o alpha-linux-nat.o \
+NATDEPFILES= inf-ptrace.o alpha-linux-nat.o \
 	fork-child.o proc-service.o linux-thread-db.o \
 	linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o
+CORELOW_O := corelow.o
 NAT_CDEPS = $(srcdir)/proc-service.list
 
 # The dynamically loaded libthread_db needs access to symbols in the
--- a/gdb/config/alpha/alpha-osf3.mh
+++ b/gdb/config/alpha/alpha-osf3.mh
@@ -1,6 +1,7 @@
 # Host: Little-endian Alpha running OSF/1-3.x and higher using procfs
 NAT_FILE= nm-osf3.h
-NATDEPFILES= corelow.o alpha-nat.o fork-child.o \
+NATDEPFILES= alpha-nat.o fork-child.o \
 	solib-osf.o procfs.o proc-api.o proc-events.o proc-flags.o \
 	proc-why.o dec-thread.o
+CORELOW_O := corelow.o
 NAT_CLIBS= -lpthreaddebug
--- a/gdb/config/alpha/fbsd.mh
+++ b/gdb/config/alpha/fbsd.mh
@@ -1,6 +1,7 @@
 # Host: FreeBSD/alpha
 NATDEPFILES= fork-child.o inf-ptrace.o \
 	fbsd-nat.o alphabsd-nat.o bsd-kvm.o \
-	corelow.o core-regset.o
+	core-regset.o
+CORELOW_O := corelow.o
 
 LOADLIBES= -lkvm
--- a/gdb/config/arm/nbsdaout.mh
+++ b/gdb/config/arm/nbsdaout.mh
@@ -1,3 +1,4 @@
 # Host: NetBSD/arm
-NATDEPFILES= fork-child.o inf-ptrace.o corelow.o armnbsd-nat.o \
+NATDEPFILES= fork-child.o inf-ptrace.o armnbsd-nat.o \
 	solib-sunos.o
+CORELOW_O := corelow.o
--- a/gdb/config/arm/nbsdelf.mh
+++ b/gdb/config/arm/nbsdelf.mh
@@ -1,2 +1,3 @@
 # Host: NetBSD/arm
-NATDEPFILES= fork-child.o inf-ptrace.o corelow.o armnbsd-nat.o
+NATDEPFILES= fork-child.o inf-ptrace.o armnbsd-nat.o
+CORELOW_O := corelow.o
--- a/gdb/config/i386/i386gnu.mh
+++ b/gdb/config/i386/i386gnu.mh
@@ -1,7 +1,8 @@
 # Host: Intel 386 running the GNU Hurd
-NATDEPFILES= i386gnu-nat.o gnu-nat.o corelow.o core-regset.o fork-child.o \
+NATDEPFILES= i386gnu-nat.o gnu-nat.o core-regset.o fork-child.o \
 	     notify_S.o process_reply_S.o msg_reply_S.o \
 	     msg_U.o exc_request_U.o exc_request_S.o
+CORELOW_O := corelow.o
 
 NAT_FILE= nm-i386gnu.h
 MH_CFLAGS = -D_GNU_SOURCE
--- a/gdb/config/ia64/hpux.mh
+++ b/gdb/config/ia64/hpux.mh
@@ -1,3 +1,4 @@
 # Host: ia64 running HP-UX
-NATDEPFILES= fork-child.o inf-ttrace.o corelow.o ia64-hpux-nat.o \
+NATDEPFILES= fork-child.o inf-ttrace.o ia64-hpux-nat.o \
         solib-ia64-hpux.o
+CORELOW_O := corelow.o
--- a/gdb/config/ia64/linux.mh
+++ b/gdb/config/ia64/linux.mh
@@ -1,11 +1,12 @@
 # Host: Intel IA-64 running GNU/Linux
 
 NAT_FILE= config/nm-linux.h
-NATDEPFILES= inf-ptrace.o fork-child.o corelow.o \
+NATDEPFILES= inf-ptrace.o fork-child.o \
 	core-regset.o ia64-linux-nat.o \
 	proc-service.o linux-thread-db.o \
 	linux-nat.o linux-osdata.o linux-fork.o \
 	linux-procfs.o
+CORELOW_O := corelow.o
 NAT_CDEPS = $(srcdir)/proc-service.list
 
 LOADLIBES = -ldl $(RDYNAMIC)
--- a/gdb/config/m32r/linux.mh
+++ b/gdb/config/m32r/linux.mh
@@ -1,9 +1,10 @@
 # Host: M32R based machine running GNU/Linux
 
 NAT_FILE= config/nm-linux.h
-NATDEPFILES= inf-ptrace.o fork-child.o corelow.o	\
+NATDEPFILES= inf-ptrace.o fork-child.o				\
 	m32r-linux-nat.o proc-service.o linux-thread-db.o	\
 	linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o
+CORELOW_O := corelow.o
 NAT_CDEPS = $(srcdir)/proc-service.list
 
 LOADLIBES= -ldl $(RDYNAMIC)
--- a/gdb/config/m68k/linux.mh
+++ b/gdb/config/m68k/linux.mh
@@ -2,9 +2,10 @@
 
 NAT_FILE= config/nm-linux.h
 NATDEPFILES= inf-ptrace.o fork-child.o \
-	corelow.o m68klinux-nat.o \
+	m68klinux-nat.o \
 	proc-service.o linux-thread-db.o \
 	linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o
+CORELOW_O := corelow.o
 NAT_CDEPS = $(srcdir)/proc-service.list
 
 # The dynamically loaded libthread_db needs access to symbols in the
--- a/gdb/config/mips/irix5.mh
+++ b/gdb/config/mips/irix5.mh
@@ -1,3 +1,4 @@
 # Host: SGI Iris running irix 5.x
-NATDEPFILES= fork-child.o irix5-nat.o corelow.o procfs.o \
+NATDEPFILES= fork-child.o irix5-nat.o procfs.o \
 	proc-api.o proc-events.o proc-flags.o proc-why.o
+CORELOW_O := corelow.o
--- a/gdb/config/mips/irix6.mh
+++ b/gdb/config/mips/irix6.mh
@@ -1,3 +1,4 @@
 # Host: SGI Iris running irix 6.x
-NATDEPFILES= fork-child.o irix5-nat.o corelow.o procfs.o \
+NATDEPFILES= fork-child.o irix5-nat.o procfs.o \
 	proc-api.o proc-events.o proc-flags.o proc-why.o
+CORELOW_O := corelow.o
--- a/gdb/config/pa/hpux.mh
+++ b/gdb/config/pa/hpux.mh
@@ -1,3 +1,4 @@
 # Host: PA-RISC HP-UX
 NATDEPFILES= fork-child.o inf-ptrace.o inf-ttrace.o \
-	hppa-hpux-nat.o corelow.o somread.o
+	hppa-hpux-nat.o somread.o
+CORELOW_O := corelow.o
--- a/gdb/config/pa/linux.mh
+++ b/gdb/config/pa/linux.mh
@@ -1,9 +1,10 @@
 # Host: Hewlett-Packard PA-RISC machine, running Linux
 NAT_FILE= config/nm-linux.h
-NATDEPFILES= inf-ptrace.o fork-child.o corelow.o \
+NATDEPFILES= inf-ptrace.o fork-child.o \
 	hppa-linux-nat.o proc-service.o linux-thread-db.o \
 	linux-nat.o linux-osdata.o linux-fork.o \
 	linux-procfs.o
+CORELOW_O := corelow.o
 NAT_CDEPS = $(srcdir)/proc-service.list
 
 LOADLIBES = -ldl $(RDYNAMIC)
--- a/gdb/config/powerpc/aix.mh
+++ b/gdb/config/powerpc/aix.mh
@@ -3,8 +3,9 @@
 NAT_FILE= config/rs6000/nm-rs6000.h
 
 # aix-thread.o is not listed in NATDEPFILES as it is pulled in by configure.
-NATDEPFILES= fork-child.o inf-ptrace.o corelow.o rs6000-nat.o \
+NATDEPFILES= fork-child.o inf-ptrace.o rs6000-nat.o \
 	     xcoffsolib.o
+CORELOW_O := corelow.o
 
 # When compiled with cc, for debugging, this argument should be passed.
 # We have no idea who our current compiler is though, so we skip it.
--- a/gdb/config/s390/s390.mh
+++ b/gdb/config/s390/s390.mh
@@ -1,7 +1,8 @@
 # Host: S390, running Linux
 NAT_FILE= config/nm-linux.h
-NATDEPFILES= inf-ptrace.o fork-child.o corelow.o s390-nat.o \
+NATDEPFILES= inf-ptrace.o fork-child.o s390-nat.o \
 	linux-thread-db.o proc-service.o \
 	linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o
+CORELOW_O := corelow.o
 NAT_CDEPS = $(srcdir)/proc-service.list
 LOADLIBES = -ldl $(RDYNAMIC)
--- a/gdb/config/sparc/linux.mh
+++ b/gdb/config/sparc/linux.mh
@@ -1,10 +1,11 @@
 # Host: GNU/Linux SPARC
 NAT_FILE= config/nm-linux.h
 NATDEPFILES= sparc-nat.o sparc-linux-nat.o \
-	corelow.o core-regset.o fork-child.o inf-ptrace.o \
+	core-regset.o fork-child.o inf-ptrace.o \
 	proc-service.o linux-thread-db.o \
 	linux-nat.o linux-osdata.o linux-fork.o \
 	linux-procfs.o
+CORELOW_O := corelow.o
 NAT_CDEPS = $(srcdir)/proc-service.list
 
 # The dynamically loaded libthread_db needs access to symbols in the
--- a/gdb/config/sparc/linux64.mh
+++ b/gdb/config/sparc/linux64.mh
@@ -1,11 +1,12 @@
 # Host: GNU/Linux UltraSPARC
 NAT_FILE= config/nm-linux.h
 NATDEPFILES= sparc-nat.o sparc64-nat.o sparc64-linux-nat.o \
-	corelow.o core-regset.o \
+	core-regset.o \
 	fork-child.o inf-ptrace.o \
 	proc-service.o linux-thread-db.o \
 	linux-nat.o linux-osdata.o linux-fork.o \
 	linux-procfs.o
+CORELOW_O := corelow.o
 NAT_CDEPS = $(srcdir)/proc-service.list
 
 # The dynamically loaded libthread_db needs access to symbols in the
--- a/gdb/config/sparc/sol2.mh
+++ b/gdb/config/sparc/sol2.mh
@@ -1,5 +1,6 @@
 # Host: Solaris SPARC & UltraSPARC
 NAT_FILE= nm-sol2.h
 NATDEPFILES= sparc-sol2-nat.o \
-	corelow.o core-regset.o fork-child.o \
+	core-regset.o fork-child.o \
 	procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
+CORELOW_O := corelow.o
--- a/gdb/config/vax/vax.mh
+++ b/gdb/config/vax/vax.mh
@@ -1,2 +1,3 @@
 # Host: VAX running 4.2BSD or Ultrix
-NATDEPFILES= vax-nat.o fork-child.o inf-ptrace.o corelow.o
+NATDEPFILES= vax-nat.o fork-child.o inf-ptrace.o
+CORELOW_O := corelow.o
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -174,6 +174,7 @@ fi
 # Accumulate some settings from configure.tgt over all enabled targets
 
 TARGET_OBS=
+CORELOW_O=
 all_targets=
 
 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
@@ -196,12 +197,16 @@ do
 
     # Target-specific object files
     for i in ${gdb_target_obs}; do
-        case " $TARGET_OBS " in
-        *" ${i} "*) ;;
-        *)
-          TARGET_OBS="$TARGET_OBS ${i}"
-          ;;
-        esac
+        if test "$i" = corelow.o; then
+            CORELOW_O=corelow.o
+        else
+            case " $TARGET_OBS " in
+            *" ${i} "*) ;;
+            *)
+              TARGET_OBS="$TARGET_OBS ${i}"
+              ;;
+            esac
+        fi
     done
 
     # Check whether this target needs 64-bit CORE_ADDR
@@ -233,9 +238,11 @@ if test x${all_targets} = xtrue; then
   else
     TARGET_OBS='$(ALL_TARGET_OBS)'
   fi
+  CORELOW_O=corelow.o
 fi
 
 AC_SUBST(TARGET_OBS)
+AC_SUBST(CORELOW_O)
 
 # For other settings, only the main target counts.
 gdb_sim=

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

* Re: [patch 2/2] Fix linking on non-x86* after libgdb.a removal
  2012-01-04 20:43 [patch 2/2] Fix linking on non-x86* after libgdb.a removal Jan Kratochvil
@ 2012-01-05 14:46 ` Ulrich Weigand
  2012-01-05 15:25   ` Jan Kratochvil
  0 siblings, 1 reply; 10+ messages in thread
From: Ulrich Weigand @ 2012-01-05 14:46 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches

Jan Kratochvil wrote:

> this is the second part for solving corelow after the s390x regression:
> 	[patch 2/2] Do not build libgdb.a by default
> 	http://sourceware.org/ml/gdb-patches/2011-12/msg00716.html
> ->
> 	corelow.o:(.bss+0x0): multiple definition of `core_gdbarch'
> 	corelow.o:(.bss+0x0): first defined here
> 	corelow.o: In function `deprecated_add_core_fns':
> 	corelow.c:(.text+0x0): multiple definition of `deprecated_add_core_fns'
> 	corelow.o:corelow.c:(.text+0x0): first defined here
> 
> 
> For targets using new set_gdbarch_regset_from_core_section it would not be
> a problem, just put corelow.o into the right entry of gdb/configure.tgt.

Huh, at least for s390 this would certainly be the correct solution; the
target actually is fully switched to modern gdbarch core handling ...

This needs to be done anyway to properly handle cross-debugging targeting
s390 core files.  Unless you already have done so, I can prepare a patch.

> But for legacy targets still using deprecated_add_core_fns (like
> sparc-solaris2.6 etc.) the addition to gdb/configure.tgt would enable
> corelow.o even for cross-targeted GDBs where there is unfortunately still no
> core files support.
> 
> Created the original configuration, just avoiding a duplicate corelow.o entry.
> A better idea is welcome.

Maybe a better way would be to just unconditionally add corelow.o to
COMMON_OBS and be done with it?  What would be the harm in having the
core target always present, even in configurations where no core file
formats will be recognized?

Or, if we want to keep the existing behaviour exactly, we could just
filter out all objects from TARGET_OBS that are already present in
NATDEPFILES (or vice versa).  This would at least avoid the ad-hoc
handling of one specific file ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com

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

* Re: [patch 2/2] Fix linking on non-x86* after libgdb.a removal
  2012-01-05 14:46 ` Ulrich Weigand
@ 2012-01-05 15:25   ` Jan Kratochvil
  2012-01-05 17:10     ` [commit, s390] Move corelow.o to target config (Re: [patch 2/2] Fix linking on non-x86* after libgdb.a removal) Ulrich Weigand
  2012-01-05 17:12     ` [patch 2/2] Fix linking on non-x86* after libgdb.a removal Ulrich Weigand
  0 siblings, 2 replies; 10+ messages in thread
From: Jan Kratochvil @ 2012-01-05 15:25 UTC (permalink / raw)
  To: Ulrich Weigand; +Cc: gdb-patches

On Thu, 05 Jan 2012 15:46:19 +0100, Ulrich Weigand wrote:
> Jan Kratochvil wrote:
> > For targets using new set_gdbarch_regset_from_core_section it would not be
> > a problem, just put corelow.o into the right entry of gdb/configure.tgt.
> 
> Huh, at least for s390 this would certainly be the correct solution; the
> target actually is fully switched to modern gdbarch core handling ...

I agree and I forgot to write that at least some - at least s390 - targets
properly work with core files on cross-gdb.  But still some other targets do
not.  I find such fix(es) outside of the scope of this proposed patch.
As I found for example on sparc*-tdep.c files it is not so obvious which are
and which are not already converted.


> This needs to be done anyway to properly handle cross-debugging targeting
> s390 core files.  Unless you already have done so, I can prepare a patch.

Sure such (separate) patch would be great.


> Maybe a better way would be to just unconditionally add corelow.o to
> COMMON_OBS and be done with it?  What would be the harm in having the
> core target always present, even in configurations where no core file
> formats will be recognized?

Currently GDB writes:
GDB can't read core files on this machine.

I guess it will load the core file without recognizing its registers?
I do not have available any core file from the legacy *-tdep.c archs.
That can be considered a regression.


> Or, if we want to keep the existing behaviour exactly, we could just
> filter out all objects from TARGET_OBS that are already present in
> NATDEPFILES (or vice versa).  This would at least avoid the ad-hoc
> handling of one specific file ...

I think one cannot do such filtering in a cross-platform way from Makefile.
But I agree it can be done from configure.ac.  I can rework it that way.

There needs to be some exception for ALL_TARGET_OBS which are not known to
configure.ac, I considered this as a blocker but I see it is not.


Thanks,
Jan

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

* [commit, s390] Move corelow.o to target config (Re: [patch 2/2] Fix linking on non-x86* after libgdb.a removal)
  2012-01-05 15:25   ` Jan Kratochvil
@ 2012-01-05 17:10     ` Ulrich Weigand
  2012-01-05 17:12     ` [patch 2/2] Fix linking on non-x86* after libgdb.a removal Ulrich Weigand
  1 sibling, 0 replies; 10+ messages in thread
From: Ulrich Weigand @ 2012-01-05 17:10 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches

Jan Kratochvil wrote:
> On Thu, 05 Jan 2012 15:46:19 +0100, Ulrich Weigand wrote:
> > This needs to be done anyway to properly handle cross-debugging targeting
> > s390 core files.  Unless you already have done so, I can prepare a patch.
> 
> Sure such (separate) patch would be great.

OK, I've checked in the patch below.

Tested on s390x-ibm-linux (-m31/-m64).

Bye,
Ulrich


ChangeLog:

	* configure.tgt [s390*-*-*] (gdb_target_obs): Add corelow.o.
	* config/s390/s390.mh (NATDEPFILES): Remove corelow.o.


Index: gdb/configure.tgt
===================================================================
RCS file: /cvs/src/src/gdb/configure.tgt,v
retrieving revision 1.247
diff -u -p -r1.247 configure.tgt
--- gdb/configure.tgt	2 Jan 2012 17:18:46 -0000	1.247
+++ gdb/configure.tgt	5 Jan 2012 17:04:41 -0000
@@ -428,7 +428,7 @@ powerpc*-*-*)
 
 s390*-*-*)
 	# Target: S390 running Linux
-	gdb_target_obs="s390-tdep.o solib-svr4.o linux-tdep.o"
+	gdb_target_obs="s390-tdep.o solib-svr4.o corelow.o linux-tdep.o"
 	build_gdbserver=yes
 	;;
 
Index: gdb/config/s390/s390.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/s390/s390.mh,v
retrieving revision 1.19
diff -u -p -r1.19 s390.mh
--- gdb/config/s390/s390.mh	2 Sep 2011 21:40:30 -0000	1.19
+++ gdb/config/s390/s390.mh	5 Jan 2012 17:04:42 -0000
@@ -1,6 +1,6 @@
 # Host: S390, running Linux
 NAT_FILE= config/nm-linux.h
-NATDEPFILES= inf-ptrace.o fork-child.o corelow.o s390-nat.o \
+NATDEPFILES= inf-ptrace.o fork-child.o s390-nat.o \
 	linux-thread-db.o proc-service.o \
 	linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o
 NAT_CDEPS = $(srcdir)/proc-service.list


-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com

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

* Re: [patch 2/2] Fix linking on non-x86* after libgdb.a removal
  2012-01-05 15:25   ` Jan Kratochvil
  2012-01-05 17:10     ` [commit, s390] Move corelow.o to target config (Re: [patch 2/2] Fix linking on non-x86* after libgdb.a removal) Ulrich Weigand
@ 2012-01-05 17:12     ` Ulrich Weigand
  2012-01-09 21:02       ` Jan Kratochvil
  1 sibling, 1 reply; 10+ messages in thread
From: Ulrich Weigand @ 2012-01-05 17:12 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches

Jan Kratochvil wrote:
> On Thu, 05 Jan 2012 15:46:19 +0100, Ulrich Weigand wrote:
> > Maybe a better way would be to just unconditionally add corelow.o to
> > COMMON_OBS and be done with it?  What would be the harm in having the
> > core target always present, even in configurations where no core file
> > formats will be recognized?
> 
> Currently GDB writes:
> GDB can't read core files on this machine.
> 
> I guess it will load the core file without recognizing its registers?
> I do not have available any core file from the legacy *-tdep.c archs.
> That can be considered a regression.

I guess so.  Well, it should be straightforward to add a check to
corelow.c and give the same error message as above if:
- there are no old-style core_fns handlers installed at all, and
- there is no gdbarch handler for this core file type

That ought to fully replicate the current behaviour.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com

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

* Re: [patch 2/2] Fix linking on non-x86* after libgdb.a removal
  2012-01-05 17:12     ` [patch 2/2] Fix linking on non-x86* after libgdb.a removal Ulrich Weigand
@ 2012-01-09 21:02       ` Jan Kratochvil
  2012-01-10 16:06         ` Ulrich Weigand
  2012-01-10 19:32         ` Pedro Alves
  0 siblings, 2 replies; 10+ messages in thread
From: Jan Kratochvil @ 2012-01-09 21:02 UTC (permalink / raw)
  To: Ulrich Weigand; +Cc: gdb-patches

On Thu, 05 Jan 2012 18:12:11 +0100, Ulrich Weigand wrote:
> Jan Kratochvil wrote:
> > On Thu, 05 Jan 2012 15:46:19 +0100, Ulrich Weigand wrote:
> > > Maybe a better way would be to just unconditionally add corelow.o to
> > > COMMON_OBS and be done with it?

BTW - if someone else reads this - isn't it just a needless overhead?
But I am fine with such negligible code overhead myself.


> I guess so.  Well, it should be straightforward to add a check to
> corelow.c and give the same error message as above if:
> - there are no old-style core_fns handlers installed at all, and
> - there is no gdbarch handler for this core file type
> 
> That ought to fully replicate the current behaviour.

While implementing it I find the current behavior already wrong:

I got a --target=sparc-solaris2.6 core file for testing:
	http://people.redhat.com/jkratoch/sparcsolariscore.tar.xz

Which is useful for testing GDB as GDB still supports sparc-solaris2.6 core
files only in the deprecated_add_core_fns native mode.

On x86_64-linux-gnu with
  ./configure --target=sparc-solaris2.6
GDB really errors with:
  GDB can't read core files on this machine.
(as it does not have corelow.c)

But on x86_64-linux-gnu With
  ./configure --enable-targets=sparc-solaris2.6
GDB does not behave so great:
  warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
  of GDB.  Attempting to continue with the default sparc settings.
  Reading symbols from /home/jkratoch/t/sparcsolariscore/ss...done.
  warning: "/home/jkratoch/t/sparcsolariscore/core": no core file handler recognizes format, using default
  Can't fetch registers from this type of core file
  warning: while parsing target library list: no element found
  Core was generated by `./ss'.
  Can't fetch registers from this type of core file
  #0  <unavailable> in ?? ()
  (gdb) info registers 
  Can't fetch registers from this type of core file
  g0             *value not available*
  Can't fetch registers from this type of core file
  g1             *value not available*
(as it does have corelow.c for x86_64)

I believe in the second case it would be better to just refuse such core file.
Still one has the core r/w memory available there but without registers it
does not seem to be of much use and it may be more confusing than anything
else.

It is also weird the behavior of target X (sparc-solaris2.6; whether the core
file gets an error or just *value not available* registers) depends on whether
there are also compiled in unrelated targets Y (x86_64-linux-gnu) or Z.

No regressions on {x86_64,x86_64-m32,i686}-fedorarawhide-linux-gnu.


Thanks,
Jan


gdb/
2012-01-09  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Fix duplicate .o files after omitting libbfd.a.
	* Makefile.in (ALL_TARGET_OBS): Remove corelow.o.
	(SFILES): Add corelow.c.
	(COMMON_OBS): Add corelow.o.
	(ALLDEPFILES): Remove corelow.c.
	* config/alpha/alpha-linux.mh (NATDEPFILES): Remove corelow.o.
	* config/alpha/alpha-osf3.mh: Likewise.
	* config/alpha/fbsd.mh: Likewise.
	* config/arm/nbsdaout.mh: Likewise.
	* config/arm/nbsdelf.mh: Likewise.
	* config/i386/i386gnu.mh: Likewise.
	* config/ia64/hpux.mh: Likewise.
	* config/ia64/linux.mh: Likewise.
	* config/m32r/linux.mh: Likewise.
	* config/m68k/linux.mh: Likewise.
	* config/mips/irix5.mh: Likewise.
	* config/mips/irix6.mh: Likewise.
	* config/pa/hpux.mh: Likewise.
	* config/pa/linux.mh: Likewise.
	* config/powerpc/aix.mh: Likewise.
	* config/sparc/linux.mh: Likewise.
	* config/sparc/linux64.mh: Likewise.
	* config/sparc/sol2.mh: Likewise.
	* config/vax/vax.mh: Likewise.
	* configure.tgt (alpha*-*-freebsd* alpha*-*-kfreebsd*-gnu)
	(alpha*-*-netbsd*, alpha*-*-knetbsd*-gnu, alpha*-*-openbsd*)
	(am33_2.0*-*-linux*, arm*-wince-pe, arm*-*-mingw32ce*, arm*-*-linux*)
	(arm*-*-openbsd*, cris*, frv-*-*, hppa*-*-hpux*, hppa*-*-netbsd*)
	(hppa*-*-openbsd*, i[34567]86-*-dicos*, i[34567]86-*-freebsd*)
	(i[34567]86-*-kfreebsd*-gnu, i[34567]86-*-netbsd*)
	(i[34567]86-*-knetbsd*-gnu, i[34567]86-*-openbsd*, i[34567]86-*-nto*)
	(i[34567]86-*-solaris2.1[0-9]*, x86_64-*-solaris2.1[0-9]*)
	(i[34567]86-*-solaris*, i[34567]86-*-linux*, i[34567]86-*-cygwin*)
	(i[34567]86-*-mingw32*, m68*-*-netbsd*, m68*-*-knetbsd*-gnu)
	(m68*-*-openbsd*, m88*-*-openbsd*, microblaze*-linux-*)
	(microblaze*-*-linux*, mips*-*-linux*, mips*-*-netbsd*)
	(mips*-*-knetbsd*-gnu, mips64*-*-openbsd*, powerpc-*-netbsd*)
	(powerpc-*-knetbsd*-gnu, powerpc-*-openbsd*, powerpc-*-linux*)
	(powerpc64-*-linux*, s390*-*-*, score-*-*, sh*-*-linux*)
	(sh*-*-netbsdelf*, sh*-*-knetbsd*-gnu, sh*-*-openbsd*)
	(sparc*-*-freebsd*, sparc*-*-kfreebsd*-gnu, sparc-*-netbsd*)
	(sparc-*-knetbsd*-gnu, sparc64-*-netbsd*, sparc64-*-knetbsd*-gnu)
	(sparc-*-openbsd*, sparc64-*-openbsd*, tic6x-*-*linux, vax-*-netbsd*)
	(vax-*-knetbsd*-gnu, vax-*-openbsd*, x86_64-*-dicos*, x86_64-*-linux*)
	(x86_64-*-freebsd*, x86_64-*-kfreebsd*-gnu, x86_64-*-netbsd*)
	(x86_64-*-knetbsd*-gnu, x86_64-*-openbsd*, xtensa*-*-linux*): Remove
	corelow.o from gdb_target_obs.
	* corefile.c (core_target): Update the comment on NULL value.
	(core_file_command): Replace error by gdb_assert on CORE_TARGET.
	* corelow.c (sniff_core_bfd): Call error instead of warning on zero
	MATCHES.  Drop YUMMY set on NULL.
	(core_close): Do not call exit_inferior_silent on zero PID.  Do not
	reclaim CORE_DATA if it is already NULL.

--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -581,7 +581,6 @@ ALL_TARGET_OBS = \
 	remote-m32r-sdi.o remote-mips.o \
 	xcoffread.o \
 	symfile-mem.o \
-	corelow.o \
 	windows-tdep.o \
 	linux-record.o
 
@@ -692,7 +691,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
 	block.c blockframe.c breakpoint.c buildsym.c \
 	c-exp.y c-lang.c c-typeprint.c c-valprint.c \
 	charset.c cli-out.c coffread.c coff-pe-read.c \
-	complaints.c completer.c continuations.c corefile.c \
+	complaints.c completer.c continuations.c corefile.c corelow.c \
 	cp-abi.c cp-support.c cp-namespace.c cp-valprint.c \
 	d-lang.c d-valprint.c \
 	cp-name-parser.y \
@@ -860,7 +859,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
 	auxv.o \
 	bfd-target.o \
 	blockframe.o breakpoint.o findvar.o regcache.o \
-	charset.o continuations.o disasm.o dummy-frame.o dfp.o \
+	charset.o continuations.o corelow.o disasm.o dummy-frame.o dfp.o \
 	source.o value.o eval.o valops.o valarith.o valprint.o printcmd.o \
 	block.o symtab.o psymtab.o symfile.o symmisc.o linespec.o dictionary.o \
 	infcall.o \
@@ -1439,7 +1438,7 @@ ALLDEPFILES = \
 	avr-tdep.c \
 	bfin-linux-tdep.c bfin-tdep.c \
 	bsd-uthread.c bsd-kvm.c \
-	core-regset.c corelow.c \
+	core-regset.c \
 	dcache.c dicos-tdep.c darwin-nat.c \
 	exec.c \
 	fbsd-nat.c \
--- a/gdb/config/alpha/alpha-linux.mh
+++ b/gdb/config/alpha/alpha-linux.mh
@@ -1,6 +1,6 @@
 # Host: Little-endian Alpha running Linux
 NAT_FILE= config/nm-linux.h
-NATDEPFILES= inf-ptrace.o corelow.o alpha-linux-nat.o \
+NATDEPFILES= inf-ptrace.o alpha-linux-nat.o \
 	fork-child.o proc-service.o linux-thread-db.o \
 	linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o
 NAT_CDEPS = $(srcdir)/proc-service.list
--- a/gdb/config/alpha/alpha-osf3.mh
+++ b/gdb/config/alpha/alpha-osf3.mh
@@ -1,6 +1,6 @@
 # Host: Little-endian Alpha running OSF/1-3.x and higher using procfs
 NAT_FILE= nm-osf3.h
-NATDEPFILES= corelow.o alpha-nat.o fork-child.o \
+NATDEPFILES= alpha-nat.o fork-child.o \
 	solib-osf.o procfs.o proc-api.o proc-events.o proc-flags.o \
 	proc-why.o dec-thread.o
 NAT_CLIBS= -lpthreaddebug
--- a/gdb/config/alpha/fbsd.mh
+++ b/gdb/config/alpha/fbsd.mh
@@ -1,6 +1,6 @@
 # Host: FreeBSD/alpha
 NATDEPFILES= fork-child.o inf-ptrace.o \
 	fbsd-nat.o alphabsd-nat.o bsd-kvm.o \
-	corelow.o core-regset.o
+	core-regset.o
 
 LOADLIBES= -lkvm
--- a/gdb/config/arm/nbsdaout.mh
+++ b/gdb/config/arm/nbsdaout.mh
@@ -1,3 +1,3 @@
 # Host: NetBSD/arm
-NATDEPFILES= fork-child.o inf-ptrace.o corelow.o armnbsd-nat.o \
+NATDEPFILES= fork-child.o inf-ptrace.o armnbsd-nat.o \
 	solib-sunos.o
--- a/gdb/config/arm/nbsdelf.mh
+++ b/gdb/config/arm/nbsdelf.mh
@@ -1,2 +1,2 @@
 # Host: NetBSD/arm
-NATDEPFILES= fork-child.o inf-ptrace.o corelow.o armnbsd-nat.o
+NATDEPFILES= fork-child.o inf-ptrace.o armnbsd-nat.o
--- a/gdb/config/i386/i386gnu.mh
+++ b/gdb/config/i386/i386gnu.mh
@@ -1,5 +1,5 @@
 # Host: Intel 386 running the GNU Hurd
-NATDEPFILES= i386gnu-nat.o gnu-nat.o corelow.o core-regset.o fork-child.o \
+NATDEPFILES= i386gnu-nat.o gnu-nat.o core-regset.o fork-child.o \
 	     notify_S.o process_reply_S.o msg_reply_S.o \
 	     msg_U.o exc_request_U.o exc_request_S.o
 
--- a/gdb/config/ia64/hpux.mh
+++ b/gdb/config/ia64/hpux.mh
@@ -1,3 +1,3 @@
 # Host: ia64 running HP-UX
-NATDEPFILES= fork-child.o inf-ttrace.o corelow.o ia64-hpux-nat.o \
+NATDEPFILES= fork-child.o inf-ttrace.o ia64-hpux-nat.o \
         solib-ia64-hpux.o
--- a/gdb/config/ia64/linux.mh
+++ b/gdb/config/ia64/linux.mh
@@ -1,7 +1,7 @@
 # Host: Intel IA-64 running GNU/Linux
 
 NAT_FILE= config/nm-linux.h
-NATDEPFILES= inf-ptrace.o fork-child.o corelow.o \
+NATDEPFILES= inf-ptrace.o fork-child.o \
 	core-regset.o ia64-linux-nat.o \
 	proc-service.o linux-thread-db.o \
 	linux-nat.o linux-osdata.o linux-fork.o \
--- a/gdb/config/m32r/linux.mh
+++ b/gdb/config/m32r/linux.mh
@@ -1,7 +1,7 @@
 # Host: M32R based machine running GNU/Linux
 
 NAT_FILE= config/nm-linux.h
-NATDEPFILES= inf-ptrace.o fork-child.o corelow.o	\
+NATDEPFILES= inf-ptrace.o fork-child.o				\
 	m32r-linux-nat.o proc-service.o linux-thread-db.o	\
 	linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o
 NAT_CDEPS = $(srcdir)/proc-service.list
--- a/gdb/config/m68k/linux.mh
+++ b/gdb/config/m68k/linux.mh
@@ -2,7 +2,7 @@
 
 NAT_FILE= config/nm-linux.h
 NATDEPFILES= inf-ptrace.o fork-child.o \
-	corelow.o m68klinux-nat.o \
+	m68klinux-nat.o \
 	proc-service.o linux-thread-db.o \
 	linux-nat.o linux-osdata.o linux-fork.o linux-procfs.o
 NAT_CDEPS = $(srcdir)/proc-service.list
--- a/gdb/config/mips/irix5.mh
+++ b/gdb/config/mips/irix5.mh
@@ -1,3 +1,3 @@
 # Host: SGI Iris running irix 5.x
-NATDEPFILES= fork-child.o irix5-nat.o corelow.o procfs.o \
+NATDEPFILES= fork-child.o irix5-nat.o procfs.o \
 	proc-api.o proc-events.o proc-flags.o proc-why.o
--- a/gdb/config/mips/irix6.mh
+++ b/gdb/config/mips/irix6.mh
@@ -1,3 +1,3 @@
 # Host: SGI Iris running irix 6.x
-NATDEPFILES= fork-child.o irix5-nat.o corelow.o procfs.o \
+NATDEPFILES= fork-child.o irix5-nat.o procfs.o \
 	proc-api.o proc-events.o proc-flags.o proc-why.o
--- a/gdb/config/pa/hpux.mh
+++ b/gdb/config/pa/hpux.mh
@@ -1,3 +1,3 @@
 # Host: PA-RISC HP-UX
 NATDEPFILES= fork-child.o inf-ptrace.o inf-ttrace.o \
-	hppa-hpux-nat.o corelow.o somread.o
+	hppa-hpux-nat.o somread.o
--- a/gdb/config/pa/linux.mh
+++ b/gdb/config/pa/linux.mh
@@ -1,6 +1,6 @@
 # Host: Hewlett-Packard PA-RISC machine, running Linux
 NAT_FILE= config/nm-linux.h
-NATDEPFILES= inf-ptrace.o fork-child.o corelow.o \
+NATDEPFILES= inf-ptrace.o fork-child.o \
 	hppa-linux-nat.o proc-service.o linux-thread-db.o \
 	linux-nat.o linux-osdata.o linux-fork.o \
 	linux-procfs.o
--- a/gdb/config/powerpc/aix.mh
+++ b/gdb/config/powerpc/aix.mh
@@ -3,7 +3,7 @@
 NAT_FILE= config/rs6000/nm-rs6000.h
 
 # aix-thread.o is not listed in NATDEPFILES as it is pulled in by configure.
-NATDEPFILES= fork-child.o inf-ptrace.o corelow.o rs6000-nat.o \
+NATDEPFILES= fork-child.o inf-ptrace.o rs6000-nat.o \
 	     xcoffsolib.o
 
 # When compiled with cc, for debugging, this argument should be passed.
--- a/gdb/config/sparc/linux.mh
+++ b/gdb/config/sparc/linux.mh
@@ -1,7 +1,7 @@
 # Host: GNU/Linux SPARC
 NAT_FILE= config/nm-linux.h
 NATDEPFILES= sparc-nat.o sparc-linux-nat.o \
-	corelow.o core-regset.o fork-child.o inf-ptrace.o \
+	core-regset.o fork-child.o inf-ptrace.o \
 	proc-service.o linux-thread-db.o \
 	linux-nat.o linux-osdata.o linux-fork.o \
 	linux-procfs.o
--- a/gdb/config/sparc/linux64.mh
+++ b/gdb/config/sparc/linux64.mh
@@ -1,7 +1,7 @@
 # Host: GNU/Linux UltraSPARC
 NAT_FILE= config/nm-linux.h
 NATDEPFILES= sparc-nat.o sparc64-nat.o sparc64-linux-nat.o \
-	corelow.o core-regset.o \
+	core-regset.o \
 	fork-child.o inf-ptrace.o \
 	proc-service.o linux-thread-db.o \
 	linux-nat.o linux-osdata.o linux-fork.o \
--- a/gdb/config/sparc/sol2.mh
+++ b/gdb/config/sparc/sol2.mh
@@ -1,5 +1,5 @@
 # Host: Solaris SPARC & UltraSPARC
 NAT_FILE= nm-sol2.h
 NATDEPFILES= sparc-sol2-nat.o \
-	corelow.o core-regset.o fork-child.o \
+	core-regset.o fork-child.o \
 	procfs.o proc-api.o proc-events.o proc-flags.o proc-why.o
--- a/gdb/config/vax/vax.mh
+++ b/gdb/config/vax/vax.mh
@@ -1,2 +1,2 @@
 # Host: VAX running 4.2BSD or Ultrix
-NATDEPFILES= vax-nat.o fork-child.o inf-ptrace.o corelow.o
+NATDEPFILES= vax-nat.o fork-child.o inf-ptrace.o
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -44,19 +44,18 @@ alpha*-*-linux*)
 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
 	# Target: FreeBSD/alpha
 	gdb_target_obs="alpha-tdep.o alpha-mdebug-tdep.o alphabsd-tdep.o \
-			alphafbsd-tdep.o corelow.o solib-svr4.o"
+			alphafbsd-tdep.o solib-svr4.o"
 	;;
 alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu)
 	# Target: NetBSD/alpha
 	gdb_target_obs="alpha-tdep.o alpha-mdebug-tdep.o alphabsd-tdep.o \
-			alphanbsd-tdep.o nbsd-tdep.o corelow.o \
-			solib-svr4.o"
+			alphanbsd-tdep.o nbsd-tdep.o solib-svr4.o"
 	;;
 alpha*-*-openbsd*)
 	# Target: OpenBSD/alpha
 	gdb_target_obs="alpha-tdep.o alpha-mdebug-tdep.o alphabsd-tdep.o \
 			alphanbsd-tdep.o alphaobsd-tdep.o nbsd-tdep.o \
-			obsd-tdep.o corelow.o solib-svr4.o"
+			obsd-tdep.o solib-svr4.o"
 	;;
 alpha*-*-*)
 	# Target: Alpha
@@ -66,18 +65,18 @@ alpha*-*-*)
 am33_2.0*-*-linux*)
 	# Target: Matsushita mn10300 (AM33) running Linux
 	gdb_target_obs="mn10300-tdep.o mn10300-linux-tdep.o linux-tdep.o \
-			corelow.o solib-svr4.o"
+			solib-svr4.o"
 	;;
 
 arm*-wince-pe | arm*-*-mingw32ce*)
 	# Target: ARM based machine running Windows CE (win32)
-	gdb_target_obs="arm-tdep.o arm-wince-tdep.o corelow.o"
+	gdb_target_obs="arm-tdep.o arm-wince-tdep.o"
 	build_gdbserver=yes
 	;;
 arm*-*-linux*)
 	# Target: ARM based machine running GNU/Linux
 	gdb_target_obs="arm-tdep.o arm-linux-tdep.o glibc-tdep.o \
-			solib-svr4.o symfile-mem.o corelow.o linux-tdep.o"
+			solib-svr4.o symfile-mem.o linux-tdep.o"
 	build_gdbserver=yes
 	;;
 arm*-*-netbsd* | arm*-*-knetbsd*-gnu)
@@ -87,7 +86,7 @@ arm*-*-netbsd* | arm*-*-knetbsd*-gnu)
 arm*-*-openbsd*)
 	# Target: OpenBSD/arm
 	gdb_target_obs="arm-tdep.o armbsd-tdep.o armobsd-tdep.o obsd-tdep.o \
-			corelow.o solib-svr4.o"
+			solib-svr4.o"
 	;;
 arm*-*-symbianelf*)
 	# Target: SymbianOS/arm
@@ -119,13 +118,12 @@ bfin-*-*)
 
 cris*)
 	# Target: CRIS
-	gdb_target_obs="cris-tdep.o corelow.o solib-svr4.o"
+	gdb_target_obs="cris-tdep.o solib-svr4.o"
 	;;
 
 frv-*-*)
 	# Target: Fujitsu FRV processor
-	gdb_target_obs="frv-tdep.o frv-linux-tdep.o linux-tdep.o \
-			solib-frv.o corelow.o"
+	gdb_target_obs="frv-tdep.o frv-linux-tdep.o linux-tdep.o solib-frv.o"
 	gdb_sim=../sim/frv/libsim.a
 	;;
 
@@ -142,8 +140,7 @@ h8300-*-*)
 
 hppa*-*-hpux*)
 	# Target: HP PA-RISC running hpux
-	gdb_target_obs="hppa-tdep.o hppa-hpux-tdep.o corelow.o \
-			solib-som.o solib-pa64.o"
+	gdb_target_obs="hppa-tdep.o hppa-hpux-tdep.o solib-som.o solib-pa64.o"
 	;;
 hppa*-*-linux*)
 	# Target: HP PA-RISC running Linux
@@ -152,13 +149,11 @@ hppa*-*-linux*)
 	;;
 hppa*-*-netbsd*)
 	# Target: NetBSD/hppa
-	gdb_target_obs="hppa-tdep.o hppabsd-tdep.o hppanbsd-tdep.o \
-			corelow.o solib-svr4.o"
+	gdb_target_obs="hppa-tdep.o hppabsd-tdep.o hppanbsd-tdep.o solib-svr4.o"
 	;;
 hppa*-*-openbsd*)
 	# Target: OpenBSD/hppa
-	gdb_target_obs="hppa-tdep.o hppabsd-tdep.o hppaobsd-tdep.o \
-			corelow.o solib-svr4.o"
+	gdb_target_obs="hppa-tdep.o hppabsd-tdep.o hppaobsd-tdep.o solib-svr4.o"
 	;;
 hppa*-*-*)
 	# Target: HP PA-RISC
@@ -176,46 +171,43 @@ i[34567]86-*-darwin*)
 	;;
 i[34567]86-*-dicos*)
 	# Target: DICOS/i386
-	gdb_target_obs="i386-tdep.o i387-tdep.o \
-			dicos-tdep.o i386-dicos-tdep.o \
-			corelow.o"
+	gdb_target_obs="i386-tdep.o i387-tdep.o dicos-tdep.o i386-dicos-tdep.o"
 	;;
 i[34567]86-*-freebsd* | i[34567]86-*-kfreebsd*-gnu)
 	# Target: FreeBSD/i386
 	gdb_target_obs="i386-tdep.o i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o \
-			bsd-uthread.o corelow.o solib-svr4.o"
+			bsd-uthread.o solib-svr4.o"
 	;;
 i[34567]86-*-netbsd* | i[34567]86-*-knetbsd*-gnu)
 	# Target: NetBSD/i386
 	gdb_target_obs="i386-tdep.o i387-tdep.o i386bsd-tdep.o i386nbsd-tdep.o \
-			nbsd-tdep.o corelow.o solib-svr4.o"
+			nbsd-tdep.o solib-svr4.o"
 	;;
 i[34567]86-*-openbsd*)
 	# Target: OpenBSD/i386
 	gdb_target_obs="i386-tdep.o i387-tdep.o i386bsd-tdep.o i386obsd-tdep.o \
-			bsd-uthread.o corelow.o solib-svr4.o"
+			bsd-uthread.o solib-svr4.o"
 	;;
 i[34567]86-*-nto*)
 	# Target: Intel 386 running qnx6.
-	gdb_target_obs="i386-tdep.o i387-tdep.o corelow.o solib-svr4.o \
+	gdb_target_obs="i386-tdep.o i387-tdep.o solib-svr4.o \
 			i386-nto-tdep.o nto-tdep.o"
 	build_gdbserver=yes
 	;;
 i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*)
 	# Target: Solaris x86_64
 	gdb_target_obs="i386-tdep.o i387-tdep.o amd64-tdep.o amd64-sol2-tdep.o \
-			i386-sol2-tdep.o sol2-tdep.o \
-			corelow.o solib-svr4.o"
+			i386-sol2-tdep.o sol2-tdep.o solib-svr4.o"
 	;;
 i[34567]86-*-solaris*)
 	# Target: Solaris x86
 	gdb_target_obs="i386-tdep.o i387-tdep.o i386-sol2-tdep.o sol2-tdep.o \
-			corelow.o solib-svr4.o"
+			solib-svr4.o"
 	;;
 i[34567]86-*-linux*)
 	# Target: Intel 386 running GNU/Linux
 	gdb_target_obs="i386-tdep.o i386-linux-tdep.o glibc-tdep.o i387-tdep.o \
-			solib-svr4.o symfile-mem.o corelow.o \
+			solib-svr4.o symfile-mem.o \
 			linux-tdep.o linux-record.o"
 	if test "x$enable_64_bit_bfd" = "xyes"; then
 	    # Target: GNU/Linux x86-64
@@ -230,13 +222,13 @@ i[34567]86-*-gnu*)
 i[34567]86-*-cygwin*)
 	# Target: Intel 386 running win32
 	gdb_target_obs="i386-tdep.o i386-cygwin-tdep.o i387-tdep.o \
-			corelow.o windows-tdep.o"
+			windows-tdep.o"
 	build_gdbserver=yes
 	;;
 i[34567]86-*-mingw32*)
 	# Target: Intel 386 running win32
 	gdb_target_obs="i386-tdep.o i386-cygwin-tdep.o i387-tdep.o \
-			corelow.o windows-tdep.o"
+			windows-tdep.o"
 	build_gdbserver=yes
 	;;
 i[34567]86-*-*)
@@ -311,18 +303,16 @@ m68*-*-linux*)
 	;;
 m68*-*-netbsd* | m68*-*-knetbsd*-gnu)
 	# Target: NetBSD/m68k
-	gdb_target_obs="m68k-tdep.o m68kbsd-tdep.o \
-			corelow.o solib-svr4.o"
+	gdb_target_obs="m68k-tdep.o m68kbsd-tdep.o solib-svr4.o"
 	;;
 m68*-*-openbsd*)
 	# Target: OpenBSD/m68k
-	gdb_target_obs="m68k-tdep.o m68kbsd-tdep.o \
-			corelow.o solib-svr4.o"
+	gdb_target_obs="m68k-tdep.o m68kbsd-tdep.o solib-svr4.o"
 	;;
 
 m88*-*-openbsd*)
 	# Target: OpenBSD/m88k
-	gdb_target_obs="m88k-tdep.o corelow.o"
+	gdb_target_obs="m88k-tdep.o"
 	;;
 
 mep-*-*)
@@ -334,8 +324,7 @@ mep-*-*)
 microblaze*-linux-*|microblaze*-*-linux*)
 	# Target: Xilinx MicroBlaze running Linux
 	gdb_target_obs="microblaze-tdep.o microblaze-linux-tdep.o microblaze-rom.o \
-			monitor.o dsrec.o solib-svr4.o corelow.o \
-			symfile-mem.o linux-tdep.o"
+			monitor.o dsrec.o solib-svr4.o symfile-mem.o linux-tdep.o"
 	gdb_sim=../sim/microblaze/libsim.a
 	;;
 microblaze*-*-*)
@@ -355,21 +344,18 @@ mips*-sgi-irix6*)
 mips*-*-linux*)
 	# Target: Linux/MIPS
 	gdb_target_obs="mips-tdep.o mips-linux-tdep.o glibc-tdep.o \
-			corelow.o solib-svr4.o symfile-mem.o \
-			linux-tdep.o"
+			solib-svr4.o symfile-mem.o linux-tdep.o"
 	gdb_sim=../sim/mips/libsim.a
 	build_gdbserver=yes
 	;;
 mips*-*-netbsd* | mips*-*-knetbsd*-gnu)
 	# Target: MIPS running NetBSD
-	gdb_target_obs="mips-tdep.o mipsnbsd-tdep.o \
-			corelow.o solib-svr4.o nbsd-tdep.o"
+	gdb_target_obs="mips-tdep.o mipsnbsd-tdep.o solib-svr4.o nbsd-tdep.o"
 	gdb_sim=../sim/mips/libsim.a
 	;;
 mips64*-*-openbsd*)
 	# Target: OpenBSD/mips64
-	gdb_target_obs="mips-tdep.o mips64obsd-tdep.o \
-			corelow.o solib-svr4.o"
+	gdb_target_obs="mips-tdep.o mips64obsd-tdep.o solib-svr4.o"
 	;;
 mips*-*-elf)
 	# Target: MIPS ELF
@@ -396,13 +382,13 @@ mt-*-*)
 powerpc-*-netbsd* | powerpc-*-knetbsd*-gnu)
 	# Target: NetBSD/powerpc
 	gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppcnbsd-tdep.o \
-			corelow.o solib-svr4.o"
+			solib-svr4.o"
 	gdb_sim=../sim/ppc/libsim.a
 	;;
 powerpc-*-openbsd*)
 	# Target: OpenBSD/powerpc
 	gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppcobsd-tdep.o \
-			corelow.o solib-svr4.o"
+			solib-svr4.o"
 	;;
 powerpc-*-aix* | rs6000-*-*)
 	# Target: PowerPC running AIX
@@ -413,7 +399,7 @@ powerpc-*-linux* | powerpc64-*-linux*)
 	# Target: PowerPC running Linux
 	gdb_target_obs="rs6000-tdep.o ppc-linux-tdep.o ppc-sysv-tdep.o \
 			solib-svr4.o solib-spu.o spu-multiarch.o \
-			corelow.o symfile-mem.o linux-tdep.o"
+			symfile-mem.o linux-tdep.o"
 	gdb_sim=../sim/ppc/libsim.a
 	build_gdbserver=yes
 	;;
@@ -428,7 +414,7 @@ powerpc*-*-*)
 
 s390*-*-*)
 	# Target: S390 running Linux
-	gdb_target_obs="s390-tdep.o solib-svr4.o corelow.o linux-tdep.o"
+	gdb_target_obs="s390-tdep.o solib-svr4.o linux-tdep.o"
 	build_gdbserver=yes
 	;;
 
@@ -440,7 +426,7 @@ rx-*-elf)
 
 score-*-*)
 	# Target: S+core embedded system
-	gdb_target_obs="score-tdep.o corelow.o"
+	gdb_target_obs="score-tdep.o"
 	if test -f ../sim/score/Makefile; then
 	  gdb_sim=../sim/score/libsim.a
 	fi
@@ -451,19 +437,18 @@ sh*-*-linux*)
 	# Target: GNU/Linux Super-H
 	gdb_target_obs="sh-tdep.o sh64-tdep.o sh-linux-tdep.o monitor.o \
 			dsrec.o solib-svr4.o symfile-mem.o \
-			glibc-tdep.o corelow.o linux-tdep.o"
+			glibc-tdep.o linux-tdep.o"
 	gdb_sim=../sim/sh/libsim.a
 	build_gdbserver=yes
 	;;
 sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
 	# Target: NetBSD/sh
-	gdb_target_obs="sh-tdep.o shnbsd-tdep.o corelow.o solib-svr4.o"
+	gdb_target_obs="sh-tdep.o shnbsd-tdep.o solib-svr4.o"
 	gdb_sim=../sim/sh/libsim.a
 	;;
 sh*-*-openbsd*)
 	# Target: OpenBSD/sh
-	gdb_target_obs="sh-tdep.o sh64-tdep.o shnbsd-tdep.o \
-			corelow.o solib-svr4.o"
+	gdb_target_obs="sh-tdep.o sh64-tdep.o shnbsd-tdep.o solib-svr4.o"
 	;;
 sh64-*-elf*)
 	# Target: Renesas/Super-H 64 bit with simulator
@@ -497,31 +482,27 @@ sparc64-*-linux*)
 sparc*-*-freebsd* | sparc*-*-kfreebsd*-gnu)
 	# Target: FreeBSD/sparc64
 	gdb_target_obs="sparc-tdep.o sparc64-tdep.o sparc64fbsd-tdep.o \
-			corelow.o solib-svr4.o"
+			solib-svr4.o"
 	;;
 sparc-*-netbsd* | sparc-*-knetbsd*-gnu)
 	# Target: NetBSD/sparc
-	gdb_target_obs="sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o \
-			corelow.o solib-svr4.o"
+	gdb_target_obs="sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o solib-svr4.o"
 	;;
 sparc64-*-netbsd* | sparc64-*-knetbsd*-gnu)
 	# Target: NetBSD/sparc64
 	gdb_target_obs="sparc64-tdep.o sparc64nbsd-tdep.o sparc-tdep.o \
-			sparcnbsd-tdep.o nbsd-tdep.o \
-			corelow.o solib-svr4.o"
+			sparcnbsd-tdep.o nbsd-tdep.o solib-svr4.o"
 	;;
 sparc-*-openbsd*)
 	# Target: OpenBSD/sparc
 	gdb_target_obs="sparc-tdep.o sparcnbsd-tdep.o sparcobsd-tdep.o \
-			nbsd-tdep.o obsd-tdep.o bsd-uthread.o \
-			corelow.o solib-svr4.o"
+			nbsd-tdep.o obsd-tdep.o bsd-uthread.o solib-svr4.o"
 	;;
 sparc64-*-openbsd*)
 	# Target: OpenBSD/sparc64
 	gdb_target_obs="sparc64-tdep.o sparc64nbsd-tdep.o sparc64obsd-tdep.o \
 			sparc-tdep.o sparcnbsd-tdep.o sparcobsd-tdep.o \
-			nbsd-tdep.o obsd-tdep.o bsd-uthread.o \
-			corelow.o solib-svr4.o"
+			nbsd-tdep.o obsd-tdep.o bsd-uthread.o solib-svr4.o"
 	;;
 sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
 	# Target: Solaris SPARC
@@ -552,7 +533,7 @@ spu*-*-*)
 tic6x-*-*linux)
 	# Target: GNU/Linux TI C6x
 	gdb_target_obs="tic6x-tdep.o tic6x-linux-tdep.o solib-dsbt.o \
-			glibc-tdep.o corelow.o linux-tdep.o"
+			glibc-tdep.o linux-tdep.o"
 	;;
 
 tic6x-*-*)
@@ -574,12 +555,11 @@ v850*-*-elf)
 
 vax-*-netbsd* | vax-*-knetbsd*-gnu)
 	# Target: NetBSD/vax
-	gdb_target_obs="vax-tdep.o vaxnbsd-tdep.o \
-			corelow.o solib-svr4.o"
+	gdb_target_obs="vax-tdep.o vaxnbsd-tdep.o solib-svr4.o"
 	;;
 vax-*-openbsd*)
 	# Target: OpenBSD/vax
-	gdb_target_obs="vax-tdep.o vaxobsd-tdep.o corelow.o"
+	gdb_target_obs="vax-tdep.o vaxobsd-tdep.o"
 	;;
 vax-*-*)
 	# Target: VAX running 4.2BSD or Ultrix
@@ -596,22 +576,20 @@ x86_64-*-darwin*)
 x86_64-*-dicos*)
 	# Target: DICOS/x86-64
 	gdb_target_obs="amd64-tdep.o i386-tdep.o i387-tdep.o \
-			dicos-tdep.o i386-dicos-tdep.o amd64-dicos-tdep.o \
-			corelow.o"
+			dicos-tdep.o i386-dicos-tdep.o amd64-dicos-tdep.o"
 	;;
 x86_64-*-linux*)
 	# Target: GNU/Linux x86-64
 	gdb_target_obs="amd64-tdep.o amd64-linux-tdep.o i386-tdep.o \
 			i387-tdep.o i386-linux-tdep.o glibc-tdep.o \
-			solib-svr4.o corelow.o symfile-mem.o linux-tdep.o \
-			linux-record.o"
+			solib-svr4.o symfile-mem.o linux-tdep.o linux-record.o"
 	build_gdbserver=yes
 	;;
 x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
 	# Target: FreeBSD/amd64
 	gdb_target_obs="amd64-tdep.o amd64fbsd-tdep.o i386-tdep.o \
 			i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o \
-			bsd-uthread.o corelow.o solib-svr4.o"
+			bsd-uthread.o solib-svr4.o"
 	;;
 x86_64-*-mingw*)
         # Target: MingW/amd64
@@ -623,18 +601,18 @@ x86_64-*-mingw*)
 x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu)
 	# Target: NetBSD/amd64
 	gdb_target_obs="amd64-tdep.o amd64nbsd-tdep.o i386-tdep.o i387-tdep.o \
-			nbsd-tdep.o corelow.o solib-svr4.o"
+			nbsd-tdep.o solib-svr4.o"
 	;;
 x86_64-*-openbsd*)
 	# Target: OpenBSD/amd64
 	gdb_target_obs="amd64-tdep.o amd64obsd-tdep.o i386-tdep.o \
 			i387-tdep.o i386bsd-tdep.o i386obsd-tdep.o \
-			bsd-uthread.o corelow.o solib-svr4.o"
+			bsd-uthread.o solib-svr4.o"
 	;;
 xtensa*-*-linux*)	gdb_target=linux
 	# Target: GNU/Linux Xtensa
 	gdb_target_obs="xtensa-tdep.o xtensa-config.o xtensa-linux-tdep.o \
-			solib-svr4.o corelow.o symfile-mem.o linux-tdep.o"
+			solib-svr4.o symfile-mem.o linux-tdep.o"
 	build_gdbserver=yes
 	;;
 xtensa*)
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -60,7 +60,7 @@ static int exec_file_hook_count = 0;		/* Size of array.  */
 
 bfd *core_bfd = NULL;
 
-/* corelow.c target (if included for this gdb target).  */
+/* corelow.c target.  It is never NULL after GDB initialization.  */
 
 struct target_ops *core_target;
 \f
@@ -72,8 +72,7 @@ core_file_command (char *filename, int from_tty)
 {
   dont_repeat ();		/* Either way, seems bogus.  */
 
-  if (core_target == NULL)
-    error (_("GDB can't read core files on this machine."));
+  gdb_assert (core_target != NULL);
 
   if (!filename)
     (core_target->to_detach) (core_target, filename, from_tty);
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -131,8 +131,7 @@ default_core_sniffer (struct core_fns *our_fns, bfd *abfd)
 }
 
 /* Walk through the list of core functions to find a set that can
-   handle the core file open on ABFD.  Default to the first one in the
-   list if nothing matches.  Returns pointer to set that is
+   handle the core file open on ABFD.  Returns pointer to set that is
    selected.  */
 
 static struct core_fns *
@@ -161,15 +160,9 @@ sniff_core_bfd (bfd *abfd)
 	       bfd_get_filename (abfd), matches);
     }
   else if (matches == 0)
-    {
-      warning (_("\"%s\": no core file handler "
-		 "recognizes format, using default"),
-	       bfd_get_filename (abfd));
-    }
-  if (yummy == NULL)
-    {
-      yummy = core_file_fns;
-    }
+    error (_("\"%s\": no core file handler recognizes format"),
+	   bfd_get_filename (abfd));
+
   return (yummy);
 }
 
@@ -213,15 +206,19 @@ core_close (int quitting)
       int pid = ptid_get_pid (inferior_ptid);
       inferior_ptid = null_ptid;    /* Avoid confusion from thread
 				       stuff.  */
-      exit_inferior_silent (pid);
+      if (pid != 0)
+	exit_inferior_silent (pid);
 
       /* Clear out solib state while the bfd is still open.  See
          comments in clear_solib in solib.c.  */
       clear_solib ();
 
-      xfree (core_data->sections);
-      xfree (core_data);
-      core_data = NULL;
+      if (core_data)
+	{
+	  xfree (core_data->sections);
+	  xfree (core_data);
+	  core_data = NULL;
+	}
       core_has_fake_pid = 0;
 
       name = bfd_get_filename (core_bfd);

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

* Re: [patch 2/2] Fix linking on non-x86* after libgdb.a removal
  2012-01-09 21:02       ` Jan Kratochvil
@ 2012-01-10 16:06         ` Ulrich Weigand
  2012-01-10 17:17           ` [commit] " Jan Kratochvil
  2012-01-10 19:32         ` Pedro Alves
  1 sibling, 1 reply; 10+ messages in thread
From: Ulrich Weigand @ 2012-01-10 16:06 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: gdb-patches

Jan Kratochvil wrote:

> While implementing it I find the current behavior already wrong:
[snip]
> It is also weird the behavior of target X (sparc-solaris2.6; whether the core
> file gets an error or just *value not available* registers) depends on whether
> there are also compiled in unrelated targets Y (x86_64-linux-gnu) or Z.

Yes, fully agreed.

> gdb/
> 2012-01-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	Fix duplicate .o files after omitting libbfd.a.
> 	* Makefile.in (ALL_TARGET_OBS): Remove corelow.o.
> 	(SFILES): Add corelow.c.
> 	(COMMON_OBS): Add corelow.o.
> 	(ALLDEPFILES): Remove corelow.c.
> 	* config/alpha/alpha-linux.mh (NATDEPFILES): Remove corelow.o.
> 	* config/alpha/alpha-osf3.mh: Likewise.
> 	* config/alpha/fbsd.mh: Likewise.
> 	* config/arm/nbsdaout.mh: Likewise.
> 	* config/arm/nbsdelf.mh: Likewise.
> 	* config/i386/i386gnu.mh: Likewise.
> 	* config/ia64/hpux.mh: Likewise.
> 	* config/ia64/linux.mh: Likewise.
> 	* config/m32r/linux.mh: Likewise.
> 	* config/m68k/linux.mh: Likewise.
> 	* config/mips/irix5.mh: Likewise.
> 	* config/mips/irix6.mh: Likewise.
> 	* config/pa/hpux.mh: Likewise.
> 	* config/pa/linux.mh: Likewise.
> 	* config/powerpc/aix.mh: Likewise.
> 	* config/sparc/linux.mh: Likewise.
> 	* config/sparc/linux64.mh: Likewise.
> 	* config/sparc/sol2.mh: Likewise.
> 	* config/vax/vax.mh: Likewise.
> 	* configure.tgt (alpha*-*-freebsd* alpha*-*-kfreebsd*-gnu)
> 	(alpha*-*-netbsd*, alpha*-*-knetbsd*-gnu, alpha*-*-openbsd*)
> 	(am33_2.0*-*-linux*, arm*-wince-pe, arm*-*-mingw32ce*, arm*-*-linux*)
> 	(arm*-*-openbsd*, cris*, frv-*-*, hppa*-*-hpux*, hppa*-*-netbsd*)
> 	(hppa*-*-openbsd*, i[34567]86-*-dicos*, i[34567]86-*-freebsd*)
> 	(i[34567]86-*-kfreebsd*-gnu, i[34567]86-*-netbsd*)
> 	(i[34567]86-*-knetbsd*-gnu, i[34567]86-*-openbsd*, i[34567]86-*-nto*)
> 	(i[34567]86-*-solaris2.1[0-9]*, x86_64-*-solaris2.1[0-9]*)
> 	(i[34567]86-*-solaris*, i[34567]86-*-linux*, i[34567]86-*-cygwin*)
> 	(i[34567]86-*-mingw32*, m68*-*-netbsd*, m68*-*-knetbsd*-gnu)
> 	(m68*-*-openbsd*, m88*-*-openbsd*, microblaze*-linux-*)
> 	(microblaze*-*-linux*, mips*-*-linux*, mips*-*-netbsd*)
> 	(mips*-*-knetbsd*-gnu, mips64*-*-openbsd*, powerpc-*-netbsd*)
> 	(powerpc-*-knetbsd*-gnu, powerpc-*-openbsd*, powerpc-*-linux*)
> 	(powerpc64-*-linux*, s390*-*-*, score-*-*, sh*-*-linux*)
> 	(sh*-*-netbsdelf*, sh*-*-knetbsd*-gnu, sh*-*-openbsd*)
> 	(sparc*-*-freebsd*, sparc*-*-kfreebsd*-gnu, sparc-*-netbsd*)
> 	(sparc-*-knetbsd*-gnu, sparc64-*-netbsd*, sparc64-*-knetbsd*-gnu)
> 	(sparc-*-openbsd*, sparc64-*-openbsd*, tic6x-*-*linux, vax-*-netbsd*)
> 	(vax-*-knetbsd*-gnu, vax-*-openbsd*, x86_64-*-dicos*, x86_64-*-linux*)
> 	(x86_64-*-freebsd*, x86_64-*-kfreebsd*-gnu, x86_64-*-netbsd*)
> 	(x86_64-*-knetbsd*-gnu, x86_64-*-openbsd*, xtensa*-*-linux*): Remove
> 	corelow.o from gdb_target_obs.
> 	* corefile.c (core_target): Update the comment on NULL value.
> 	(core_file_command): Replace error by gdb_assert on CORE_TARGET.
> 	* corelow.c (sniff_core_bfd): Call error instead of warning on zero
> 	MATCHES.  Drop YUMMY set on NULL.
> 	(core_close): Do not call exit_inferior_silent on zero PID.  Do not
> 	reclaim CORE_DATA if it is already NULL.

Looks all good to me.

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com

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

* [commit] [patch 2/2] Fix linking on non-x86* after libgdb.a removal
  2012-01-10 16:06         ` Ulrich Weigand
@ 2012-01-10 17:17           ` Jan Kratochvil
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Kratochvil @ 2012-01-10 17:17 UTC (permalink / raw)
  To: Ulrich Weigand; +Cc: gdb-patches

On Tue, 10 Jan 2012 17:02:58 +0100, Ulrich Weigand wrote:
> Looks all good to me.

Thanks for the review, checked in:
	http://sourceware.org/ml/gdb-cvs/2012-01/msg00099.html

Sorry for the intermediate breakage.


Jan

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

* Re: [patch 2/2] Fix linking on non-x86* after libgdb.a removal
  2012-01-09 21:02       ` Jan Kratochvil
  2012-01-10 16:06         ` Ulrich Weigand
@ 2012-01-10 19:32         ` Pedro Alves
  2012-01-10 19:55           ` Jan Kratochvil
  1 sibling, 1 reply; 10+ messages in thread
From: Pedro Alves @ 2012-01-10 19:32 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: Ulrich Weigand, gdb-patches

On 01/09/2012 09:01 PM, Jan Kratochvil wrote:
> @@ -72,8 +72,7 @@ core_file_command (char *filename, int from_tty)
>  {
>    dont_repeat ();		/* Either way, seems bogus.  */
>  
> -  if (core_target == NULL)
> -    error (_("GDB can't read core files on this machine."));
> +  gdb_assert (core_target != NULL);

I think we should stop expecting it in the testsuite too.  Any objections to this?

gdb/testsuite/
2012-01-10  Pedro Alves  <palves@redhat.com>

	* gdb.base/default.exp (core-file): Don't expect "GDB can't read
	core files on this machine" anymore.

---

 gdb/testsuite/gdb.base/default.exp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index 74d2d2d..9677396 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -102,7 +102,7 @@ gdb_test "commands" "Argument required .one or more breakpoint numbers...*" "com
 gdb_test "condition" "Argument required .breakpoint number.*" "condition"

 #test core-file
-gdb_test "core-file" "No core file now.|GDB can't read core files on this machine." "core-file"
+gdb_test "core-file" "No core file now." "core-file"
 #test delete "d" abbreviation
 gdb_test_no_output "d" "delete \"d\" abbreviation"
 #test delete

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

* Re: [patch 2/2] Fix linking on non-x86* after libgdb.a removal
  2012-01-10 19:32         ` Pedro Alves
@ 2012-01-10 19:55           ` Jan Kratochvil
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Kratochvil @ 2012-01-10 19:55 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Ulrich Weigand, gdb-patches

On Tue, 10 Jan 2012 20:31:08 +0100, Pedro Alves wrote:
> I think we should stop expecting it in the testsuite too.  Any objections to this?
> 
> gdb/testsuite/
> 2012-01-10  Pedro Alves  <palves@redhat.com>
> 
> 	* gdb.base/default.exp (core-file): Don't expect "GDB can't read
> 	core files on this machine" anymore.

Oops, I agree.


Thanks,
Jan

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

end of thread, other threads:[~2012-01-10 19:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-04 20:43 [patch 2/2] Fix linking on non-x86* after libgdb.a removal Jan Kratochvil
2012-01-05 14:46 ` Ulrich Weigand
2012-01-05 15:25   ` Jan Kratochvil
2012-01-05 17:10     ` [commit, s390] Move corelow.o to target config (Re: [patch 2/2] Fix linking on non-x86* after libgdb.a removal) Ulrich Weigand
2012-01-05 17:12     ` [patch 2/2] Fix linking on non-x86* after libgdb.a removal Ulrich Weigand
2012-01-09 21:02       ` Jan Kratochvil
2012-01-10 16:06         ` Ulrich Weigand
2012-01-10 17:17           ` [commit] " Jan Kratochvil
2012-01-10 19:32         ` Pedro Alves
2012-01-10 19:55           ` Jan Kratochvil

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).