public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: pmuldoon@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  pmuldoon/python-backtrace: Merge remote-tracking branch 'gdb/master' into pmuldoon/python-backtrace
Date: Mon, 04 Mar 2013 14:57:00 -0000	[thread overview]
Message-ID: <20130304145733.29783.qmail@sourceware.org> (raw)

The branch, pmuldoon/python-backtrace has been updated
       via  b8b48cb9f82600f5b16f06b68174b86cec80d09e (commit)
       via  0f35195383794f1dcf4f1f8ae2ef5f07858aca50 (commit)
       via  4e788bd4be2950df996a2c0c739207d7bcb7f5d8 (commit)
       via  5790218b0893f7f0a5e5134122272ebb18cd7d92 (commit)
       via  4e9b47fbf3a3b49c8035cd9b99c631eaf659a810 (commit)
       via  691b7b1619b24eb868511e9e6c01f15d88cf5593 (commit)
       via  594713cde31afaa841f79cc6aed3fd4050a81a5f (commit)
       via  8f71e83348767590d87fbea0900bcad1373f1adc (commit)
       via  9d9879fa54fedf41b1b8c0ad2722351c3016aa40 (commit)
       via  6418d069fab3da999d5acd2cc9642af3e9a8781e (commit)
       via  baf854baee4c0d91cea8ede74254b5294b0afded (commit)
       via  3f06a288043476f8a5d0ad59dae9d19d200cc6a9 (commit)
       via  2c66bfdc1df559e2e964fbc8a12cfb7a60c746df (commit)
       via  443082b7ef5f69e97f1d8f0e253bb96d0e8198fc (commit)
       via  aafdb4f6069ecbdb379add3ae0dd922f10b01ea9 (commit)
       via  61295913b52b25d7eaebaad367b8905871d86af4 (commit)
       via  f7feb8ed05092f1ff35198ece8f56c83cb2cdf04 (commit)
       via  d915986e0120981ac466ee26e9b5efd6e6b58003 (commit)
       via  8f0aafd10f86de7b28b3e21ec6abc2b847c8009e (commit)
       via  67f321214dfb0c58d4b1ff21e4c5e1af3a072359 (commit)
       via  7aeafcc429cc2611354197b0db5c350fadd48bfe (commit)
       via  59f0d85306d7c8f40e2342d151d5ce5523ccbea9 (commit)
       via  8df1bb09f2964890064a22333c773f633716e241 (commit)
       via  19877e9971c2fdcba4d094c7ceccb70b86728e84 (commit)
       via  117e297f387b49403987460c19d0427e2b95a9e2 (commit)
       via  eddc5294adaa3e39b3f1533208e8a7fc2520905e (commit)
       via  8156b292f0bda6d2f335d2f4bda6c5bb37709260 (commit)
       via  789f5888389f3e0aa1e948824c4b391a655b3cb0 (commit)
       via  cc27921fa54a33125a649e7e8e2e2aa868762658 (commit)
       via  3873faf4381851d2ac70bf235bf0cfefcd14af57 (commit)
       via  30a8cb2f3121545ee5b4bd01a29b5d2808c5585f (commit)
       via  cb18d6a74dec7482af131a46f5340f2ec2b0451e (commit)
       via  7e3f0d549dd34c2f02b68771655da8b7848b7aed (commit)
       via  417defa7183f63f0f1c96c3fad14a4b2ee33efc8 (commit)
      from  752671ef14d31e0d7adf5c3f3febe43b46721309 (commit)

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

- Log -----------------------------------------------------------------
commit b8b48cb9f82600f5b16f06b68174b86cec80d09e
Merge: 752671e 0f35195
Author: Phil Muldoon <pmuldoon@redhat.com>
Date:   Mon Mar 4 14:57:09 2013 +0000

    Merge remote-tracking branch 'gdb/master' into pmuldoon/python-backtrace

commit 0f35195383794f1dcf4f1f8ae2ef5f07858aca50
Author: Nick Clifton <nickc@redhat.com>
Date:   Mon Mar 4 09:21:40 2013 +0000

    	* archive64.c (bfd_elf64_archive_write_armap): Fix calculation of
    	file pointer offsets for thin archives.

commit 4e788bd4be2950df996a2c0c739207d7bcb7f5d8
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Mon Mar 4 00:00:03 2013 +0000

    *** empty log message ***

commit 5790218b0893f7f0a5e5134122272ebb18cd7d92
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Sun Mar 3 23:00:07 2013 +0000

    daily update

commit 4e9b47fbf3a3b49c8035cd9b99c631eaf659a810
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Sun Mar 3 00:00:33 2013 +0000

    *** empty log message ***

commit 691b7b1619b24eb868511e9e6c01f15d88cf5593
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Sat Mar 2 23:00:06 2013 +0000

    daily update

