public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: jkratoch@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  jankratochvil/gdbserverbuildid: Locate solib files via build-id
Date: Mon, 24 Mar 2014 19:18:00 -0000	[thread overview]
Message-ID: <20140324191822.17222.qmail@sourceware.org> (raw)

The branch, jankratochvil/gdbserverbuildid has been updated
  discards  9a55d97b9ecf35edf74fe8a098055e7022b2c783 (commit)
  discards  44d174c7e81b033ec87ce55e82f731e2d1da3182 (commit)
  discards  626cc0e72e235a1a87e07c1d7bae34d2aa3a77be (commit)
  discards  041741fef5261c22c998f501f4abc95600e7e4a6 (commit)
  discards  d9973c1a673ac4a78bc74364750e71889028ace1 (commit)
  discards  381f2e19e2571d013f33868986d3df8c3da6c05e (commit)
  discards  b1f19a1e7e87a9ae39df68c3aa3d4b631a6740bd (commit)
  discards  4c7392a0d13eeac097d1ca47d2b946ecbd86c18d (commit)
  discards  1f575ae335ae3a1b89a415dccb3c87b35048b6f9 (commit)
  discards  3d534729ad4f862c57e08e3e275a8e0cbf46d36f (commit)
  discards  d1f21a3bc674d45ab6d1acce592e27fa15c80c97 (commit)
       via  b5f21a557fe7556e005e1668c25b60817fa8c5ab (commit)
       via  f7ca538f516871db3c25f72341250b36c0761537 (commit)
       via  3348967bdcf0f9d0007ee8b39122f5beca796612 (commit)
       via  074475a91fbac2ce95078efe33c9adea34b8b846 (commit)
       via  b35540c6d57608d9bec3039aa4efbe567e8d0ff3 (commit)
       via  88eedb227c9ccdef185463cb3bed0fb86bbadc1a (commit)
       via  48f7a38bdfd5ebc740f46d54e0fa6d782738f7c5 (commit)
       via  efeae1f1529f916b6b21e3e48502d9a48c6f6813 (commit)
       via  ddaf6724c0b5eb205f5ce6039e75b213bdb2bac2 (commit)
       via  babd16ee72e5bcace88b4add0a9c938ce6382ba9 (commit)
       via  7e867dd78fd647a013f47496967439b19fa9b944 (commit)
       via  d23487918b315cccd04c2b60a7cf7775920caecb (commit)
       via  7588d2eca0397166c2445eae6559c89f9b44e4e7 (commit)
       via  a62904492b27b9fb77da8fa2714fd05cc28804a7 (commit)
       via  aa9fa1e22a61f60c51ef7886cb297bfbad3cc305 (commit)
       via  31ae9d245c409ce407c32a36034acf89fdc23a5f (commit)
       via  69fa4030016295f3da40005fca7dd287a8c75406 (commit)
      from  9a55d97b9ecf35edf74fe8a098055e7022b2c783 (commit)

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

- Log -----------------------------------------------------------------
commit b5f21a557fe7556e005e1668c25b60817fa8c5ab
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 19:51:42 2014 +0100

    Locate solib files via build-id
    
    Hi,
    
    this is a new functionality that the file itself (*) it found via build-id, if
    the regular name-located file does not match inferior build-id or if the
    named-located file even does not exist.
    
    I am not completely sure with the SO->SO_NAME initialization.  It cannot be
    a regression but not sure how it should behave for the build-id-located files.
    Currently the original target filename is kept but the comment there says is
    may confuse MI frontends.  OTOH putting there the build-id located file will
    show its build-id name in SO_NAME which is also wrong.
    
    (*) /usr/lib/libxxx.so, not /usr/lib/debug/usr/lib/libxxx.so.debug.
        Although GDB uses only symbols from that file so in fact the *.debug file
        would be sufficient.  But for example .symtab is sometimes only in the .so
        file and not the .so.debug file so GDB looks up .so as the associated
        .so.debug file gets loaded automatically on top of .so anyway.
    
    
    Thanks,
    Jan
    
    
    gdb/
    2014-03-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	Locate solib files via build-id.
    	* build-id.c (build_id_so_validate): Remove const from the parameter,
    	return void.  Handle also NULL SO->ABFD.  Call also build_id_to_bfd.
    	* build-id.h (build_id_so_validate): Update declaration.
    	* solib.c (solib_map_sections): Call VALIDATE even for NULL SO->ABFD.
    	No longer free SO->ABFD on failed VALIDATE.
    	(default_solib_validate): Update its const and return value.
    	* solib.h (default_solib_validate): Update declaration.
    	* solist.h (struct target_so_ops): Update definition of field validate.
    
    gdb/testsuite/
    2014-03-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	Locate solib files via build-id.
    	* gdb.base/solib-mismatch.exp (nocrlf, expected_header): Make
    	solib_matching_test variables global.
    	(solib_locate_test): New proc.
    	(locate non-matching shared library)
    	(locate non-existing shared library): New tests.

