public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: jkratoch@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  master: Merge remote branch 'gdb/master'
Date: Thu, 22 Jul 2010 16:26:00 -0000	[thread overview]
Message-ID: <20100722162620.22769.qmail@sourceware.org> (raw)

The branch, master has been updated
       via  189a12568b5adaf27adc793337208a5917245296 (commit)
       via  2b73877481047f917a170b928b48cef2edabf85b (commit)
       via  dbe9ce40460eae15963f7265b2528d72d79c22b7 (commit)
       via  f6733df2c51a1ae1c4079dc48ae6dd465718ee8b (commit)
       via  40eba23c5bec7f8dab7a95d9e45b7dc312025e87 (commit)
       via  87cb721e04a308a8a8ab04e5d85af6b45a2d7cc3 (commit)
       via  3337d42d5e89de6e423ad894e2554d6fe3c4d730 (commit)
       via  73fb0576db6a164b318b462a09968b83e7ca02b3 (commit)
       via  93716b05fbf987e193a8ee7472ca2bd78d1b38fa (commit)
       via  c7730817ca1a50c9dbfcee1455932ffbb3011401 (commit)
       via  09585c444faac3133f5cd039898ebd56582d067e (commit)
       via  33696e5c31fb0a43b309bd7bf1aa4a75b50bdadd (commit)
       via  728ca2a6bf5302172d48dd236a4a9e85968b0e89 (commit)
       via  36c81cbde4cc8d190931b202621951d5f48d9e1e (commit)
       via  be85e670ba2642dca50fd7262b3a1e22fd03267e (commit)
       via  aabf4a046ef1151f220f8293addc51c0a370b6b8 (commit)
      from  6d89063b0f0516a9f0a2a37bc5993500657b3226 (commit)

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

- Log -----------------------------------------------------------------
commit 189a12568b5adaf27adc793337208a5917245296
Merge: 6d89063b0f0516a9f0a2a37bc5993500657b3226 2b73877481047f917a170b928b48cef2edabf85b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Jul 22 18:26:08 2010 +0200

    Merge remote branch 'gdb/master'

commit 2b73877481047f917a170b928b48cef2edabf85b
Author: Tom Tromey <tromey@redhat.com>
Date:   Thu Jul 22 15:53:47 2010 +0000

    	* dwarf2read.c (create_debug_types_hash_table): Set objfile on
    	type signature's per-CU data.

commit dbe9ce40460eae15963f7265b2528d72d79c22b7
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Thu Jul 22 14:48:54 2010 +0000

    	* archive.c (_bfd_archive_bsd44_construct_extended_name_table):
    	Correct format specifier.

commit f6733df2c51a1ae1c4079dc48ae6dd465718ee8b
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Thu Jul 22 14:29:15 2010 +0000

    	* ecoff.c: Don't include aout/ranlib.h.
    	(_bfd_ecoff_slurp_armap): Use correct struct for ardata->symdefs.
    	(_bfd_ecoff_write_armap): Output ar_date and ar_size using
    	_bfd_ar_spacepad.

commit 40eba23c5bec7f8dab7a95d9e45b7dc312025e87
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Thu Jul 22 14:07:09 2010 +0000

    	* aoutx.h (some_aout_object_p): Don't set EXEC_P for files with
    	relocs.

commit 87cb721e04a308a8a8ab04e5d85af6b45a2d7cc3
Author: Pedro Alves <pedro@codesourcery.com>
Date:   Thu Jul 22 10:52:01 2010 +0000

    	* NEWS: Mention target reported shared libraries support by
    	default.

commit 3337d42d5e89de6e423ad894e2554d6fe3c4d730
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Thu Jul 22 00:00:05 2010 +0000

    daily update

commit 73fb0576db6a164b318b462a09968b83e7ca02b3
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Thu Jul 22 00:00:03 2010 +0000

    *** empty log message ***

