#sdb help
2 messages in this thread
Humm forget my question about BSS except for this. Is the proper form of
BSS BSS.B BSS.W BSS.L ok? Or else how do I specify? Now for a truly good
qestion. Can I create a Debug file directly from AS? Or can't SDB handle
that? If not what do you recomend? I did try to set up my assembly
program as a C program that does a prinf followed by a LOT of in line
assembly. Sadly this didnt work as expected. I get the following errors.
Undefined local symbol .1 .2 .3 & .4 ?!? Where the heck are these coming
from? Oh and a new favorite undefined symbol – _printf What in the world
is going on?
No, the proper format for BSS is:
bss label,size
Where 'label' is the name of the thing, and 'size' is the number of bytes
it comprises.
Debug files are created by the linker, ln, when you use the -g switch. It
gets the debug info from the individual object modules, which in turn get
information from control information embedded in the assembly source (which
is placed there by the compiler). Look at the code generated with and
without the -bs switch (by using the -at switch) and you'll see the control
information in there. You would in essence have to manually place this
control information in your assembly file, and then link with -g to get SDB
to recognize it.
I'd have to see your file to see what the problems were. In general, I
think the approach of doing some C stuff followed by oodles of in-line
assembly is not a good one, and you're bound to run into problems. You may
want to compile a program like:
main ()
{
printf ("WHatever");
}
with the -at switch, and then use that file as a 'template' for adding your
assembly stuff to. If you're unfamiliar with merging C and assembly, this
is probably your safest bet.
-Mike