aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-05-11 12:44:34 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-05-11 12:44:34 +0000
commit1aafd4da217bfefde7152bd8b99ee4a6a590aee0 (patch)
treea8ccad14f936c48b0a72b17a24ab8cca9fb45b1a /gdb
parentb4de647686a85b468c90656c71236432b25ccbfd (diff)
downloadfsf-binutils-gdb-1aafd4da217bfefde7152bd8b99ee4a6a590aee0.zip
fsf-binutils-gdb-1aafd4da217bfefde7152bd8b99ee4a6a590aee0.tar.gz
fsf-binutils-gdb-1aafd4da217bfefde7152bd8b99ee4a6a590aee0.tar.bz2
* breakpoint.c (single_step_breakpoint_inserted_here_p): New function.
(breakpoint_inserted_here_p): Call it. (software_breakpoint_inserted_here_p): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/breakpoint.c27
2 files changed, 33 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 16d9c48..fa244ec 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2007-05-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * breakpoint.c (single_step_breakpoint_inserted_here_p): New function.
+ (breakpoint_inserted_here_p): Call it.
+ (software_breakpoint_inserted_here_p): Likewise.
+
2007-05-10 Ulrich Weigand <uweigand@de.ibm.com>
* inf-ptrace.c (inf_ptrace_register_u_offset): Adapt parameter list.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 23b5f1d..176a17c 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -202,6 +202,8 @@ static void tcatch_command (char *arg, int from_tty);
static void ep_skip_leading_whitespace (char **s);
+static int single_step_breakpoint_inserted_here_p (CORE_ADDR pc);
+
/* Prototypes for exported functions. */
/* If FALSE, gdb will not use hardware support for watchpoints, even
@@ -1841,6 +1843,10 @@ breakpoint_inserted_here_p (CORE_ADDR pc)
}
}
+ /* Also check for software single-step breakpoints. */
+ if (single_step_breakpoint_inserted_here_p (pc))
+ return 1;
+
return 0;
}
@@ -1872,6 +1878,10 @@ software_breakpoint_inserted_here_p (CORE_ADDR pc)
}
}
+ /* Also check for software single-step breakpoints. */
+ if (single_step_breakpoint_inserted_here_p (pc))
+ return 1;
+
return 0;
}
@@ -7951,6 +7961,23 @@ remove_single_step_breakpoints (void)
}
}
+/* Check whether a software single-step breakpoint is inserted at PC. */
+
+static int
+single_step_breakpoint_inserted_here_p (CORE_ADDR pc)
+{
+ int i;
+
+ for (i = 0; i < 2; i++)
+ {
+ struct bp_target_info *bp_tgt = single_step_breakpoints[i];
+ if (bp_tgt && bp_tgt->placed_address == pc)
+ return 1;
+ }
+
+ return 0;
+}
+
/* This help string is used for the break, hbreak, tbreak and thbreak commands.
It is defined as a macro to prevent duplication.