Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
ns32ktoolchain [2020/07/06 18:23] – [GDB] admin | ns32ktoolchain [2020/07/10 00:19] – [GDB] admin |
---|
==== GNU as ==== | ==== GNU as ==== |
| |
GNU ''as'' (gas) has a slightly different syntax than the so-called TDS (Tiny Development System) and [[http://wiki.sensi.org/download/ns32k/as_refman.pdf|GENIX assembler]]. Be careful when porting your ns32k assembler files to gas. As an example, all hex constants should be written as 0x123456 not x'123456. Immediate values should not be prepended with ''$''. To access a variable as PC-relative use ''movd var(pc),r0'' istruction. Many assembler directives are different too. Consult a documentation : | GNU ''as'' (gas) has a slightly different syntax than so-called TDS (Tiny Development System) assembler and [[http://wiki.sensi.org/download/ns32k/as_refman.pdf|GENIX assembler]]. Be careful when porting your ns32k assembler files to gas. As an example, all hex constants should be written as 0x123456 not x'123456. Immediate values should not be prepended with ''$''. To access a variable as PC-relative use ''movd var(pc),r0'' istruction template. Many assembler directives are different too. Consult a documentation : |
| |
https://sourceware.org/binutils/docs/as/index.html | https://sourceware.org/binutils/docs/as/index.html |
| |
On the other hand, GNU ''as'' is just a "backend" for the GCC compiler and rarely used standalone. | On the other hand, GNU ''as'' is just a "backend" for the GCC compiler and rarely used standalone. An examples of the GNU ''as'' usage may be found in the NetBSD ns32k for the pc532 port: in the bootloader, kernel ans some libraries call optimized for speed. |
| |
GCC compiler has an interesting option ''-S'' to produce an assembly ''.s'' file from the ''.c''. Resulting files are fully compatible with ''gas''. Also GCC may pass an options to ''as'' with ''-Wa'' option. To produce an assembler listing with source code lines: | GCC compiler has an interesting option ''-S'' to produce an assembly ''.s'' file from the ''.c''. Resulting files are fully compatible with ''gas''. Also GCC may pass an options to ''as'' with ''-Wa'' option. To produce an assembler listing with source code lines: |
...Work in progress | ...Work in progress |
| |
Sources: ftp://sourceware.org/pub/gdb/old-releases/\\ | Sources: ftp://sourceware.org/pub/gdb/old-releases/ |
TODO: Examine NetBSD gdb. | |
| |
GDB 2.5.1: no ns32k support. parsing ns32k COFF coffread.c \\ | GDB 2.5.1: no ns32k support. parsing ns32k COFF coffread.c \\ |
... \\ | ... \\ |
GDB 4.0.1: uses [[wp>Binary_File_Descriptor_library|BFD]] \\ | GDB 4.0.1: uses [[wp>Binary_File_Descriptor_library|BFD]] \\ |
| ...\\ |
| NetBSD 1.5.3 uses GDB 4.17\\ |
... \\ | ... \\ |
GDB 6.4 dropped support for ns32k-*-* | GDB 6.4 dropped support for ns32k-*-* |