• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisiona96e36da2f5278949099b0b985b2fa6ce474b135 (tree)
Time2016-02-10 07:29:21
AuthorKeith Seitz <keiths@redh...>
CommiterKeith Seitz

Log Message

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.

Change Summary

Incremental Difference

--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
11 2016-02-09 Keith Seitz <keiths@redhat.com>
22
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+
39 PR python/19506
410 * python/py-breakpoint.c (bppy_init): Use
511 string_to_event_location_basic instead of new_linespec_location.
--- a/gdb/guile/scm-breakpoint.c
+++ b/gdb/guile/scm-breakpoint.c
@@ -425,8 +425,8 @@ gdbscm_register_breakpoint_x (SCM self)
425425
426426 pending_breakpoint_scm = self;
427427 location = bp_smob->spec.location;
428- copy = location;
429- eloc = new_linespec_location (&copy);
428+ copy = skip_spaces (location);
429+ eloc = string_to_event_location_basic (&copy, current_language);
430430 cleanup = make_cleanup_delete_event_location (eloc);
431431
432432 TRY
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
11 2016-02-09 Keith Seitz <keiths@redhat.com>
22
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+
38 PR python/19506
49 * gdb.python/py-breakpoint.exp (test_bkpt_address): New procedure.
510 (toplevel): Call test_bkpt_address.
--- a/gdb/testsuite/gdb.guile/scm-breakpoint.exp
+++ b/gdb/testsuite/gdb.guile/scm-breakpoint.exp
@@ -487,6 +487,18 @@ proc test_bkpt_registration {} {
487487 }
488488 }
489489
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+
490502 test_bkpt_basic
491503 test_bkpt_deletion
492504 test_bkpt_cond_and_cmds
@@ -495,3 +507,4 @@ test_watchpoints
495507 test_bkpt_internal
496508 test_bkpt_eval_funcs
497509 test_bkpt_registration
510+test_bkpt_address