This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [01/15] Introduce get_current_arch () function
- From: Tom Tromey <tromey at redhat dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 09 Jun 2009 11:04:08 -0600
- Subject: Re: [01/15] Introduce get_current_arch () function
- References: <200906091514.n59FElgC026768@d12av02.megacenter.de.ibm.com>
- Reply-to: tromey at redhat dot com
>>>>> "Ulrich" == Ulrich Weigand <uweigand@de.ibm.com> writes:
Ulrich> printf_command (char *arg, int from_tty)
Ulrich> {
Ulrich> + struct gdbarch *gdbarch = get_current_arch ();
I think that perhaps the printf command should use the arch from the
values it is trying to print.
Ulrich> struct type *wctype = lookup_typename (current_language,
Ulrich> - current_gdbarch,
Ulrich> + gdbarch,
Ulrich> "wchar_t", NULL, 0);
E.g., here it could use the architecture from val_args[i].
The benefit here would be that you could print out two wide strings,
each from a different architecture, using a single printf. This seems
like a reasonable thing to want to do.
Tom