This is the mail archive of the archer-commits@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[SCM] archer-jankratochvil-pie: Merge commit 'origin/master' into archer-jankratochvil-pie


The branch, archer-jankratochvil-pie has been updated
       via  28fb21a4fbed8700f4505cf14196310840e0022e (commit)
       via  3b110f3cfd726fa3b2053b27c247d3eac8dd2258 (commit)
       via  8e8dba97b747f799b01f4470dc2ee989b4bc879b (commit)
       via  64ec4b9be54ac499af889c2a07b3b04707a5329c (commit)
       via  f090e1a64d9c364912831501f983e77ddf964103 (commit)
       via  2b4883a330cae38948ba9cdf73591d9469c44115 (commit)
       via  d31e1aa0a5f371854df0dee37bcc52cf215c71ac (commit)
       via  10bdbbe575126265b3bfb36202ad375ba958a79f (commit)
       via  3c9d90eb912b5bccaa8e5cc3978a1c80af847383 (commit)
       via  45be22d02c66875a2123b8acf20ac734473846af (commit)
       via  45a6119b30973d8762a017af9b8f7c88bf819710 (commit)
       via  448115f008b74bee4d4f2719e40cb61eb8182196 (commit)
       via  6eeac3eae8cbffbb2c7f7ebd27f1124ea553194f (commit)
       via  2efb8fd2fa7035b63a54713d00683ce0c3864a51 (commit)
       via  1d5fc2d130d5a7eb4e21b5900949f4fd7ed81a98 (commit)
       via  10c985beb3b4aa90725d4c868cccd4988a0052be (commit)
       via  b393da17fdca372026c81b39a4b6ef5ea8e399a8 (commit)
       via  91dc8afe504a2aecea2a6ef9c834deee82dbf4b0 (commit)
       via  00dcd5d5e8cbe08054c1467b4cb64a691785ca17 (commit)
       via  ecd2f7a466d9dd95f2ba4c121e9f131a4812430b (commit)
       via  81a6da6c627fc4332331750677768638aef3cb5a (commit)
       via  24fe0f2c4aa171d7551967c5becf4d04850ab75b (commit)
       via  046d8e1ac7df336d7ed1aaff54cc1e2ac52d717d (commit)
       via  45a49373ec683ba89b81cd3de33ba264476286a8 (commit)
       via  cb17d8719c90c6da77a2fc94d18a3d382f1ffe10 (commit)
       via  9d53bc21654690f832ab743888c61d72b4c0dc65 (commit)
       via  dfd6b858d3152720c803247a5437232f062be31a (commit)
       via  b13cbe42377c66a0e89467e6527a41c3a4e3f665 (commit)
       via  5a52e0d91dacf2bba81dfaafb8dac48322070da8 (commit)
       via  4d04eff68db1807506f1a5cc9e7a252c51669a23 (commit)
       via  36ae52d16cc9d38cfe317a79bb5d63c624359154 (commit)
       via  6d5442015fa03f9f5e9163fbe592e7aa0e154ab2 (commit)
       via  43116f575cec6a569e9cb06c92a3c2cc5cb95eb7 (commit)
       via  8fac53967c6574e472a6d911a0bc0826b524512f (commit)
      from  54862f2ce442fe6edb0e29c34953adf9cff1622e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 28fb21a4fbed8700f4505cf14196310840e0022e
Merge: 54862f2ce442fe6edb0e29c34953adf9cff1622e 3b110f3cfd726fa3b2053b27c247d3eac8dd2258
Author: Jan Kratochvil <jkratoch@host1.dyn.jankratochvil.net>
Date:   Thu Nov 5 19:03:06 2009 +0100

    Merge commit 'origin/master' into archer-jankratochvil-pie

-----------------------------------------------------------------------

Summary of changes:
 bfd/ChangeLog                            |   13 +
 bfd/elf32-spu.c                          |   38 +-
 bfd/elflink.c                            |   22 +-
 bfd/version.h                            |    2 +-
 gdb/ChangeLog                            |   61 +
 gdb/MAINTAINERS                          |    1 +
 gdb/doc/ChangeLog                        |    5 +
 gdb/doc/gdb.texinfo                      |   13 +-
 gdb/elfread.c                            |   12 +-
 gdb/frame.c                              |    7 +-
 gdb/gdbserver/ChangeLog                  |    8 +
 gdb/gdbserver/configure                  |   34 +
 gdb/gdbserver/configure.ac               |   19 +
 gdb/gdbserver/configure.srv              |    3 +
 gdb/linux-thread-db.c                    |   22 +-
 gdb/objfiles.c                           |   41 +-
 gdb/objfiles.h                           |   12 +-
 gdb/solib-frv.c                          |   41 +-
 gdb/solib-irix.c                         |   10 +-
 gdb/symfile.c                            |  222 ++-
 gdb/testsuite/ChangeLog                  |   27 +
 gdb/testsuite/gdb.arch/i386-gnu-cfi.exp  |    2 +-
 gdb/testsuite/gdb.arch/i386-prologue.exp |    2 +-
 gdb/testsuite/gdb.arch/i386-unwind.exp   |    2 +-
 gdb/testsuite/gdb.base/opaque.exp        |   25 +-
 gdb/testsuite/gdb.base/sepdebug.exp      |   23 +
 gdb/testsuite/gdb.base/sepdebug2.c       |   22 +
 gdb/testsuite/gdb.cp/ctti.exp            |    8 +-
 gdb/testsuite/lib/gdb.exp                |    2 +-
 gdb/version.in                           |    2 +-
 include/opcode/ChangeLog                 |    5 +
 include/opcode/rx.h                      |    5 +-
 opcodes/ChangeLog                        |   12 +
 opcodes/m32c-desc.c                      |    2 +-
 opcodes/mep-desc.c                       |    2 +-
 opcodes/rx-decode.c                      |   82 +-
 opcodes/rx-decode.opc                    |   12 +-
 opcodes/rx-dis.c                         |    2 +-
 sim/frv/ChangeLog                        |   12 +
 sim/frv/arch.c                           |    2 +-
 sim/frv/arch.h                           |    2 +-
 sim/frv/cpu.c                            |    2 +-
 sim/frv/cpu.h                            |  424 +++---
 sim/frv/cpuall.h                         |    2 +-
 sim/frv/decode.c                         | 2819 +++++++++---------------------
 sim/frv/decode.h                         |    2 +-
 sim/frv/model.c                          |    2 +-
 sim/frv/sem.c                            | 2092 +++++++++++-----------
 sim/iq2000/ChangeLog                     |   13 +
 sim/iq2000/arch.c                        |   23 +-
 sim/iq2000/arch.h                        |   23 +-
 sim/iq2000/cpu.c                         |   23 +-
 sim/iq2000/cpu.h                         |   23 +-
 sim/iq2000/cpuall.h                      |   23 +-
 sim/iq2000/decode.c                      |  631 +++++--
 sim/iq2000/decode.h                      |   41 +-
 sim/iq2000/model.c                       |   25 +-
 sim/iq2000/sem-switch.c                  |   52 +-
 sim/iq2000/sem.c                         |   51 +-
 sim/lm32/ChangeLog                       |   13 +
 sim/lm32/arch.c                          |   24 +-
 sim/lm32/arch.h                          |   24 +-
 sim/lm32/cpu.c                           |   24 +-
 sim/lm32/cpu.h                           |   24 +-
 sim/lm32/cpuall.h                        |   24 +-
 sim/lm32/decode.c                        |  234 +--
 sim/lm32/decode.h                        |   28 +-
 sim/lm32/model.c                         |   24 +-
 sim/lm32/sem-switch.c                    |   24 +-
 sim/lm32/sem.c                           |   24 +-
 sim/m32r/ChangeLog                       |   33 +
 sim/m32r/Makefile.in                     |   38 +-
 sim/m32r/arch.c                          |   23 +-
 sim/m32r/arch.h                          |   23 +-
 sim/m32r/cpu.c                           |   23 +-
 sim/m32r/cpu.h                           |   23 +-
 sim/m32r/cpu2.c                          |   23 +-
 sim/m32r/cpu2.h                          |   41 +-
 sim/m32r/cpuall.h                        |   23 +-
 sim/m32r/cpux.c                          |   23 +-
 sim/m32r/cpux.h                          |   41 +-
 sim/m32r/decode.c                        |  188 ++-
 sim/m32r/decode.h                        |   23 +-
 sim/m32r/decode2.c                       |  283 +++-
 sim/m32r/decode2.h                       |   23 +-
 sim/m32r/decodex.c                       |  242 ++-
 sim/m32r/decodex.h                       |   23 +-
 sim/m32r/model.c                         |   23 +-
 sim/m32r/model2.c                        |   23 +-
 sim/m32r/modelx.c                        |   23 +-
 sim/m32r/sem-switch.c                    |   33 +-
 sim/m32r/sem.c                           |   33 +-
 sim/m32r/sem2-switch.c                   |   63 +-
 sim/m32r/semx-switch.c                   |   63 +-
 sim/sh64/ChangeLog                       |   25 +
 sim/sh64/Makefile.in                     |   26 +-
 sim/sh64/arch.c                          |   23 +-
 sim/sh64/arch.h                          |   23 +-
 sim/sh64/cpu.c                           |   23 +-
 sim/sh64/cpu.h                           |   25 +-
 sim/sh64/cpuall.h                        |   23 +-
 sim/sh64/decode-compact.c                |  637 ++------
 sim/sh64/decode-compact.h                |   23 +-
 sim/sh64/decode-media.c                  |  102 +-
 sim/sh64/decode-media.h                  |   36 +-
 sim/sh64/defs-compact.h                  |   23 +-
 sim/sh64/defs-media.h                    |   23 +-
 sim/sh64/sem-compact-switch.c            |   23 +-
 sim/sh64/sem-compact.c                   |   23 +-
 sim/sh64/sem-media-switch.c              |   23 +-
 sim/sh64/sem-media.c                     |   23 +-
 sim/sh64/sh-desc.c                       |   29 +-
 sim/sh64/sh-opc.h                        |   23 +-
 113 files changed, 4711 insertions(+), 5379 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/sepdebug2.c

