Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* How to know which processor I'm targetting at runtime
@ 2003-02-11 20:05 Kris Warkentin
  2003-02-14 13:46 ` Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: Kris Warkentin @ 2003-02-11 20:05 UTC (permalink / raw)
  To: gdb

I have some ugly code that relies on a define from one of our
config/arch/tm*.h files.  Essentially we're just doing:

#define SOLIB_PROCESSOR [x86|mips|arm....]

so that we can do some setup elsewhere.  Is there a nice way to get which
architecture I'm running at runtime?  I'd like to get rid of our tm files if
possible.

cheers,

Kris


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to know which processor I'm targetting at runtime
  2003-02-11 20:05 How to know which processor I'm targetting at runtime Kris Warkentin
@ 2003-02-14 13:46 ` Andrew Cagney
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2003-02-14 13:46 UTC (permalink / raw)
  To: Kris Warkentin; +Cc: gdb

> I have some ugly code that relies on a define from one of our
> config/arch/tm*.h files.  Essentially we're just doing:
> 
> #define SOLIB_PROCESSOR [x86|mips|arm....]
> 
> so that we can do some setup elsewhere.  Is there a nice way to get which
> architecture I'm running at runtime?  I'd like to get rid of our tm files if
> possible.

gdbarch_bfd_arch_info (current_gdbarch) returns a `struct bfd_arch_info' 
which contains everything you need.

Andrew



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-14 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-11 20:05 How to know which processor I'm targetting at runtime Kris Warkentin
2003-02-14 13:46 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox