From: Nick Roberts <nickrob@snap.net.nz>
To: Daniel Jacobowitz <drow@false.org>
Cc: Bob Rossi <bob@brasko.net>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Hooks still needed for annotations
Date: Sat, 04 Jun 2005 03:19:00 -0000 [thread overview]
Message-ID: <17057.7583.990091.951816@farnswood.snap.net.nz> (raw)
In-Reply-To: <20050603235923.GA9992@nevyn.them.org>
> The way to prevent them from being removed again is to add test cases.
OK, I've done this. Running the tests revealed a small bug with
"set annotate" -- it didn't call _initialize_annotate to set the hooks.
This must be why the tests didn't fail when the hooks were removed in the
first place.
I've only tested for breakpoints-invalid annotations when breakpoints
have been deleted as I could simply adapt existing tests. They should
also be present when breakpoints are enabled/disabled. However, this test
should be sufficient to prevent the inadvertant removal of the hooks.
Nick
2005-06-04 Nick Roberts <nickrob@snap.net.nz>
* event-top.c (change_annotation_level): Call _initialize_annotate.
* interps.c (clear_interpreter_hooks):
Re-instate deprecated_delete_breakpoint_hook and
deprecated_modify_breakpoint_hook for annotations.
2005-06-04 Nick Roberts <nickrob@snap.net.nz>
* gdb.base/annota1.exp, gdb.base/annota3.exp, gdb.cp/annota3.exp:
Test for breakpoints-invalid when deleting breakpoints.
*** /home/nick/src/gdb/event-top.c.~1.40.~ 2005-03-17 12:23:51.000000000 +1300
--- /home/nick/src/gdb/event-top.c 2005-06-04 14:36:37.000000000 +1200
***************
*** 43,48 ****
--- 43,50 ----
/* readline defines this. */
#undef savestring
+ extern void _initialize_annotate (void);
+
static void rl_callback_read_char_wrapper (gdb_client_data client_data);
static void command_line_handler (char *rl);
static void command_line_handler_continuation (struct continuation_arg *arg);
***************
*** 359,364 ****
--- 361,367 ----
pop_prompt ();
}
}
+ _initialize_annotate ();
}
/* Pushes a new prompt on the prompt stack. Each prompt has three
*** /home/nick/src/gdb/event-top.c.~1.40.~ 2005-03-17 12:23:51.000000000 +1300
--- /home/nick/src/gdb/event-top.c 2005-06-04 14:36:37.000000000 +1200
***************
*** 43,48 ****
--- 43,50 ----
/* readline defines this. */
#undef savestring
+ extern void _initialize_annotate (void);
+
static void rl_callback_read_char_wrapper (gdb_client_data client_data);
static void command_line_handler (char *rl);
static void command_line_handler_continuation (struct continuation_arg *arg);
***************
*** 359,364 ****
--- 361,367 ----
pop_prompt ();
}
}
+ _initialize_annotate ();
}
/* Pushes a new prompt on the prompt stack. Each prompt has three
*** /home/nick/src/gdb/interps.c.~1.15.~ 2005-04-26 21:44:15.000000000 +1200
--- /home/nick/src/gdb/interps.c 2005-06-04 15:12:16.000000000 +1200
***************
*** 326,333 ****
deprecated_query_hook = 0;
deprecated_warning_hook = 0;
deprecated_create_breakpoint_hook = 0;
- deprecated_delete_breakpoint_hook = 0;
- deprecated_modify_breakpoint_hook = 0;
deprecated_interactive_hook = 0;
deprecated_registers_changed_hook = 0;
deprecated_readline_begin_hook = 0;
--- 326,331 ----
*** /home/nick/src/gdb/testsuite/gdb.base/annota1.exp.~1.17.~ 2005-04-28 17:17:24.000000000 +1200
--- /home/nick/src/gdb/testsuite/gdb.base/annota1.exp 2005-06-04 14:50:08.000000000 +1200
***************
*** 315,321 ****
#
send_gdb "delete 1\n"
gdb_expect {
! -re "\r\n\032\032post-prompt\r\n$gdb_prompt$" \
{ pass "delete bp 1" }
-re ".*$gdb_prompt$" { fail "delete bp 1" }
timeout { fail "delete bp 1 (timeout)" }
--- 315,321 ----
#
send_gdb "delete 1\n"
gdb_expect {
! -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-invalid\r\n$gdb_prompt$" \
{ pass "delete bp 1" }
-re ".*$gdb_prompt$" { fail "delete bp 1" }
timeout { fail "delete bp 1 (timeout)" }
***************
*** 323,329 ****
send_gdb "delete 2\n"
gdb_expect {
! -re "\r\n\032\032post-prompt\r\n$gdb_prompt$" \
{ pass "delete bp 2" }
-re ".*$gdb_prompt$" { fail "delete bp 2 " }
timeout { fail "delete bp 2 (timeout)" }
--- 323,329 ----
send_gdb "delete 2\n"
gdb_expect {
! -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-invalid\r\n$gdb_prompt$" \
{ pass "delete bp 2" }
-re ".*$gdb_prompt$" { fail "delete bp 2 " }
timeout { fail "delete bp 2 (timeout)" }
***************
*** 331,337 ****
send_gdb "delete 3\n"
gdb_expect {
! -re "\r\n\032\032post-prompt\r\n$gdb_prompt$" \
{ pass "delete bp 3" }
-re ".*$gdb_prompt$" { fail "delete bp 3" }
timeout { fail "delete bp 3 (timeout)" }
--- 331,337 ----
send_gdb "delete 3\n"
gdb_expect {
! -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-invalid\r\n$gdb_prompt$" \
{ pass "delete bp 3" }
-re ".*$gdb_prompt$" { fail "delete bp 3" }
timeout { fail "delete bp 3 (timeout)" }
*** /home/nick/src/gdb/testsuite/gdb.base/annota3.exp.~1.5.~ 2004-07-26 03:41:51.000000000 +1200
--- /home/nick/src/gdb/testsuite/gdb.base/annota3.exp 2005-06-04 14:45:03.000000000 +1200
***************
*** 258,273 ****
--- 258,276 ----
send_gdb "delete 1\n"
gdb_expect_list "delete bp 1" "$gdb_prompt$" {
"\r\n\032\032post-prompt\r\n"
+ "\r\n\032\032breakpoints-invalid\r\n"
}
send_gdb "delete 2\n"
gdb_expect_list "delete bp 2" "$gdb_prompt$" {
"\r\n\032\032post-prompt\r\n"
+ "\r\n\032\032breakpoints-invalid\r\n"
}
send_gdb "delete 3\n"
gdb_expect_list "delete bp 3" "$gdb_prompt$" {
"\r\n\032\032post-prompt\r\n"
+ "\r\n\032\032breakpoints-invalid\r\n"
}
#
*** /home/nick/src/gdb/testsuite/gdb.cp/annota3.exp.~1.3.~ 2004-02-28 09:23:12.000000000 +1300
--- /home/nick/src/gdb/testsuite/gdb.cp/annota3.exp 2005-06-04 14:56:46.000000000 +1200
***************
*** 140,146 ****
-re ".*Delete all breakpoints. \\(y or n\\) \r\n\032\032query.*$" {
send_gdb "y\n"
gdb_expect {
! -re "\r\n\032\032post-query\r\n$gdb_prompt$" { pass "delete bps" }
-re ".*$gdb_prompt$" { fail "delete bps" }
timeout { fail "delete bps (timeout)" }
}
--- 140,146 ----
-re ".*Delete all breakpoints. \\(y or n\\) \r\n\032\032query.*$" {
send_gdb "y\n"
gdb_expect {
! -re "\r\n\032\032post-query\r\n\r\n\032\032breakpoints-invalid\r\n$gdb_prompt$" { pass "delete bps" }
-re ".*$gdb_prompt$" { fail "delete bps" }
timeout { fail "delete bps (timeout)" }
}
next prev parent reply other threads:[~2005-06-04 3:19 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-01 7:15 Nick Roberts
2005-06-01 11:30 ` Bob Rossi
2005-06-01 21:31 ` Nick Roberts
2005-06-03 19:09 ` Daniel Jacobowitz
2005-06-03 22:35 ` Nick Roberts
2005-06-03 23:59 ` Daniel Jacobowitz
2005-06-04 3:19 ` Nick Roberts [this message]
2005-07-03 17:03 ` Daniel Jacobowitz
2005-07-03 22:13 ` Nick Roberts
2005-07-03 22:44 ` Daniel Jacobowitz
2005-06-04 13:02 ` Bob Rossi
2005-06-13 3:14 ` Daniel Jacobowitz
2005-06-15 15:52 ` Bob Rossi
2005-06-15 16:07 ` Daniel Jacobowitz
2005-06-15 16:31 ` Bob Rossi
2005-07-03 16:45 ` Daniel Jacobowitz
2005-06-15 23:07 ` Nick Roberts
2005-06-15 23:29 ` Bob Rossi
2005-07-01 0:21 ` Bob Rossi
2005-07-01 1:18 ` Nick Roberts
2005-06-06 21:57 ` Nick Roberts
2005-06-10 2:26 ` Bob Rossi
2005-06-10 3:25 ` Nick Roberts
2005-06-15 15:24 ` Bob Rossi
2005-06-15 21:38 ` Nick Roberts
2005-06-15 22:58 ` Bob Rossi
2005-07-03 16:39 ` Daniel Jacobowitz
2005-07-06 15:03 ` Bob Rossi
2005-07-15 0:03 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17057.7583.990091.951816@farnswood.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=bob@brasko.net \
--cc=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox