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