public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: jkratoch@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  archer-jankratochvil-autoload: Merge branch 'pathvec0-1-secmove-misc2-safepath-debug-warn' into pathvec0-1-secmove-misc2-safepath-debug-warn-warnlocal
Date: Sun, 01 Apr 2012 17:33:00 -0000	[thread overview]
Message-ID: <20120401173318.23057.qmail@sourceware.org> (raw)

The branch, archer-jankratochvil-autoload has been updated
       via  26a33de9965b3fa3b16c6a5fdec1ea5b9538504e (commit)
       via  812b235c4fe7e8622133512579101360c92431cd (commit)
       via  5c5ddb886084a0819fca98dafdc614deb19abc79 (commit)
       via  5c19b68b73204aa0fc4bbea8bf70c634d81809d6 (commit)
       via  635cd635f149db7e5ec3317bdd31a8946312deb3 (commit)
       via  1fd4e10d16209f6ee1c5931c45ba2d2c0c15fdce (commit)
       via  92409a40d35834019933b91fd39ba342e6f7b8eb (commit)
       via  db64de4785a5633f587fed8461359cf5a84fa354 (commit)
       via  1bfa2e98d3f389d56e91086ee751f40ad20be7bd (commit)
       via  42a5701801d936963e2dc8601f6263a8a8a893af (commit)
       via  102cfbff26eeb580ec0eb6f3b9dd90b70dd712c4 (commit)
       via  e3df13cdd6d84f7858e6594e5b8b146ab1568430 (commit)
       via  cad742c703445fdd7782f077f72e6dd6c121b2d4 (commit)
       via  998f66804450c2f270ab500612d78e979f096763 (commit)
       via  69d759bfd1cb3f97c5fa9a85d041f0baa0a0875b (commit)
       via  2b6491ab2361656dac2923679dbac83d6c51cbf7 (commit)
       via  7f155a5f25558de0a62eccdca0e4c00fe7c80bc0 (commit)
       via  8833a6a5a2827ef4424ca1beeec744c27df7d54d (commit)
       via  8c9a1670230749d3f3de5d9e2c56fcbea0306a16 (commit)
       via  4726e97059187f1a29000918284d067b17de3cfe (commit)
       via  b82cb396626f6a6c6c7d6a13a0419807da20bbc6 (commit)
       via  9beada4963b071b828a2fb54e41624289cf1e528 (commit)
       via  9d67e99b3b60e9dbdfc317d98863f385c96b8125 (commit)
       via  5ed8a0d1b31edc7d398a71eb0d2ec59897517b7a (commit)
       via  5841f3b2c5eddc10f6a3a1f07a082bf9daea9427 (commit)
       via  34b1f2f971ac17cc3d0b812c8c0017f8696030cb (commit)
       via  a6d3df81c4092878447204579025691aceec9682 (commit)
       via  3167997c2432e8ae4e21f1649bb968ad1c8c853c (commit)
       via  9a02193c10925ff26b4d2ce9f1326e098bb0ae62 (commit)
       via  7a63e9515491f21eaf07301df87d389def20e317 (commit)
       via  8f7c38639511cc0ec0314bbf6d14efaf2ad0bd85 (commit)
       via  bda1bace013cacd05e6c9b6ea5e9a097ec6c1d76 (commit)
       via  64119b65954deb48aabb006a63b2a07b8bad56d4 (commit)
       via  05e84e746af0ab4caabcf2dce10238eca015d6bc (commit)
       via  7ea6ee4a9b3cb896cbf718cb2b8c0f498b8d5801 (commit)
       via  279477758ac575031068f20b1c0938f23cd73cfd (commit)
       via  1f77461ac7709d026de460dc0ab0d2910c90eed3 (commit)
       via  aa4149e524e3107bb10fdc62d433aec5914ca581 (commit)
       via  e9dfdcd982542382219633d65c35e18957313cd1 (commit)
      from  3ddade37ad5dd06bba888c17af42570c1c4236b6 (commit)

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

