diff options
author | Keith Seitz <keiths@redhat.com> | 2016-02-09 10:02:53 -0800 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2016-02-09 14:29:21 -0800 |
commit | a96e36da2f5278949099b0b985b2fa6ce474b135 (patch) | |
tree | 815cc75257d0565feff6c093d3e9d1b8ca414022 /gdb/testsuite/gdb.guile | |
parent | 9f61929fd82fb632ee7c3be883d7086afc5c65d0 (diff) | |
download | gdb-a96e36da2f5278949099b0b985b2fa6ce474b135.zip gdb-a96e36da2f5278949099b0b985b2fa6ce474b135.tar.gz gdb-a96e36da2f5278949099b0b985b2fa6ce474b135.tar.bz2 |
Use string_to_event_location_basic in guile.
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.
Diffstat (limited to 'gdb/testsuite/gdb.guile')
-rw-r--r-- | gdb/testsuite/gdb.guile/scm-breakpoint.exp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.guile/scm-breakpoint.exp b/gdb/testsuite/gdb.guile/scm-breakpoint.exp index 542a40f..33edf86 100644 --- a/gdb/testsuite/gdb.guile/scm-breakpoint.exp +++ b/gdb/testsuite/gdb.guile/scm-breakpoint.exp @@ -487,6 +487,18 @@ proc test_bkpt_registration {} { } } +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 @@ -495,3 +507,4 @@ test_watchpoints test_bkpt_internal test_bkpt_eval_funcs test_bkpt_registration +test_bkpt_address |