[comp.sys.amiga.tech] Compiler querys

petersen@uicsrd.csrd.uiuc.edu (06/17/88)

The second release of PDC has a -g option to produce STABN, and STABS 
assembler-ops for the dbx source code debugger.  This was the way to go
right now for me as I'm translating into SUN assembler then running.  I've
decided to solve the run-time loading of the IEEE libraries (and possibly
others) by including a flag word in a special section

	SECTION	PDCFLAGS,DATA
	DC.L	<flags-bits>

Then having a lable to the start of that section in acrt0.asm and some
terminating flag value to be linked at the end.  The startup code would
then do an OR of all the flags from each file and then load the
appropriate libraries.  Will this work?? Do you see any problems with
this approach other than a little bit of overhead?

Is it feasable to port a subset of gdb to the amiga?  What other debugging
tools are available either PD or Shareware with source, or inexpensive?
The lack of these tools is one of the BIG problems facing me as I try
to re-port PDC from the SUN to the amiga.  The second is that I'm using
a 1 Meg amiga 500 with one (1) diskdrive and no 9600 baud terminal to 
use the RomWack (or whatever).  

Since the reason I'm improving PDC is that I didn't want to spend mucho
bucks for a commercial C compiler this makes the porting process hairy
at best.  If I've caught all of the bugs every thing should go pretty
smooth, if not what do you do??  Is there a debugger available from the
keyboard and not a attached terminal??

Would someone with better equipment and/or more experience be willing to
do a parallel re-port? (Starting with a compiler and debugger on the amiga 
would be a BIG advantage)

Second thread:

I've received several letters with offers of source code to library
routines.  The latest for a K&R printf replacement designed for the
GNU project.  So if you have ported unix software to the amiga and have 
already written the routines would you consider contributing them?
I did an "nm" on /lib/libc.a and diffed with the functions that I have
and the following list seem to be the ones that might be useful.  I did
not check the man pages on all of them to see if they are wanted or even
possible to implement under AmigaDOS.  Most of the basic system calls
would just be wrappers to Open, Seek, Read, Write, etc..
---------------------------
basic system calls:                 access chdir chmod creat dup dup2 link 
                                    lseek lstat mkdir rename rmdir tell unlink
better random number generator:     random srandom initstate setstate
binary search:                      bsearch
convert date and time to ascii:     ctime localtime gmtime asctime 
                                    timezone dysize
convert string to double precision: strtod atof
convert string to integer:          strtol atol
create a temporary file:            tmpfile tempnam tmpnam
environment functions:              getenv putenv
execute a file:                     execl execv execle execlp execve 
                                    execvp system
find and sort directory:            scandir alphasort
find first bit:                     ffs
generate uniform random number:     drand48 erand48 lrand48 nrand48 mrand48 
                                    jrand48 srand48 seed48 lcong48
get date and time:                  time ftime
get directory entries:              getdirentries
get process time:                   times utime utimes vtimes
get the current/working directory:  getcwd getwd
get/set a signal:                   signal gsignal ssignal
get/set an interval timer:          getitimer setitimer
get/set the date and time:          gettimeofday settimeofday
linear search and update:           lfind lsearch
make a unique file name:            mktemp mkstemp
manage a queue:                     insque remque
manage binary search trees:         tdelete tfind tsearch twalk
more basic file functions:          fchmod fcntl ioctl fstat fstatfs 
                                    ftruncate truncate stat statfs
non-local goto:                     setjmp longjmp
printf support:                     vfprintf ecvt fcvt gcvt vprintf vsprintf
quick sort:                         qsort
report CPU time used:               clock
schedule a signal in the future:    alarm pause sleep ualarm usleep
simple random number generator:     srand rand
walk a file tree:                   ftw
--------------
University of Illinois, Urbana-Champaign
Center for Supercomputing Research and Development

    UUCP:    {ihnp4,uunet,convex}!uiucuxc!uicsrd!petersen
    ARPANET: petersen%uicsrd@uxc.cso.uiuc.edu
    CSNET:   petersen%uicsrd@uiuc.csnet
    BITNET:  petersen@uicsrd.csrd.uiuc.edu