- Log -----------------------------------------------------------------
commit 26a33de9965b3fa3b16c6a5fdec1ea5b9538504e
Merge: 1bfa2e9 812b235
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:32:56 2012 +0200

    Merge branch 'pathvec0-1-secmove-misc2-safepath-debug-warn' into pathvec0-1-secmove-misc2-safepath-debug-warn-warnlocal

commit 812b235c4fe7e8622133512579101360c92431cd
Merge: 42a5701 5c5ddb8
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:32:56 2012 +0200

    Merge branch 'pathvec0-1-secmove-misc2-safepath-debug' into pathvec0-1-secmove-misc2-safepath-debug-warn

commit 5c5ddb886084a0819fca98dafdc614deb19abc79
Merge: 102cfbf 5c19b68
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:32:52 2012 +0200

    Merge branch 'pathvec0-1-secmove-misc2-safepath' into pathvec0-1-secmove-misc2-safepath-debug
    
    Conflicts:
    	gdb/auto-load.c

commit 5c19b68b73204aa0fc4bbea8bf70c634d81809d6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:32:06 2012 +0200

    .

commit 635cd635f149db7e5ec3317bdd31a8946312deb3
Merge: e3df13c 1fd4e10
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:26:42 2012 +0200

    Merge branch 'pathvec0-1-secmove-misc2' into pathvec0-1-secmove-misc2-safepath

commit 1fd4e10d16209f6ee1c5931c45ba2d2c0c15fdce
Merge: cad742c 92409a4
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:26:41 2012 +0200

    Merge branch 'pathvec0-1-secmove' into pathvec0-1-secmove-misc2

commit 92409a40d35834019933b91fd39ba342e6f7b8eb
Merge: 998f668 db64de4
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:26:41 2012 +0200

    Merge branch 'pathvec0-1' into pathvec0-1-secmove

commit db64de4785a5633f587fed8461359cf5a84fa354
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:26:35 2012 +0200

    .

commit 1bfa2e98d3f389d56e91086ee751f40ad20be7bd
Merge: 8c9a167 42a5701
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:16:38 2012 +0200

    Merge branch 'pathvec0-1-secmove-misc2-safepath-debug-warn' into pathvec0-1-secmove-misc2-safepath-debug-warn-warnlocal

commit 42a5701801d936963e2dc8601f6263a8a8a893af
Merge: 4726e97 102cfbf
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:16:19 2012 +0200

    Merge branch 'pathvec0-1-secmove-misc2-safepath-debug' into pathvec0-1-secmove-misc2-safepath-debug-warn

commit 102cfbff26eeb580ec0eb6f3b9dd90b70dd712c4
Merge: b82cb39 e3df13c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:16:18 2012 +0200

    Merge branch 'pathvec0-1-secmove-misc2-safepath' into pathvec0-1-secmove-misc2-safepath-debug

commit e3df13cdd6d84f7858e6594e5b8b146ab1568430
Merge: 9beada4 cad742c
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:16:18 2012 +0200

    Merge branch 'pathvec0-1-secmove-misc2' into pathvec0-1-secmove-misc2-safepath

commit cad742c703445fdd7782f077f72e6dd6c121b2d4
Merge: 9d67e99 998f668
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:16:18 2012 +0200

    Merge branch 'pathvec0-1-secmove' into pathvec0-1-secmove-misc2

commit 998f66804450c2f270ab500612d78e979f096763
Merge: 5ed8a0d 69d759b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:16:18 2012 +0200

    Merge branch 'pathvec0-1' into pathvec0-1-secmove

commit 69d759bfd1cb3f97c5fa9a85d041f0baa0a0875b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:12:32 2012 +0200

    .

commit 2b6491ab2361656dac2923679dbac83d6c51cbf7
Merge: 8833a6a 7f155a5
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:09:11 2012 +0200

    Merge branch 'pathvec0' into pathvec0-1

