This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [commit/Ada] delete ada-lang.c:extract_string and use target_read_string instead
- From: Tom Tromey <tromey at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 16 Apr 2009 16:18:11 -0600
- Subject: Re: [commit/Ada] delete ada-lang.c:extract_string and use target_read_string instead
- References: <20090416171914.GM7557@adacore.com>
- Reply-to: tromey at redhat dot com
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
Joel> + xfree (main_program_name);
Joel> + target_read_string (main_program_name_addr, &main_program_name,
Joel> + 1024, &err_code);
Joel> +
Joel> + if (err_code != 0)
Joel> + return NULL;
Joel> return main_program_name;
I don't know what the Ada compiler emits here, but offhand it seems
like this needs a conversion to the host charset.
I'd imagine in most cases everything is ASCII-compatible and therefore
the problem never manifests.
Tom