rpms/gdb/devel gdb-6.3-ctorline-20050120.patch, 1.3, 1.4 gdb-6.3-test-dtorfix-20050121.patch, 1.2, 1.3 gdb-6.6-buildid-locate.patch, 1.1, 1.2 gdb.spec, 1.246, 1.247

Jan Kratochvil (jkratoch) fedora-extras-commits at redhat.com
Tue Sep 25 23:15:31 UTC 2007


Author: jkratoch

Update of /cvs/pkgs/rpms/gdb/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28310

Modified Files:
	gdb-6.3-ctorline-20050120.patch 
	gdb-6.3-test-dtorfix-20050121.patch 
	gdb-6.6-buildid-locate.patch gdb.spec 
Log Message:
* Tue Sep 25 2007 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.6-30
- Fix re-setting of the ctors/dtors breakpoints with multiple PCs (BZ 301701).
- Avoid one useless user question in the core files locator (build-id).


gdb-6.3-ctorline-20050120.patch:

Index: gdb-6.3-ctorline-20050120.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-ctorline-20050120.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- gdb-6.3-ctorline-20050120.patch	22 Sep 2007 15:56:10 -0000	1.3
+++ gdb-6.3-ctorline-20050120.patch	25 Sep 2007 23:14:54 -0000	1.4
@@ -29,6 +29,13 @@
 	* breakpoint.c (breakpoint_sals_to_pc): Support more than two returned
 	PC values.
 
+2007-09-25  Jan Kratochvil  <jan.kratochvil at redhat.com>
+
+	* breakpoint.c (breakpoint_sals_to_pc): New parameter ADDR_STRING_P.
+	Expand also *ADDR_STRING_P if multiple PCs were found.
+	(break_command_1, do_captured_breakpoint): Pass also the ADDR_STRING
+	variable to be updated.
+
 Index: gdb-6.5/gdb/mi/mi-cmd-disas.c
 ===================================================================
 --- gdb-6.5.orig/gdb/mi/mi-cmd-disas.c	2006-07-11 01:30:43.000000000 -0300
@@ -472,9 +479,12 @@
 ===================================================================
 --- gdb-6.5.orig/gdb/breakpoint.c	2006-07-11 01:30:53.000000000 -0300
 +++ gdb-6.5/gdb/breakpoint.c	2006-07-11 01:39:20.000000000 -0300
-@@ -5268,10 +5268,44 @@ static void
+@@ -5268,12 +5268,69 @@ static void
+ 
+ static void
  breakpoint_sals_to_pc (struct symtabs_and_lines *sals,
- 		       char *address)
+-		       char *address)
++		       char *address, char ***addr_string_p)
  {    
 -  int i;
 -  for (i = 0; i < sals->nelts; i++)
@@ -498,6 +508,9 @@
 +          struct symtab_and_line *new_sals = 
 +            xmalloc ((sals->nelts + num_pc_values - 1) 
 +                     * sizeof (struct symtab_and_line));
++          char **new_addr_string;
++
++          /* Expand the SALS array.  */
 +          memcpy (new_sals, sals->sals, (i + 1) 
 +                  * sizeof (struct symtab_and_line));
 +	  /* The one returned SALS entry is copied for all the PCs.  */
@@ -513,6 +526,26 @@
 +            {
 +              sals->sals[i + j].pc = pc_list[j];
 +            }
++
++          /* Expand the *ADDR_STRING_P array.  */
++          new_addr_string = xmalloc ((sals->nelts + num_pc_values - 1)
++                                     * sizeof *new_addr_string);
++          memcpy (new_addr_string, *addr_string_p,
++                  (i + 1) * sizeof *new_addr_string);
++          /* The existing *ADDR_STRING_P entry must be deleted for all the
++             multiple PCs as BREAKPOINT_RE_SET currently does not set all the
++             PCs for a sinle line back again.  For NULL values "*0x%x" direct
++             address will be provided by CREATE_BREAKPOINTS.  */
++          xfree ((*addr_string_p)[i]);
++           for (j = 0; j < num_pc_values; ++j)
++             {
++              new_addr_string[i + j] = NULL;
++            }
++          memcpy (&new_addr_string[i + num_pc_values], &(*addr_string_p)[i + 1],
++                  (sals->nelts - (i + num_pc_values)) * sizeof *new_addr_string);
++          xfree (*addr_string_p);
++          *addr_string_p = new_addr_string;
++
 +          incr = num_pc_values;
 +        }
 +