commit 7f155a5f25558de0a62eccdca0e4c00fe7c80bc0
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:08:58 2012 +0200

    .

commit 8833a6a5a2827ef4424ca1beeec744c27df7d54d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 19:07:10 2012 +0200

    .

commit 8c9a1670230749d3f3de5d9e2c56fcbea0306a16
Merge: 3ddade3 4726e97
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 17:11:27 2012 +0200

    Merge branch 'secmove-misc2-safepath-debug-warn' into secmove-misc2-safepath-debug-warn-warnlocal

commit 4726e97059187f1a29000918284d067b17de3cfe
Merge: 4099a52 b82cb39
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 17:11:26 2012 +0200

    Merge branch 'secmove-misc2-safepath-debug' into secmove-misc2-safepath-debug-warn

commit b82cb396626f6a6c6c7d6a13a0419807da20bbc6
Merge: c523676 9beada4
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 17:11:26 2012 +0200

    Merge branch 'secmove-misc2-safepath' into secmove-misc2-safepath-debug

commit 9beada4963b071b828a2fb54e41624289cf1e528
Merge: 2c3cee0 9d67e99
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 17:11:26 2012 +0200

    Merge branch 'secmove-misc2' into secmove-misc2-safepath

commit 9d67e99b3b60e9dbdfc317d98863f385c96b8125
Merge: c7441fb 5ed8a0d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 17:11:26 2012 +0200

    Merge branch 'secmove' into secmove-misc2

commit 5ed8a0d1b31edc7d398a71eb0d2ec59897517b7a
Merge: 003cb48 5841f3b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Sun Apr 1 17:11:25 2012 +0200

    Merge remote-tracking branch 'gdb/master' into secmove

commit 5841f3b2c5eddc10f6a3a1f07a082bf9daea9427
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sun Apr 1 04:31:46 2012 +0000

    sim: bfin: throw VEC_ILGAL_I with 32bit insn in group1/group2 slots
    
    Parallel insns can only do one 32bit, then two 16bits.  So if we see
    a 2nd 32bit insn after the first 32bit in a parallel insn, abort.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>

commit 34b1f2f971ac17cc3d0b812c8c0017f8696030cb
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sun Apr 1 04:23:40 2012 +0000

    sim: bfin: simplify field width processing and fix build warnings
    
    This fix the build time warning:
    warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>

commit a6d3df81c4092878447204579025691aceec9682
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sun Apr 1 04:21:03 2012 +0000

    sim: bfin: fix unused bfrom handling for BF535
    
    machs.c: In function 'bfin_model_cpu_init':
    machs.c:1657:1: warning: 'bfrom' may be used uninitialized
    	in this function [-Wuninitialized]
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>

commit 3167997c2432e8ae4e21f1649bb968ad1c8c853c
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sun Apr 1 04:15:30 2012 +0000

    opcodes: bfin: simplify field width processing and fix build warnings
    
    This fix the build time warning:
    warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>

commit 9a02193c10925ff26b4d2ce9f1326e098bb0ae62
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sun Apr 1 02:39:11 2012 +0000

    sim: bfin: fix build warning/style with auxvt_size
    
    Fix warning about mixing decls and code by moving auxvt_size decl
    down to the scope where it is used.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>

commit 7a63e9515491f21eaf07301df87d389def20e317
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Sun Apr 1 00:00:35 2012 +0000

    daily update

commit 8f7c38639511cc0ec0314bbf6d14efaf2ad0bd85
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Sun Apr 1 00:00:33 2012 +0000

    *** empty log message ***

commit bda1bace013cacd05e6c9b6ea5e9a097ec6c1d76
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sat Mar 31 18:48:20 2012 +0000

    sim: bfin: fix typo in BF54x SIC init
    
    The current code triggers a warning:
    dv-bfin_sic.c: In function 'bfin_sic_finish':
    dv-bfin_sic.c:930:41: warning: operation on 'sic-><U78e8>.bf54x.iwr1'
    	may be undefined [-Wsequence-point]
    
    This points out the IWR2 register was not being setup because of a typo.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>

