From: Pedro Alves <palves@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 1/3] Rename rl_callback_read_char_wrapper -> gdb_rl_callback_read_char
Date: Thu, 21 Apr 2016 23:50:00 -0000 [thread overview]
Message-ID: <1461282640-30425-2-git-send-email-palves@redhat.com> (raw)
In-Reply-To: <1461282640-30425-1-git-send-email-palves@redhat.com>
Use the "gdb_rl_" prefix like other gdb readline function wrappers to
make it clear this is a gdb function, not a readline function.
gdb/ChangeLog:
2016-04-21 Pedro Alves <palves@redhat.com>
* event-top.c (rl_callback_read_char_wrapper): Rename to ...
(gdb_rl_callback_read_char_wrapper): ... this.
(change_line_handler, gdb_setup_readline): Adjust.
---
gdb/event-top.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/gdb/event-top.c b/gdb/event-top.c
index ee8684b..b9947c4 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -48,7 +48,6 @@
/* readline defines this. */
#undef savestring
-static void rl_callback_read_char_wrapper (gdb_client_data client_data);
static void command_line_handler (char *rl);
static void change_line_handler (void);
static char *top_level_prompt (void);
@@ -141,7 +140,7 @@ static struct async_signal_handler *sigtstp_token;
#endif
static struct async_signal_handler *async_sigterm_token;
-/* This hook is called by rl_callback_read_char_wrapper after each
+/* This hook is called by gdb_rl_callback_read_char_wrapper after each
character is processed. */
void (*after_char_processing_hook) (void);
\f
@@ -150,7 +149,7 @@ void (*after_char_processing_hook) (void);
loop expects the callback function to have a paramter, while
readline expects none. */
static void
-rl_callback_read_char_wrapper (gdb_client_data client_data)
+gdb_rl_callback_read_char_wrapper (gdb_client_data client_data)
{
rl_callback_read_char ();
if (after_char_processing_hook)
@@ -188,7 +187,7 @@ change_line_handler (void)
if (async_command_editing_p)
{
/* Turn on editing by using readline. */
- call_readline = rl_callback_read_char_wrapper;
+ call_readline = gdb_rl_callback_read_char_wrapper;
input_handler = command_line_handler;
}
else
@@ -1109,8 +1108,10 @@ set_async_editing_command (char *args, int from_tty,
}
/* Set things up for readline to be invoked via the alternate
- interface, i.e. via a callback function (rl_callback_read_char),
- and hook up instream to the event loop. */
+ interface, i.e. via a callback function
+ (gdb_rl_callback_read_char), and hook up instream to the event
+ loop. */
+
void
gdb_setup_readline (void)
{
@@ -1136,7 +1137,7 @@ gdb_setup_readline (void)
/* When a character is detected on instream by select or poll,
readline will be invoked via this callback function. */
- call_readline = rl_callback_read_char_wrapper;
+ call_readline = gdb_rl_callback_read_char_wrapper;
}
else
{
--
2.5.5
prev parent reply other threads:[~2016-04-21 23:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-21 23:50 [PATCH 0/3] Fix C++ exceptions across readline result in std::terminate() -> SIGABRT Pedro Alves
2016-04-21 23:50 ` [PATCH 2/3] Propagate GDB/C++ exceptions across readline using sj/lj-based TRY/CATCH Pedro Alves
2016-04-22 8:19 ` Yao Qi
2016-04-22 9:05 ` Pedro Alves
2016-04-22 15:25 ` Pedro Alves
2016-04-21 23:50 ` [PATCH 3/3] Switch gdb's TRY/CATCH to C++ try/catch Pedro Alves
2016-04-21 23:50 ` Pedro Alves [this message]
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=1461282640-30425-2-git-send-email-palves@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).