Subversion Repositories tendra.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
2
    		 Crown Copyright (c) 1997
3
 
4
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
12
 
13
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
15
 
16
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
19
 
20
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
22
        these conditions;
23
 
24
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
27
        it may be put.
28
*/
29
 
30
 
31
/* 	$Id: symdiags.c,v 1.2 1998/02/04 10:43:33 release Exp $	 */
32
 
33
#ifndef lint
34
static char vcid[] = "$Id: symdiags.c,v 1.2 1998/02/04 10:43:33 release Exp $";
35
#endif /* lint */
36
/*
37
  symdiags.c
38
 
39
  Functions for the inclusion of diagnostic information in 
40
  symbolic assembler files.  Only file and line number information 
41
  is available.
42
*/
43
#include "config.h"
44
#include "common_types.h"
45
#include "exptypes.h"
46
#include "shapemacs.h"
47
#include "expmacs.h"
48
#include "exp.h"
49
#include "procrectypes.h"
50
#include "procrecs.h"
51
#include "tags.h"
52
#include "bitsmacs.h"
53
#include "diagtypes.h"
54
#include "xalloc.h"
55
#include "ibinasm.h"
56
#include "out_ba.h"
57
#include "syms.h"
58
#include "diag_fns.h"
59
#include "locate.h"
60
#include "symbol.h"
61
#include "alphadiags.h"
62
#include "diagglob.h"
63
#include "mark_scope.h"
64
#include "symdiags.h"
65
#include "pseudo.h"
66
#include "cross_config.h"
67
 
68
#ifndef CROSS_INCLUDE
69
#include <symconst.h>
70
#else
71
#include CROSS_INCLUDE/symconst.h>
72
#endif
73
 
74
 
75
static char *currentfile="";	/* The current source file (.c) */
76
 
77
 
78
/*
79
  This function outputs a line number and, if necessary, a
80
  file identifying the place in the original source to look
81
  when debugging.
82
*/
83
void output_symbolic_diagnostic
84
    PROTO_N ( ( outfile,inf ) )
85
    PROTO_T ( FILE *outfile X diag_info *inf )
86
{
87
  sourcemark *source;
88
  char * fname;
89
  if(inf->key == DIAG_INFO_SOURCE){
90
    source = &inf->data.source.beg;
91
    fname = source->file->file.ints.chars;
92
    if(strcmp(fname,currentfile)){
93
      /* if the file is _not_ the same as the current file */
94
      set_file(fname,1);
95
      currentfile = fname;
96
    }
97
    set_lineno(source->line_no.nat_val.small_nat,1);
98
    return;
99
  }
100
  if(inf->key != DIAG_INFO_ID) return;
101
  return;	
102
}
103
 
104