This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] m32c: Print warning instead of error in address->pointer function
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Kevin Buettner <kevinb at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 13 Apr 2010 08:38:55 -0700
- Subject: Re: [RFC] m32c: Print warning instead of error in address->pointer function
- References: <20100405212328.0f47c335@redhat.com>
> * 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