This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [ob] More warnings; Call for assistance
- From: Jim Blandy <jimb at red-bean dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 17 Jan 2006 17:15:24 -0800
- Subject: Re: [ob] More warnings; Call for assistance
- References: <20060117151730.GA2420@nevyn.them.org>
On 1/17/06, Daniel Jacobowitz <drow@false.org> wrote:
> LA_PRINT_STRING takes a const gdb_byte * argument for the string. But this
> is a NUL-terminated string in the debugger's memory; I think stepping back
> to char * is the best fix here. That's the expprint.c warnings.
I wrote that up, but then I didn't like it. The use of 'char *'
should be reserved for host-format character strings, but it looks to
me like LA_PRINT_STRING expects a string in the target format. (Not
that the interface documentation offers much help here.) Look at the
way c_printstr unpacks the string character by character using
extract_unsigned_integer. Look at the way LA_EMIT_CHAR is responsible
for calling target_char_to_host.
If folks agree, then I'll make the comments in language.h clearer, and
try to finish off this change.