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: [ob] More warnings; Call for assistance


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.


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