public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-sergiodj-stap: Using ALL_PSPACE and ALL_PSPACE_OBJFILES to find the probes.
@ 2012-02-28 17:53 sergiodj
  0 siblings, 0 replies; only message in thread
From: sergiodj @ 2012-02-28 17:53 UTC (permalink / raw)
  To: archer-commits

The branch, archer-sergiodj-stap has been updated
       via  1ae6db9968d3a93949e052f0ec9d68cd5a075bc8 (commit)
       via  20c0605d38af378b23547d51e9471e3b2a08db03 (commit)
       via  6defe671d1a7e11e8a7e9b682a2c20e26fb8d4d0 (commit)
       via  45331a69bfe6e5100bc4f3b1d92001ff5b6b4e51 (commit)
       via  5d3a2c8ba77d0d1302f4a24d8c3a608fc0df3a18 (commit)
       via  0819c877d3c463df0dcada25a8bee788e6239ffc (commit)
       via  022a761ce1c0ec0db2c06eb920844d39c7c118d5 (commit)
       via  aa3135fbe1b7939a857516bb13d5970bec9769f4 (commit)
       via  a51012aee12673e6b63c03bc28d25b31d4450193 (commit)
       via  7b4ac7b1e42a577abdd020c8a52a641d60798414 (commit)
       via  6a6978ff4bf308a4360fa8080ab675e7fdee8a02 (commit)
      from  7723a55a19972aa7b152d0e25603f83922874c64 (commit)

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

- Log -----------------------------------------------------------------
commit 1ae6db9968d3a93949e052f0ec9d68cd5a075bc8
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date:   Tue Feb 28 14:52:56 2012 -0300

    Using ALL_PSPACE and ALL_PSPACE_OBJFILES to find the probes.

commit 20c0605d38af378b23547d51e9471e3b2a08db03
Merge: 7723a55 6defe67
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date:   Tue Feb 28 14:52:34 2012 -0300

    Merge remote-tracking branch 'origin/master' into archer-sergiodj-stap

commit 6defe671d1a7e11e8a7e9b682a2c20e26fb8d4d0
Author: Joel Brobecker <brobecker@gnat.com>
Date:   Tue Feb 28 16:30:30 2012 +0000

    Fix ARI violation in ada_tasks_inferior_data_sniffer.
    
    This patch removes some variable assignments inside condition
    expressions.
    
    gdb/ChangeLog:
    
            * ada-tasks.c (ada_tasks_inferior_data_sniffer): Rework code to
            avoid variable assignments inside condition.

commit 45331a69bfe6e5100bc4f3b1d92001ff5b6b4e51
Author: tschwinge <tschwinge>
Date:   Tue Feb 28 10:24:14 2012 +0000

    gdb/testsuite/
            * gdb.base/annota1.c [__sh__]: Remove any special-casing.
            * gdb.base/annota3.c: Likewise.
            * gdb.base/sigall.c: Likewise.
            * gdb.base/signals.c: Likewise.
            * gdb.reverse/sigall-reverse.c: Likewise.

commit 5d3a2c8ba77d0d1302f4a24d8c3a608fc0df3a18
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Tue Feb 28 08:14:05 2012 +0000

    gdb/
    	Fix static analysis issue found by cppcheck.
    	* microblaze-tdep.c (microblaze_extract_return_value): Fix
    	uninitialized BUF for size 2.

commit 0819c877d3c463df0dcada25a8bee788e6239ffc
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Tue Feb 28 00:00:32 2012 +0000

    *** empty log message ***

commit 022a761ce1c0ec0db2c06eb920844d39c7c118d5
Author: Maciej W. Rozycki <macro@linux-mips.org>
Date:   Mon Feb 27 23:05:40 2012 +0000

    	* mips-tdep.c (mips32_instruction_has_delay_slot): New function.
    	(mips16_instruction_has_delay_slot): Likewise.
    	(mips_segment_boundary): Likewise.
    	(mips_adjust_breakpoint_address): Likewise.
    	(mips_gdbarch_init): Use mips_adjust_breakpoint_address.

commit aa3135fbe1b7939a857516bb13d5970bec9769f4
Author: Alan Modra <amodra@bigpond.net.au>
Date:   Mon Feb 27 23:00:04 2012 +0000

    daily update