commit 93716b05fbf987e193a8ee7472ca2bd78d1b38fa
Author: Pedro Alves <pedro@codesourcery.com>
Date:   Wed Jul 21 18:08:26 2010 +0000

    gdb/
    2010-07-21  Pedro Alves  <pedro@codesourcery.com>
    
    	PR symtab/11827
    
    	Revert:
    	2010-05-21  Pierre Muller  <muller@ics.u-strasbg.fr>
    	* dwarf2read.c (process_die): Also allow DW_TAG_const_type
    	and DW_TAG_volatile_type.
    	(new_symbol): Likewise.
    
    gdb/testsuite/
    2010-07-21  Pedro Alves  <pedro@codesourcery.com>
    
    	PR symtab/11827
    
    	* gdb.base/printcmds.c (enum some_volatile_enum): New enum.
    	(some_volatile_enum): New variable.
    	* gdb.base/printcmds.exp (test_print_enums): New.
    	<top level>: Call it.

commit c7730817ca1a50c9dbfcee1455932ffbb3011401
Author: DJ Delorie <dj@delorie.com>
Date:   Wed Jul 21 16:08:00 2010 +0000

    merge from gcc

commit 09585c444faac3133f5cd039898ebd56582d067e
Author: swagiaal <swagiaal>
Date:   Wed Jul 21 14:59:04 2010 +0000

    Corrected pre-overload-resolution function evaluation.
    
    2010-07-21  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* eval.c (evaluate_subexp_standard): Disabled evaluation of C++
    	function symbols before overload resolution.
    
    2010-07-21  Sami Wagiaalla  <swagiaal@redhat.com>
    
    	* gdb.cp/fpointer.cc: New test.
    	* gdb.cp/fpointer.exp: New test.

commit 33696e5c31fb0a43b309bd7bf1aa4a75b50bdadd
Author: Pedro Alves <pedro@codesourcery.com>
Date:   Wed Jul 21 11:25:51 2010 +0000

    	* breakpoint.c (bptype_string): New, abstracted out from
    	print_one_breakpoint_location.
    	(print_one_breakpoint_location): Adjust.
    	(breakpoint_1): Adjust the type column width dynamically.

commit 728ca2a6bf5302172d48dd236a4a9e85968b0e89
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Wed Jul 21 00:00:33 2010 +0000

    *** empty log message ***

commit 36c81cbde4cc8d190931b202621951d5f48d9e1e
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Wed Jul 21 00:00:05 2010 +0000

    daily update

commit be85e670ba2642dca50fd7262b3a1e22fd03267e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Jul 20 22:19:06 2010 +0000

    gdb/
    	* symfile.c (find_separate_debug_file_by_debuglink): Remove
    	a gdb_assert call, new comment.
    
    gdb/testsuite/
    	* gdb.base/solib-nodir.exp: New file.
    	* lib/gdb.exp (runto): New case for a GDB internal error.

commit aabf4a046ef1151f220f8293addc51c0a370b6b8
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Jul 20 22:06:59 2010 +0000

    gdb/testsuite/
    	* gdb.base/charset-malloc.c: New file.
    	* gdb.base/charset.c (malloc_stub): New prototype.
    	(main): Call it instead of malloc itself.
    	* gdb.base/charset.exp: Use only prepare_for_testing.
    	(binfile): Remove the variable.

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

Summary of changes:
 bfd/ChangeLog                           |   17 +++++++++
 bfd/aoutx.h                             |    4 ++-
 bfd/archive.c                           |    2 +-
 bfd/ecoff.c                             |   16 ++++----
 bfd/version.h                           |    2 +-
 gdb/ChangeLog                           |   37 +++++++++++++++++++
 gdb/NEWS                                |    8 ++++
 gdb/breakpoint.c                        |   58 +++++++++++++++++++------------
 gdb/dwarf2read.c                        |    5 +--
 gdb/eval.c                              |   30 +++++++++++-----
 gdb/symfile.c                           |    6 +--
 gdb/testsuite/ChangeLog                 |   29 +++++++++++++++
 gdb/testsuite/gdb.base/charset-malloc.c |   35 ++++++++++++++++++
 gdb/testsuite/gdb.base/charset.c        |    6 ++--
 gdb/testsuite/gdb.base/charset.exp      |   11 +-----
 gdb/testsuite/gdb.base/printcmds.c      |    6 +++
 gdb/testsuite/gdb.base/printcmds.exp    |    6 +++
 gdb/testsuite/gdb.base/solib-nodir.exp  |   54 ++++++++++++++++++++++++++++
 gdb/testsuite/gdb.cp/fpointer.cc        |   40 +++++++++++++++++++++
 gdb/testsuite/gdb.cp/fpointer.exp       |   40 +++++++++++++++++++++
 gdb/testsuite/lib/gdb.exp               |    5 +++
 gdb/version.in                          |    2 +-
 libiberty/ChangeLog                     |    4 ++
 libiberty/make-temp-file.c              |    7 +++-
 24 files changed, 365 insertions(+), 65 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/charset-malloc.c
 create mode 100644 gdb/testsuite/gdb.base/solib-nodir.exp
 create mode 100644 gdb/testsuite/gdb.cp/fpointer.cc
 create mode 100644 gdb/testsuite/gdb.cp/fpointer.exp