commit 594713cde31afaa841f79cc6aed3fd4050a81a5f
Author: Kevin Buettner <kevinb@redhat.com>
Date:   Sat Mar 2 18:34:13 2013 +0000

    Revise ChangeLog comment for recently committed change.

commit 8f71e83348767590d87fbea0900bcad1373f1adc
Author: Kevin Buettner <kevinb@redhat.com>
Date:   Sat Mar 2 18:26:26 2013 +0000

    	* v850-tdep.c: (v850e2_register_name): (v850e2_reg_names):
    	Revise system register names to match current V850E2M
    	architecture specifications.

commit 9d9879fa54fedf41b1b8c0ad2722351c3016aa40
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sat Mar 2 01:57:47 2013 +0000

    Add RegRex64 to riz
    
    	* i386-reg.tbl (riz): Add RegRex64.
    	* i386-tbl.h: Regenerated.

commit 6418d069fab3da999d5acd2cc9642af3e9a8781e
Author: jiwang <jiwang>
Date:   Sat Mar 2 01:34:39 2013 +0000

     gdb/
         * tilegx-tdep.c (tilegx_analyze_prologue): Limit bundle reading
         to END_ADDR.
         (tilegx_skip_prologue): Limit prologue analysis to section end

commit baf854baee4c0d91cea8ede74254b5294b0afded
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Sat Mar 2 00:00:03 2013 +0000

    *** empty log message ***

commit 3f06a288043476f8a5d0ad59dae9d19d200cc6a9
Author: Cary Coutant <ccoutant@google.com>
Date:   Fri Mar 1 23:40:38 2013 +0000

    Restore patch lost in last merge from GCC.
    
    include/
    	* dwarf2.h (enum dwarf_sect): New enum type.

commit 2c66bfdc1df559e2e964fbc8a12cfb7a60c746df
Author: DJ Delorie <dj@delorie.com>
Date:   Fri Mar 1 23:00:18 2013 +0000

    merge from gcc

commit 443082b7ef5f69e97f1d8f0e253bb96d0e8198fc
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Fri Mar 1 23:00:06 2013 +0000

    daily update

commit aafdb4f6069ecbdb379add3ae0dd922f10b01ea9
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Fri Mar 1 21:18:18 2013 +0000

    gdb/
    	* dwarf2loc.c (call_site_find_chain_1): New variable save_callee_pc,
    	use it.

commit 61295913b52b25d7eaebaad367b8905871d86af4
Author: Cary Coutant <ccoutant@google.com>
Date:   Fri Mar 1 19:23:32 2013 +0000

    include/
    	* dwarf2.h (enum dwarf_sect): New enum type.

