diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-05-11 15:05:56 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-05-11 15:05:56 +0000 |
commit | 0090345643feb25a5214871384c4cccf55f2e991 (patch) | |
tree | 29f6fdc68b81754854feea7fb3bd04926d495355 /gdb/breakpoint.c | |
parent | 7feb7d068ae65557ede03c36468ebac61b0939ca (diff) | |
download | gdb-0090345643feb25a5214871384c4cccf55f2e991.zip gdb-0090345643feb25a5214871384c4cccf55f2e991.tar.gz gdb-0090345643feb25a5214871384c4cccf55f2e991.tar.bz2 |
gdb/
Fix internal error on breaking at a multi-locations caller source line.
* breakpoint.c (parse_breakpoint_sals): Set EXPLICIT_PC for the `break'
command with no parameters.
gdb/testsuite/
* gdb.cp/expand-sals.exp, gdb.cp/expand-sals.cc: New.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index e832596..d403f36 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -5494,6 +5494,14 @@ parse_breakpoint_sals (char **address, sal.line = default_breakpoint_line; sal.symtab = default_breakpoint_symtab; sal.section = find_pc_overlay (sal.pc); + + /* "break" without arguments is equivalent to "break *PC" where PC is + the default_breakpoint_address. So make sure to set + sal.explicit_pc to prevent GDB from trying to expand the list of + sals to include all other instances with the same symtab and line. + */ + sal.explicit_pc = 1; + sals->sals[0] = sal; sals->nelts = 1; } |