commit 64119b65954deb48aabb006a63b2a07b8bad56d4
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sat Mar 31 18:44:43 2012 +0000

    sim: bfin: include devices.h to fix build warnings
    
    The place where these funcs get defined do not include the header that
    declares their prototypes.  Add that to fix -Wmissing-prototypes:
    
    devices.c:59:1: warning: no previous prototype for 'dv_bfin_mmr_invalid'
    devices.c:66:1: warning: no previous prototype for 'dv_bfin_mmr_require'
    devices.c:99:1: warning: no previous prototype for 'dv_bfin_mmr_check'
    devices.c:159:14: warning: no previous prototype for 'dv_get_bus_num'
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>

commit 05e84e746af0ab4caabcf2dce10238eca015d6bc
Author: Andreas Schwab <schwab@suse.de>
Date:   Sat Mar 31 14:27:31 2012 +0000

    * elf32-m68k.c (elf_m68k_relocate_section): Allow
    R_68K_TLS_LE{8,16,32} for PIE.

commit 7ea6ee4a9b3cb896cbf718cb2b8c0f498b8d5801
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Sat Mar 31 00:00:33 2012 +0000

    *** empty log message ***

commit 279477758ac575031068f20b1c0938f23cd73cfd
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Fri Mar 30 23:00:08 2012 +0000

    daily update

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

Summary of changes:
 bfd/ChangeLog                       |    5 +
 bfd/elf32-m68k.c                    |    2 +-
 bfd/version.h                       |    2 +-
 gdb/ChangeLog                       |    7 ++
 gdb/auto-load.c                     |   30 +++----
 gdb/charset.c                       |    7 +-
 gdb/elfread.c                       |   27 +++---
 gdb/gdb_vecs.h                      |   12 +++
 gdb/gdbserver/ChangeLog             |    9 ++
 gdb/gdbserver/config.in             |    6 +
 gdb/gdbserver/configure             |   24 +++++
 gdb/gdbserver/configure.ac          |    4 +
 gdb/gdbserver/linux-low.c           |   30 ++++++
 gdb/progspace.c                     |    7 +-
 gdb/python/py-value.c               |    3 +-
 gdb/python/python.c                 |   29 ++++--
 gdb/source.c                        |  172 ++++++++++++++--------------------
 gdb/symfile.c                       |   28 ++----
 gdb/testsuite/ChangeLog             |    4 +
 gdb/testsuite/gdb.python/python.exp |    3 +
 gdb/utils.c                         |   88 ++++++++++++++++++
 gdb/version.in                      |    2 +-
 opcodes/ChangeLog                   |    5 +
 opcodes/bfin-dis.c                  |   11 +--
 sim/bfin/ChangeLog                  |   27 ++++++
 sim/bfin/bfin-sim.c                 |   14 +--
 sim/bfin/devices.c                  |    1 +
 sim/bfin/dv-bfin_sic.c              |    2 +-
 sim/bfin/interp.c                   |    4 +-
 sim/bfin/machs.c                    |    2 +-
 30 files changed, 368 insertions(+), 199 deletions(-)

First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8bd12f2..384235e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-31  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* elf32-m68k.c (elf_m68k_relocate_section): Allow
+	R_68K_TLS_LE{8,16,32} for PIE.
+
 2012-03-30  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
 
 	* elf64-s390.c: Fix several comments regarding PLT entry
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 26cec39..91ae2df 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -3948,7 +3948,7 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
 	case R_68K_TLS_LE32:
 	case R_68K_TLS_LE16:
 	case R_68K_TLS_LE8:
