1 /* This file is debug.c
3 Copyright (C) 1987-1992 Free Software Foundation, Inc.
5 This file is part of GAS, the GNU Assembler.
7 GAS is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GAS is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GAS; see the file COPYING. If not, write to
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
21 /* Routines for debug use only. */
24 static char rcsid[] = "$FreeBSD: src/gnu/usr.bin/as/debug.c,v 1.5 1999/08/27 23:34:14 peter Exp $";
35 for ( chp=frchain_root; chp; chp = chp->frch_next ){
36 switch ( chp->frch_seg ){
47 printf("\nSEGMENT %s %d\n", p, chp->frch_subseg);
48 dmp_frag( chp->frch_root,"\t");
52 dmp_frag( fp, indent )
56 for ( ; fp; fp = fp->fr_next ){
57 printf("%sFRAGMENT @ 0x%x\n", indent, fp);
58 switch( fp->fr_type ){
60 printf("%srs_align(%d)\n",indent, fp->fr_offset);
63 printf("%srs_fill(%d)\n",indent, fp->fr_offset);
65 var_chars( fp, fp->fr_var + fp->fr_fix );
66 printf("%s\t repeated %d times,",
67 indent, fp->fr_offset);
68 printf(" fixed length if # chars == 0)\n");
71 printf("%srs_org(%d+sym @0x%x)\n",indent,
72 fp->fr_offset, fp->fr_symbol);
73 printf("%sfill with ",indent);
77 case rs_machine_dependent:
78 printf("%smachine_dep\n",indent);
81 printf("%sunknown type\n",indent);
84 printf("%saddr=%d(0x%x)\n",indent,fp->fr_address,fp->fr_address);
85 printf("%sfr_fix=%d\n",indent,fp->fr_fix);
86 printf("%sfr_var=%d\n",indent,fp->fr_var);
87 printf("%sfr_offset=%d\n",indent,fp->fr_offset);
88 printf("%schars @ 0x%x\n",indent,fp->fr_literal);
99 for ( p=(unsigned char*)fp->fr_literal; n; n-- , p++ ){
100 printf("%02x ", *p );