Commit Graph

26 Commits

Author SHA1 Message Date
James Jones 526716329c Support -g debug info generation
-Add GenLineNoSym(), which will generate debug
 symbols for file names and line numbers when
 debug info generation is requested.

-Replace code that warns -g is not supported with
 code to set a flag.

-Complain if -g is specified for non-BSD output
 formats, as only stabs-in-symbol-table/a.out
 format debug information is supported currently.

-Document -g flag in usage information function.

-Document -g flag in manual.

v2:
-Only call debug symbol generation functions when
 dbg_sym != 0
2022-08-15 21:08:10 -05:00
James Jones e8f9d55bc7 Add NewDebugSymbol(): stabs symbol factory
This function, currently unused, generates a stabs
debugging symbol, as documented here:

https://sourceware.org/gdb/onlinedocs/stabs.html

It can be used to process stabs directives, also
documented at the above URL, generated by HLL
compilers such as GCC, as well as to generate line
number and file name debug symbols when assembling
hand-coded assembly files with the -g option.

v2:
-Don't double-init stabs symbol fields
-Consistently use tabs, not spaces
2022-08-15 21:08:06 -05:00
Shamus Hammons 2e6a046d5d Fix to prevent defined registers/CCs from being exported in the symtab.
As it turns out, this was not due to malice but because RMAC was set up
to squeeze out every label ever defined in the assembly.  Hopefully,
with this patch, things should be a bit more sane.  :-)
2022-05-30 17:40:19 -05:00
ggn 37694c99b0 Fix for bug #174 - when a macro contains an error, actually print the filename it was defined in, instead of current filename 2021-06-08 20:41:50 -05:00
Shamus Hammons cbc8347d4f Update to the name (don't ask), and copyright dates. Now at v2.1.0. 2021-03-07 16:43:25 -06:00
Shamus Hammons 4205233c83 EOY minor update. 2020-01-03 09:25:26 -06:00
Shamus Hammons 29fa5dcf50 The deed has been accomplished.
As far as I can tell, there should be no more regressions, but that's
no guarantee of anything.  Assuming no more are found, this should go
out as version 2.0.0.  :-D
2019-08-07 18:24:52 -05:00
Shamus Hammons bdbf34766f Added in DSP fixups to sect.c, misc. fixes for 6502 assembler. 2019-08-06 10:16:20 -05:00
Shamus Hammons 9153334781 Partial fix for bug #108 (Fixup cleanups).
RMAC has needed a struct for fixups for some time, and now it has one.
All of the credit for pushing (and patching!) in that direction goes to
ggn; blame for the way it's implemented goes to me. There's still room
for improvement; but for now, this should leave us in much better shape.
Now at v1.12.0.
2018-02-09 23:08:47 -06:00
Shamus Hammons 29b32d134b Lots of fixes for floating point handling; version now at 1.11.0.
Some of the following changes are ggn's, and some are mine:

 - When tokenizing floats we need to store them using a double pointer
 - PTR union needed a (double *)
 - Major changes to float depositing in eagen0.c
 - Reverted the changes in expr.c so at least floats are processed by
   expr() and friends
 - SYM svalue needs to be 64 bits
 - When EQUing a float symbol don't chop off the upper 32 bits from eval
 - Added fltpoint.{c,h} in order to properly create IEEE-754 floating
   point and Motorola extended numbers
 - Fixed float evaluations in evexpr()
 - Fixed floating point depositions in direct.c (in d_dc())
 - Upped the BSD image limit in object.c to 8MB for crazy people making
   6MB Jaguar ROMs (will need a real fix at some point)
2018-01-21 08:25:06 -06:00
ggn c2caacfdc8 Modified IMACRO and IREPT to store line numbers during definition - error now correctly prints source line number 2017-11-29 13:58:33 -06:00
Shamus Hammons c9541a9d4f Fixed IREPT blocks to not corrupt memory on 64-bit hosts. 2017-07-19 15:27:06 -05:00
ggn 03dd34951a (c) message in header files and doc mini adjustments. 2017-05-08 09:15:22 -05:00
Shamus Hammons ff2052bcaa Code cleanup, version bump for last commit. :-) 2017-04-20 14:29:31 -05:00
Shamus Hammons 60f204cb9e ELF support for RMAC.
ggn deserves most of the credit for this, as my job was going through
and tossing out the stuff that wasn't needed. ;-) There might be some
ELFish things that still need fixing; time, as usual, will tell.
2017-04-14 15:52:31 -05:00
ggn c74d8ef6f1 Visual Studio 2015 project files. A few warnings about unused variables fixed.
Signed-off-by: Shamus Hammons <jlhamm@acm.org>
2015-10-06 21:10:42 -05:00
Shamus Hammons d0c28c349d Fix for "*" getting bad section attributes, reported by A. Seed. 2015-02-19 08:56:14 -06:00
Shamus Hammons a48737de12 Fixed a nasty bug that dropped symbols that shouldn't have been.
This stemmed from the fact that EQUR symbols somehow made it on to the
symbol declaration list. If such symbol was later .equrundef'd, it would
find it's way back onto the the sdecl list *twice*, with the result
that any symbols that came after it would be summarily discarded into
the ether. Really, really bad mojo.
2015-01-31 20:49:38 -06:00
Shamus Hammons 3f2bccb78a Misc. whitespace cleanups, removal of unneeded code. 2015-01-16 11:16:33 -06:00
Shamus Hammons 062214e620 Fixed word reversed fixup problem.
For some reason, there was code in several places that marked fixups/symbols
as belonging to a RISC section when it was clearly not the case. As a result,
it caused serious problems by reversing words in 68K sections just because a
symbol had been seen in a MOVEI # statement in a RISC section. Probably not
the last nasty surprise in this pile of spaghetti. :-/
2014-05-17 15:56:15 -05:00
Shamus Hammons daf2f61a36 Fixed problem with nested MACROs.
While the assembler is in better shape vis-a-vis 64-bitness, there's
still a long way to go towards refactoring the thing to remove all
the problems it has with crufty data structures, and I'm sure there's
still bugs left in things like the .rept directive.
2012-11-25 22:49:46 -06:00
Shamus Hammons d16b8ea0ee First working 64-bit version of RMAC
There's still lots to do, like refactoring a bunch of stuff that's
still basically wrong, but that's par for the course. There may be
more things that need fixing (like the .rept function, for example).
2012-11-24 13:48:52 -06:00
Shamus Hammons 49cce96fba Code cleanup and prepartion for 64-bit host fixes
I removed a few functions that are better off being handled by the
native system libraries (malloc for amem, strdup for nstring). Also,
cleaned up files in preparation for removing pointers from the token
stream--which is preventing RMAC from working on 64-bit systems.
2012-11-23 10:39:09 -06:00
James Hammons 3385b36663 More readability cleanups. 2012-01-19 22:28:32 +00:00
James Hammons 75cce0d9eb Various cleanups to fix compiler warnings. 2011-12-26 23:54:45 +00:00
James Hammons d28f432296 Initial commit. 2011-12-26 22:50:27 +00:00