Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Sanjoy Das <sanjoy@playingwithpointers.com>
Cc: gdb-patches@sourceware.org
Subject: Re: JIT Reader
Date: Wed, 02 Nov 2011 18:30:00 -0000	[thread overview]
Message-ID: <m37h3ixtpz.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4EA9095D.5070408@playingwithpointers.com> (Sanjoy Das's message	of "Thu, 27 Oct 2011 13:03:49 +0530")

>>>>> "Sanjoy" == Sanjoy Das <sanjoy@playingwithpointers.com> writes:

Sanjoy> +static int
Sanjoy> +jit_reader_try_read_symtab (struct jit_code_entry *code_entry)
[...]
Sanjoy> +  gdb_mem = xmalloc (code_entry->symfile_size);
Sanjoy> +  if (target_read_memory (code_entry->symfile_addr, gdb_mem,
Sanjoy> +                          code_entry->symfile_size))
Sanjoy> +    {
Sanjoy> +      status = 0;
Sanjoy> +      goto cleanup;
Sanjoy> +    }

It is not at all clear to me that target_read_memory cannot throw an
exception.  I think it would be safer to wrap this in a TRY_CATCH.

Tom


  parent reply	other threads:[~2011-11-02 18:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-27  9:41 Sanjoy Das
2011-11-02 17:52 ` Tom Tromey
2011-11-02 18:04 ` Tom Tromey
2011-11-02 18:30 ` Tom Tromey [this message]
2011-11-02 18:38 ` Tom Tromey
2011-11-03 10:38   ` Sanjoy Das
2011-11-03 14:37     ` Tom Tromey
2011-11-03 14:38     ` Tom Tromey
2011-11-03 14:39     ` Tom Tromey
2011-11-03 16:39       ` Sanjoy Das
2011-11-03 17:13         ` Eli Zaretskii
2011-11-03 17:55           ` Sanjoy Das
2011-11-04  2:58       ` Sanjoy Das
2011-11-04 13:49         ` Tom Tromey

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=m37h3ixtpz.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sanjoy@playingwithpointers.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