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: [RFA] defs.h: Define GDB_DEFAULT_TARGET_[WIDE_]CHARSET for Cygwin and MingW builds


On Tue, Mar 02, 2010 at 11:43:58AM +0100, Corinna Vinschen wrote:
> The target specifies charset and wide charset.  So we need two
> target-specific variables.  As I mentioned above, both variables would
> replace the auto_target...charset variables.

That makes sense.

> How do I access the current gdbarch from show_target_charset_name,
> show_target_wide_charset_name, and all the other functions in charset.c
> which refer to the target charsets?

>From the show functions, which are called by the CLI infrastructure, I
think you're supposed to use get_current_arch (in arch-utils.h).

>From other functions, mostly, you need the caller to pass an
architecture.  An increasing portion of GDB is parameterized
this way.  That'll work for e.g. target_wide_charset ().

I don't think you can do either from _initialize_charset.  That may
have to happen lazily...

-- 
Daniel Jacobowitz
CodeSourcery


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