First 500 lines of diff:
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index aa36284..cdbf3a0 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,20 @@
+2010-07-23  Alan Modra  <amodra@gmail.com>
+
+	* archive.c (_bfd_archive_bsd44_construct_extended_name_table):
+	Correct format specifier.
+
+2010-07-22  Alan Modra  <amodra@gmail.com>
+
+	* ecoff.c: Don't include aout/ranlib.h.
+	(_bfd_ecoff_slurp_armap): Use correct struct for ardata->symdefs.
+	(_bfd_ecoff_write_armap): Output ar_date and ar_size using
+	_bfd_ar_spacepad.
+
+2010-07-22  Alan Modra  <amodra@gmail.com>
+
+	* aoutx.h (some_aout_object_p): Don't set EXEC_P for files with
+	relocs.
+
 2010-07-20  Alan Modra  <amodra@gmail.com>
 
 	* elf.c (assign_file_positions_for_load_sections): Check that
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index c3366b6..c632722 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -629,7 +629,9 @@ NAME (aout, some_aout_object_p) (bfd *abfd,
   if (execp->a_entry != 0
       || (execp->a_entry >= obj_textsec (abfd)->vma
 	  && execp->a_entry < (obj_textsec (abfd)->vma
-			       + obj_textsec (abfd)->size)))
+			       + obj_textsec (abfd)->size)
+	  && execp->a_trsize == 0
+	  && execp->a_drsize == 0))
     abfd->flags |= EXEC_P;
 #ifdef STAT_FOR_EXEC
   else
diff --git a/bfd/archive.c b/bfd/archive.c
index fbe555b..1b3f692 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -1649,7 +1649,7 @@ _bfd_archive_bsd44_construct_extended_name_table (bfd *abfd,
 
           len = (len + 3) & ~3;
           arch_eltdata (current)->extra_size = len;
-          _bfd_ar_spacepad (hdr->ar_name, maxname, "#1/%u", len);
+          _bfd_ar_spacepad (hdr->ar_name, maxname, "#1/%lu", len);
 	}
     }
 
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index ecfc34e..af9d7d6 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -27,7 +27,6 @@
 #include "bfdlink.h"
 #include "libbfd.h"
 #include "aout/ar.h"
-#include "aout/ranlib.h"
 #include "aout/stab_gnu.h"
 
 /* FIXME: We need the definitions of N_SET[ADTB], but aout64.h defines
@@ -2855,7 +2854,7 @@ _bfd_ecoff_slurp_armap (bfd *abfd)
   struct artdata *ardata;
   unsigned int count;
   char *raw_ptr;
-  struct symdef *symdef_ptr;
+  carsym *symdef_ptr;
   char *stringbase;
   bfd_size_type amt;
 
@@ -2975,12 +2974,12 @@ _bfd_ecoff_slurp_armap (bfd *abfd)
       ++ardata->symdef_count;
 
   amt = ardata->symdef_count;
-  amt *= sizeof (struct symdef);
-  symdef_ptr = (struct symdef *) bfd_alloc (abfd, amt);
+  amt *= sizeof (carsym);
+  symdef_ptr = (carsym *) bfd_alloc (abfd, amt);
   if (!symdef_ptr)
     return FALSE;
 
-  ardata->symdefs = (carsym *) symdef_ptr;
+  ardata->symdefs = symdef_ptr;
 
   raw_ptr = raw_armap + 4;
   for (i = 0; i < count; i++, raw_ptr += 8)
@@ -2991,7 +2990,7 @@ _bfd_ecoff_slurp_armap (bfd *abfd)
       if (file_offset == 0)
 	continue;
       name_offset = H_GET_32 (abfd, raw_ptr);
-      symdef_ptr->s.name = stringbase + name_offset;
+      symdef_ptr->name = stringbase + name_offset;
       symdef_ptr->file_offset = file_offset;
       ++symdef_ptr;
     }
@@ -3063,7 +3062,8 @@ _bfd_ecoff_write_armap (bfd *abfd,
      linker just checks the archive name; the GNU linker may check the
      date.  */
   stat (abfd->filename, &statbuf);
