From: Pedro Alves <pedro_alves@portugalmail.pt>
To: Lerele <lerele@champenstudios.com>
Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org
Subject: Re: [Patch] Win32 gdbserver new interrupt support, and attach to process fix.
Date: Sun, 25 Feb 2007 01:57:00 -0000 [thread overview]
Message-ID: <45E0ECB2.3060906@portugalmail.pt> (raw)
In-Reply-To: <45E0CA5A.1020005@champenstudios.com>
Lerele escreveu:
> Pedro Alves wrote:
>
>>
>> Lerele wrote:
>>
>>> }
>>> -#endif
>>> +
>>> +/* Expose 'static void input_interrupt (int unused)' function to
>>> enable checking for a + remote interrupt request. */
>>
>>
>> Is the 'Expose 'static void input_interrupt (int unused)' function'
>> part really necessary?
>>
> You mean the comment?
Yep. Sorry I wasn't clear.
>> Full stop, double space. "...get_child_debug_event. Default ..."
>>
> Please clarify.
>
The GNU coding convention states that you use a full stop followed by
two spaces to end a sentence.
>>> - return res;
>>> + return res? 0:-1;
>>>
>>
>> Space around '?' and ':'. Personally, I liked the res != FALSE ? 0 :
>> -1 version better.
>>
>
> Honestly, I don't really care too much.
> You guys decide.
>
I don't care much either, but I think the spaces around '?' and ':'
are mandatory.
+ return res ? 0 : -1;
>>
>>> +/* Send a signal to the inferior process, however is appropriate. */
>>> +static void
>>> +win32_send_signal (int signo)
>>> +{
>>> + if ( signo == TARGET_SIGNAL_INT )
>>> + {
>>> + if ( !GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT,
>>> current_process_id) )
>>>
>>
>> Also, pedantically speaking, both remote_utils.c:putpkt_binary, and
>> remote_utils.c:input_interrupt
>> (the sole users of _send_signal) send SIGINT, not TARGET_SIGNAL_INT.
>> Luckily on
>> Windows, both are defined as 2.
>>
>> I have a local patch that does:
>>
>> /* Send a signal to the inferior process, however is appropriate. */
>> - void (*send_signal) (int);
>> + void (*send_signal) (enum target_signal);
>>
>> ... and takes care of the conversion of the target side. I'll post it
>> for review. In the meantime, you may
>> want to change your patch to use SIGINT.
>>
>
> You mean line gdb/signals/signal.c 'target_signal_from_host' and
> 'do_target_signal_to_host' functions?
> I'm not really sure if we should use SIGINT in win32-i386-low.c, given
> that it should only know about target signals.
>
The only send_signal calls I could find, are in remote_utils like so:
(*the_target->send_signal) (SIGINT);
So, *pedantically*, it should be:
+static void
+win32_send_signal (int signo)
+{
+ if (signo == SIGINT)
And I agree that it doesn't look right. With my patch
installed, it turns to:
+static void
+win32_send_signal (enum target_signal signo)
+{
+ if (signo == TARGET_SIGNAL_INT)
Anyway, don't let this bother you. If it gets OKed as is,
I'll take care of it later.
Cheers,
Pedro Alves
next prev parent reply other threads:[~2007-02-25 1:57 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-23 23:52 Lerele
2007-02-24 12:07 ` Eli Zaretskii
2007-02-24 13:03 ` Lerele
2007-02-24 14:07 ` Eli Zaretskii
2007-02-24 15:23 ` Lerele
2007-02-24 19:10 ` Eli Zaretskii
2007-02-24 21:19 ` Pedro Alves
2007-02-24 21:44 ` Andreas Schwab
2007-02-24 23:35 ` Lerele
2007-02-25 0:15 ` Daniel Jacobowitz
2007-02-25 1:57 ` Pedro Alves [this message]
2007-02-25 22:46 ` Pedro Alves
2007-03-04 22:53 ` Lerele
2007-03-05 0:56 ` Pedro Alves
2007-03-05 1:21 ` Pedro Alves
2007-03-05 13:17 ` Lerele
2007-03-05 20:34 ` Lerele
2007-03-05 20:44 ` Pedro Alves
2007-03-06 0:04 ` Pedro Alves
2007-03-06 20:39 ` Pedro Alves
2007-03-06 22:18 ` Lerele
2007-03-06 23:22 ` Pedro Alves
2007-03-05 12:44 ` Daniel Jacobowitz
2007-03-05 20:30 ` Lerele
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=45E0ECB2.3060906@portugalmail.pt \
--to=pedro_alves@portugalmail.pt \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=lerele@champenstudios.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