aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Guitton <guitton@adacore.com>2009-06-19 15:14:11 +0000
committerJerome Guitton <guitton@adacore.com>2009-06-19 15:14:11 +0000
commit3daf8fe56f9c1c43710fc1b8b9b21fde2a14deae (patch)
tree5708eb1a4e8b97d36316ad3188b706ebb87d1882
parentd46fc8e83803954783e4791a975c78859b3d18de (diff)
downloadgdb-3daf8fe56f9c1c43710fc1b8b9b21fde2a14deae.zip
gdb-3daf8fe56f9c1c43710fc1b8b9b21fde2a14deae.tar.gz
gdb-3daf8fe56f9c1c43710fc1b8b9b21fde2a14deae.tar.bz2
* breakpoint.c (expand_line_sal_maybe): When explicit_line,
skip prologue on each sals. (skip_prologue_sal): Return explicit_line and explicit_pc unmodified.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/breakpoint.c21
2 files changed, 26 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bdad408..ddaaff4 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2009-06-19 Jerome Guitton <guitton@adacore.com>
+
+ * breakpoint.c (expand_line_sal_maybe): When explicit_line,
+ skip prologue on each sals.
+ (skip_prologue_sal): Return explicit_line and explicit_pc
+ unmodified.
+
2009-06-19 Tristan Gingold <gingold@adacore.com>
* darwin-nat.c (_initialize_darwin_inferior): Remove commented-out
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 99909e7..c32ad90 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -207,6 +207,9 @@ static void disable_trace_command (char *, int);
static void trace_pass_command (char *, int);
+static void skip_prologue_sal (struct symtab_and_line *sal);
+
+
/* Flag indicating that a command has proceeded the inferior past the
current breakpoint. */
@@ -5436,6 +5439,15 @@ expand_line_sal_maybe (struct symtab_and_line sal)
}
}
}
+ else
+ {
+ for (i = 0; i < expanded.nelts; ++i)
+ {
+ /* If this SAL corresponds to a breakpoint inserted using a
+ line number, then skip the function prologue if necessary. */
+ skip_prologue_sal (&expanded.sals[i]);
+ }
+ }
if (expanded.nelts <= 1)
@@ -5903,7 +5915,8 @@ set_breakpoint (char *address, char *condition,
/* Adjust SAL to the first instruction past the function prologue.
The end of the prologue is determined using the line table from
- the debugging information.
+ the debugging information. explicit_pc and explicit_line are
+ not modified.
If SAL is already past the prologue, then do nothing. */
@@ -5918,7 +5931,11 @@ skip_prologue_sal (struct symtab_and_line *sal)
start_sal = find_function_start_sal (sym, 1);
if (sal->pc < start_sal.pc)
- *sal = start_sal;
+ {
+ start_sal.explicit_line = sal->explicit_line;
+ start_sal.explicit_pc = sal->explicit_pc;
+ *sal = start_sal;
+ }
}
/* Helper function for break_command_1 and disassemble_command. */