This patch, analogous to the previous python patch, implements proper
legacy linespec support in guile code using the newly introduced
string_to_event_location_basic.
gdb/ChangeLog
* guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Skip
leading whitespace and use string_to_event_location_basic instead
of new_linespec_location.
gdb/testsuite/ChangeLog
* gdb.guile/scm-breakpoint.exp (test_bkpt_address): New procedure.
(toplevel): Call test_bkpt_address.
+2016-02-09 Keith Seitz <keiths@redhat.com>
+
+ * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Skip
+ leading whitespace and use string_to_event_location_basic instead
+ of new_linespec_location.
+
2016-02-09 Keith Seitz <keiths@redhat.com>
PR python/19506
pending_breakpoint_scm = self;
location = bp_smob->spec.location;
- copy = location;
- eloc = new_linespec_location (©);
+ copy = skip_spaces (location);
+ eloc = string_to_event_location_basic (©, current_language);
cleanup = make_cleanup_delete_event_location (eloc);
TRY
+2016-02-09 Keith Seitz <keiths@redhat.com>
+
+ * gdb.guile/scm-breakpoint.exp (test_bkpt_address): New procedure.
+ (toplevel): Call test_bkpt_address.
+
2016-02-09 Keith Seitz <keiths@redhat.com>
PR python/19506
}
}
+proc test_bkpt_address {} {
+ global decimal srcfile
+
+ # Leading whitespace is intentional!
+ gdb_scm_test_silent_cmd \
+ "guile (define bp1 (make-breakpoint \" *multiply\"))" \
+ "create address breakpoint a ' *multiply'" 1
+
+ gdb_test "guile (register-breakpoint! bp1)" \
+ ".*Breakpoint ($decimal)+ at .*$srcfile, line ($decimal)+\."
+}
+
test_bkpt_basic
test_bkpt_deletion
test_bkpt_cond_and_cmds
test_bkpt_internal
test_bkpt_eval_funcs
test_bkpt_registration
+test_bkpt_address