commit f7feb8ed05092f1ff35198ece8f56c83cb2cdf04
Author: Pedro Alves <palves@redhat.com>
Date:   Fri Mar 1 15:38:23 2013 +0000

    Use gdb_byte for bytes from the program being debugged.
    
    gdb_byte should be used for bytes from the program being debugged.  We
    have many places using char or unsigned char instead all over the
    existing ports, and more ends up added over time due to copy/paste as
    new code is based on old code.
    
    I've greped the tree for "char buf[", and fixed all I found.
    
    Tested by building with --enable-targets=all.
    
    2013-03-01  Pedro Alves  <palves@redhat.com>
    
    	Use gdb_byte for bytes from the program being debugged.
    
    	* arm-tdep.c (arm_store_return_value, arm_get_longjmp_target):
    	Change type of local 'buf' to gdb_byte.
    	* avr-tdep.c (avr_frame_prev_register, avr_push_dummy_call): Likewise.
    	* bfin-tdep.c (bfin_push_dummy_call): Likewise.
    	* cris-tdep.c (cris_sigcontext_addr)
    	(cris_sigtramp_frame_unwind_cache): Likewise.
    	* frv-linux-tdep.c (frv_linux_pc_in_sigtramp)
    	(frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache):
    	Likewise.
    	* frv-tdep.c (frv_pseudo_register_write, frv_analyze_prologue): Likewise.
    	* hppa-hpux-tdep.c (hppa32_hpux_find_global_pointer)
    	(hppa32_hpux_search_dummy_call_sequence)
    	(hppa_hpux_supply_save_state): Likewise.
    	* hppa-linux-tdep.c (insns_match_pattern)
    	(hppa_linux_find_global_pointer): Likewise.
    	* hppa-tdep.c (hppa_in_function_epilogue_p)
    	(skip_prologue_hard_way, hppa_frame_cache): Likewise.
    	* i386-nto-tdep.c (i386nto_sigcontext_addr): Likewise.
    	* i386fbsd-tdep.c (i386fbsd_supply_uthread)
    	(i386fbsd_collect_uthread): Likewise.
    	* ia64-hpux-tdep.c (ia64_hpux_push_dummy_code): Likewise.
    	* ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Likewise.
    	* ia64-tdep.c (examine_prologue, ia64_frame_cache)
    	(ia64_frame_prev_register, ia64_sigtramp_frame_cache)
    	(ia64_sigtramp_frame_prev_register, ia64_access_reg)
    	(ia64_access_rse_reg, ia64_libunwind_frame_this_id)
    	(ia64_libunwind_frame_prev_register)
    	(ia64_libunwind_sigtramp_frame_this_id)
    	(ia64_find_global_pointer_from_dynamic_section)
    	(find_extant_func_descr, find_func_descr, ia64_dummy_id)
    	(ia64_unwind_pc): Likewise.
    	* iq2000-tdep.c (iq2000_store_return_value): Likewise.
    	* m68hc11-tdep.c (m68hc11_push_dummy_call)
    	(m68hc11_extract_return_value): Likewise.
    	* m68klinux-nat.c (fetch_register, store_register): Likewise.
    	* mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_cr32_write)
    	(mep_get_insn, mep_push_dummy_call): Likewise.
    	* mips-linux-tdep.c (mips_linux_get_longjmp_target)
    	(mips_linux_in_dynsym_stub): Likewise.
    	* mn10300-tdep.c (mep_pseudo_cr32_write): Likewise.
    	* ppc-linux-nat.c (fetch_register, store_register): Likewise.
    	* regcache.c (dump_endian_bytes): Change type of parameter 'buf'
    	to gdb_byte.
    	* remote-mips.c (mips_set_register): Likewise.
    	* remote-sim.c (gdbsim_fetch_register): Likewise.
    	* score-tdep.c (score7_fetch_inst): Change type of parameter
    	'memblock' and local 'buf' to gdb_byte.
    	(score7_malloc_and_get_memblock): Change return type to gdb_byte.
    	Change type of local 'buf' to gdb_byte.  Adjust.
    	(score7_adjust_memblock_ptr): Change type of parameter 'memblock'
    	to gdb_byte**.
    	(score7_analyze_prologue): Change type of 'memblock' and
    	'memblock_ptr' locals to gdb_byte*.
    	* sh64-tdep.c (sh64_extract_return_value)
    	(sh64_store_return_value): Change type of local 'buf' to gdb_byte.
    	* solib-darwin.c (darwin_current_sos, darwin_read_exec_load_addr):
    	* solib-pa64.c (pa64_solib_create_inferior_hook)
    	(pa64_open_symbol_file_object): Remove local 'buf'.
    	* solib-som.c (som_solib_create_inferior_hook, link_map_start)
    	(som_open_symbol_file_object): Likewise.
    	* solib-spu.c (spu_current_sos): Likewise.
    	* spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
    	* spu-multiarch.c (parse_spufs_run, spu_fetch_registers)
    	(spu_store_registers): Likewise.
    	* target.c (debug_print_register): Likewise.
    	* tic6x-tdep.c (tic6x_get_longjmp_target): Likewise.
    	* xstormy16-tdep.c (xstormy16_store_return_value)
    	(xstormy16_push_dummy_call, xstormy16_resolve_jmp_table_entry)
    	(xstormy16_find_jmp_table_entry): Likewise.

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

