[RFC] m32c: Print warning instead of error in address->pointer function
Joel Brobecker
brobecker@adacore.com
Tue Apr 13 15:39:00 GMT 2010
> * m32c-tdep.c (m32c_m16c_address_to_pointer): Print warning
> instead of an error if no PLT entry is found. Return a
> potentially useful result.
> (m32c_m16c_pointer_to_address): Add code to search for function
> address when no .plt entry is found.
No objection on my end. Don't know if there is any better alternative
anyway, and an improvement is an improvement ;-).
I just noticed that you forgot to bracket the warning text with _()...
> + warning ("Cannot convert code address %s to function pointer:\n"
> + "couldn't find trampoline named '%s.plt'.\n"
> + "Returning pointer value %s instead; this may produce\n"
> + "a useful result if converted back into an address by GDB,\n"
> + "but will most likely not be useful otherwise.\n",
> + paddress (gdbarch, addr), func_name,
> + paddress (gdbarch, ptrval));
--
Joel
More information about the Gdb-patches
mailing list