BSD 4_4_Lite2 development
[unix-history] / usr / src / contrib / gas-1.38 / NOTES
gdb debugging of assembly sources:
write a function linestab() that generates a .stabd symbol
independently of the input
write a function filestab() to generate a .stabs symbol
we need to take especial care with #line directives
since we want to handle locore, and locore is passed thru cpp
this could be tough
outline of a solution:
cpp sends us lines of the form
# logical-line "logical-file" trash
these lines are interpreted ahead of the gas preprocess pass
in the starting state, the logical filename is the same
as the real filename (in case there're no #lines)
the initial logical line number is 1
every time we're ready to process a new instruction line,
if the source file has changed,
emit a .stabs for the logical file
emit a .stabd for the logical line
bump the logical line number
can gas eat multiple actual lines in one insn?
i386 nits:
jmp *$foo produces a short relative branch
string quotes in comments
Bill says gas eats text across newlines to find matches
works fine for me
I think it's most likely due to cpp
make / no longer be a comment char
it's now like the VAX: # is the only comment char
incorrectly assembles lcall, int3, into, bsr/f instructions
constant expressions fail if more than a few terms
gives (low+2)*3+4*5 as an example
works fine for me
cpp seems to think $ is a valid literal
use -$ in /usr/bin/cpp