public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: Patrick Monnerat <Patrick.Monnerat@datasphere.ch>
Cc: insight@sourceware.org
Subject: Re: [PATCH] fix error sending signal to dead process
Date: Thu, 19 Apr 2012 00:22:00 -0000	[thread overview]
Message-ID: <4F8F5AAD.9050207@redhat.com> (raw)
In-Reply-To: <AB5E58B87EB73C46A38073D8F459F113D9F882@dataspheresrv01>

On 04/05/2012 05:45 AM, Patrick Monnerat wrote:
> The attached patch fixes this problem. It simply do not pass signal to
> tcl if the pid is null.

A nit or two, comments below.

> P.S.: the bug report system linked from your web site
> (http://sources.redhat.com/cgi-bin/gnatsweb.pl?database=insight&user=gue
> st&password=guest&cmd=login) is down (HTTP error 500).

Gah! It looks like sourceware is now 100% bugzilla, but insight was 
never "converted" (aka I thought the "old" bug database was still 
around). I'll update the page to ask viewers to submit bugs here for the 
interim. Thank you for bringing this to my attention.

> diff -Naur insight-7.4.50.orig/gdb/gdbtk/generic/gdbtk-hooks.c insight-7.4.50.new/gdb/gdbtk/generic/gdbtk-hooks.c
> --- insight-7.4.50.orig/gdb/gdbtk/generic/gdbtk-hooks.c	2012-03-28 15:09:12.000000000 +0200
> +++ insight-7.4.50.new/gdb/gdbtk/generic/gdbtk-hooks.c	2012-04-05 12:44:20.284306992 +0200
> @@ -804,7 +804,7 @@
>   gdbtk_annotate_signal (void)
>   {
>     char *buf;
> -  struct thread_info *tp = inferior_thread ();
> +  struct thread_info *tp;
>
>     /* Inform gui that the target has stopped. This is
>        a necessary stop button evil. We don't want signal notification
> @@ -812,6 +812,11 @@
>        timeout. */
>     Tcl_Eval (gdbtk_interp, "gdbtk_stop_idle_callback");
>
> +  if (ptid_equal(inferior_ptid, null_ptid))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

There should be spaces between function names and opening parenthesis. 
[Yeah, it's rather lame, but it is GNU coding standard. Insight follows 
GDB's conventions.]

ChangeLog entry?

> +    return;
> +
> +  tp = inferior_thread ();
> +
>     buf = xstrprintf ("gdbtk_signal %s {%s}",
>   	     target_signal_to_name (tp->suspend.stop_signal),
>   	     target_signal_to_string (tp->suspend.stop_signal));

[Aside: Eew. I can't believe Tcl_Eval is still being used!]

Keith

  reply	other threads:[~2012-04-19  0:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-05 12:48 Patrick Monnerat
2012-04-19  0:22 ` Keith Seitz [this message]
2012-04-19 15:19   ` Patrick Monnerat
2012-04-19 16:59     ` Keith Seitz
2012-04-19 17:51       ` Patrick Monnerat
2012-04-19 19:50         ` Keith Seitz

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=4F8F5AAD.9050207@redhat.com \
    --to=keiths@redhat.com \
    --cc=Patrick.Monnerat@datasphere.ch \
    --cc=insight@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).