From b44690f98e5887c702b244a0515b59052bd8a171 Mon Sep 17 00:00:00 2001 From: CSRG Date: Wed, 13 Mar 1991 08:54:49 -0800 Subject: [PATCH] BSD 4_4_Lite1 development Work on file usr/src/contrib/gas-1.38/NOTES Synthesized-from: CSRG/cd2/4.4BSD-Lite1 --- usr/src/contrib/gas-1.38/NOTES | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 usr/src/contrib/gas-1.38/NOTES diff --git a/usr/src/contrib/gas-1.38/NOTES b/usr/src/contrib/gas-1.38/NOTES new file mode 100644 index 0000000000..b3f3f92d2e --- /dev/null +++ b/usr/src/contrib/gas-1.38/NOTES @@ -0,0 +1,35 @@ +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 -- 2.20.1