This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: JIT Reader


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]