commit a51012aee12673e6b63c03bc28d25b31d4450193
Author: Maciej W. Rozycki <macro@linux-mips.org>
Date:   Mon Feb 27 21:36:47 2012 +0000

    	* infrun.c (handle_inferior_event): Don't proceed through
    	shared library trampolines if stepping at the machine
    	instruction level.

commit 7b4ac7b1e42a577abdd020c8a52a641d60798414
Author: Maciej W. Rozycki <macro@linux-mips.org>
Date:   Mon Feb 27 21:27:45 2012 +0000

    	* mips-linux-tdep.c (mips_linux_init_abi): Set num_pseudo_regs
    	too.

commit 6a6978ff4bf308a4360fa8080ab675e7fdee8a02
Author: Maciej W. Rozycki <macro@linux-mips.org>
Date:   Mon Feb 27 20:48:25 2012 +0000

    	* gdb.cp/breakpoint.exp (test_breakpoint): Fix the runto_main
    	failure return path.

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

Summary of changes:
 bfd/version.h                              |    2 +-
 gdb/ChangeLog                              |   34 ++++
 gdb/ada-tasks.c                            |   16 +-
 gdb/infrun.c                               |    3 +-
 gdb/microblaze-tdep.c                      |    1 +
 gdb/mips-linux-tdep.c                      |    1 +
 gdb/mips-tdep.c                            |  232 ++++++++++++++++++++++++++++
 gdb/stap-probe.c                           |   66 +++++----
 gdb/testsuite/ChangeLog                    |   13 ++
 gdb/testsuite/gdb.base/annota1.c           |    4 -
 gdb/testsuite/gdb.base/annota3.c           |    4 -
 gdb/testsuite/gdb.base/sigall.c            |    3 -
 gdb/testsuite/gdb.base/signals.c           |    4 -
 gdb/testsuite/gdb.cp/breakpoint.exp        |    2 +-
 gdb/testsuite/gdb.reverse/sigall-reverse.c |    3 -
 gdb/version.in                             |    2 +-
 16 files changed, 331 insertions(+), 59 deletions(-)

First 500 lines of diff:
diff --git a/bfd/version.h b/bfd/version.h
index dcde1f2..4d863c8 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20120227
+#define BFD_VERSION_DATE 20120228
 #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 02c9c42..a4857b8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,37 @@
+2012-02-28  Joel Brobecker  <brobecker@adacore.com>
+
+	From Tristan Gingold  <gingold@adacore.com>.
+	* ada-tasks.c (ada_tasks_inferior_data_sniffer): Rework code to
+	avoid variable assignments inside condition.
+
+2012-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	Fix static analysis issue found by cppcheck.
+	* microblaze-tdep.c (microblaze_extract_return_value): Fix
+	uninitialized BUF for size 2.
+
+2012-02-27  Chris Dearman  <chris@mips.com>
+            Nathan Froyd  <froydnj@codesourcery.com>
+            Maciej W. Rozycki  <macro@codesourcery.com>
+
+	* mips-tdep.c (mips32_instruction_has_delay_slot): New function.
+	(mips16_instruction_has_delay_slot): Likewise.
+	(mips_segment_boundary): Likewise.
+	(mips_adjust_breakpoint_address): Likewise.
+	(mips_gdbarch_init): Use mips_adjust_breakpoint_address.
+
+2012-02-27  Maciej W. Rozycki  <macro@mips.com>
+            Maciej W. Rozycki  <macro@codesourcery.com>
+
+	* infrun.c (handle_inferior_event): Don't proceed through
+	shared library trampolines if stepping at the machine
+	instruction level.
+
+2012-02-27  Maciej W. Rozycki  <macro@codesourcery.com>
+
+	* mips-linux-tdep.c (mips_linux_init_abi): Set num_pseudo_regs
+	too.
+
 2012-02-27  Thomas Schwinge  <thomas@codesourcery.com>
 
 	* sh-tdep.c (sh_make_stub_cache, sh_stub_this_id)
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
index 4c0b667..11ad262 100644
--- a/gdb/ada-tasks.c
+++ b/gdb/ada-tasks.c
@@ -870,13 +870,15 @@ ada_tasks_inferior_data_sniffer (struct ada_tasks_inferior_data *data)
 	{
 	  /* Validate.  */
 	  struct type *type = check_typedef (SYMBOL_TYPE (sym));
-	  struct type *eltype;
-	  struct type *idxtype;
-
-	  if (TYPE_CODE (type) == TYPE_CODE_ARRAY
-	      && (eltype = check_typedef (TYPE_TARGET_TYPE (type)))
-	      && TYPE_CODE (eltype) == TYPE_CODE_PTR
-	      && (idxtype = check_typedef (TYPE_INDEX_TYPE (type)))
+	  struct type *eltype = NULL;
+	  struct type *idxtype = NULL;
+
+	  if (TYPE_CODE (type) == TYPE_CODE_ARRAY)
+	    eltype = check_typedef (TYPE_TARGET_TYPE (type));
+	  if (eltype != NULL
+	      && TYPE_CODE (eltype) == TYPE_CODE_PTR)
+	    idxtype = check_typedef (TYPE_INDEX_TYPE (type));
+	  if (idxtype != NULL
 	      && !TYPE_LOW_BOUND_UNDEFINED (idxtype)
 	      && !TYPE_HIGH_BOUND_UNDEFINED (idxtype))
 	    {
diff --git a/gdb/infrun.c b/gdb/infrun.c
index c158344..c99ad1d 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -5013,7 +5013,8 @@ process_event_stop_test:
   /* If we're in the return path from a shared library trampoline,
      we want to proceed through the trampoline when stepping.  */
   if (gdbarch_in_solib_return_trampoline (gdbarch,
-					  stop_pc, ecs->stop_func_name))
+					  stop_pc, ecs->stop_func_name)
+      && ecs->event_thread->control.step_over_calls != STEP_OVER_NONE)
     {
       /* Determine where this trampoline returns.  */
       CORE_ADDR real_stop_pc;
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index ca6d129..6aea41e 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -562,6 +562,7 @@ microblaze_extract_return_value (struct type *type, struct regcache *regcache,
 	memcpy(valbuf, buf + MICROBLAZE_REGISTER_SIZE - 1, 1);
 	return;
       case 2:	/* return last 2 bytes in register.  */
+	regcache_cooked_read (regcache, MICROBLAZE_RETVAL_REGNUM, buf);
 	memcpy(valbuf, buf + MICROBLAZE_REGISTER_SIZE - 2, 2);
 	return;
       case 4:	/* for sizes 4 or 8, copy the required length.  */
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index c339ec0..6b16995 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -1334,6 +1334,7 @@ mips_linux_init_abi (struct gdbarch_info info,
 	 described or not).  */
       gdb_assert (gdbarch_num_regs (gdbarch) <= MIPS_RESTART_REGNUM);
       set_gdbarch_num_regs (gdbarch, MIPS_RESTART_REGNUM + 1);
+      set_gdbarch_num_pseudo_regs (gdbarch, MIPS_RESTART_REGNUM + 1);
 
       /* If it's present, then assign it to the reserved number.  */
       feature = tdesc_find_feature (info.target_desc,
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index a670cd3..67ead3c 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -5293,6 +5293,236 @@ mips_breakpoint_from_pc (struct gdbarch *gdbarch,
     }
 }
 
+/* Return non-zero if the ADDR instruction has a branch delay slot
+   (i.e. it is a jump or branch instruction).  This function is based
+   on mips32_next_pc.  */
+
+static int
+mips32_instruction_has_delay_slot (struct gdbarch *gdbarch, CORE_ADDR addr)
+{
+  gdb_byte buf[MIPS_INSN32_SIZE];
+  unsigned long inst;
+  int status;
+  int op;
+
+  status = target_read_memory (addr, buf, MIPS_INSN32_SIZE);
+  if (status)
+    return 0;
+
+  inst = mips_fetch_instruction (gdbarch, addr);
+  op = itype_op (inst);
+  if ((inst & 0xe0000000) != 0)
+    return (op >> 2 == 5	/* BEQL, BNEL, BLEZL, BGTZL: bits 0101xx  */
+	    || op == 29		/* JALX: bits 011101  */
+	    || (op == 17 && itype_rs (inst) == 8));
+				/* BC1F, BC1FL, BC1T, BC1TL: 010001 01000  */
+  else
+    switch (op & 0x07)		/* extract bits 28,27,26  */
+      {
+      case 0:			/* SPECIAL  */
+	op = rtype_funct (inst);
+	return (op == 8		/* JR  */
+		|| op == 9);	/* JALR  */
+	break;			/* end SPECIAL  */
+      case 1:			/* REGIMM  */
+	op = itype_rt (inst);	/* branch condition  */
+	return (op & 0xc) == 0;
+				/* BLTZ, BLTZL, BGEZ, BGEZL: bits 000xx  */
+				/* BLTZAL, BLTZALL, BGEZAL, BGEZALL: 100xx  */
+	break;			/* end REGIMM  */
+      default:			/* J, JAL, BEQ, BNE, BLEZ, BGTZ  */
+	return 1;
+	break;
+      }
+}
+
+/* Return non-zero if the ADDR instruction, which must be a 32-bit
+   instruction if MUSTBE32 is set or can be any instruction otherwise,
+   has a branch delay slot (i.e. it is a non-compact jump instruction).  */
+
+static int
+mips16_instruction_has_delay_slot (struct gdbarch *gdbarch, CORE_ADDR addr,
+				   int mustbe32)
+{
+  gdb_byte buf[MIPS_INSN16_SIZE];
+  unsigned short inst;
+  int status;
+
+  status = target_read_memory (addr, buf, MIPS_INSN16_SIZE);
+  if (status)
+    return 0;
+
+  inst = mips_fetch_instruction (gdbarch, addr);
+  if (!mustbe32)
+    return (inst & 0xf89f) == 0xe800;	/* JR/JALR (16-bit instruction)  */
+  return (inst & 0xf800) == 0x1800;	/* JAL/JALX (32-bit instruction)  */
+}
+
+/* Calculate the starting address of the MIPS memory segment BPADDR is in.
+   This assumes KSSEG exists.  */
+
+static CORE_ADDR
+mips_segment_boundary (CORE_ADDR bpaddr)
+{
+  CORE_ADDR mask = CORE_ADDR_MAX;
+  int segsize;
+
+  if (sizeof (CORE_ADDR) == 8)
+    /* Get the topmost two bits of bpaddr in a 32-bit safe manner (avoid
+       a compiler warning produced where CORE_ADDR is a 32-bit type even
+       though in that case this is dead code).  */
+    switch (bpaddr >> ((sizeof (CORE_ADDR) << 3) - 2) & 3)
+      {
+      case 3:
+	if (bpaddr == (bfd_signed_vma) (int32_t) bpaddr)
+	  segsize = 29;			/* 32-bit compatibility segment  */
+	else
+	  segsize = 62;			/* xkseg  */
+	break;
+      case 2:				/* xkphys  */
+	segsize = 59;
+	break;
+      default:				/* xksseg (1), xkuseg/kuseg (0)  */
+	segsize = 62;
+	break;
+      }
+  else if (bpaddr & 0x80000000)		/* kernel segment  */
+    segsize = 29;
+  else
+    segsize = 31;			/* user segment  */
+  mask <<= segsize;
+  return bpaddr & mask;
+}
+
+/* Move the breakpoint at BPADDR out of any branch delay slot by shifting
+   it backwards if necessary.  Return the address of the new location.  */
+
+static CORE_ADDR
+mips_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
+{
+  CORE_ADDR prev_addr, next_addr;
+  CORE_ADDR boundary;
+  CORE_ADDR func_addr;
+
+  /* If a breakpoint is set on the instruction in a branch delay slot,
+     GDB gets confused.  When the breakpoint is hit, the PC isn't on
+     the instruction in the branch delay slot, the PC will point to
+     the branch instruction.  Since the PC doesn't match any known
+     breakpoints, GDB reports a trap exception.
+
+     There are two possible fixes for this problem.
+
+     1) When the breakpoint gets hit, see if the BD bit is set in the
+     Cause register (which indicates the last exception occurred in a
+     branch delay slot).  If the BD bit is set, fix the PC to point to
+     the instruction in the branch delay slot.
+
+     2) When the user sets the breakpoint, don't allow him to set the
+     breakpoint on the instruction in the branch delay slot.  Instead
+     move the breakpoint to the branch instruction (which will have
+     the same result).
+
+     The problem with the first solution is that if the user then
+     single-steps the processor, the branch instruction will get
+     skipped (since GDB thinks the PC is on the instruction in the
+     branch delay slot).
+
+     So, we'll use the second solution.  To do this we need to know if
+     the instruction we're trying to set the breakpoint on is in the
+     branch delay slot.  */
+
+  boundary = mips_segment_boundary (bpaddr);
+
+  /* Make sure we don't scan back before the beginning of the current
+     function, since we may fetch constant data or insns that look like
+     a jump.  Of course we might do that anyway if the compiler has
+     moved constants inline. :-(  */
+  if (find_pc_partial_function (bpaddr, NULL, &func_addr, NULL)
+      && func_addr > boundary && func_addr <= bpaddr)
+    boundary = func_addr;
+
+  if (!mips_pc_is_mips16 (bpaddr))
+    {
+      if (bpaddr == boundary)
+	return bpaddr;
+
+      /* If the previous instruction has a branch delay slot, we have
+         to move the breakpoint to the branch instruction. */
+      prev_addr = bpaddr - 4;
+      if (mips32_instruction_has_delay_slot (gdbarch, prev_addr))
+	bpaddr = prev_addr;
+    }
+  else
+    {
+      struct minimal_symbol *sym;
+      CORE_ADDR addr, jmpaddr;
+      int i;
+
+      boundary = unmake_mips16_addr (boundary);
+
+      /* The only MIPS16 instructions with delay slots are JAL, JALX,
+         JALR and JR.  An absolute JAL/JALX is always 4 bytes long,
+         so try for that first, then try the 2 byte JALR/JR.
+         FIXME: We have to assume that bpaddr is not the second half
+         of an extended instruction.  */
+
+      jmpaddr = 0;
+      addr = bpaddr;
+      for (i = 1; i < 4; i++)
+	{
+	  if (unmake_mips16_addr (addr) == boundary)
+	    break;
+	  addr -= 2;
+	  if (i == 1 && mips16_instruction_has_delay_slot (gdbarch, addr, 0))
+	    /* Looks like a JR/JALR at [target-1], but it could be
+	       the second word of a previous JAL/JALX, so record it
+	       and check back one more.  */
+	    jmpaddr = addr;
+	  else if (i > 1
+		   && mips16_instruction_has_delay_slot (gdbarch, addr, 1))
+	    {
+	      if (i == 2)
+		/* Looks like a JAL/JALX at [target-2], but it could also
+		   be the second word of a previous JAL/JALX, record it,
+		   and check back one more.  */
+		jmpaddr = addr;
+	      else
+		/* Looks like a JAL/JALX at [target-3], so any previously
+		   recorded JAL/JALX or JR/JALR must be wrong, because:
+
+		   >-3: JAL
+		    -2: JAL-ext (can't be JAL/JALX)
+		    -1: bdslot (can't be JR/JALR)
+		     0: target insn
+
+		   Of course it could be another JAL-ext which looks
+		   like a JAL, but in that case we'd have broken out
+		   of this loop at [target-2]:
+
+		    -4: JAL
+		   >-3: JAL-ext
+		    -2: bdslot (can't be jmp)
+		    -1: JR/JALR
+		     0: target insn  */
+		jmpaddr = 0;
+	    }
+	  else
+	    {
+	      /* Not a jump instruction: if we're at [target-1] this
+	         could be the second word of a JAL/JALX, so continue;
+	         otherwise we're done.  */
+	      if (i > 1)
+		break;
+	    }
+	}
+
+      if (jmpaddr)
+	bpaddr = jmpaddr;
+    }
+
+  return bpaddr;
+}
+
 /* If PC is in a mips16 call or return stub, return the address of the target
    PC, which is either the callee or the caller.  There are several
    cases which must be handled:
@@ -6230,6 +6460,8 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
   set_gdbarch_breakpoint_from_pc (gdbarch, mips_breakpoint_from_pc);
+  set_gdbarch_adjust_breakpoint_address (gdbarch,
+					 mips_adjust_breakpoint_address);
 
   set_gdbarch_skip_prologue (gdbarch, mips_skip_prologue);
 
diff --git a/gdb/stap-probe.c b/gdb/stap-probe.c
index eb03d97..4fd1a7f 100644
--- a/gdb/stap-probe.c
+++ b/gdb/stap-probe.c
@@ -1385,6 +1385,7 @@ parse_stap_probe (char **argptr, struct linespec_result *canonical)
   struct cleanup *cleanup;
   struct symtabs_and_lines result;
   struct objfile *objfile;
+  struct program_space *pspace;
 
   result.sals = NULL;
   result.nelts = 0;
@@ -1450,44 +1451,49 @@ parse_stap_probe (char **argptr, struct linespec_result *canonical)
   if (objfile_name && *objfile_name == '\0')
     error (_("invalid objfile name"));
 
-  ALL_OBJFILES (objfile)
-  {
-    struct stap_probe *probes;
-    int i, num_probes;
+  ALL_PSPACES (pspace)
+    {
+      ALL_PSPACE_OBJFILES (pspace, objfile)
+	{
+	  struct stap_probe *probes;
+	  int i, num_probes;
 
-    if (! objfile->sf || ! objfile->sf->sym_probe_fns)
-      continue;
+	  if (! objfile->sf || ! objfile->sf->sym_probe_fns)
+	    continue;
 
-    if (objfile_name
-	&& FILENAME_CMP (objfile->name, objfile_name) != 0
-	&& FILENAME_CMP (lbasename (objfile->name), objfile_name) != 0)
-      continue;
+	  if (objfile_name
+	      && FILENAME_CMP (objfile->name, objfile_name) != 0
+	      && FILENAME_CMP (lbasename (objfile->name), objfile_name) != 0)
+	    continue;
 
-    probes = objfile->sf->sym_probe_fns->sym_get_probes (objfile, &num_probes);
-    for (i = 0; i < num_probes; ++i)
-      {
-	struct symtab_and_line *sal;
+	  probes = objfile->sf->sym_probe_fns->sym_get_probes (objfile,
+							       &num_probes);
+	  for (i = 0; i < num_probes; ++i)
+	    {
+	      struct symtab_and_line *sal;
 
-	if (provider && strcmp (probes[i].provider, provider) != 0)
-	  continue;
+	      if (provider && strcmp (probes[i].provider, provider) != 0)
+		continue;
 
-	if (strcmp (probes[i].name, name) != 0)
-	  continue;
+	      if (strcmp (probes[i].name, name) != 0)
+		continue;
 
-	++result.nelts;
-	result.sals = xrealloc (result.sals,
-				result.nelts * sizeof (struct symtab_and_line));
-	sal = &result.sals[result.nelts - 1];
+	      ++result.nelts;
+	      result.sals = xrealloc (result.sals,
+				      result.nelts
+				      * sizeof (struct symtab_and_line));
+	      sal = &result.sals[result.nelts - 1];
 
-	init_sal (sal);
+	      init_sal (sal);
 
-	sal->pc = probes[i].address;
-	sal->explicit_pc = 1;
-	sal->section = find_pc_overlay (sal->pc);
-	sal->pspace = current_program_space;
-	sal->semaphore = probes[i].sem_addr;
-      }
-  }
+	      sal->pc = probes[i].address;
+	      sal->explicit_pc = 1;
+	      sal->section = find_pc_overlay (sal->pc);
+	      sal->pspace = current_program_space;
+	      sal->semaphore = probes[i].sem_addr;
+	    }
+	}
+    }
 
   if (result.nelts == 0)
     {
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5122d91..ddb9cdc 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,16 @@
+2012-02-28  Thomas Schwinge  <thomas@codesourcery.com>
+
+        * gdb.base/annota1.c [__sh__]: Remove any special-casing.
+        * gdb.base/annota3.c: Likewise.
+        * gdb.base/sigall.c: Likewise.
+        * gdb.base/signals.c: Likewise.
+        * gdb.reverse/sigall-reverse.c: Likewise.
+
+2012-02-27  Maciej W. Rozycki  <macro@codesourcery.com>
+
+	* gdb.cp/breakpoint.exp (test_breakpoint): Fix the runto_main
+	failure return path.
+
 2012-02-27  Luis Machado  <lgustavo@codesourcery.com>
 
 	* gdb.base/save-bp.exp: Account for new condition evaluator output.
diff --git a/gdb/testsuite/gdb.base/annota1.c b/gdb/testsuite/gdb.base/annota1.c
index 6a13ee9..28c9ed1 100644
--- a/gdb/testsuite/gdb.base/annota1.c
+++ b/gdb/testsuite/gdb.base/annota1.c
@@ -1,10 +1,6 @@
 #include <stdio.h>
 #include <signal.h>
 
-#ifdef __sh__
-#define signal(a,b)	/* Signals not supported on this target - make them go away */
-#endif
-
 
 #ifdef PROTOTYPES
 void
diff --git a/gdb/testsuite/gdb.base/annota3.c b/gdb/testsuite/gdb.base/annota3.c
index 6a13ee9..28c9ed1 100644
--- a/gdb/testsuite/gdb.base/annota3.c
+++ b/gdb/testsuite/gdb.base/annota3.c
@@ -1,10 +1,6 @@


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-02-28 17:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-28 17:53 [SCM] archer-sergiodj-stap: Using ALL_PSPACE and ALL_PSPACE_OBJFILES to find the probes sergiodj

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).