Subject: What is multi-arch?
From: Andrew Cagney <
Date: Tue, 20 Apr 1999 01:24:01 +1000
Organization: Cygnus Solutions


In the below I'll try to describe, in broad terms, the concept of a multi-arch debugger and then outline the approach that GDB is taking in achieving that goal.

What is an architecture?

For GDB, an architecture is a very loose concept. It can be thought of as any property of the target that isn't directly dependent on the current instance of the program being debugged. The term ``target architecture'' is some times used.

The ``architecture'' would include:

while preclude the actual value of a given register.

What is multi-arch?

Such a phrase is fairly loose in its definition so I'll provide you with a spectrum of definitions:


The objective, at this stage, is to modify GDB so that it can be built `multi-arch'.

In simple terms, the change required is for all those macro's in gdb/config/*/tm-*.h to be replaced with corresponding functions. Those functions combined into a table (very large architecture object - gdbarch) - one object per architecture variant. When establishing a debugging session, gdb would select/create/install the architecture variant that best matched what was being debugged.

Of course, it isn't that simple. Much of GDB's internal code needs to be tweaked so that it makes run-time rather than compile time architecture dependent decisions.

In succeeding e-mails I'll be expanding on this,