First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ce48a24..86af786 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,16 @@
+2009-11-05  Nick Clifton  <nickc@redhat.com>
+
+	* elflink.c (elf_link_add_object_symbols): Improve error
+	message generated when a symbol is left unresolved because a
+        --no-add-needed command line option has prevented the
+	inclusion of the DSO defining it.
+
+2009-11-03  Alan Modra  <amodra@bigpond.net.au>
+	    Ulrich Weigand  <uweigand@de.ibm.com>
+
+	* elf32-spu.c (mark_functions_via_relocs): Handle non-branch relocs
+	(jump tables or other references to code labels) as well.
+
 2009-11-02  Paul Brook  <paul@codesourcery.com>
 
 	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle VFPv4
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c
index 890f260..48025ff 100644
--- a/bfd/elf32-spu.c
+++ b/bfd/elf32-spu.c
@@ -2692,19 +2692,12 @@ mark_functions_via_relocs (asection *sec,
       Elf_Internal_Sym *sym;
       struct elf_link_hash_entry *h;
       bfd_vma val;
-      bfd_boolean reject, is_call;
+      bfd_boolean nonbranch, is_call;
       struct function_info *caller;
       struct call_info *callee;
 
-      reject = FALSE;
       r_type = ELF32_R_TYPE (irela->r_info);
-      if (r_type != R_SPU_REL16
-	  && r_type != R_SPU_ADDR16)
-	{
-	  reject = TRUE;
-	  if (!(call_tree && spu_hash_table (info)->params->auto_overlay))
-	    continue;
-	}
+      nonbranch = r_type != R_SPU_REL16 && r_type != R_SPU_ADDR16;
 
       r_indx = ELF32_R_SYM (irela->r_info);
       if (!get_sym_h (&h, &sym, &sym_sec, psyms, r_indx, sec->owner))
@@ -2715,7 +2708,7 @@ mark_functions_via_relocs (asection *sec,
 	continue;
 
       is_call = FALSE;
-      if (!reject)
+      if (!nonbranch)
 	{
 	  unsigned char insn[4];
 
@@ -2746,14 +2739,13 @@ mark_functions_via_relocs (asection *sec,
 	    }
 	  else
 	    {
-	      reject = TRUE;
-	      if (!(call_tree && spu_hash_table (info)->params->auto_overlay)
-		  || is_hint (insn))
+	      nonbranch = TRUE;
+	      if (is_hint (insn))
 		continue;
 	    }
 	}
 
-      if (reject)
+      if (nonbranch)
 	{
 	  /* For --auto-overlay, count possible stubs we need for
 	     function pointer references.  */
@@ -2763,8 +2755,20 @@ mark_functions_via_relocs (asection *sec,
 	  else
 	    sym_type = ELF_ST_TYPE (sym->st_info);
 	  if (sym_type == STT_FUNC)
-	    spu_hash_table (info)->non_ovly_stub += 1;
-	  continue;
+	    {
+	      if (call_tree && spu_hash_table (info)->params->auto_overlay)
+		spu_hash_table (info)->non_ovly_stub += 1;
+	      /* If the symbol type is STT_FUNC then this must be a
+		 function pointer initialisation.  */
+	      continue;
+	    }
+	  /* Ignore data references.  */
+	  if ((sym_sec->flags & (SEC_ALLOC | SEC_LOAD | SEC_CODE))
+	      != (SEC_ALLOC | SEC_LOAD | SEC_CODE))
+	    continue;
+	  /* Otherwise we probably have a jump table reloc for
+	     a switch statement or some other reference to a
+	     code label.  */
 	}
 
       if (h)
@@ -2813,7 +2817,7 @@ mark_functions_via_relocs (asection *sec,
       callee->is_pasted = FALSE;
       callee->broken_cycle = FALSE;
       callee->priority = priority;
-      callee->count = 1;
+      callee->count = nonbranch? 0 : 1;
       if (callee->fun->last_caller != sec)
 	{
 	  callee->fun->last_caller = sec;
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 65bba87..cd016b7 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -3877,6 +3877,7 @@ error_free_dyn:
       bfd_boolean common;
       unsigned int old_alignment;
       bfd *old_bfd;
+      bfd * undef_bfd = NULL;
 
       override = FALSE;
 
@@ -4108,6 +4109,20 @@ error_free_dyn:
 	      name = newname;
 	    }
 
+	  /* If this is a definition of a previously undefined symbol
+	     make a note of the bfd that contained the reference in
+	     case we need to refer to it later on in error messages.  */
+	  if (! bfd_is_und_section (sec))
+	    {
+	      h = elf_link_hash_lookup (elf_hash_table (info), name, FALSE, FALSE, FALSE);
+
+	      if (h != NULL
+		  && (h->root.type == bfd_link_hash_undefined
+		      || h->root.type == bfd_link_hash_undefweak)
+		  && h->root.u.undef.abfd)
+		undef_bfd = h->root.u.undef.abfd;
+	    }
+
 	  if (!_bfd_elf_merge_symbol (abfd, info, name, isym, &sec,
 				      &value, &old_alignment,
 				      sym_hash, &skip, &override,
@@ -4447,9 +4462,12 @@ error_free_dyn:
 	      if ((elf_dyn_lib_class (abfd) & DYN_NO_NEEDED) != 0)
 		{
 		  (*_bfd_error_handler)
-		    (_("%B: invalid DSO for symbol `%s' definition"),
+		    (_("%B: undefined reference to symbol '%s'"),
+		     undef_bfd == NULL ? info->output_bfd : undef_bfd, name);
+		  (*_bfd_error_handler)
+		    (_("note: '%s' is defined in DSO %B so try adding it to the linker command line"),
 		     abfd, name);
-		  bfd_set_error (bfd_error_bad_value);
+		  bfd_set_error (bfd_error_invalid_operation);
 		  goto error_free_vers;
 		}
 
diff --git a/bfd/version.h b/bfd/version.h
index 06eb92e..2ca5baf 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20091102
+#define BFD_VERSION_DATE 20091105
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e364642..ff7fa70 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,64 @@
+2009-11-04  Tom Tromey  <tromey@redhat.com>
+
+	* symfile.c (add_psymbol_to_bcache): Don't copy name.  Make
+	'psymbol' non-static.
+
+2009-11-03  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
+	* linux-thread-db.c (disable_thread_event_reporting): Adjust.
+	
+2009-11-03  Joel Brobecker  <brobecker@adacore.com>
+
+	* MAINTAINERS (Responsible Maintainers): Add Tristan Gingold as
+	maintainer of the avr target.
+
+2009-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
+
+	* elfread.c (elf_symfile_segments): Do not warn about
+	uninitialized sections outside of load segments.
+
+2009-11-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* symfile.c (build_id_to_debug_filename): New variable debugdir.  Move
+	variables size, s and data into a new inner block.  Change xmalloc for
+	alloca, use direct BUILDID->SIZE there now.  Loop for the
+	DEBUG_FILE_DIRECTORY components.
+	(find_separate_debug_file): New variable debugdir and debugdir_end.
+	Loop for the DEBUG_FILE_DIRECTORY components.
+	(_initialize_symfile): For "debug-file-directory" use plural and note
+	one can use multiple components now.
+
+2009-11-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* symfile.c (find_separate_debug_file): Initialize dir, debugfile and
+	canon_name to NULL.  Change alloca to xmalloc, newly call xfree for it.
+	New label cleanup_return_debugfile, jump to it from the failure paths.
+
+2009-11-02  Andrew Cagney  <cagney@gnu.org>
+
+	* symfile.c (separate_debug_file_exists): When the CRCs mismatch
+	print a warning.
+	(find_separate_debug_file): Pass in the objfile's name.
+
+2009-11-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Remove INVALID_ENTRY_POINT.
+	* frame.c (inside_entry_func): New variable entry_point.  Return 0 if
+	the entry point is not known.
+	* solib-irix.c (enable_break): Likewise.
+	* objfiles.c (init_entry_point_info): Stop using INVALID_ENTRY_POINT.
+	Initialize EI.ENTRY_POINT_P.
+	(entry_point_address): Rename to ...
+	(entry_point_address_query): ... a new function.  Use EI.ENTRY_POINT_P.
+	(entry_point_address): New function.
+	(objfile_relocate): Use EI.ENTRY_POINT_P.
+	* objfiles.h (struct entry_info): Simplify entry_point comment.  New
+	field entry_point_p.
+	(INVALID_ENTRY_POINT): Remove.
+	(entry_point_address_query): New prototype.
+	* solib-frv.c (enable_break): Check for NULL SYMFILE_OBJFILE and its
+	EI.ENTRY_POINT_P.  Return 0 if ".interp" is not found.
+
 2009-11-01  Michael Snyder  <msnyder@vmware.com>
 
 	* NEWS (New Commands): Mention record save/restore.
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index 5f10a44..6f0a47f 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -257,6 +257,7 @@ the native maintainer when resolving ABI issues.
 			Richard Earnshaw	rearnsha@arm.com
 
 	avr		--target=avr ,-Werror
+			Tristan Gingold		gingold@adacore.com
 
 	cris		--target=cris-elf ,-Werror ,
 			(sim does not build with -Werror)
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index d9b5b97..912f20c 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.texinfo (set debug-file-directory, show debug-file-directory)
+	(Auto-loading): Use plural and note one can use multiple components now.
+
 2009-11-01  Vladimir Prus  <vladimir@codesourcery.com>
 
 	* gdb.texinfo (GDB/MI Stack Manipulation): Make
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 2453d3a..a388bc9 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -14084,13 +14084,14 @@ name @value{GDBN} is currently using.
 @table @code
 
 @kindex set debug-file-directory
-@item set debug-file-directory @var{directory}
-Set the directory which @value{GDBN} searches for separate debugging
-information files to @var{directory}.
+@item set debug-file-directory @var{directories}
+Set the directories which @value{GDBN} searches for separate debugging
+information files to @var{directory}.  Multiple directory components can be set
+concatenating them by a directory separator.
 
 @kindex show debug-file-directory
 @item show debug-file-directory
-Show the directory @value{GDBN} searches for separate debugging
+Show the directories @value{GDBN} searches for separate debugging
 information files.
 
 @end table
@@ -19382,8 +19383,8 @@ readable, @value{GDBN} will evaluate it as a Python script.
 
 If this file does not exist, and if the parameter
 @code{debug-file-directory} is set (@pxref{Separate Debug Files}),
-then @value{GDBN} will use the file named
-@file{@var{debug-file-directory}/@var{real-name}}, where
+then @value{GDBN} will use for its each separated directory component
+@code{component} the file named @file{@code{component}/@var{real-name}}, where
 @var{real-name} is the object file's real name, as described above.
 
 Finally, if this file does not exist, then @value{GDBN} will look for
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 767dfe6..131d7d2 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -114,7 +114,17 @@ elf_symfile_segments (bfd *abfd)
 	    break;
 	  }
 
-      if (bfd_get_section_size (sect) > 0 && j == num_segments)
+      /* We should have found a segment for every non-empty section.
+	 If we haven't, we will not relocate this section by any
+	 offsets we apply to the segments.  As an exception, do not
+	 warn about SHT_NOBITS sections; in normal ELF execution
+	 environments, SHT_NOBITS means zero-initialized and belongs
+	 in a segment, but in no-OS environments some tools (e.g. ARM
+	 RealView) use SHT_NOBITS for uninitialized data.  Since it is
+	 uninitialized, it doesn't need a program header.  Such
+	 binaries are not relocatable.  */
+      if (bfd_get_section_size (sect) > 0 && j == num_segments
+	  && (bfd_get_section_flags (abfd, sect) & SEC_LOAD) != 0)
 	warning (_("Loadable segment \"%s\" outside of ELF segments"),
 		 bfd_section_name (abfd, sect));
     }
diff --git a/gdb/frame.c b/gdb/frame.c
index 02a9bd1..cd28fa4 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -1650,7 +1650,12 @@ inside_main_func (struct frame_info *this_frame)
 static int
 inside_entry_func (struct frame_info *this_frame)
 {
-  return (get_frame_func (this_frame) == entry_point_address ());
+  CORE_ADDR entry_point;
+
+  if (!entry_point_address_query (&entry_point))
+    return 0;
+
+  return get_frame_func (this_frame) == entry_point;
 }
 
 /* Return a structure containing various interesting information about
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 5a83c8f..59979c8 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,11 @@
+2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
+
+	* configure.ac (i[34567]86-*): Check if we're targetting x86-64
+	with an i686 compiler.
+	* configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
+	needed.
+	* configure: Rebuilt.
+
 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
 
 	PR gdb/10783
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 687105a..955f716 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -3973,6 +3973,40 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+# Check for various supplementary target information (beyond the
+# triplet) which might affect the choices in configure.srv.
+case "${target}" in
+  i[34567]86-*-linux*)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if building for x86-64" >&5
+$as_echo_n "checking if building for x86-64... " >&6; }
+if test "${gdb_cv_i386_is_x86_64+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CPPFLAGS="$CPPFLAGS"
+                    CPPFLAGS="$CPPFLAGS $CFLAGS"
+                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#if __x86_64__
+got it
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "got it" >/dev/null 2>&1; then :
+  gdb_cv_i386_is_x86_64=yes
+else
+  gdb_cv_i386_is_x86_64=no
+fi
+rm -f conftest*
+
+                    CPPFLAGS="$save_CPPFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_i386_is_x86_64" >&5
+$as_echo "$gdb_cv_i386_is_x86_64" >&6; }
+    ;;
+esac
+
 . ${srcdir}/configure.srv
 
 if test "${srv_mingwce}" = "yes"; then
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index 2f2b2a3..57eaf21 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -73,6 +73,25 @@ ACX_BUGURL([http://www.gnu.org/software/gdb/bugs/])
 AC_DEFINE_UNQUOTED([PKGVERSION], ["$PKGVERSION"], [Additional package description])
 AC_DEFINE_UNQUOTED([REPORT_BUGS_TO], ["$REPORT_BUGS_TO"], [Bug reporting address])
 
+# Check for various supplementary target information (beyond the
+# triplet) which might affect the choices in configure.srv.
+case "${target}" in
+changequote(,)dnl
+  i[34567]86-*-linux*)
+changequote([,])dnl
+    AC_CACHE_CHECK([if building for x86-64], [gdb_cv_i386_is_x86_64],
+      	           [save_CPPFLAGS="$CPPFLAGS"
+                    CPPFLAGS="$CPPFLAGS $CFLAGS"
+                    AC_EGREP_CPP([got it], [
+#if __x86_64__
+got it
+#endif
+                 ], [gdb_cv_i386_is_x86_64=yes],
+                    [gdb_cv_i386_is_x86_64=no])
+                    CPPFLAGS="$save_CPPFLAGS"])
+    ;;
+esac
+
 . ${srcdir}/configure.srv
 
 if test "${srv_mingwce}" = "yes"; then
diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv
index 7aded27..ea746be 100644
--- a/gdb/gdbserver/configure.srv
+++ b/gdb/gdbserver/configure.srv
@@ -64,6 +64,9 @@ case "${target}" in
 			srv_tgtobj="i386-low.o win32-low.o win32-i386-low.o"
 			;;
   i[34567]86-*-linux*)	srv_regobj=reg-i386-linux.o
+			if test "$gdb_cv_i386_is_x86_64" = yes ; then
+			    srv_regobj="reg-x86-64-linux.o $srv_regobj"
+			fi
 			srv_tgtobj="linux-low.o linux-x86-low.o i386-low.o i387-fp.o"
 			srv_linux_usrregs=yes
 			srv_linux_regsets=yes
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index ee9c141..ac6a4e5 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -905,20 +905,18 @@ thread_db_load (void)
 }
 
 static void
-disable_thread_event_reporting (void)
+disable_thread_event_reporting (struct thread_db_info *info)
 {
-  td_thr_events_t events;
-  struct thread_db_info *info;
-
-  info = get_thread_db_info (GET_PID (inferior_ptid));
+  if (info->td_ta_set_event_p != NULL)
+    {
+      td_thr_events_t events;
 
-  /* Set the process wide mask saying we aren't interested in any
-     events anymore.  */
-  td_event_emptyset (&events);
-  info->td_ta_set_event_p (info->thread_agent, &events);
+      /* Set the process wide mask saying we aren't interested in any
+	 events anymore.  */
+      td_event_emptyset (&events);
+      info->td_ta_set_event_p (info->thread_agent, &events);
+    }
 
-  /* Delete thread event breakpoints, if any.  */
-  remove_thread_event_breakpoints ();
   info->td_create_bp_addr = 0;
   info->td_death_bp_addr = 0;
 }
@@ -1088,7 +1086,7 @@ thread_db_detach (struct target_ops *ops, char *args, int from_tty)
 
   if (info)
     {
-      disable_thread_event_reporting ();
+      disable_thread_event_reporting (info);
 
       /* Delete the old thread event breakpoints.  Note that unlike
 	 when mourning, we can remove them here because there's still
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 6a4fef5..58a0fd6 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -294,29 +294,34 @@ init_entry_point_info (struct objfile *objfile)
       /* Executable file -- record its entry point so we'll recognize
          the startup file because it contains the entry point.  */
       objfile->ei.entry_point = bfd_get_start_address (objfile->obfd);
+      objfile->ei.entry_point_p = 1;
     }
   else if (bfd_get_file_flags (objfile->obfd) & DYNAMIC
 	   && bfd_get_start_address (objfile->obfd) != 0)
-    /* Some shared libraries may have entry points set and be
-       runnable.  There's no clear way to indicate this, so just check
-       for values other than zero.  */
-    objfile->ei.entry_point = bfd_get_start_address (objfile->obfd);    
+    {
+      /* Some shared libraries may have entry points set and be
+	 runnable.  There's no clear way to indicate this, so just check


hooks/post-receive
--
Repository for Project Archer.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]