commit f7ca538f516871db3c25f72341250b36c0761537
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 19:51:42 2014 +0100

    Code cleanup: solib_map_sections abfd var
    
    Hi,
    
    just remove a local variable holding so->abfd copy as so->abfd may change in
    the next patch.
    
    
    Jan
    
    
    gdb/
    2014-03-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	* solib.c (solib_map_sections): Remove variable abfd.

commit 3348967bdcf0f9d0007ee8b39122f5beca796612
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 19:51:42 2014 +0100

    Tests for validate symbol file using build-id
    
    
    Hi,
    
    new testcase.
    
    
    Jan
    
    
    gdb/testsuite/
    2014-02-26  Aleksandar Ristovski  <aristovski@qnx.com
    
    	Tests for validate symbol file using build-id.
    	* gdb.base/solib-mismatch-lib.c: New file.
    	* gdb.base/solib-mismatch-libmod.c: New file.
    	* gdb.base/solib-mismatch.c: New file.
    	* gdb.base/solib-mismatch.exp: New file.

commit 074475a91fbac2ce95078efe33c9adea34b8b846
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 19:51:42 2014 +0100

    Validate symbol file using build-id
    
    
    Hi,
    
    consumer part of the "build-id" attribute.
    
    
    Jan
    
    
    gdb/
    2014-02-26  Aleksandar Ristovski  <aristovski@qnx.com
    	    Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	Validate symbol file using build-id.
    	* NEWS (Changes since GDB 7.7): Add 'set build-id-force'
    	and 'show build-id-force'.  Add build-id attribute.
    	* build-id.c: Include solist.h, rsp-low.h and gdbcmd.h.
    	(build_id_force, show_build_id_force): New.
    	(build_id_verify): Use BUILD_ID_FORCE.
    	(build_id_to_debug_bfd): Rename to ...
    	(build_id_to_bfd): ... here.  Add parameter suffix.
    	(build_id_to_debug_bfd): New wrapper of build_id_to_bfd.
    	(build_id_so_validate, _initialize_build_id): New.
    	* build-id.h (build_id_so_validate): New declaration.
    	* solib-darwin.c (_initialize_darwin_solib): Assign validate value.
    	* solib-dsbt.c (_initialize_dsbt_solib): Ditto.
    	* solib-frv.c (_initialize_frv_solib): Ditto.
    	* solib-ia64-hpux.c (ia64_hpux_target_so_ops): Ditto.
    	* solib-irix.c (_initialize_irix_solib): Ditto.
    	* solib-osf.c (_initialize_osf_solib): Ditto.
    	* solib-pa64.c (_initialize_pa64_solib): Ditto.
    	* solib-som.c (_initialize_som_solib): Ditto.
    	* solib-spu.c (set_spu_solib_ops): Ditto.
    	* solib-svr4.c: Include build-id.h and rsp-low.h.
    	(svr4_copy_library_list): Deeply copy also BUILD_ID.
    	(library_list_start_library): Parse 'build-id' attribute.
    	(svr4_library_attributes): Add 'build-id' attribute.
    	(_initialize_svr4_solib): Assign validate value.
    	* solib-target.c (solib.h): Include.
    	(_initialize_solib_target): Assign validate value.
    	* solib.c (solib_map_sections): Use ops->validate.
    	(free_so): Free build_id.
    	(default_solib_validate): New function.
    	* solib.h (default_solib_validate): New declaration.
    	* solist.h (struct so_list): New fields 'build_idsz' and 'build_id'.
    	(target_so_ops): New field 'validate'.
    
    gdb/doc/
    2014-03-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	* gdb.texinfo (Files): Add 'set build-id-force'
    	and 'show build-id-force'.

