This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [ob] More warnings; Call for assistance
On Tue, Jan 17, 2006 at 05:15:24PM -0800, Jim Blandy wrote:
> 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.
Makes sense to me. That requires messing with the type of the char in
the expression union (or just dropping it when we drop the warning,
which is fine by me too - we're well out into the swamps at this
point).
--
Daniel Jacobowitz
CodeSourcery