GNU Binutils with patches for OS216
Revision | a96e36da2f5278949099b0b985b2fa6ce474b135 (tree) |
---|---|
Time | 2016-02-10 07:29:21 |
Author | Keith Seitz <keiths@redh...> |
Commiter | Keith Seitz |
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.
@@ -1,5 +1,11 @@ | ||
1 | 1 | 2016-02-09 Keith Seitz <keiths@redhat.com> |
2 | 2 | |
3 | + * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Skip | |
4 | + leading whitespace and use string_to_event_location_basic instead | |
5 | + of new_linespec_location. | |
6 | + | |
7 | +2016-02-09 Keith Seitz <keiths@redhat.com> | |
8 | + | |
3 | 9 | PR python/19506 |
4 | 10 | * python/py-breakpoint.c (bppy_init): Use |
5 | 11 | string_to_event_location_basic instead of new_linespec_location. |
@@ -425,8 +425,8 @@ gdbscm_register_breakpoint_x (SCM self) | ||
425 | 425 | |
426 | 426 | pending_breakpoint_scm = self; |
427 | 427 | location = bp_smob->spec.location; |
428 | - copy = location; | |
429 | - eloc = new_linespec_location (©); | |
428 | + copy = skip_spaces (location); | |
429 | + eloc = string_to_event_location_basic (©, current_language); | |
430 | 430 | cleanup = make_cleanup_delete_event_location (eloc); |
431 | 431 | |
432 | 432 | TRY |
@@ -1,5 +1,10 @@ | ||
1 | 1 | 2016-02-09 Keith Seitz <keiths@redhat.com> |
2 | 2 | |
3 | + * gdb.guile/scm-breakpoint.exp (test_bkpt_address): New procedure. | |
4 | + (toplevel): Call test_bkpt_address. | |
5 | + | |
6 | +2016-02-09 Keith Seitz <keiths@redhat.com> | |
7 | + | |
3 | 8 | PR python/19506 |
4 | 9 | * gdb.python/py-breakpoint.exp (test_bkpt_address): New procedure. |
5 | 10 | (toplevel): Call test_bkpt_address. |
@@ -487,6 +487,18 @@ proc test_bkpt_registration {} { | ||
487 | 487 | } |
488 | 488 | } |
489 | 489 | |
490 | +proc test_bkpt_address {} { | |
491 | + global decimal srcfile | |
492 | + | |
493 | + # Leading whitespace is intentional! | |
494 | + gdb_scm_test_silent_cmd \ | |
495 | + "guile (define bp1 (make-breakpoint \" *multiply\"))" \ | |
496 | + "create address breakpoint a ' *multiply'" 1 | |
497 | + | |
498 | + gdb_test "guile (register-breakpoint! bp1)" \ | |
499 | + ".*Breakpoint ($decimal)+ at .*$srcfile, line ($decimal)+\." | |
500 | +} | |
501 | + | |
490 | 502 | test_bkpt_basic |
491 | 503 | test_bkpt_deletion |
492 | 504 | test_bkpt_cond_and_cmds |
@@ -495,3 +507,4 @@ test_watchpoints | ||
495 | 507 | test_bkpt_internal |
496 | 508 | test_bkpt_eval_funcs |
497 | 509 | test_bkpt_registration |
510 | +test_bkpt_address |