1 /* gdb.c -as supports gdb-
2 Copyright (C) 1987 Free Software Foundation, Inc.
4 This file is part of GAS, the GNU Assembler.
6 GAS is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 1, or (at your option)
11 GAS is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GAS; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
20 /* This code is independent of the underlying operating system. */
24 static long int size
; /* 0 or size of GDB symbol file. */
25 static char * where
; /* Where we put symbol file in memory. */
27 #define SUSPECT /* JF */
29 long int /* 0 means don't call gdb_... routines */
30 gdb_begin (filename
) /* because we failed to establish file */
32 char * filename
; /* NULL: we have nothing to do. */
34 long int gdb_file_size();
36 void gdb_file_begin();
38 void gdb_block_begin();
39 void gdb_symbols_begin();
43 if (filename
&& (size
= gdb_file_size (filename
)))
45 where
= xmalloc( (long) size
);
46 gdb_file_read (where
, filename
); /* Read, then close file. */
62 gdb_emit (filename
) /* Append GDB symbols to object file. */
65 void gdb_block_emit();
66 void gdb_symbols_emit();
67 void gdb_lines_emit();
68 void output_file_append();
73 output_file_append (where
, size
, filename
);
79 Notes: We overwrite what was there.
80 We assume all overwrites are 4-char numbers.
84 gdb_alter (offset
, value
) /* put value into GDB file + offset. */
88 void md_number_to_chars();
91 if (offset
> size
- sizeof(long int) || offset
< 0)
93 as_warn( "gdb_alter: offset=%d. size=%ld.\n", offset
, size
);
99 /* Symbol info will be used on the host machine only (only executable
100 * code is actually downloaded to the i80960). Therefore, leave it
101 * in host byte order.
104 *(long int *)(where
+ offset
) = value
;
106 md_number_to_chars (where
+ offset
, value
, 4);
This page took 0.03232 seconds and 4 git commands to generate.