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.
This commit is contained in:
Jan Kratochvil
2009-05-11 15:05:56 +00:00
parent 7feb7d068a
commit 0090345643
5 changed files with 129 additions and 0 deletions

View File

@@ -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;
}