-	  if (info->shared)
+	  if (info->shared && !info->pie)
 	    {
 	      (*_bfd_error_handler)
 		(_("%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted "
diff --git a/bfd/version.h b/bfd/version.h
index 3fecf92..8a2c17f 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20120330
+#define BFD_VERSION_DATE 20120401
 #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 f6c7735..118401c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2012-03-30  Tom Tromey  <tromey@redhat.com>
+
+	* python/python.c (gdbpy_decode_line): Move cleanup creation out
+	of TRY_CATCH.  Fix error handling.
+	* python/py-value.c (convert_value_from_python): Move 'old'
+	declaration to innermost scope.
+
 2012-03-29  Joel Brobecker  <brobecker@adacore.com>
 	    Andrey Smirnov  <andrew.smirnov@gmail.com>
 
diff --git a/gdb/auto-load.c b/gdb/auto-load.c
index 8c9dc39..e963c15 100644
--- a/gdb/auto-load.c
+++ b/gdb/auto-load.c
@@ -143,7 +143,8 @@ static VEC (char_ptr) *auto_load_safe_path_vec;
 static void
 auto_load_safe_path_vec_update (void)
 {
-  char *safe_path, *filename_real = NULL, *dir;
+  char *dir;
+  VEC (char_ptr) *dir_vec = NULL;
   int ix;
 
   if (debug_auto_load)
@@ -151,33 +152,26 @@ auto_load_safe_path_vec_update (void)
 			_("auto-load: Updating directories of \"%s\".\n"),
 			auto_load_safe_path);
 
-  for (ix = 0; VEC_iterate (char_ptr, auto_load_safe_path_vec, ix, dir); ++ix)
-    xfree (dir);
-  VEC_free (char_ptr, auto_load_safe_path_vec);
-  auto_load_safe_path_vec = NULL;
+  free_char_ptr_vec (auto_load_safe_path_vec);
 
-  safe_path = alloca (strlen (auto_load_safe_path) + 1);
-  strcpy (safe_path, auto_load_safe_path);
+  auto_load_safe_path_vec = dirnames_to_char_ptr_vec (auto_load_safe_path);
 
-  do
+  /* Apply tilde_expand and gdb_realpath to each AUTO_LOAD_SAFE_PATH_VEC
+     element.  */
+  for (ix = 0; VEC_iterate (char_ptr, auto_load_safe_path_vec, ix, dir); ++ix)
     {
-      char *next_dir, *real_path;
+      char *expanded = tilde_expand (dir);
+      char *real_path = gdb_realpath (expanded);
 
-      next_dir = strchr (safe_path, DIRNAME_SEPARATOR);
-      if (next_dir != NULL)
-	*next_dir++ = 0;
-
-      real_path = gdb_realpath (tilde_expand (safe_path));
-      VEC_safe_push (char_ptr, auto_load_safe_path_vec, real_path);
+      xfree (dir);
+      xfree (expanded);
+      VEC_replace (char_ptr, auto_load_safe_path_vec, ix, real_path);
 
       if (debug_auto_load)
 	fprintf_unfiltered (gdb_stdlog,
 			    _("auto-load: Resolved directory \"%s\".\n"),
 			    real_path);
-
-      safe_path = next_dir;
     }
-  while (safe_path != NULL);
 }
 
 /* "set" command for the auto_load_safe_path configuration variable.  */
diff --git a/gdb/charset.c b/gdb/charset.c
index 4a209a5..89baf46 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -909,11 +909,8 @@ find_charset_names (void)
   if (fail)
     {
       /* Some error occurred, so drop the vector.  */
-      int ix;
-      char *elt;
-      for (ix = 0; VEC_iterate (char_ptr, charsets, ix, elt); ++ix)
-	xfree (elt);
-      VEC_truncate (char_ptr, charsets, 0);
+      free_char_ptr_vec (charsets);
+      charsets = NULL;
     }
   else
     VEC_safe_push (char_ptr, charsets, NULL);
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 9f8a7e8..117e674 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -1123,6 +1123,9 @@ static char *
 build_id_to_debug_filename (struct build_id *build_id)
 {
   char *link, *debugdir, *retval = NULL;
+  VEC (char_ptr) *debugdir_vec;
+  struct cleanup *back_to;
+  int ix;
 
   /* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */
   link = alloca (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
@@ -1131,22 +1134,18 @@ build_id_to_debug_filename (struct build_id *build_id)
   /* Keep backward compatibility so that DEBUG_FILE_DIRECTORY being "" will
      cause "/.build-id/..." lookups.  */
 
-  debugdir = debug_file_directory;
-  do
+  debugdir_vec = dirnames_to_char_ptr_vec (debug_file_directory);
+  back_to = make_cleanup_free_char_ptr_vec (debugdir_vec);
+
+  for (ix = 0; VEC_iterate (char_ptr, debugdir_vec, ix, debugdir); ++ix)
     {
-      char *s, *debugdir_end;
+      size_t debugdir_len = strlen (debugdir);
       gdb_byte *data = build_id->data;
       size_t size = build_id->size;
+      char *s;
 
-      while (*debugdir == DIRNAME_SEPARATOR)
-	debugdir++;
-
-      debugdir_end = strchr (debugdir, DIRNAME_SEPARATOR);
-      if (debugdir_end == NULL)
-	debugdir_end = &debugdir[strlen (debugdir)];
-
-      memcpy (link, debugdir, debugdir_end - debugdir);
-      s = &link[debugdir_end - debugdir];
+      memcpy (link, debugdir, debugdir_len);
+      s = &link[debugdir_len];
       s += sprintf (s, "/.build-id/");
       if (size > 0)
 	{
@@ -1171,11 +1170,9 @@ build_id_to_debug_filename (struct build_id *build_id)
 
       if (retval != NULL)
 	break;
-
-      debugdir = debugdir_end;
     }
-  while (*debugdir != 0);
 
+  do_cleanups (back_to);
   return retval;
 }
 
diff --git a/gdb/gdb_vecs.h b/gdb/gdb_vecs.h
index 04bd711..b9e0b14 100644
--- a/gdb/gdb_vecs.h
+++ b/gdb/gdb_vecs.h
@@ -25,4 +25,16 @@
 
 DEF_VEC_P (char_ptr);
 
+/* From utils.c: */
+
+extern void free_char_ptr_vec (VEC (char_ptr) *char_ptr_vec);
+
+extern struct cleanup *
+  make_cleanup_free_char_ptr_vec (VEC (char_ptr) *char_ptr_vec);
+
+extern void dirnames_to_char_ptr_vec_append (VEC (char_ptr) **vecp,
+					     const char *dirnames);
+
+extern VEC (char_ptr) *dirnames_to_char_ptr_vec (const char *dirnames);
+
 #endif /* GDB_VECS_H */
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 63df5b0..cd53c66 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,12 @@
+2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
+
+	* configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
+	are available.
+	* linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
+	[HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
+	* config.in: Regenerate.
+	* configure: Likewise.
+
 2012-03-29  Pedro Alves  <palves@redhat.com>
 
 	* linux-low.c (regsets_store_inferior_registers) [__sparc__]:
diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in
index 1d61c13..912b6ae 100644
--- a/gdb/gdbserver/config.in
+++ b/gdb/gdbserver/config.in
@@ -49,6 +49,12 @@
 /* Define to 1 if you have the `dladdr' function. */
 #undef HAVE_DLADDR
 
+/* Define to 1 if the system has the type `Elf32_auxv_t'. */
+#undef HAVE_ELF32_AUXV_T
+
+/* Define to 1 if the system has the type `Elf64_auxv_t'. */
+#undef HAVE_ELF64_AUXV_T
+
 /* Define if <sys/procfs.h> has elf_fpregset_t. */
 #undef HAVE_ELF_FPREGSET_T
 
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 2b0aeb8..9a6f6df 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -4474,6 +4474,30 @@ _ACEOF
 fi
 
 
+ac_fn_c_check_type "$LINENO" "Elf32_auxv_t" "ac_cv_type_Elf32_auxv_t" "#include <elf.h>
+
+"
+if test "x$ac_cv_type_Elf32_auxv_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ELF32_AUXV_T 1
+_ACEOF
+
+
+fi
+ac_fn_c_check_type "$LINENO" "Elf64_auxv_t" "ac_cv_type_Elf64_auxv_t" "#include <elf.h>
+
+"
+if test "x$ac_cv_type_Elf64_auxv_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ELF64_AUXV_T 1
+_ACEOF
+
+
+fi
+
+
 
 
 # Check whether --with-pkgversion was given.
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index d2f22bd..9ac4232 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -168,6 +168,10 @@ AC_CHECK_TYPES(socklen_t, [], [],
 #include <sys/socket.h>
 ])
 
+AC_CHECK_TYPES([Elf32_auxv_t, Elf64_auxv_t], [], [],
+#include <elf.h>
+)
+
 ACX_PKGVERSION([GDB])
 ACX_BUGURL([http://www.gnu.org/software/gdb/bugs/])
 AC_DEFINE_UNQUOTED([PKGVERSION], ["$PKGVERSION"], [Additional package description])
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index ab87570..043451d 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -82,6 +82,36 @@
 #endif
 #endif
 
+#ifndef HAVE_ELF32_AUXV_T
+/* Copied from glibc's elf.h.  */
+typedef struct
+{
+  uint32_t a_type;		/* Entry type */
+  union
+    {
+      uint32_t a_val;		/* Integer value */
+      /* We use to have pointer elements added here.  We cannot do that,
+	 though, since it does not work when using 32-bit definitions
+	 on 64-bit platforms and vice versa.  */
+    } a_un;
+} Elf32_auxv_t;
+#endif
+
+#ifndef HAVE_ELF64_AUXV_T
+/* Copied from glibc's elf.h.  */
+typedef struct
+{
+  uint64_t a_type;		/* Entry type */
+  union
+    {
+      uint64_t a_val;		/* Integer value */
+      /* We use to have pointer elements added here.  We cannot do that,
+	 though, since it does not work when using 32-bit definitions
+	 on 64-bit platforms and vice versa.  */
+    } a_un;
+} Elf64_auxv_t;
+#endif
+
 /* ``all_threads'' is keyed by the LWP ID, which we use as the GDB protocol
    representation of the thread ID.
 
diff --git a/gdb/progspace.c b/gdb/progspace.c
index 54531d9..d285e67 100644
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -509,13 +509,8 @@ switch_to_program_space_and_thread (struct program_space *pspace)
 void
 clear_program_space_solib_cache (struct program_space *pspace)
 {
-  int ix;
-  char *name;
-
   VEC_free (so_list_ptr, pspace->added_solibs);
-  for (ix = 0; VEC_iterate (char_ptr, pspace->deleted_solibs, ix, name); ++ix)
-    xfree (name);
-  VEC_free (char_ptr, pspace->deleted_solibs);
+  free_char_ptr_vec (pspace->deleted_solibs);
 }
 
 \f
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 58513d8..6f67bdb 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -1250,7 +1250,6 @@ struct value *
 convert_value_from_python (PyObject *obj)
 {
   struct value *value = NULL; /* -Wall */
-  struct cleanup *old;
   volatile struct gdb_exception except;
   int cmp;
 
@@ -1319,6 +1318,8 @@ convert_value_from_python (PyObject *obj)
 	  s = python_string_to_target_string (obj);
 	  if (s != NULL)
 	    {
+	      struct cleanup *old;
+
 	      old = make_cleanup (xfree, s);
 	      value = value_cstring (s, strlen (s), builtin_type_pychar);
 	      do_cleanups (old);
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 735d94d..938275a 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -503,7 +503,7 @@ gdbpy_decode_line (PyObject *self, PyObject *args)
 						  appease gcc.  */
   struct symtab_and_line sal;
   const char *arg = NULL;
-  char *copy = NULL;
+  char *copy_to_free = NULL, *copy = NULL;
   struct cleanup *cleanups;
   PyObject *result = NULL;
   PyObject *return_result = NULL;
@@ -515,14 +515,14 @@ gdbpy_decode_line (PyObject *self, PyObject *args)
 
   cleanups = make_cleanup (null_cleanup, NULL);
 
+  sals.sals = NULL;
   TRY_CATCH (except, RETURN_MASK_ALL)
     {
       if (arg)
 	{
 	  copy = xstrdup (arg);
-	  make_cleanup (xfree, copy);
+	  copy_to_free = copy;
 	  sals = decode_line_1 (&copy, 0, 0, 0);
-	  make_cleanup (xfree, sals.sals);
 	}
       else
 	{
@@ -532,6 +532,13 @@ gdbpy_decode_line (PyObject *self, PyObject *args)
 	  sals.nelts = 1;
 	}
     }
+
+  if (sals.sals != NULL && sals.sals != &sal)
+    {
+      make_cleanup (xfree, copy_to_free);
+      make_cleanup (xfree, sals.sals);
+    }
+
   if (except.reason < 0)
     {
       do_cleanups (cleanups);
@@ -575,7 +582,16 @@ gdbpy_decode_line (PyObject *self, PyObject *args)
     }
 
   if (copy && strlen (copy) > 0)
-    unparsed = PyString_FromString (copy);
+    {
+      unparsed = PyString_FromString (copy);
+      if (unparsed == NULL)
+	{
+	  Py_DECREF (result);
+	  Py_DECREF (return_result);
+	  return_result = NULL;
+	  goto error;
+	}
+    }
   else
     {
       unparsed = Py_None;
@@ -585,13 +601,10 @@ gdbpy_decode_line (PyObject *self, PyObject *args)
   PyTuple_SetItem (return_result, 0, unparsed);
   PyTuple_SetItem (return_result, 1, result);
 
+ error:
   do_cleanups (cleanups);
 
   return return_result;
-
- error:
-  do_cleanups (cleanups);
-  return NULL;
 }
 
 /* Parse a string and evaluate it as an expression.  */
diff --git a/gdb/source.c b/gdb/source.c
index 97f5d46..18eeeac 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -440,62 +440,40 @@ add_path (char *dirname, char **which_path, int parse_separators)
 {
   char *old = *which_path;
   int prefix = 0;
-  char **argv = NULL;
-  char *arg;
-  int argv_index = 0;
+  VEC (char_ptr) *dir_vec = NULL;
+  struct cleanup *back_to;
+  int ix;
+  char *name;
 
   if (dirname == 0)
     return;
 
   if (parse_separators)
     {
+      char **argv, **argvp;
+
       /* This will properly parse the space and tab separators
-	 and any quotes that may exist.  DIRNAME_SEPARATOR will
-	 be dealt with later.  */
+	 and any quotes that may exist.  */
       argv = gdb_buildargv (dirname);
-      make_cleanup_freeargv (argv);
 
-      arg = argv[0];
+      for (argvp = argv; *argvp; argvp++)
+	dirnames_to_char_ptr_vec_append (&dir_vec, *argvp);
+
+      freeargv (argv);
     }
   else
-    {
-      arg = xstrdup (dirname);
-      make_cleanup (xfree, arg);
-    }
+    VEC_safe_push (char_ptr, dir_vec, xstrdup (dirname));
+  back_to = make_cleanup_free_char_ptr_vec (dir_vec);
 
-  do
+  for (ix = 0; VEC_iterate (char_ptr, dir_vec, ix, name); ++ix)
     {
-      char *name = arg;
       char *p;
       struct stat st;
 
-      {


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


             reply	other threads:[~2012-04-01 17:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-01 17:33 jkratoch [this message]
2012-04-01 17:49 jkratoch
2012-04-01 18:29 jkratoch
2012-04-03 17:42 jkratoch
2012-04-04  6:42 jkratoch
2012-04-05 18:35 jkratoch
2012-04-05 20:55 jkratoch
2012-04-05 21:35 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=20120401173318.23057.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).