gdb: Remove unneeded parameter from set_breakpoint_location_function
authorAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 1 Jul 2019 15:00:52 +0000 (16:00 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 9 Jul 2019 09:31:20 +0000 (10:31 +0100)
commit0ba852ab4126a6eb4be88577d62dc25f2be7f725
tree0ef80118d4c8ea5beace2189699ffb5dd3714334
parentb3a7d1711e4557811865333a0ac96fc16b750869
gdb: Remove unneeded parameter from set_breakpoint_location_function

The explicit_loc parameter in set_breakpoint_location_function is not
useful.  This parameter is set from two possible fields of the
symtab_and_line used to create the breakpoint; the explicit_pc field,
and the explicit_line field.

First, the explicit_line field, this is not currently set for any
breakpoint command, so will never be true.

Next, the explicit_pc field.  This can be true but will never be true
at the same time that the sal->msymbol field is also true - the
sal->msymbol is only ever set in linespec.c:minsym_found, which
doesn't allow for explicitly setting the pc.

The result of this is that if we are setting a breakpoint on an
msymbol that could turn out to be an ifunc, then we will not also have
either an explicit_pc or an explicit_line, this check can therefore be
removed.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* breakpoint.c (set_breakpoint_location_function): Remove
explicit_loc parameter.
(momentary_breakpoint_from_master): Update call to
set_breakpoint_location_function.
(add_location_to_breakpoint): Likewise.
gdb/ChangeLog
gdb/breakpoint.c