Summary of changes:
 bfd/ChangeLog                    |   10 +
 bfd/archive64.c                  |   13 +-
 bfd/elf32-arm.c                  |   18 +-
 bfd/version.h                    |    2 +-
 gdb/ChangeLog                    |  137 ++++++++
 gdb/arm-tdep.c                   |    4 +-
 gdb/avr-tdep.c                   |    4 +-
 gdb/bfin-tdep.c                  |    2 +-
 gdb/contrib/excheck.py           |  296 +++++++++++++++++
 gdb/contrib/exsummary.py         |  185 +++++++++++
 gdb/contrib/gcc-with-excheck     |   28 ++
 gdb/cris-tdep.c                  |    4 +-
 gdb/dwarf2loc.c                  |    3 +-
 gdb/frv-linux-tdep.c             |    6 +-
 gdb/frv-tdep.c                   |    4 +-
 gdb/gdbserver/ChangeLog          |   13 +
 gdb/gdbserver/config.in          |    6 +
 gdb/gdbserver/configure          |  200 ++++++++++++
 gdb/gdbserver/configure.ac       |    1 +
 gdb/gdbserver/win32-low.c        |   30 +-
 gdb/hppa-hpux-tdep.c             |    8 +-
 gdb/hppa-linux-tdep.c            |    6 +-
 gdb/hppa-tdep.c                  |    6 +-
 gdb/i386-nto-tdep.c              |    2 +-
 gdb/i386fbsd-tdep.c              |    4 +-
 gdb/ia64-hpux-tdep.c             |    2 +-
 gdb/ia64-linux-tdep.c            |    2 +-
 gdb/ia64-tdep.c                  |   32 +-
 gdb/iq2000-tdep.c                |    2 +-
 gdb/m68hc11-tdep.c               |    4 +-
 gdb/m68klinux-nat.c              |    4 +-
 gdb/mep-tdep.c                   |    8 +-
 gdb/mips-linux-tdep.c            |    4 +-
 gdb/mn10300-tdep.c               |    2 +-
 gdb/objfiles.h                   |    2 +-
 gdb/ppc-linux-nat.c              |    4 +-
 gdb/python/py-arch.c             |    6 +-
 gdb/python/py-block.c            |    6 +-
 gdb/python/py-finishbreakpoint.c |   72 ++--
 gdb/python/python.c              |   48 ++-
 gdb/regcache.c                   |    4 +-
 gdb/regformats/reg-tilegx32.dat  |   67 ++++
 gdb/remote-mips.c                |    2 +-
 gdb/remote-sim.c                 |    4 +-
 gdb/score-tdep.c                 |   16 +-
 gdb/sh64-tdep.c                  |    4 +-
 gdb/solib-darwin.c               |    4 +-
 gdb/solib-pa64.c                 |    2 -
 gdb/solib-som.c                  |    6 +-
 gdb/solib-spu.c                  |    2 +-
 gdb/spu-linux-nat.c              |    2 +-
 gdb/spu-multiarch.c              |   14 +-
 gdb/target.c                     |    2 +-
 gdb/tic6x-tdep.c                 |    2 +-
 gdb/tilegx-tdep.c                |   37 ++-
 gdb/v850-tdep.c                  |   57 ++--
 gdb/version.in                   |    2 +-
 gdb/xstormy16-tdep.c             |    8 +-
 include/ChangeLog                |    4 +
 include/dwarf2.h                 |   14 +
 include/opcode/ChangeLog         |    4 +
 include/opcode/aarch64.h         |    1 +
 libiberty/ChangeLog              |    6 +
 libiberty/libiberty.texi         |    6 +-
 libiberty/obstacks.texi          |    2 +-
 opcodes/ChangeLog                |   16 +
 opcodes/aarch64-asm-2.c          |  134 ++++----
 opcodes/aarch64-dis-2.c          |  668 +++++++++++++++++++++-----------------
 opcodes/aarch64-opc-2.c          |   66 ++--
 opcodes/aarch64-tbl.h            |   24 ++
 opcodes/i386-reg.tbl             |    2 +-
 opcodes/i386-tbl.h               |    8 +-
 72 files changed, 1775 insertions(+), 605 deletions(-)
 create mode 100644 gdb/contrib/excheck.py
 create mode 100644 gdb/contrib/exsummary.py
 create mode 100755 gdb/contrib/gcc-with-excheck
 create mode 100644 gdb/regformats/reg-tilegx32.dat

First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 27746f2..8b949e4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,13 @@
+2013-03-04  Nick Clifton  <nickc@redhat.com>
+
+	* archive64.c (bfd_elf64_archive_write_armap): Fix calculation of
+	file pointer offsets for thin archives.
+
+2013-02-28  Nathan Sidwell  <nathan@codesourcery.com>
+
+	* elf32-arm.c (elf32_arm_size_dynamic_sections): Don't call
+	elf32_arm_allocate_dynrelocs for source reloc for non-dynamic link.
+
 2013-02-27  DJ Delorie  <dj@redhat.com>
 
 	* reloc.c (BFD_RELOC_RL78_CODE): Add.
diff --git a/bfd/archive64.c b/bfd/archive64.c
index db4ce2c..be64e0d 100644
--- a/bfd/archive64.c
+++ b/bfd/archive64.c
@@ -1,6 +1,5 @@
-/* MIPS-specific support for 64-bit ELF
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007,
-   2010, 2012  Free Software Foundation, Inc.
+/* Support for 64-bit ELF archives.
+   Copyright 1996-2013 Free Software Foundation, Inc.
    Ian Lance Taylor, Cygnus Support
    Linker support added by Mark Mitchell, CodeSourcery, LLC.
    <mark@codesourcery.com>
@@ -200,7 +199,7 @@ bfd_elf64_archive_write_armap (bfd *arch,
        current = current->archive_next)
     {
       /* For each symbol which is used defined in this object, write out
-	 the object file's address in the archive */
+	 the object file's address in the archive.  */
 
       for (;
 	   count < symbol_count && map[count].u.abfd == current;
@@ -210,9 +209,11 @@ bfd_elf64_archive_write_armap (bfd *arch,
 	  if (bfd_bwrite (buf, 8, arch) != 8)
 	    return FALSE;
 	}
+
       /* Add size of this archive entry */
-      archive_member_file_ptr += (arelt_size (current)
-				  + sizeof (struct ar_hdr));
+      archive_member_file_ptr += sizeof (struct ar_hdr);
+      if (! bfd_is_thin_archive (arch))
+	archive_member_file_ptr += arelt_size (current);
       /* remember about the even alignment */
       archive_member_file_ptr += archive_member_file_ptr % 2;
     }
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index cf5bc6d..aba1814 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -13648,14 +13648,18 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
 		  && (local_iplt == NULL
 		      || local_iplt->arm.noncall_refcount == 0))
 		elf32_arm_allocate_irelocs (info, srel, 1);
