This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: JIT Reader
- From: Tom Tromey <tromey at redhat dot com>
- To: Sanjoy Das <sanjoy at playingwithpointers dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 02 Nov 2011 12:30:32 -0600
- Subject: Re: JIT Reader
- References: <4EA9095D.5070408@playingwithpointers.com>
>>>>> "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