@@ -527,7 +560,7 @@
      {
 +      /* Resolve all line numbers to PC's and verify that the addresses
 +         are ok for the target.  */
-+      breakpoint_sals_to_pc (&sals, addr_start);
++      breakpoint_sals_to_pc (&sals, addr_start, &addr_string);
 +
        /* Make sure that all storage allocated to SALS gets freed.  */
        make_cleanup (xfree, sals.sals);
@@ -544,6 +577,15 @@
    /* Verify that condition can be parsed, before setting any
       breakpoints.  Allocate a separate condition expression for each
       breakpoint. */
+@@ -5665,7 +5688,7 @@ do_captured_breakpoint (struct ui_out *u
+     error (_("Garbage %s following breakpoint address"), address_end);
+ 
+   /* Resolve all line numbers to PC's.  */
+-  breakpoint_sals_to_pc (&sals, args->address);
++  breakpoint_sals_to_pc (&sals, args->address, &addr_string);
+ 
+   /* Verify that conditions can be parsed, before setting any
+      breakpoints.  */
 @@ -5670,14 +5699,16 @@ gdb_breakpoint (char *address, char *con
  void
  resolve_sal_pc (struct symtab_and_line *sal)

gdb-6.3-test-dtorfix-20050121.patch:

Index: gdb-6.3-test-dtorfix-20050121.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.3-test-dtorfix-20050121.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gdb-6.3-test-dtorfix-20050121.patch	22 Sep 2007 15:56:10 -0000	1.2
+++ gdb-6.3-test-dtorfix-20050121.patch	25 Sep 2007 23:14:55 -0000	1.3
@@ -10,6 +10,11 @@
 	* gdb.cp/constructortest.exp, gdb.cp/constructortest.cc: Test also the
 	`$delete' destructor variant.
 
+2007-09-25  Jan Kratochvil <jan.kratochvil at redhat.com>
+
+	* gdb.cp/constructortest.exp: Delete the FIXME workaround of restarting
+	the whole GDB.
+
 --- gdb-6.3/gdb/testsuite/gdb.cp/constructortest.cc.fix	Fri Jan 21 17:06:56 2005
 +++ gdb-6.3/gdb/testsuite/gdb.cp/constructortest.cc	Fri Jan 21 17:05:18 2005
 @@ -0,0 +1,99 @@
@@ -114,7 +119,7 @@
 +}
 --- gdb-6.3/gdb/testsuite/gdb.cp/constructortest.exp.fix	Fri Jan 21 17:07:02 2005
 +++ gdb-6.3/gdb/testsuite/gdb.cp/constructortest.exp	Fri Jan 21 17:05:29 2005
-@@ -0,0 +1,135 @@
+@@ -0,0 +1,127 @@
 +# This testcase is part of GDB, the GNU debugger.
 +
 +# Copyright 2005, 2007 Free Software Foundation, Inc.
@@ -216,10 +221,6 @@
 +
 +# Test now the $delete destructors.
 +
-+# FIXME: Without the full GDB restart we would hit a GDB memory corruption.
-+gdb_exit
-+gdb_start
-+gdb_reinitialize_dir $srcdir/$subdir
 +gdb_load ${binfile}
 +runto_main
 +
@@ -240,10 +241,6 @@
 +# Verify that we can break by line number in a destructor and find
 +# the $delete occurence
 +
-+# FIXME: Without the full GDB restart we would hit a GDB memory corruption.
-+gdb_exit
-+gdb_start
-+gdb_reinitialize_dir $srcdir/$subdir
 +gdb_load ${binfile}
 +runto_main
 +

gdb-6.6-buildid-locate.patch:

Index: gdb-6.6-buildid-locate.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.6-buildid-locate.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gdb-6.6-buildid-locate.patch	28 Aug 2007 14:46:38 -0000	1.1
+++ gdb-6.6-buildid-locate.patch	25 Sep 2007 23:14:55 -0000	1.2
@@ -35,7 +35,7 @@
  
  
  #ifndef O_LARGEFILE
-@@ -253,6 +257,70 @@ add_to_thread_list (bfd *abfd, asection 
+@@ -253,6 +257,63 @@ add_to_thread_list (bfd *abfd, asection 
      inferior_ptid = pid_to_ptid (thread_id);	/* Yes, make it current */
  }
  
@@ -93,30 +93,28 @@
 +
 +  xfree (exec_filename);
 +
-+  if (exec_filename != NULL)
-+    {
-+#ifdef SOLIB_ADD
-+      SOLIB_ADD (NULL, 0, &current_target, auto_solib_add);
-+#else
-+      solib_add (NULL, 0, &current_target, auto_solib_add);
-+#endif
-+    }
++  /* No automatic SOLIB_ADD as the libraries would get read twice.  */
 +}
 +
  /* This routine opens and sets up the core file bfd.  */
  
  static void
-@@ -377,6 +445,10 @@ core_open (char *filename, int from_tty)
-       /* Fetch all registers from core file.  */
-       target_fetch_registers (-1);
- 
-+      /* Find build_id identifiers.  */
+@@ -417,6 +420,15 @@ core_open (char *filename, int from_tty)
+   ontop = !push_target (&core_ops);
+   discard_cleanups (old_chain);
+ 
++  if (ontop)
++    {
++      /* Find the build_id identifiers.  If it gets executed after
++         POST_CREATE_INFERIOR we would clash with asking to discard the already
++         loaded VDSO symbols.  */
 +      if (build_id_core_loads != 0)
 +        build_id_locate_exec (from_tty);
++    }
 +
-       /* Now, set up the frame cache, and print the top of stack.  */
-       flush_cached_frames ();
-       select_frame (get_current_frame ());
+   /* This is done first, before anything has a chance to query the
+      inferior for information such as symbols.  */
+   post_create_inferior (&core_ops, from_tty);
 @@ -662,4 +734,13 @@ _initialize_corelow (void)
  
    if (!coreops_suppress_target)


Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -r1.246 -r1.247
--- gdb.spec	23 Sep 2007 15:42:37 -0000	1.246
+++ gdb.spec	25 Sep 2007 23:14:55 -0000	1.247
@@ -11,7 +11,7 @@
 Version: 6.6
 
 # The release always contains a leading reserved number, start it at 1.
-Release: 29%{?dist}
+Release: 30%{?dist}
 
 License: GPL
 Group: Development/Debuggers
@@ -687,6 +687,10 @@
 # don't include the files in include, they are part of binutils
 
 %changelog
+* Tue Sep 25 2007 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.6-30
+- Fix re-setting of the ctors/dtors breakpoints with multiple PCs (BZ 301701).
+- Avoid one useless user question in the core files locator (build-id).
+
 * Sun Sep 23 2007 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.6-29
 - Fixed the kernel VDSO loading (`warning: no loadable sections found in ...').
 - Fix the testcase for pending signals (from BZ 233852).




More information about the fedora-extras-commits mailing list