-	      else if ((info->shared && !(*local_tls_type & GOT_TLS_GDESC))
-		       || *local_tls_type & GOT_TLS_GD)
-		elf32_arm_allocate_dynrelocs (info, srel, 1);
-
-	      if (info->shared && *local_tls_type & GOT_TLS_GDESC)
+	      else if (info->shared || output_bfd->flags & DYNAMIC)
 		{
-		  elf32_arm_allocate_dynrelocs (info, htab->root.srelplt, 1);
-		  htab->tls_trampoline = -1;
+		  if ((info->shared && !(*local_tls_type & GOT_TLS_GDESC))
+		      || *local_tls_type & GOT_TLS_GD)
+		    elf32_arm_allocate_dynrelocs (info, srel, 1);
+		  
+		  if (info->shared && *local_tls_type & GOT_TLS_GDESC)
+		    {
+		      elf32_arm_allocate_dynrelocs (info,
+						    htab->root.srelplt, 1);
+		      htab->tls_trampoline = -1;
+		    }
 		}
 	    }
 	  else
diff --git a/bfd/version.h b/bfd/version.h
index c80f9a6..9f5454b 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20130228
+#define BFD_VERSION_DATE 20130304
 #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 a3bdecd..2a35477 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,140 @@
+2013-03-02  Kevin Buettner  <kevinb@redhat.com>
+
+	* v850-tdep.c: (v850e2_register_name): Revise system register
+	names to match current V850E2M architecture specifications.
+	Update register number enum comments too.
+	
+2013-03-01  Jiong Wang  <jiwang@tilera.com>
+	    Pedro Alves  <palves@redhat.com>
+
+	* tilegx-tdep.c (tilegx_analyze_prologue): Limit bundle reading
+	to END_ADDR.
+	(tilegx_skip_prologue): Limit prologue analysis to section end.
+
+2013-03-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* dwarf2loc.c (call_site_find_chain_1): New variable save_callee_pc,
+	use it.
+
+2013-03-01  Pedro Alves  <palves@redhat.com>
+
+	Use gdb_byte for bytes from the program being debugged.
+
+	* arm-tdep.c (arm_store_return_value, arm_get_longjmp_target):
+	Change type of local 'buf' to gdb_byte.
+	* avr-tdep.c (avr_frame_prev_register, avr_push_dummy_call): Likewise.
+	* bfin-tdep.c (bfin_push_dummy_call): Likewise.
+	* cris-tdep.c (cris_sigcontext_addr)
+	(cris_sigtramp_frame_unwind_cache): Likewise.
+	* frv-linux-tdep.c (frv_linux_pc_in_sigtramp)
+	(frv_linux_sigcontext_reg_addr, frv_linux_sigtramp_frame_cache):
+	Likewise.
+	* frv-tdep.c (frv_pseudo_register_write, frv_analyze_prologue): Likewise.
+	* hppa-hpux-tdep.c (hppa32_hpux_find_global_pointer)
+	(hppa32_hpux_search_dummy_call_sequence)
+	(hppa_hpux_supply_save_state): Likewise.
+	* hppa-linux-tdep.c (insns_match_pattern)
+	(hppa_linux_find_global_pointer): Likewise.
+	* hppa-tdep.c (hppa_in_function_epilogue_p)
+	(skip_prologue_hard_way, hppa_frame_cache): Likewise.
+	* i386-nto-tdep.c (i386nto_sigcontext_addr): Likewise.
+	* i386fbsd-tdep.c (i386fbsd_supply_uthread)
+	(i386fbsd_collect_uthread): Likewise.
+	* ia64-hpux-tdep.c (ia64_hpux_push_dummy_code): Likewise.
+	* ia64-linux-tdep.c (ia64_linux_sigcontext_register_address): Likewise.
+	* ia64-tdep.c (examine_prologue, ia64_frame_cache)
+	(ia64_frame_prev_register, ia64_sigtramp_frame_cache)
+	(ia64_sigtramp_frame_prev_register, ia64_access_reg)
+	(ia64_access_rse_reg, ia64_libunwind_frame_this_id)
+	(ia64_libunwind_frame_prev_register)
+	(ia64_libunwind_sigtramp_frame_this_id)
+	(ia64_find_global_pointer_from_dynamic_section)
+	(find_extant_func_descr, find_func_descr, ia64_dummy_id)
+	(ia64_unwind_pc): Likewise.
+	* iq2000-tdep.c (iq2000_store_return_value): Likewise.
+	* m68hc11-tdep.c (m68hc11_push_dummy_call)
+	(m68hc11_extract_return_value): Likewise.
+	* m68klinux-nat.c (fetch_register, store_register): Likewise.
+	* mep-tdep.c (mep_pseudo_cr32_read, mep_pseudo_cr32_write)
+	(mep_get_insn, mep_push_dummy_call): Likewise.
+	* mips-linux-tdep.c (mips_linux_get_longjmp_target)
+	(mips_linux_in_dynsym_stub): Likewise.
+	* mn10300-tdep.c (mep_pseudo_cr32_write): Likewise.
+	* ppc-linux-nat.c (fetch_register, store_register): Likewise.
+	* regcache.c (dump_endian_bytes): Change type of parameter 'buf'
+	to gdb_byte.
+	* remote-mips.c (mips_set_register): Likewise.
+	* remote-sim.c (gdbsim_fetch_register): Likewise.
+	* score-tdep.c (score7_fetch_inst): Change type of parameter
+	'memblock' and local 'buf' to gdb_byte.
+	(score7_malloc_and_get_memblock): Change return type to gdb_byte.
+	Change type of local 'buf' to gdb_byte.  Adjust.
+	(score7_adjust_memblock_ptr): Change type of parameter 'memblock'
+	to gdb_byte**.
+	(score7_analyze_prologue): Change type of 'memblock' and
+	'memblock_ptr' locals to gdb_byte*.
+	* sh64-tdep.c (sh64_extract_return_value)
+	(sh64_store_return_value): Change type of local 'buf' to gdb_byte.
+	* solib-darwin.c (darwin_current_sos, darwin_read_exec_load_addr):
+	* solib-pa64.c (pa64_solib_create_inferior_hook)
+	(pa64_open_symbol_file_object): Remove local 'buf'.
+	* solib-som.c (som_solib_create_inferior_hook, link_map_start)
+	(som_open_symbol_file_object): Likewise.
+	* solib-spu.c (spu_current_sos): Likewise.
+	* spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
+	* spu-multiarch.c (parse_spufs_run, spu_fetch_registers)
+	(spu_store_registers): Likewise.
+	* target.c (debug_print_register): Likewise.
+	* tic6x-tdep.c (tic6x_get_longjmp_target): Likewise.
+	* xstormy16-tdep.c (xstormy16_store_return_value)
+	(xstormy16_push_dummy_call, xstormy16_resolve_jmp_table_entry)
+	(xstormy16_find_jmp_table_entry): Likewise.
+
+2013-03-01  Jiong Wang  <jiwang@tilera.com>
+
+	* tilegx-tdep.c (tilegx_get_longjmp_target): New function.
+	(tilegx_gdbarch_init): Install it.
+
+2013-02-28  Tom Tromey  <tromey@redhat.com>
+
+	* python/py-arch.c (archpy_disassemble): Use PyInt_Check and
+	PyLong_Check.
+
+2013-02-28  Doug Evans  <dje@google.com>
+
+	* python/py-finishbreakpoint.c (bpfinishpy_init): gcc -Wall lint.
+	* python/python.c (gdbpy_find_pc_line): Ditto.
+
+2013-02-28  Tom Tromey  <tromey@redhat.com>
+
+	* contrib/excheck.py: New file.
+	* contrib/exsummary.py: New file.
+	* contrib/gcc-with-excheck: New file.
+
+2013-02-28  Tom Tromey  <tromey@redhat.com>
+
+	* python/python.c (gdbpy_print_stack): Call begin_line and
+	fprintf_filtered inside TRY_CATCH.
+
+2013-02-28  Tom Tromey  <tromey@redhat.com>
+
+	* python/python.c (gdbpy_find_pc_line): Call find_pc_line
+	inside TRY_CATCH.
+
+2013-02-28  Tom Tromey  <tromey@redhat.com>
+
+	* py-finishbreakpoint.c (bpfinishpy_init): Reorganize to call
+	frame_object_to_frame_info inside TRY_CATCH.
+
+2013-02-28  Tom Tromey  <tromey@redhat.com>
+
+	* py-block.c (gdbpy_block_for_pc): Call block_for_pc inside
+	TRY_CATCH.
+
+2013-02-28  Tom Tromey  <tromey@redhat.com>
+
+	* objfiles.h (ALL_PSPACE_OBJFILES): Remove trailing backlash.
+
 2013-02-27  Corinna Vinschen  <vinschen@redhat.com>
 
 	* windows-nat.c: Throughout, fix format strings and casts of
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index ead09d7..d890dcb 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -9043,7 +9043,7 @@ arm_store_return_value (struct type *type, struct regcache *regs,
 
   if (TYPE_CODE (type) == TYPE_CODE_FLT)
     {
-      char buf[MAX_REGISTER_SIZE];
+      gdb_byte buf[MAX_REGISTER_SIZE];
 
       switch (gdbarch_tdep (gdbarch)->fp_model)
 	{
@@ -9207,7 +9207,7 @@ arm_get_longjmp_target (struct frame_info *frame, CORE_ADDR *pc)
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   CORE_ADDR jb_addr;
-  char buf[INT_REGISTER_SIZE];
+  gdb_byte buf[INT_REGISTER_SIZE];
   
   jb_addr = get_frame_register_unsigned (frame, ARM_A1_REGNUM);
 
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 9dd807f..b14bf83 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -1103,7 +1103,7 @@ avr_frame_prev_register (struct frame_info *this_frame,
 	     everything else about the avr is little endian.  Ick!  */
 	  ULONGEST pc;
 	  int i;
-	  unsigned char buf[3];
+	  gdb_byte buf[3];
 	  struct gdbarch *gdbarch = get_frame_arch (this_frame);
 	  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
@@ -1245,7 +1245,7 @@ avr_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   int i;
-  unsigned char buf[3];
+  gdb_byte buf[3];
   int call_length = gdbarch_tdep (gdbarch)->call_length;
   CORE_ADDR return_pc = avr_convert_iaddr_to_raw (bp_addr);
   int regnum = AVR_ARGN_REGNUM;
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index d7fcccb..22dad1b 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -503,7 +503,7 @@ bfin_push_dummy_call (struct gdbarch *gdbarch,
 {
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-  char buf[4];
+  gdb_byte buf[4];
   int i;
   long reg_r0, reg_r1, reg_r2;
   int total_len = 0;
diff --git a/gdb/contrib/excheck.py b/gdb/contrib/excheck.py
new file mode 100644
index 0000000..f8f917f
--- /dev/null
+++ b/gdb/contrib/excheck.py
@@ -0,0 +1,296 @@
+#   Copyright 2011, 2013 Free Software Foundation, Inc.
+#
+#   This is free software: you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by
+#   the Free Software Foundation, either version 3 of the License, or
+#   (at your option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#   General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License
+#   along with this program.  If not, see
+#   <http://www.gnu.org/licenses/>.
+
+# This is a GCC plugin that computes some exception-handling data for
+# gdb.  This data can then be summarized and checked by the
+# exsummary.py script.
+
+# To use:
+# * First, install the GCC Python plugin.  See
+#   https://fedorahosted.org/gcc-python-plugin/
+# * export PYTHON_PLUGIN=/full/path/to/plugin/directory
+#   This should be the directory holding "python.so".
+# * cd build/gdb; make mostlyclean
+# * make CC=.../gcc-with-excheck
+#   This will write a number of .py files in the build directory.
+# * python .../exsummary.py
+#   This will show the violations.
+
+import gcc
+import gccutils
+import sys
+
+# Where our output goes.
+output_file = None
+
+# Cleanup functions require special treatment, because they take a
+# function argument, but in theory the function must be nothrow.
+cleanup_functions = {
+    'make_cleanup': 1,
+    'make_cleanup_dtor': 1,
+    'make_final_cleanup': 1,
+    'make_my_cleanup2': 1,
+    'make_my_cleanup': 1
+}
+
+# Functions which may throw but which we want to ignore.
+ignore_functions = {
+    # This one is super special.
+    'exceptions_state_mc': 1,
+    # gdb generally pretends that internal_error cannot throw, even
+    # though it can.
+    'internal_error': 1,
+    # do_cleanups and friends are supposedly nothrow but we don't want
+    # to run afoul of the indirect function call logic.
+    'do_cleanups': 1,
+    'do_final_cleanups': 1
+}
+
+# Functions which take a function argument, but which are not
+# interesting, usually because the argument is not called in the
+# current context.
+non_passthrough_functions = {
+    'signal': 1,
+    'add_internal_function': 1
+}
+
+# Return True if the type is from Python.
+def type_is_pythonic(t):
+    if isinstance(t, gcc.ArrayType):
+        t = t.type
+    if not isinstance(t, gcc.RecordType):
+        return False
+    # Hack.
+    return str(t).find('struct Py') == 0
+
+# Examine all the fields of a struct.  We don't currently need any
+# sort of recursion, so this is simple for now.
+def examine_struct_fields(initializer):
+    global output_file
+    for idx2, value2 in initializer.elements:
+        if isinstance(idx2, gcc.Declaration):
+            if isinstance(value2, gcc.AddrExpr):
+                value2 = value2.operand
+                if isinstance(value2, gcc.FunctionDecl):
+                    output_file.write("declare_nothrow(%s)\n"
+                                      % repr(str(value2.name)))
+
+# Examine all global variables looking for pointers to functions in
+# structures whose types were defined by Python.
+def examine_globals():
+    global output_file
+    vars = gcc.get_variables()
+    for var in vars:
+        if not isinstance(var.decl, gcc.VarDecl):
+            continue
+        output_file.write("################\n")
+        output_file.write("# Analysis for %s\n" % var.decl.name)
+        if not var.decl.initial:
+            continue
+        if not type_is_pythonic(var.decl.type):
+            continue
+
+        if isinstance(var.decl.type, gcc.ArrayType):
+            for idx, value in var.decl.initial.elements:
+                examine_struct_fields(value)
+        else:
+            gccutils.check_isinstance(var.decl.type, gcc.RecordType)
+            examine_struct_fields(var.decl.initial)
+
+# Called at the end of compilation to write out some data derived from
+# globals and to close the output.
+def close_output(*args):
+    global output_file
+    examine_globals()
+    output_file.close()
+
+# The pass which derives some exception-checking information.  We take
+# a two-step approach: first we get a call graph from the compiler.
+# This is emitted by the plugin as Python code.  Then, we run a second
+# program that reads all the generated Python and uses it to get a
+# global view of exception routes in gdb.
+class GdbExceptionChecker(gcc.GimplePass):
+    def __init__(self, output_file):
+        gcc.GimplePass.__init__(self, 'gdb_exception_checker')
+        self.output_file = output_file
+
+    def log(self, obj):
+        self.output_file.write("# %s\n" % str(obj))
+
+    # Return true if FN is a call to a method on a Python object.
+    # We know these cannot throw in the gdb sense.
+    def fn_is_python_ignorable(self, fn):
+        if not isinstance(fn, gcc.SsaName):
+            return False
+        stmt = fn.def_stmt
+        if not isinstance(stmt, gcc.GimpleAssign):
+            return False
+        if stmt.exprcode is not gcc.ComponentRef:
+            return False
+        rhs = stmt.rhs[0]
+        if not isinstance(rhs, gcc.ComponentRef):
+            return False
+        if not isinstance(rhs.field, gcc.FieldDecl):
+            return False
+        return rhs.field.name == 'tp_dealloc' or rhs.field.name == 'tp_free'
+
+    # Decode a function call and write something to the output.
+    # THIS_FUN is the enclosing function that we are processing.
+    # FNDECL is the call to process; it might not actually be a DECL
+    # node.
+    # LOC is the location of the call.
+    def handle_one_fndecl(self, this_fun, fndecl, loc):
+        callee_name = ''
+        if isinstance(fndecl, gcc.AddrExpr):
+            fndecl = fndecl.operand
+        if isinstance(fndecl, gcc.FunctionDecl):
+            # Ordinary call to a named function.
+            callee_name = str(fndecl.name)
+            self.output_file.write("function_call(%s, %s, %s)\n"
+                                   % (repr(callee_name),
+                                      repr(this_fun.decl.name),
+                                      repr(str(loc))))
+        elif self.fn_is_python_ignorable(fndecl):
+            # Call to tp_dealloc.
+            pass
+        elif (isinstance(fndecl, gcc.SsaName)
+              and isinstance(fndecl.var, gcc.ParmDecl)):
+            # We can ignore an indirect call via a parameter to the
+            # current function, because this is handled via the rule
+            # for passthrough functions.
+            pass
+        else:
+            # Any other indirect call.
+            self.output_file.write("has_indirect_call(%s, %s)\n"
+                                   % (repr(this_fun.decl.name),
+                                      repr(str(loc))))
+        return callee_name
+
+    # This does most of the work for examine_one_bb.
+    # THIS_FUN is the enclosing function.
+    # BB is the basic block to process.
+    # Returns True if this block is the header of a TRY_CATCH, False
+    # otherwise.
+    def examine_one_bb_inner(self, this_fun, bb):
+        if not bb.gimple:
+            return False
+        try_catch = False
+        for stmt in bb.gimple:
+            loc = stmt.loc
+            if not loc:
+                loc = this_fun.decl.location
+            if not isinstance(stmt, gcc.GimpleCall):
+                continue
+            callee_name = self.handle_one_fndecl(this_fun, stmt.fn, loc)
+


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


             reply	other threads:[~2013-03-04 14:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-04 14:57 pmuldoon [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-05-10  8:43 pmuldoon
2013-05-08 10:03 pmuldoon
2013-05-02 13:11 pmuldoon
2013-04-30  9:40 pmuldoon
2013-04-22 12:13 pmuldoon
2013-04-19 11:29 pmuldoon
2013-03-08 15:40 pmuldoon
2013-02-28  9:46 pmuldoon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130304145733.29783.qmail@sourceware.org \
    --to=pmuldoon@sourceware.org \
    --cc=archer-commits@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).