Re: how do debuggers work... (Steve Simmons)
Tue, 3 Dec 1991 14:11:15 GMT

          From comp.compilers

Related articles
How do debuggers work? omtzigt-theo@CS.YALE.EDU (Erwinus Theodorus Leonardus Omtzigt (Theo)) (1991-11-27)
Re: how do debuggers work... (1991-12-03)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Steve Simmons)
Keywords: debug, design
Organization: CONVEX Computer Corporation, Richardson, Tx., USA
References: 91-12-003
Date: Tue, 3 Dec 1991 14:11:15 GMT

A simple answer to that complex question is...

The compiler generates a descriptive interface that is distinct from the
object code. This interface maps the realized machine code and data back
to the original source text. That is, ranges of PCs are associated with a
source statement. Offsets from either a frame on the stack or base of a
memory segment are associated with variables. From here, a debugger is
capable placing breakpoints on pc addresses and examining/translating
areas in memory.

The best reference on this is Aho, Hopcroft, and Sethi, the last dragon
book. There are many other papers. On Unix, the most common interface is
the STAB interface. This was defined by Mark Linton when he was at
Stanfod. He is now at SGI (I think).

Recently, Convex has defined a new Compiler-Debugger Interface for its
compiler so that it may better support optimized code. That is, code
motion causes a fragmentation in PC ranges and there is no longer a
one-to-one mapping. Also, uses of variables are optimized into uses of
compiler-synthesized variables. These issues must be dealt with.

Thank you.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.