All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>, qemu-devel@nongnu.org
Cc: zealot351@gmail.com, maria.klimushenkova@ispras.ru
Subject: Re: [Qemu-devel] [PATCH] gdbstub: init mon_chr through qemu_chr_alloc
Date: Thu, 11 Sep 2014 10:25:34 +0200	[thread overview]
Message-ID: <54115C7E.5040305@redhat.com> (raw)
In-Reply-To: <20140910143413.6908.43083.stgit@PASHA-ISP>

Il 10/09/2014 16:34, Pavel Dovgalyuk ha scritto:
> This patch initializes monitor for gdbstub with the qemu_chr_alloc function
> instead of just allocating the memory. Initialization function call
> is required, because it also creates chr_write_lock mutex, which is used
> when writing to this character device.
> 
> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> ---
>  gdbstub.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/gdbstub.c b/gdbstub.c
> index 8afe0b7..71aaa23 100644
> --- a/gdbstub.c
> +++ b/gdbstub.c
> @@ -1707,7 +1707,7 @@ int gdbserver_start(const char *device)
>          qemu_add_vm_change_state_handler(gdb_vm_state_change, NULL);
>  
>          /* Initialize a monitor terminal for gdb */
> -        mon_chr = g_malloc0(sizeof(*mon_chr));
> +        mon_chr = qemu_chr_alloc();
>          mon_chr->chr_write = gdb_monitor_write;
>          monitor_init(mon_chr, 0);
>      } else {
> 

Thanks, will send a pull request soon.

Paolo

      reply	other threads:[~2014-09-11  8:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10 14:34 [Qemu-devel] [PATCH] gdbstub: init mon_chr through qemu_chr_alloc Pavel Dovgalyuk
2014-09-11  8:25 ` Paolo Bonzini [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=54115C7E.5040305@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Pavel.Dovgaluk@ispras.ru \
    --cc=maria.klimushenkova@ispras.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=zealot351@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.