commit b35540c6d57608d9bec3039aa4efbe567e8d0ff3
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 19:51:41 2014 +0100

    gdbserver build-id attribute generator
    
    
    Hi,
    
    producer part of the new "build-id" XML attribute.
    
    
    Jan
    
    
    gdb/
    2014-02-26  Aleksandar Ristovski  <aristovski@qnx.com
    
    	gdbserver build-id attribute generator.
    	* features/library-list-svr4.dtd (library-list-svr4): New
    	'build-id' attribute.
    
    gdb/doc/
    2014-02-26  Aleksandar Ristovski  <aristovski@qnx.com
    
    	gdbserver build-id attribute generator.
    	* gdb.texinfo (Library List Format for SVR4 Targets): Add
    	'build-id' in description, example, new attribute in dtd.
    
    gdb/gdbserver/
    2014-02-26  Aleksandar Ristovski  <aristovski@qnx.com
    
    	gdbserver build-id attribute generator.
    	* linux-low.c (linux-maps.h, search.h, rsp-low.h): Include.
    	(ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
    	(ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
    	(find_phdr): New.
    	(get_dynamic): Use find_pdhr to traverse program headers.
    	(struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
    	(compare_mapping_entry_range, struct find_memory_region_callback_data)
    	(read_build_id, find_memory_region_callback, lrfind_mapping_entry)
    	(get_hex_build_id): New.
    	(linux_qxfer_libraries_svr4): Add optional build-id attribute
    	to reply XML document.

commit 88eedb227c9ccdef185463cb3bed0fb86bbadc1a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 19:51:41 2014 +0100

    Move linux_find_memory_regions_full & co.
    
    
    Hi,
    
    this should be just a move with no changes.
    
    
    Jan
    
    
    gdb/
    2014-02-26  Aleksandar Ristovski  <aristovski@qnx.com
    
    	Move linux_find_memory_regions_full & co.
    	* common/target-utils.c (string.h, gdb_assert.h): Include.
    	(read_alloc, read_stralloc): Move definitions from target.c.
    	* common/target-utils.h (read_alloc_pread_ftype): New typedef.
    	(read_alloc): New declaration.
    	(read_stralloc_func_ftype): New typedef.
    	(read_stralloc): New declaration.
    	* common/linux-maps.c (fcntl.h, unistd.h, target.h, gdb_assert.h)
    	(ctype.h, string.h, target-utils.h): Include.
    	(read_mapping): Move from linux-tdep.c.
    	[GDBSERVER] (linux_find_memory_read_stralloc_1_pread): New function.
    	[GDBSERVER] (linux_find_memory_read_stralloc_1): New function.
    	(linux_find_memory_read_stralloc): New function.
    	(linux_find_memory_regions_full): Move from linux-tdep.c.
    	* common/linux-maps.h (read_mapping): New declaration.
    	(linux_find_memory_region_ftype): Moved typedef from linux-tdep.c.
    	(linux_find_memory_regions_full): New declaration.
    	* linux-tdep.c (linux-maps.h): Include.
    	(read_mapping): Moved to common/linux-maps.c.
    	(linux_find_memory_region_ftype): Moved typedef to common/linux-maps.h.
    	(linux_find_memory_regions_full): Moved definition to
    	common/linux-maps.c.
    	* target.c (target-utils.h): Include.
    	(read_alloc_pread_ftype): Moved typedef to common/target-utils.h.
    	(read_alloc, read_stralloc): Moved definitions to
    	common/target-utils.c.

commit 48f7a38bdfd5ebc740f46d54e0fa6d782738f7c5
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 19:51:41 2014 +0100

    Prepare linux_find_memory_regions_full & co. for move
    
    
    Hi,
    
    prepare code for move into gdb/common/.
    
    
    Jan
    
    
    gdb/
    2014-02-26  Aleksandar Ristovski  <aristovski@qnx.com
    
    	Prepare linux_find_memory_regions_full & co. for move.
    	* linux-tdep.c (linux_find_memory_region_ftype): Comment.
    	(linux_find_memory_regions_full): Change signature and prepare
    	for moving to linux-maps.
    	(linux_find_memory_regions_data): Rename field 'obfd' to 'data'.
    	(linux_find_memory_regions_thunk): New.
    	(linux_find_memory_regions_thunk): Use 'data' field instead of 'obfd'.
    	(linux_find_memory_regions_gdb): New.
    	(linux_find_memory_regions): Rename argument 'obfd' to 'func_data'.
    	(linux_make_mappings_corefile_notes): Use
    	linux_find_memory_regions_gdb.
    	* target.c (read_alloc_pread_ftype): New typedef.
    	(target_fileio_read_alloc_1_pread): New function.
    	(read_alloc): Refactor from target_fileio_read_alloc_1.
    	(read_stralloc_func_ftype): New typedef.
    	(target_fileio_read_alloc_1): New implementation. Use read_alloc.
    	(read_stralloc): Refactored from target_fileio_read_stralloc.
    	(target_fileio_read_stralloc): New implementation, use read_stralloc.

commit efeae1f1529f916b6b21e3e48502d9a48c6f6813
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 19:51:40 2014 +0100

    Create empty common/linux-maps.[ch] and common/target-utils.[ch]
    
    
    Hi,
    
    prepare new files for later move.
    
    
    Jan
    
    
    gdb/
    2014-02-26  Aleksandar Ristovski  <aristovski@qnx.com
    
    	Create empty common/linux-maps.[ch] and common/target-utils.[ch].
    	* Makefile.in (HFILES_NO_SRCDIR); Add common/linux-maps.h,
    	common/target-utils.h.
    	(COMMON_OBS): Add target-utils.o.
    	(linux-maps.o, target-utils.o): New.
    	* common/target-utils.c: New file.
    	* common/target-utils.h: New file.
    	* common/linux-maps.c: New file.
    	* common/linux-maps.h: New file.
    	* config/i386/linux.mh (NATDEPFILES): Add linux-maps.o.
    	* config/i386/linux64.mh (NATDEPFILES): Ditto.
    
    gdb/gdbserver/
    2014-02-26  Aleksandar Ristovski  <aristovski@qnx.com
    
    	Create empty common/linux-maps.[ch] and common/target-utils.[ch].
    	* Makefile.in (OBS): Add target-utils.o.
    	(linux-maps.o, target-utils.o): New.
    	* configure.srv (srv_linux_obj): Add linux-maps.o.

commit ddaf6724c0b5eb205f5ce6039e75b213bdb2bac2
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 19:51:40 2014 +0100

    Merge multiple hex conversions
    
    
    Hi,
    
    here most of the patch has been reimplemented in the meantime and this is only
    a small remaint.
    
    
    Jan
    
    
    gdb/
    2014-02-26  Aleksandar Ristovski  <aristovski@qnx.com
    
    	Merge multiple hex conversions.
    	* monitor.c: Include rsp-low.h.
    	(fromhex): Remove definition.
    
    gdb/gdbserver/
    2014-02-26  Aleksandar Ristovski  <aristovski@qnx.com
    
    	Merge multiple hex conversions.
    	* gdbreplay.c (tohex): Rename to 'fromhex'.
    	(logchar): Use fromhex.

commit babd16ee72e5bcace88b4add0a9c938ce6382ba9
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 19:51:40 2014 +0100

    Move utility functions to common/
    
    
    Hi,
    
    some parts of the former patch have been reimplemented in the meantime by
    other patches so this is only a part of the former cleanup.
    
    
    Jan
    
    
    gdb/
    2014-02-26  Aleksandar Ristovski  <aristovski@qnx.com
    
    	Move utility functions to common/.
    	* cli/cli-utils.c (skip_spaces, skip_spaces_const): Move defs to
    	common/common-utils.c.
    	* cli/cli-utils.h (skip_spaces, skip_spaces_const): Move decls to
    	common/common-utils.h.
    	* common/common-utils.c (host-defs.h, ctype.h): Include.
    	(HIGH_BYTE_POSN, is_digit_in_base, digit_to_int, strtoulst): Move
    	from utils.c.
    	(skip_spaces, skip_spaces_const): Move from cli/cli-utils.c.
    	* common/host-defs.h (TARGET_CHAR_BIT, HOST_CHAR_BIT): Moved from
    	defs.h.
    	* common/common-utils.h (strtoulst): Move decl from utils.h.
    	(hex2bin, bin2hex): Move decls from remote.h.
    	(skip_spaces, skip_spaces_const): Move decls from cli/cli-utils.h.
    	* defs.h (TARGET_CHAR_BIT, HOST_CHAR_BIT): Move to
    	common/common-utils.h
    	* utils.c (HIGH_BYTE_POSN, is_digit_in_base, digit_to_int)
    	(strtoulst): Move to common/common-utils.c.
    	* utils.h (strtoulst): Moved decl to common/common-utils.h.

commit 7e867dd78fd647a013f47496967439b19fa9b944
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 19:51:40 2014 +0100

    +README.archer

commit d23487918b315cccd04c2b60a7cf7775920caecb
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 17:37:32 2014 +0100

    testsuite: Remove needless linux-nat requirement in gdb-sigterm.exp.
    
    That "set debug lin-lwp 1" command even is not needed for the functionality of
    this testcase.
    
    This patch does fix a testcase error on aarch64-none-elf.
    
    gdb/testsuite/
    2014-03-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	* gdb.base/gdb-sigterm.exp (do_test): Remove "set debug lin-lwp 1".
    
    Message-ID: <20140323165745.GA23830@host2.jankratochvil.net>

commit 7588d2eca0397166c2445eae6559c89f9b44e4e7
Author: Pierre Langlois <pierre.langlois@embecosm.com>
Date:   Tue Mar 18 13:50:54 2014 +0000

    Fix PR/16720
    
    2014-03-24  Pierre Langlois  <pierre.langlois@embecosm.com>
    
      * avr-tdep.c (avr_scan_prologue): Accept push r1 instruction for
      small stack allocation.

commit a62904492b27b9fb77da8fa2714fd05cc28804a7
Author: Tristan Gingold <tristan.gingold@adacore.com>
Date:   Fri Mar 21 09:26:05 2014 +0100

    darwin-nat.c: fix dump of messages on x86_64.
    
    gdb/
    	* darwin-nat.c (exc_server): Remove unused prototype.
    	(darwin_dump_message): Correctly display data on x86_64.
    	(darwin_encode_reply): Fix style.
    	Add comments and fix indentation.

commit aa9fa1e22a61f60c51ef7886cb297bfbad3cc305
Author: Tristan Gingold <tristan.gingold@adacore.com>
Date:   Fri Mar 21 09:25:05 2014 +0100

    Fix stack offset in Mach-O output for -P compact_unwind.
    
    Minor fix in compact unwind output: to be more readable, the stack offset
    for indirect compact unwind entries are mutiplied by its factor (4 or 8).
    
    binutils/
    	* od-macho.c (dump_unwind_encoding_x86): Set the factor.
    	(dump_exe_compact_unwind): Change the condition.  Improve
    	indentation.

commit 31ae9d245c409ce407c32a36034acf89fdc23a5f
Author: Pierre Langlois <pierre.langlois@embecosm.com>
Date:   Mon Mar 24 09:10:07 2014 +0000

    Fix typo in previous entry.

commit 69fa4030016295f3da40005fca7dd287a8c75406
Author: Pierre Langlois <pierre.langlois@embecosm.com>
Date:   Fri Mar 21 19:46:07 2014 +0000

    Add myself as a write-after-approval mainainer.
    
    2014-03-21  Pierre Langlois  <pierre.langlois@embecosm.com>
    
    	* MAINTAINERS (Write After Approval): Add "Pierre Langlois".

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

Summary of changes:
 binutils/ChangeLog                        |    6 +++++
 binutils/od-macho.c                       |   11 +++++----
 gdb/ChangeLog                             |   16 ++++++++++++++
 gdb/MAINTAINERS                           |    1 +
 gdb/avr-tdep.c                            |    2 +-
 gdb/darwin-nat.c                          |   33 +++++++++++++---------------
 gdb/solib-svr4.c                          |    6 +++++
 gdb/solib.c                               |   25 ++++++++--------------
 gdb/testsuite/ChangeLog                   |    4 +++
 gdb/testsuite/gdb.base/gdb-sigterm.exp    |    1 -
 gdb/testsuite/gdb.base/solib-mismatch.exp |    4 ++-
 11 files changed, 67 insertions(+), 42 deletions(-)

First 500 lines of diff:
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 0f2707b..98ecae0 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-24  Tristan Gingold  <gingold@adacore.com>
+
+	* od-macho.c (dump_unwind_encoding_x86): Set the factor.
+	(dump_exe_compact_unwind): Change the condition.  Improve
+	indentation.
+
 2014-03-20  Nick Clifton  <nickc@redhat.com>
 
 	* readelf.c (process_version_sections): Fix off-by-one error in
diff --git a/binutils/od-macho.c b/binutils/od-macho.c
index 7754f36..3cd2cf0 100644
--- a/binutils/od-macho.c
+++ b/binutils/od-macho.c
@@ -1157,7 +1157,7 @@ dump_unwind_encoding_x86 (unsigned int encoding, unsigned int sz,
 
 	    stack_adj =
 	      (encoding & MACH_O_UNWIND_X86_64_FRAMELESS_STACK_ADJUST) >> 13;
-	    printf (" size at 0x%03x + 0x%02x", stack_size, stack_adj);
+	    printf (" size at 0x%03x + 0x%02x", stack_size, stack_adj * sz);
 	  }
 	/* Registers are coded using arithmetic compression: the register
 	   is indexed in range 0-6, the second in range 0-5, the third in
@@ -1359,12 +1359,13 @@ dump_exe_compact_unwind (bfd *abfd,
       const unsigned char *level2;
       unsigned int kind;
 
-      if (i == index_count - 1)
-	break;
-
       func_offset = bfd_get_32 (abfd, index_entry->function_offset);
       level2_offset = bfd_get_32 (abfd, index_entry->second_level_offset);
 
+      /* No level-2 for this index (should be the last index).  */
+      if (level2_offset == 0)
+	continue;
+
       level2 = content + level2_offset;
       kind = bfd_get_32 (abfd, level2);
       switch (kind)
@@ -1477,7 +1478,7 @@ dump_exe_compact_unwind (bfd *abfd,
 	nbr_lsda = (next_lsda_offset - lsda_offset) / sizeof (*lsda);
 	for (j = 0; j < nbr_lsda; j++)
 	  {
-	    printf ("   lsda %-3u: function 0x%08x lsda 0x%08x\n",
+	    printf ("   lsda %3u: function 0x%08x lsda 0x%08x\n",
 		    j, (unsigned int) bfd_get_32 (abfd, lsda->function_offset),
 		    (unsigned int) bfd_get_32 (abfd, lsda->lsda_offset));
 	    lsda++;
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7e52e25..c1231ca 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,19 @@
+2014-03-24  Pierre Langlois  <pierre.langlois@embecosm.com>
+
+	* avr-tdep.c (avr_scan_prologue): Accept push r1 instruction for
+	small stack allocation.
+
+2014-03-24  Tristan Gingold  <gingold@adacore.com>
+
+	* darwin-nat.c (exc_server): Remove unused prototype.
+	(darwin_dump_message): Correctly display data on x86_64.
+	(darwin_encode_reply): Fix style.
+	Add comments and fix indentation.
+
+2014-03-24  Pierre Langlois  <pierre.langlois@embecosm.com>
+
+	* MAINTAINERS (Write After Approval): Add "Pierre Langlois".
+
 2014-03-22  Doug Evans  <xdje42@gmail.com>
 
 	* infcmd.c: Whitespace fixes.
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index 1f5752a..1720d93 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -549,6 +549,7 @@ Jim Kingdon					kingdon@panix.com
 Paul Koning					paul_koning@dell.com
 Jan Kratochvil					jan.kratochvil@redhat.com
 Maxim Kuvyrkov					maxim@kugelworks.com
+Pierre Langlois 				pierre.langlois@embecosm.com
 Jonathan Larmour				jifl@ecoscentric.com
 Jeff Law					law@redhat.com
 Justin Lebar					justin.lebar@gmail.com
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 6e58f04..7fb16d1 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -720,7 +720,7 @@ avr_scan_prologue (struct gdbarch *gdbarch, CORE_ADDR pc_beg, CORE_ADDR pc_end,
           info->size += gdbarch_tdep (gdbarch)->call_length;
           vpc += 2;
         }
-      else if (insn == 0x920f)  /* push r0 */
+      else if (insn == 0x920f || insn == 0x921f)  /* push r0 or push r1 */
         {
           info->size += 1;
           vpc += 2;
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index 23a921d..3ea9696 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -85,8 +85,6 @@
 #define PTRACE(CMD, PID, ADDR, SIG) \
  darwin_ptrace(#CMD, CMD, (PID), (ADDR), (SIG))
 
-extern boolean_t exc_server (mach_msg_header_t *in, mach_msg_header_t *out);
-
 static void darwin_stop (struct target_ops *self, ptid_t);
 
 static void darwin_resume_to (struct target_ops *ops, ptid_t ptid, int step,
@@ -127,7 +125,7 @@ mach_port_t darwin_host_self;
 /* Exception port.  */
 mach_port_t darwin_ex_port;
 
-/* Port set.  */
+/* Port set, to wait for answer on all ports.  */
 mach_port_t darwin_port_set;
 
 /* Page size.  */
@@ -149,10 +147,8 @@ static unsigned int darwin_debug_flag = 0;
 /* Create a __TEXT __info_plist section in the executable so that gdb could
    be signed.  This is required to get an authorization for task_for_pid.
 
-   Once gdb is built, you can either:
-   * make it setgid procmod
-   * or codesign it with any system-trusted signing authority.
-   See taskgated(8) for details.  */
+   Once gdb is built, you must codesign it with any system-trusted signing
+   authority.  See taskgated(8) for details.  */
 static const unsigned char info_plist[]
 __attribute__ ((section ("__TEXT,__info_plist"),used)) =
   "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
@@ -492,7 +488,7 @@ darwin_dump_message (mach_msg_header_t *hdr, int disp_body)
   if (disp_body)
     {
       const unsigned char *data;
-      const unsigned long *ldata;
+      const unsigned int *ldata;
       int size;
       int i;
 
@@ -538,9 +534,9 @@ darwin_dump_message (mach_msg_header_t *hdr, int disp_body)
 	}
 
       printf_unfiltered (_("  data:"));
-      ldata = (const unsigned long *)data;
-      for (i = 0; i < size / sizeof (unsigned long); i++)
-	printf_unfiltered (" %08lx", ldata[i]);
+      ldata = (const unsigned int *)data;
+      for (i = 0; i < size / sizeof (unsigned int); i++)
+	printf_unfiltered (" %08x", ldata[i]);
       printf_unfiltered (_("\n"));
     }
 }
@@ -561,7 +557,7 @@ darwin_decode_exception_message (mach_msg_header_t *hdr,
   kern_return_t kret;
   int i;
 
-  /* Check message identifier.  2401 is exc.  */
+  /* Check message identifier.  2401 == 0x961 is exc.  */
   if (hdr->msgh_id != 2401)
     return -1;
 
@@ -616,8 +612,8 @@ darwin_decode_exception_message (mach_msg_header_t *hdr,
     return -1;
   *pthread = thread;
 
-  /* The thread should be running.  However we have observed cases where a thread
-     got a SIGTTIN message after being stopped.  */
+  /* The thread should be running.  However we have observed cases where a
+     thread got a SIGTTIN message after being stopped.  */
   gdb_assert (thread->msg_state != DARWIN_MESSAGE);
 
   /* Finish decoding.  */
@@ -644,9 +640,10 @@ darwin_encode_reply (mig_reply_error_t *reply, mach_msg_header_t *hdr,
 		     integer_t code)
 {
   mach_msg_header_t *rh = &reply->Head;
-  rh->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(hdr->msgh_bits), 0);
+
+  rh->msgh_bits = MACH_MSGH_BITS (MACH_MSGH_BITS_REMOTE (hdr->msgh_bits), 0);
   rh->msgh_remote_port = hdr->msgh_remote_port;
-  rh->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t);
+  rh->msgh_size = (mach_msg_size_t) sizeof (mig_reply_error_t);
   rh->msgh_local_port = MACH_PORT_NULL;
   rh->msgh_id = hdr->msgh_id + 100;
 
@@ -1137,7 +1134,7 @@ darwin_wait (ptid_t ptid, struct target_waitstatus *status)
 }
 
 static ptid_t
-darwin_wait_to (struct target_ops *ops, 
+darwin_wait_to (struct target_ops *ops,
                 ptid_t ptid, struct target_waitstatus *status, int options)
 {
   return darwin_wait (ptid, status);
@@ -1325,7 +1322,7 @@ darwin_kill_inferior (struct target_ops *ops)
   if (res == 0)
     {
       darwin_resume_inferior (inf);
-	  
+
       ptid = darwin_wait (inferior_ptid, &wstatus);
     }
   else if (errno != ESRCH)
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 8f0dd55..7323970 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -1099,6 +1099,12 @@ svr4_copy_library_list (struct so_list *src)
       new->lm_info = xmalloc (sizeof (struct lm_info));
       memcpy (new->lm_info, src->lm_info, sizeof (struct lm_info));
 
+      if (new->build_id != NULL)
+	{
+	  new->build_id = xmalloc (new->build_idsz);
+	  memcpy (new->build_id, src->build_id, new->build_idsz);
+	}
+
       new->next = NULL;
       *link = new;
       link = &new->next;
diff --git a/gdb/solib.c b/gdb/solib.c
index c8bbe01..3f03050 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -479,28 +479,21 @@ solib_map_sections (struct so_list *so)
   so->abfd = ops->bfd_open (filename);
   do_cleanups (old_chain);
 
+  gdb_assert (ops->validate != NULL);
+  ops->validate (so);
+
+  if (so->abfd == NULL)
+    return 0;
+
   /* Copy the full path name into so_name, allowing symbol_file_add
      to find it later.  This also affects the =library-loaded GDB/MI
      event, and in particular the part of that notification providing
      the library's host-side path.  If we let the target dictate
      that objfile's path, and the target is different from the host,
      GDB/MI will not provide the correct host-side path.  */
-  if (so->abfd != NULL)
-    {
-      if (strlen (bfd_get_filename (so->abfd)) >= SO_NAME_MAX_PATH_SIZE)
-	error (_("Shared library file name is too long."));
-      strcpy (so->so_name, bfd_get_filename (so->abfd));
-    }
-
-  /* SO_NAME should be already initialized here as VALIDATE may load
-     a different file for it.  */
-
-  gdb_assert (ops->validate != NULL);
-
-  ops->validate (so);
-
-  if (so->abfd == NULL)
-    return 0;
+  if (strlen (bfd_get_filename (so->abfd)) >= SO_NAME_MAX_PATH_SIZE)
+    error (_("Shared library file name is too long."));
+  strcpy (so->so_name, bfd_get_filename (so->abfd));
 
   if (build_section_table (so->abfd, &so->sections, &so->sections_end))
     {
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 3581132..88ba2a3 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2014-03-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.base/gdb-sigterm.exp (do_test): Remove "set debug lin-lwp 1".
+
 2014-03-22  Doug Evans  <xdje42@gmail.com>
 
 	* gdb.python/python.exp (python not supported): Verify multi-line
diff --git a/gdb/testsuite/gdb.base/gdb-sigterm.exp b/gdb/testsuite/gdb.base/gdb-sigterm.exp
index b57680d..f52517c 100644
--- a/gdb/testsuite/gdb.base/gdb-sigterm.exp
+++ b/gdb/testsuite/gdb.base/gdb-sigterm.exp
@@ -36,7 +36,6 @@ proc do_test { pass } {
 
     gdb_test_no_output "set range-stepping off" ""
     gdb_test_no_output "set debug infrun 1" ""
-    gdb_test_no_output "set debug lin-lwp 1" ""
 
     set test "run a bit #$pass"
     set abort 1
diff --git a/gdb/testsuite/gdb.base/solib-mismatch.exp b/gdb/testsuite/gdb.base/solib-mismatch.exp
index e53abce..57d78fc 100644
--- a/gdb/testsuite/gdb.base/solib-mismatch.exp
+++ b/gdb/testsuite/gdb.base/solib-mismatch.exp
@@ -166,6 +166,8 @@ with_test_prefix "test --only-keep-debug" {
 }
 
 # Test locating file by its build-id - if the regular filename does not match.
+# build-id file has to be a symlink - otherwise so_list->so_name shown in 'info
+# sharedlibrary' would contain the build-id hash and not the library name.
 set build_id_debug_relative [build_id_debug_filename_get $binlibfilerun]
 if { ![regexp {^(.*)\.debug$} $build_id_debug_relative trash build_id_relative] } {
     fail "strip debug $build_id_debug_relative"
@@ -173,7 +175,7 @@ if { ![regexp {^(.*)\.debug$} $build_id_debug_relative trash build_id_relative]
 }
 set build_id_filename "${binlibfiledirrun}/$build_id_relative"
 file mkdir [file dirname $build_id_filename]
-file copy $binlibfilerun $build_id_filename
+remote_exec host "ln -sf $binlibfilerun $build_id_filename"
 with_test_prefix "locate non-matching shared library" {
   solib_locate_test "${binlibfilebase}" "Yes"
 }


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


             reply	other threads:[~2014-03-24 19:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-24 19:18 jkratoch [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-05-18 21:05 jkratoch
2014-05-17  6:02 jkratoch
2014-03-24  4:57 jkratoch

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=20140324191822.17222.qmail@sourceware.org \
    --to=jkratoch@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).