-  sprintf (hdr.ar_date, "%ld", (long) (statbuf.st_mtime + 60));
+  _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld",
+		    (long) (statbuf.st_mtime + 60));
 
   /* The DECstation uses zeroes for the uid, gid and mode of the
      armap.  */
@@ -3074,7 +3074,7 @@ _bfd_ecoff_write_armap (bfd *abfd,
   hdr.ar_mode[1] = '4';
   hdr.ar_mode[2] = '4';
 
-  sprintf (hdr.ar_size, "%-10d", (int) mapsize);
+  _bfd_ar_spacepad (hdr.ar_size, sizeof (hdr.ar_size), "%-10ld", mapsize);
 
   hdr.ar_fmag[0] = '`';
   hdr.ar_fmag[1] = '\012';
diff --git a/bfd/version.h b/bfd/version.h
index 56f599f..4560f53 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20100720
+#define BFD_VERSION_DATE 20100722
 #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 042d5f5..861f5b8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,40 @@
+2010-07-22  Tom Tromey  <tromey@redhat.com>
+
+	* dwarf2read.c (create_debug_types_hash_table): Set objfile on
+	type signature's per-CU data.
+
+2010-07-22  Pedro Alves  <pedro@codesourcery.com>
+
+	* NEWS: Mention target reported shared libraries support by
+	default.
+
+2010-07-21  Pedro Alves  <pedro@codesourcery.com>
+
+	PR symtab/11827
+
+	Revert:
+	2010-05-21  Pierre Muller  <muller@ics.u-strasbg.fr>
+	* dwarf2read.c (process_die): Also allow DW_TAG_const_type
+	and DW_TAG_volatile_type.
+	(new_symbol): Likewise.
+
+2010-07-21  Sami Wagiaalla  <swagiaal@redhat.com>
+
+	* eval.c (evaluate_subexp_standard): Disabled evaluation of C++
+	function symbols before overload resolution.
+
+2010-07-21  Pedro Alves  <pedro@codesourcery.com>
+
+	* breakpoint.c (bptype_string): New, abstracted out from
+	print_one_breakpoint_location.
+	(print_one_breakpoint_location): Adjust.
+	(breakpoint_1): Adjust the type column width dynamically.
+
+2010-07-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* symfile.c (find_separate_debug_file_by_debuglink): Remove
+	a gdb_assert call, new comment.
+
 2010-07-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	* linux-nat.c (linux_handle_extended_wait): Handle case when
diff --git a/gdb/NEWS b/gdb/NEWS
index ea3b6b0..47f1c13 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -5,6 +5,14 @@
 
 *** Changes in GDB 7.2
 
+* Shared library support for remote targets by default
+
+  When GDB is configured for a generic, non-OS specific target, like
+  for example, --target=arm-eabi or one of the many *-*-elf targets,
+  GDB now queries remote stubs for loaded shared libraries using the
+  `qXfer:libraries:read' packet.  Previously, shared library support
+  was always disabled for such configurations.
+
 * C++ Improvements:
 
   ** Argument Dependent Lookup (ADL)
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index a9be450..b53b515 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4433,16 +4433,9 @@ static void print_breakpoint_location (struct breakpoint *b,
   do_cleanups (old_chain);
 }
 
-/* Print B to gdb_stdout. */
-static void
-print_one_breakpoint_location (struct breakpoint *b,
-			       struct bp_location *loc,
-			       int loc_number,
-			       struct bp_location **last_loc,
-			       int print_address_bits,
-			       int allflag)
+static const char *
+bptype_string (enum bptype type)
 {
-  struct command_line *l;
   struct ep_type_description
     {
       enum bptype type;
@@ -4476,7 +4469,27 @@ print_one_breakpoint_location (struct breakpoint *b,
     {bp_static_tracepoint, "static tracepoint"},
     {bp_jit_event, "jit events"},
   };
-  
+
+  if (((int) type >= (sizeof (bptypes) / sizeof (bptypes[0])))
+      || ((int) type != bptypes[(int) type].type))
+    internal_error (__FILE__, __LINE__,
+		    _("bptypes table does not describe type #%d."),
+		    (int) type);
+
+  return bptypes[(int) type].description;
+}
+
+/* Print B to gdb_stdout.  */
+
+static void
+print_one_breakpoint_location (struct breakpoint *b,
+			       struct bp_location *loc,
+			       int loc_number,
+			       struct bp_location **last_loc,
+			       int print_address_bits,
+			       int allflag)
+{
+  struct command_line *l;
   static char bpenables[] = "nynny";
   char wrap_indent[80];
   struct ui_stream *stb = ui_out_stream_new (uiout);
@@ -4521,15 +4534,8 @@ print_one_breakpoint_location (struct breakpoint *b,
   annotate_field (1);
   if (part_of_multiple)
     ui_out_field_skip (uiout, "type");
-  else 
-    {
-      if (((int) b->type >= (sizeof (bptypes) / sizeof (bptypes[0])))
-	  || ((int) b->type != bptypes[(int) b->type].type))
-	internal_error (__FILE__, __LINE__,
-			_("bptypes table does not describe type #%d."),
-			(int) b->type);
-      ui_out_field_string (uiout, "type", bptypes[(int) b->type].description);
-    }
+  else
+    ui_out_field_string (uiout, "type", bptype_string (b->type));
 
   /* 3 */
   annotate_field (2);
@@ -4907,7 +4913,8 @@ breakpoint_1 (int bnum, int allflag, int (*filter) (const struct breakpoint *))
   struct cleanup *bkpttbl_chain;
   struct value_print_options opts;
   int print_address_bits = 0;
-  
+  int print_type_col_width = 14;
+
   get_user_print_options (&opts);
 
   /* Compute the number of rows in the table, as well as the
@@ -4923,10 +4930,16 @@ breakpoint_1 (int bnum, int allflag, int (*filter) (const struct breakpoint *))
 	
 	if (allflag || user_settable_breakpoint (b))
 	  {
-	    int addr_bit = breakpoint_address_bits (b);
+	    int addr_bit, type_len;
+
+	    addr_bit = breakpoint_address_bits (b);
 	    if (addr_bit > print_address_bits)
 	      print_address_bits = addr_bit;
 
+	    type_len = strlen (bptype_string (b->type));
+	    if (type_len > print_type_col_width)
+	      print_type_col_width = type_len;
+
 	    nr_printable_breakpoints++;
 	  }
       }
@@ -4947,7 +4960,8 @@ breakpoint_1 (int bnum, int allflag, int (*filter) (const struct breakpoint *))
   ui_out_table_header (uiout, 7, ui_left, "number", "Num");		/* 1 */
   if (nr_printable_breakpoints > 0)
     annotate_field (1);
-  ui_out_table_header (uiout, 14, ui_left, "type", "Type");		/* 2 */
+  ui_out_table_header (uiout, print_type_col_width, ui_left,
+		       "type", "Type");		/* 2 */
   if (nr_printable_breakpoints > 0)
     annotate_field (2);
   ui_out_table_header (uiout, 4, ui_left, "disp", "Disp");		/* 3 */
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 288d777..3a24e9f 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -2678,6 +2678,7 @@ create_debug_types_hash_table (struct objfile *objfile)
       type_sig->signature = signature;
       type_sig->offset = offset;
       type_sig->type_offset = type_offset;
+      type_sig->per_cu.objfile = objfile;
 
       slot = htab_find_slot (types_htab, type_sig, INSERT);
       gdb_assert (slot != NULL);
@@ -4192,8 +4193,6 @@ process_die (struct die_info *die, struct dwarf2_cu *cu)
     case DW_TAG_base_type:
     case DW_TAG_subrange_type:
     case DW_TAG_typedef:
-    case DW_TAG_const_type:
-    case DW_TAG_volatile_type:
       /* Add a typedef symbol for the type definition, if it has a
          DW_AT_name.  */
       new_symbol (die, read_type_die (die, cu), cu);
@@ -10001,8 +10000,6 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu)
 	  break;
 	case DW_TAG_base_type:
         case DW_TAG_subrange_type:
-        case DW_TAG_const_type:
-        case DW_TAG_volatile_type:
 	  SYMBOL_CLASS (sym) = LOC_TYPEDEF;
 	  SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
 	  add_symbol_to_list (sym, cu->list_in_scope);
diff --git a/gdb/eval.c b/gdb/eval.c
index ff17c34..2694781 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -1570,19 +1570,29 @@ evaluate_subexp_standard (struct type *expect_type,
 	{
 	  /* Non-method function call */
 	  save_pos1 = *pos;
-	  argvec[0] = evaluate_subexp_with_coercion (exp, pos, noside);
 	  tem = 1;
-	  type = value_type (argvec[0]);
-	  if (type && TYPE_CODE (type) == TYPE_CODE_PTR)
-	    type = TYPE_TARGET_TYPE (type);
-	  if (type && TYPE_CODE (type) == TYPE_CODE_FUNC)
+
+	  /* If this is a C++ function wait until overload resolution.  */
+	  if (op == OP_VAR_VALUE
+	      && overload_resolution
+	      && (exp->language_defn->la_language == language_cplus))
 	    {
-	      for (; tem <= nargs && tem <= TYPE_NFIELDS (type); tem++)
+	      (*pos) += 4; /* Skip the evaluation of the symbol.  */
+	      argvec[0] = NULL;
+	    }
+	  else
+	    {
+	      argvec[0] = evaluate_subexp_with_coercion (exp, pos, noside);
+	      type = value_type (argvec[0]);
+	      if (type && TYPE_CODE (type) == TYPE_CODE_PTR)
+		type = TYPE_TARGET_TYPE (type);
+	      if (type && TYPE_CODE (type) == TYPE_CODE_FUNC)
 		{
-		  /* pai: FIXME This seems to be coercing arguments before
-		   * overload resolution has been done! */
-		  argvec[tem] = evaluate_subexp (TYPE_FIELD_TYPE (type, tem - 1),
-						 exp, pos, noside);
+		  for (; tem <= nargs && tem <= TYPE_NFIELDS (type); tem++)
+		    {
+		      argvec[tem] = evaluate_subexp (TYPE_FIELD_TYPE (type, tem - 1),
+						     exp, pos, noside);
+		    }
 		}
 	    }
 	}
diff --git a/gdb/symfile.c b/gdb/symfile.c
index babe9cf..371db0d 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1374,15 +1374,13 @@ find_separate_debug_file_by_debuglink (struct objfile *objfile)
   dir = xstrdup (objfile->name);
 
   /* Strip off the final filename part, leaving the directory name,
-     followed by a slash.  Objfile names should always be absolute and
-     tilde-expanded, so there should always be a slash in there
-     somewhere.  */
+     followed by a slash.  The directory can be relative or absolute.  */
   for (i = strlen(dir) - 1; i >= 0; i--)
     {
       if (IS_DIR_SEPARATOR (dir[i]))
 	break;
     }
-  gdb_assert (i >= 0 && IS_DIR_SEPARATOR (dir[i]));
+  /* If I is -1 then no directory is present there and DIR will be "".  */
   dir[i+1] = '\0';
 
   /* Set I to max (strlen (canon_name), strlen (dir)). */
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index e821f0e..0543f80 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,32 @@
+2010-07-21  Pedro Alves  <pedro@codesourcery.com>
+
+	PR symtab/11827
+
+	* gdb.base/printcmds.c (enum some_volatile_enum): New enum.
+	(some_volatile_enum): New variable.
+	* gdb.base/printcmds.exp (test_print_enums): New.
+	<top level>: Call it.
+
+2010-07-21  Sami Wagiaalla  <swagiaal@redhat.com>
+
+	* gdb.cp/fpointer.cc: New test.
+	* gdb.cp/fpointer.exp: New test.
+
+2010-07-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* gdb.base/solib-nodir.exp: New file.
+	* lib/gdb.exp (runto): New case for a GDB internal error.
+
+2010-07-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+	    Ulrich Weigand  <uweigand@de.ibm.com>
+	    Tom Tromey  <tromey@redhat.com>
+
+	* gdb.base/charset-malloc.c: New file.
+	* gdb.base/charset.c (malloc_stub): New prototype.
+	(main): Call it instead of malloc itself.
+	* gdb.base/charset.exp: Use only prepare_for_testing.
+	(binfile): Remove the variable.
+
 2010-07-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	Make core files the process_stratum.
diff --git a/gdb/testsuite/gdb.base/charset-malloc.c b/gdb/testsuite/gdb.base/charset-malloc.c
new file mode 100644
index 0000000..450b7c8
--- /dev/null
+++ b/gdb/testsuite/gdb.base/charset-malloc.c
@@ -0,0 +1,35 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2010 Free Software Foundation, Inc.
+
+   Contributed by Red Hat, originally written by Jim Blandy.
+
+   This program 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/>.
+
+   Please email any bugs, comments, and/or additions to this file to:
+   bug-gdb@gnu.org  */
+
+/* charset.c file cannot use a system include file as it has its own wchar_t
+   definition which would be in a conflict.  Use this separate compilation
+   unit.  */
+
+#include <stdlib.h>
+
+void
+malloc_stub (void)
+{
+  /* charset.exp wants to allocate memory for constants.  So make sure malloc
+     gets linked into the program.  */
+  malloc (1);
+}
diff --git a/gdb/testsuite/gdb.base/charset.c b/gdb/testsuite/gdb.base/charset.c
index a7d64f2..5dafc90 100644
--- a/gdb/testsuite/gdb.base/charset.c
+++ b/gdb/testsuite/gdb.base/charset.c
@@ -114,6 +114,8 @@ init_utf32 ()
     utf_32_string[i] = iso_8859_1_string[i] & 0xff;
 }
 
+extern void malloc_stub (void);
+
 int main ()
 {
 #ifdef usestubs
@@ -121,9 +123,7 @@ int main ()
   breakpoint();
 #endif
 
-  /* charset.exp wants to allocate memory for constants.  So make sure malloc
-     gets linked into the program.  */
-  malloc (1);
+  malloc_stub ();
 
   /* Initialize ascii_string.  */
   init_string (ascii_string,
diff --git a/gdb/testsuite/gdb.base/charset.exp b/gdb/testsuite/gdb.base/charset.exp
index 58418be..0639117 100644


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


             reply	other threads:[~2010-07-22 16:26 UTC|newest]

Thread overview: 120+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-22 16:26 jkratoch [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-02-01 19:25 jkratoch
2011-01-29 16:44 jkratoch
2011-01-25 12:53 pmuldoon
2011-01-25  9:10 jkratoch
2011-01-17 13:31 pmuldoon
2011-01-15 11:35 jkratoch
2011-01-14  8:04 jkratoch
2011-01-10 12:00 pmuldoon
2011-01-10  9:10 jkratoch
2011-01-07  5:57 jkratoch
2011-01-06 12:22 pmuldoon
2011-01-04  4:59 jkratoch
2010-12-31 22:30 jkratoch
2010-12-30  7:22 jkratoch
2010-12-22 20:11 swagiaal
2010-12-14 17:13 jkratoch
2010-12-14  8:27 pmuldoon
2010-12-10 17:16 jkratoch
2010-12-08 15:55 pmuldoon
2010-12-06  6:40 jkratoch
2010-12-04  1:03 jkratoch
2010-12-02 15:47 pmuldoon
2010-11-30  0:15 jkratoch
2010-11-28 18:02 jkratoch
2010-11-28  5:41 jkratoch
2010-11-16  5:04 jkratoch
2010-11-12 11:47 pmuldoon
2010-11-11 11:39 pmuldoon
2010-11-10  9:09 pmuldoon
2010-11-08  9:34 pmuldoon
2010-11-07 18:15 jkratoch
2010-10-22 14:28 pmuldoon
2010-10-20 12:48 pmuldoon
2010-10-19 16:01 pmuldoon
2010-10-17 20:27 jkratoch
2010-10-15 17:07 jkratoch
2010-10-14 20:55 jkratoch
2010-10-13 15:06 jkratoch
2010-10-12 16:45 jkratoch
2010-10-11  9:21 jkratoch
2010-10-11  8:47 pmuldoon
2010-10-06  9:00 pmuldoon
2010-09-30  8:56 pmuldoon
2010-09-27  9:48 jkratoch
2010-09-20 12:34 pmuldoon
2010-09-16 20:49 ratmice
2010-09-04 19:59 jkratoch
2010-09-03  7:26 jkratoch
2010-09-02 15:04 jkratoch
2010-09-01 15:29 swagiaal
2010-08-23 13:54 jkratoch
2010-08-20 17:49 jkratoch
2010-08-12 15:19 swagiaal
2010-08-06 15:32 jkratoch
2010-07-29 19:17 swagiaal
2010-07-22 16:57 jkratoch
2010-07-20 18:51 jkratoch
2010-07-09  8:09 jkratoch
2010-06-24  8:55 jkratoch
2010-06-23 20:56 jkratoch
2010-06-17 12:53 jkratoch
2010-06-07  8:14 jkratoch
2010-06-02 19:03 jkratoch
2010-05-28 21:27 jkratoch
2010-05-26 18:36 swagiaal
2010-05-17 18:02 jkratoch
2010-05-17  1:04 jkratoch
2010-05-10 19:30 swagiaal
2010-05-05 14:24 swagiaal
2010-05-03 13:49 jkratoch
2010-05-03  8:48 jkratoch
2010-05-02 23:10 jkratoch
2010-05-02 15:54 jkratoch
2010-04-30  7:11 jkratoch
2010-04-28 11:44 jkratoch
2010-04-25 20:22 jkratoch
2010-04-09 20:37 jkratoch
2010-04-07  1:41 jkratoch
2010-04-05 10:11 jkratoch
2010-04-04 11:58 jkratoch
2010-03-22 23:58 jkratoch
2010-03-20 17:23 jkratoch
2010-03-18 10:01 jkratoch
2010-03-17 18:04 jkratoch
2010-03-12 18:35 jkratoch
2010-03-04 22:28 jkratoch
2010-03-01 22:16 jkratoch
2010-02-26 22:16 jkratoch
2010-02-26 17:50 jkratoch
2010-02-17 16:01 swagiaal
2010-02-13 22:51 jkratoch
2010-02-11 12:51 jkratoch
2010-02-09 19:01 jkratoch
2010-02-08 21:46 jkratoch
2010-02-03  4:38 jkratoch
2010-01-31 17:25 jkratoch
2010-01-28 19:17 swagiaal
2010-01-28 10:56 jkratoch
2010-01-27 19:21 swagiaal
2010-01-27  8:08 jkratoch
2010-01-26 18:58 swagiaal
2010-01-20 21:48 jkratoch
2010-01-15  2:09 jkratoch
2010-01-15  0:52 jkratoch
2010-01-14 22:23 jkratoch
2010-01-13 20:53 jkratoch
2010-01-10 20:47 jkratoch
2010-01-09 10:03 jkratoch
2010-01-09  8:41 jkratoch
2010-01-08 19:16 jkratoch
2009-12-06 17:43 jkratoch
2009-12-03 16:32 jkratoch
2009-11-30 13:59 jkratoch
2009-11-24 21:21 jkratoch
2009-11-21  9:24 jkratoch
2009-11-20 21:06 jkratoch
2009-11-20 15:57 jkratoch
2009-11-17 19:59 jkratoch
2009-11-16  2:22 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=20100722162620.22769.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).