mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
* defs.h: Incorporate param.h. All users changed.
* param-no-tm.h: Change users to define TM_FILE_OVERRIDE instead. * param.h, param-no-tm.h: Removed. * Update copyrights in all changed files. * dbxread.c, dwarfread.c, inflow.c, infrun.c, m2-exp.y, putenv.c, solib.c, symtab.h, tm-umax.h, valprint.c: Lint. * tm-convex.h, tm-hp300hpux.h, tm-merlin.h, tm-sparc.h, xm-merlin.h: Avoid host include files in target descriptions. * getpagesize.h: Removed, libiberty copes now.
This commit is contained in:
parent
d51bea8d2c
commit
7d9884b927
@ -1,3 +1,15 @@
|
|||||||
|
Thu Nov 21 10:23:52 1991 John Gilmore (gnu at cygnus.com)
|
||||||
|
|
||||||
|
* defs.h: Incorporate param.h. All users changed.
|
||||||
|
* param-no-tm.h: Change users to define TM_FILE_OVERRIDE instead.
|
||||||
|
* param.h, param-no-tm.h: Removed.
|
||||||
|
* Update copyrights in all changed files.
|
||||||
|
* dbxread.c, dwarfread.c, inflow.c, infrun.c, m2-exp.y, putenv.c,
|
||||||
|
solib.c, symtab.h, tm-umax.h, valprint.c: Lint.
|
||||||
|
* tm-convex.h, tm-hp300hpux.h, tm-merlin.h, tm-sparc.h,
|
||||||
|
xm-merlin.h: Avoid host include files in target descriptions.
|
||||||
|
* getpagesize.h: Removed, libiberty copes now.
|
||||||
|
|
||||||
Wed Nov 20 18:35:56 1991 John Gilmore (gnu at cygnus.com)
|
Wed Nov 20 18:35:56 1991 John Gilmore (gnu at cygnus.com)
|
||||||
|
|
||||||
* Remove gdb/hp-include. Support for HP a.out oddities should be
|
* Remove gdb/hp-include. Support for HP a.out oddities should be
|
||||||
|
@ -20,7 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Target-machine dependent code for the AMD 29000
|
/* Target-machine dependent code for the AMD 29000
|
||||||
Copyright (C) 1990 Free Software Foundation, Inc.
|
Copyright 1990, 1991 Free Software Foundation, Inc.
|
||||||
Contributed by Cygnus Support. Written by Jim Kingdon.
|
Contributed by Cygnus Support. Written by Jim Kingdon.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
@ -23,7 +23,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Print ARM instructions for GDB, the GNU debugger.
|
/* Print Acorn Risc Machine instructions for GDB, the GNU debugger.
|
||||||
Copyright (C) 1986, 1989 Free Software Foundation, Inc.
|
Copyright 1986, 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -22,7 +22,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "arm-opcode.h"
|
#include "arm-opcode.h"
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ along with this program; if not, write to the Free Software
|
|||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "arm-opcode.h"
|
#include "arm-opcode.h"
|
||||||
|
@ -25,7 +25,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
make xcoffread.c more maintainable by sharing code. */
|
make xcoffread.c more maintainable by sharing code. */
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "obstack.h"
|
#include "obstack.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "breakpoint.h"
|
#include "breakpoint.h"
|
||||||
|
@ -31,7 +31,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "expression.h"
|
#include "expression.h"
|
||||||
|
@ -20,7 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "breakpoint.h"
|
#include "breakpoint.h"
|
||||||
#include "bfd.h"
|
#include "bfd.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Library for reading command lines and decoding commands.
|
/* Handle lists of commands, their decoding and documentation, for GDB.
|
||||||
Copyright (C) 1986, 1989, 1990 Free Software Foundation, Inc.
|
Copyright 1986, 1989, 1990, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -17,7 +17,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Print Convex instructions for GDB, the GNU debugger.
|
/* Print Convex instructions for GDB, the GNU debugger.
|
||||||
Copyright (C) 1989 Free Software Foundation, Inc.
|
Copyright 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -20,7 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
|
|
||||||
/* reg (fmt_field, inst_field) --
|
/* reg (fmt_field, inst_field) --
|
||||||
|
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
|
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Work with core dump and executable files, for GDB.
|
/* Work with core dump and executable files, for GDB.
|
||||||
Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
|
Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -22,7 +22,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h" /* required by inferior.h */
|
#include "frame.h" /* required by inferior.h */
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
|
@ -21,7 +21,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
this file is more machine-specific. */
|
this file is more machine-specific. */
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Demangler for GNU C++
|
/* Demangler for GNU C++
|
||||||
Copyright (C) 1989 Free Software Foundation, Inc.
|
Copyright 1989, 1991 Free Software Foundation, Inc.
|
||||||
written by James Clark (jjc@jclark.uucp)
|
written by James Clark (jjc@jclark.uucp)
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@ -16,14 +16,7 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
/* This is for g++ 1.36.1 (November 6 version). It will probably
|
/* This is for g++ 1.95.03 (November 13 verison). */
|
||||||
require changes for any other version.
|
|
||||||
|
|
||||||
Modified for g++ 1.36.2 (November 18 version).
|
|
||||||
|
|
||||||
Modified for g++ 1.90.06 (December 31 version).
|
|
||||||
|
|
||||||
Modified for g++ 1.95.03 (November 13 verison). */
|
|
||||||
|
|
||||||
/* This file exports one function
|
/* This file exports one function
|
||||||
|
|
||||||
@ -61,7 +54,6 @@
|
|||||||
|
|
||||||
/* GDB-specific, FIXME. */
|
/* GDB-specific, FIXME. */
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
|
|
||||||
#ifdef USG
|
#ifdef USG
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
|
877
gdb/dbxread.c
877
gdb/dbxread.c
File diff suppressed because it is too large
Load Diff
78
gdb/defs.h
78
gdb/defs.h
@ -1,4 +1,4 @@
|
|||||||
/* Basic definitions for GDB, the GNU debugger.
|
/* Basic, host-specific, and target-specific definitions for GDB.
|
||||||
Copyright (C) 1986, 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1986, 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
@ -69,6 +69,7 @@ extern int parse_escape ();
|
|||||||
extern char *reg_names[];
|
extern char *reg_names[];
|
||||||
/* Indicate that these routines do not return to the caller. */
|
/* Indicate that these routines do not return to the caller. */
|
||||||
extern volatile void error(), fatal();
|
extern volatile void error(), fatal();
|
||||||
|
extern void warning_setup(), warning();
|
||||||
|
|
||||||
/* Various possibilities for alloca. */
|
/* Various possibilities for alloca. */
|
||||||
#ifndef alloca
|
#ifndef alloca
|
||||||
@ -274,6 +275,7 @@ enum language
|
|||||||
language_unknown, /* Language not known */
|
language_unknown, /* Language not known */
|
||||||
language_auto, /* Placeholder for automatic setting */
|
language_auto, /* Placeholder for automatic setting */
|
||||||
language_c, /* C */
|
language_c, /* C */
|
||||||
|
language_cplus, /* C++ */
|
||||||
language_m2, /* Modula-2 */
|
language_m2, /* Modula-2 */
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -292,5 +294,79 @@ char *local_hex_format_custom(); /* language.c */
|
|||||||
|
|
||||||
char *local_hex_string (); /* language.c */
|
char *local_hex_string (); /* language.c */
|
||||||
char *local_hex_string_custom (); /* language.c */
|
char *local_hex_string_custom (); /* language.c */
|
||||||
|
|
||||||
|
/* System-dependent parameters for GDB.
|
||||||
|
|
||||||
|
The standard thing is to include defs.h. However, files that are
|
||||||
|
specific to a particular target can define TM_FILE_OVERRIDE before
|
||||||
|
including defs.h, then can include any particular tm-file they desire. */
|
||||||
|
|
||||||
|
/* Target machine definition. This will be a symlink to one of the
|
||||||
|
tm-*.h files, built by the `configure' script. */
|
||||||
|
|
||||||
|
#ifndef TM_FILE_OVERRIDE
|
||||||
|
#include "tm.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Host machine definition. This will be a symlink to one of the
|
||||||
|
xm-*.h files, built by the `configure' script. */
|
||||||
|
|
||||||
|
#include "xm.h"
|
||||||
|
|
||||||
|
/* TARGET_BYTE_ORDER and HOST_BYTE_ORDER should be defined to one of these. */
|
||||||
|
#if !defined (BIG_ENDIAN)
|
||||||
|
#define BIG_ENDIAN 4321
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined (LITTLE_ENDIAN)
|
||||||
|
#define LITTLE_ENDIAN 1234
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* The bit byte-order has to do just with numbering of bits in
|
||||||
|
debugging symbols and such. Conceptually, it's quite separate
|
||||||
|
from byte/word byte order. */
|
||||||
|
|
||||||
|
#if !defined (BITS_BIG_ENDIAN)
|
||||||
|
#if TARGET_BYTE_ORDER == BIG_ENDIAN
|
||||||
|
#define BITS_BIG_ENDIAN 1
|
||||||
|
#endif /* Big endian. */
|
||||||
|
|
||||||
|
#if TARGET_BYTE_ORDER == LITTLE_ENDIAN
|
||||||
|
#define BITS_BIG_ENDIAN 0
|
||||||
|
#endif /* Little endian. */
|
||||||
|
#endif /* BITS_BIG_ENDIAN not defined. */
|
||||||
|
|
||||||
|
/* Swap LEN bytes at BUFFER between target and host byte-order. */
|
||||||
|
#if TARGET_BYTE_ORDER == HOST_BYTE_ORDER
|
||||||
|
#define SWAP_TARGET_AND_HOST(buffer,len)
|
||||||
|
#else /* Target and host byte order differ. */
|
||||||
|
#define SWAP_TARGET_AND_HOST(buffer,len) \
|
||||||
|
{ \
|
||||||
|
char tmp; \
|
||||||
|
char *p = (char *)(buffer); \
|
||||||
|
char *q = ((char *)(buffer)) + len - 1; \
|
||||||
|
for (; p < q; p++, q--) \
|
||||||
|
{ \
|
||||||
|
tmp = *q; \
|
||||||
|
*q = *p; \
|
||||||
|
*p = tmp; \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
#endif /* Target and host byte order differ. */
|
||||||
|
|
||||||
|
/* On some machines there are bits in addresses which are not really
|
||||||
|
part of the address, but are used by the kernel, the hardware, etc.
|
||||||
|
for special purposes. ADDR_BITS_REMOVE takes out any such bits
|
||||||
|
so we get a "real" address such as one would find in a symbol
|
||||||
|
table. ADDR_BITS_SET sets those bits the way the system wants
|
||||||
|
them. */
|
||||||
|
#if !defined (ADDR_BITS_REMOVE)
|
||||||
|
#define ADDR_BITS_REMOVE(addr) (addr)
|
||||||
|
#define ADDR_BITS_SET(addr) (addr)
|
||||||
|
#endif /* No ADDR_BITS_REMOVE. */
|
||||||
|
|
||||||
|
#if !defined (SYS_SIGLIST_MISSING)
|
||||||
|
#define SYS_SIGLIST_MISSING defined (USG)
|
||||||
|
#endif /* No SYS_SIGLIST_MISSING */
|
||||||
|
|
||||||
#endif /* no DEFS_H */
|
#endif /* no DEFS_H */
|
||||||
|
@ -72,7 +72,6 @@ other things to work on, if you get bored. :-)
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "bfd.h"
|
#include "bfd.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "symfile.h"
|
#include "symfile.h"
|
||||||
@ -2443,9 +2442,7 @@ DESCRIPTION
|
|||||||
static void
|
static void
|
||||||
DEFUN(dwarf_psymtab_to_symtab, (pst), struct partial_symtab *pst)
|
DEFUN(dwarf_psymtab_to_symtab, (pst), struct partial_symtab *pst)
|
||||||
{
|
{
|
||||||
int desc;
|
|
||||||
bfd *sym_bfd;
|
|
||||||
|
|
||||||
if (!pst)
|
if (!pst)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -39,7 +39,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "elf-common.h"
|
#include "elf-common.h"
|
||||||
#include "elf-external.h"
|
#include "elf-external.h"
|
||||||
#include "elf-internal.h"
|
#include "elf-internal.h"
|
||||||
|
40
gdb/exec.c
40
gdb/exec.c
@ -1,5 +1,5 @@
|
|||||||
/* Work with executable files, for GDB.
|
/* Work with executable files, for GDB.
|
||||||
Copyright (C) 1988, 1989 Free Software Foundation, Inc.
|
Copyright 1988, 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
@ -111,34 +110,6 @@ exec_file_command (filename, from_tty)
|
|||||||
error ("\"%s\": not in executable format: %s.",
|
error ("\"%s\": not in executable format: %s.",
|
||||||
scratch_pathname, bfd_errmsg (bfd_error));
|
scratch_pathname, bfd_errmsg (bfd_error));
|
||||||
|
|
||||||
#if FIXME
|
|
||||||
/* This code needs to be incorporated into BFD */
|
|
||||||
#ifdef COFF_ENCAPSULATE
|
|
||||||
/* If we have a coff header, it can give us better values for
|
|
||||||
text_start and exec_data_start. This is particularly useful
|
|
||||||
for remote debugging of embedded systems. */
|
|
||||||
if (N_FLAGS(exec_aouthdr) & N_FLAGS_COFF_ENCAPSULATE)
|
|
||||||
{
|
|
||||||
struct coffheader ch;
|
|
||||||
int val;
|
|
||||||
val = lseek (execchan, -(sizeof (AOUTHDR) + sizeof (ch)), 1);
|
|
||||||
if (val == -1)
|
|
||||||
perror_with_name (filename);
|
|
||||||
val = myread (execchan, &ch, sizeof (ch));
|
|
||||||
if (val < 0)
|
|
||||||
perror_with_name (filename);
|
|
||||||
text_start = ch.text_start;
|
|
||||||
exec_data_start = ch.data_start;
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
text_start =
|
|
||||||
IS_OBJECT_FILE (exec_aouthdr) ? 0 : N_TXTADDR (exec_aouthdr);
|
|
||||||
exec_data_start = IS_OBJECT_FILE (exec_aouthdr)
|
|
||||||
? exec_aouthdr.a_text : N_DATADDR (exec_aouthdr);
|
|
||||||
}
|
|
||||||
#endif FIXME
|
|
||||||
|
|
||||||
if (build_section_table (exec_bfd, &exec_ops.sections,
|
if (build_section_table (exec_bfd, &exec_ops.sections,
|
||||||
&exec_ops.sections_end))
|
&exec_ops.sections_end))
|
||||||
error ("Can't find the file sections in `%s': %s",
|
error ("Can't find the file sections in `%s': %s",
|
||||||
@ -323,11 +294,14 @@ exec_files_info ()
|
|||||||
{
|
{
|
||||||
struct section_table *p;
|
struct section_table *p;
|
||||||
|
|
||||||
printf ("\tExecutable file `%s'.\n", bfd_get_filename(exec_bfd));
|
printf_filtered ("\t`%s', ", bfd_get_filename(exec_bfd));
|
||||||
|
wrap_here (" ");
|
||||||
|
printf_filtered ("file type %s.\n", bfd_get_target(exec_bfd));
|
||||||
|
|
||||||
for (p = exec_ops.sections; p < exec_ops.sections_end; p++) {
|
for (p = exec_ops.sections; p < exec_ops.sections_end; p++) {
|
||||||
printf("\t%s", local_hex_string_custom (p->addr, "08"));
|
printf_filtered ("\t%s", local_hex_string_custom (p->addr, "08"));
|
||||||
printf(" - %s is %s\n", local_hex_string_custom (p->endaddr, "08"),
|
printf_filtered (" - %s is %s\n",
|
||||||
|
local_hex_string_custom (p->endaddr, "08"),
|
||||||
bfd_section_name (exec_bfd, p->sec_ptr));
|
bfd_section_name (exec_bfd, p->sec_ptr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Find a variable's value in memory, for GDB, the GNU debugger.
|
/* Find a variable's value in memory, for GDB, the GNU debugger.
|
||||||
Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
|
Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
@ -399,7 +398,6 @@ read_var_value (var, frame)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case LOC_STATIC:
|
case LOC_STATIC:
|
||||||
case LOC_EXTERNAL:
|
|
||||||
addr = SYMBOL_VALUE_ADDRESS (var);
|
addr = SYMBOL_VALUE_ADDRESS (var);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -646,7 +644,6 @@ locate_var_value (var, frame)
|
|||||||
{
|
{
|
||||||
CORE_ADDR addr = 0;
|
CORE_ADDR addr = 0;
|
||||||
struct type *type = SYMBOL_TYPE (var);
|
struct type *type = SYMBOL_TYPE (var);
|
||||||
struct type *result_type;
|
|
||||||
value lazy_value;
|
value lazy_value;
|
||||||
|
|
||||||
/* Evaluate it first; if the result is a memory address, we're fine.
|
/* Evaluate it first; if the result is a memory address, we're fine.
|
||||||
@ -672,14 +669,7 @@ locate_var_value (var, frame)
|
|||||||
type = TYPE_TARGET_TYPE (type);
|
type = TYPE_TARGET_TYPE (type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Address of an array is of the type of address of it's elements. */
|
return value_from_longest (lookup_pointer_type (type), (LONGEST) addr);
|
||||||
/* FIXME, this is probably wrong now for ANSI C. */
|
|
||||||
result_type =
|
|
||||||
lookup_pointer_type (TYPE_CODE (type) == TYPE_CODE_ARRAY ?
|
|
||||||
TYPE_TARGET_TYPE (type) : type);
|
|
||||||
|
|
||||||
return value_cast (result_type,
|
|
||||||
value_from_long (builtin_type_long, (LONGEST) addr));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Not a memory address; check what the problem was. */
|
/* Not a memory address; check what the problem was. */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Print GOULD RISC instructions for GDB, the GNU debugger.
|
/* Print GOULD RISC instructions for GDB, the GNU debugger.
|
||||||
Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
|
Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -18,12 +18,10 @@ along with this program; if not, write to the Free Software
|
|||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "gdbcore.h"
|
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
|
#include "gdbcore.h"
|
||||||
#if defined GOULD_PN
|
#if defined GOULD_PN
|
||||||
#include "pn-opcode.h"
|
#include "pn-opcode.h"
|
||||||
#else
|
#else
|
||||||
|
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
/* For the GDB interface at the bottom of the file... */
|
/* For the GDB interface at the bottom of the file... */
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
|
|
||||||
#define Eb OP_E, b_mode
|
#define Eb OP_E, b_mode
|
||||||
|
@ -3,49 +3,26 @@
|
|||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
GDB is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 1, or (at your option)
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
GDB is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with GDB; see the file COPYING. If not, write to
|
along with this program; if not, write to the Free Software
|
||||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
|
|
||||||
#ifdef USG
|
|
||||||
#include <sys/types.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <sys/dir.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <sys/user.h>
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
#ifndef N_SET_MAGIC
|
|
||||||
#ifdef COFF_FORMAT
|
|
||||||
#define N_SET_MAGIC(exec, val) ((exec).magic = (val))
|
|
||||||
#else
|
|
||||||
#define N_SET_MAGIC(exec, val) ((exec).a_magic = (val))
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/file.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
|
|
||||||
/* helper functions for tm-i386.h */
|
/* helper functions for tm-i386.h */
|
||||||
|
|
||||||
/* stdio style buffering to minimize calls to ptrace */
|
/* stdio style buffering to minimize calls to ptrace */
|
||||||
|
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
|
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
|
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
|
@ -18,7 +18,6 @@ along with this program; if not, write to the Free Software
|
|||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "ieee-float.h"
|
#include "ieee-float.h"
|
||||||
#include <math.h> /* ldexp */
|
#include <math.h> /* ldexp */
|
||||||
|
|
||||||
|
25
gdb/inflow.c
25
gdb/inflow.c
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "command.h"
|
#include "command.h"
|
||||||
@ -60,7 +59,7 @@ static struct tchars tc_inferior;
|
|||||||
static struct tchars tc_ours;
|
static struct tchars tc_ours;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TIOCGLTC
|
#if defined(TIOCGLTC) && !defined(TIOCGLTC_BROKEN)
|
||||||
static struct ltchars ltc_inferior;
|
static struct ltchars ltc_inferior;
|
||||||
static struct ltchars ltc_ours;
|
static struct ltchars ltc_ours;
|
||||||
#endif
|
#endif
|
||||||
@ -71,8 +70,13 @@ static int lmode_ours;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TIOCGPGRP
|
#ifdef TIOCGPGRP
|
||||||
|
# ifdef SHORT_PGRP
|
||||||
|
static short pgrp_inferior;
|
||||||
|
static short pgrp_ours;
|
||||||
|
# else
|
||||||
static int pgrp_inferior;
|
static int pgrp_inferior;
|
||||||
static int pgrp_ours;
|
static int pgrp_ours;
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
static void (*sigint_ours) ();
|
static void (*sigint_ours) ();
|
||||||
static void (*sigquit_ours) ();
|
static void (*sigquit_ours) ();
|
||||||
@ -100,7 +104,7 @@ terminal_init_inferior ()
|
|||||||
tc_inferior = tc_ours;
|
tc_inferior = tc_ours;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TIOCGLTC
|
#if defined(TIOCGLTC) && !defined(TIOCGLTC_BROKEN)
|
||||||
ltc_inferior = ltc_ours;
|
ltc_inferior = ltc_ours;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -130,7 +134,7 @@ terminal_inferior ()
|
|||||||
#if defined(TIOCGETC) && !defined(TIOCGETC_BROKEN)
|
#if defined(TIOCGETC) && !defined(TIOCGETC_BROKEN)
|
||||||
ioctl (0, TIOCSETC, &tc_inferior);
|
ioctl (0, TIOCSETC, &tc_inferior);
|
||||||
#endif
|
#endif
|
||||||
#ifdef TIOCGLTC
|
#if defined(TIOCGLTC) && !defined(TIOCGLTC_BROKEN)
|
||||||
ioctl (0, TIOCSLTC, <c_inferior);
|
ioctl (0, TIOCSLTC, <c_inferior);
|
||||||
#endif
|
#endif
|
||||||
#ifdef TIOCLGET
|
#ifdef TIOCLGET
|
||||||
@ -210,7 +214,7 @@ terminal_ours_1 (output_only)
|
|||||||
#if defined(TIOCGETC) && !defined(TIOCGETC_BROKEN)
|
#if defined(TIOCGETC) && !defined(TIOCGETC_BROKEN)
|
||||||
ioctl (0, TIOCGETC, &tc_inferior);
|
ioctl (0, TIOCGETC, &tc_inferior);
|
||||||
#endif
|
#endif
|
||||||
#ifdef TIOCGLTC
|
#if defined(TIOCGLTC) && !defined(TIOCGLTC_BROKEN)
|
||||||
ioctl (0, TIOCGLTC, <c_inferior);
|
ioctl (0, TIOCGLTC, <c_inferior);
|
||||||
#endif
|
#endif
|
||||||
#ifdef TIOCLGET
|
#ifdef TIOCLGET
|
||||||
@ -235,7 +239,7 @@ terminal_ours_1 (output_only)
|
|||||||
#if defined(TIOCGETC) && !defined(TIOCGETC_BROKEN)
|
#if defined(TIOCGETC) && !defined(TIOCGETC_BROKEN)
|
||||||
ioctl (0, TIOCSETC, &tc_ours);
|
ioctl (0, TIOCSETC, &tc_ours);
|
||||||
#endif
|
#endif
|
||||||
#ifdef TIOCGLTC
|
#if defined(TIOCGLTC) && !defined(TIOCGLTC_BROKEN)
|
||||||
ioctl (0, TIOCSLTC, <c_ours);
|
ioctl (0, TIOCSLTC, <c_ours);
|
||||||
#endif
|
#endif
|
||||||
#ifdef TIOCLGET
|
#ifdef TIOCLGET
|
||||||
@ -293,7 +297,7 @@ child_terminal_info (args, from_tty)
|
|||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TIOCGLTC
|
#if defined(TIOCGLTC) && !defined(TIOCGLTC_BROKEN)
|
||||||
printf_filtered ("ltchars: ");
|
printf_filtered ("ltchars: ");
|
||||||
for (i = 0; i < (int)sizeof (struct ltchars); i++)
|
for (i = 0; i < (int)sizeof (struct ltchars); i++)
|
||||||
printf_filtered ("0x%x ", ((char *)<c_inferior)[i]);
|
printf_filtered ("0x%x ", ((char *)<c_inferior)[i]);
|
||||||
@ -314,6 +318,7 @@ child_terminal_info (args, from_tty)
|
|||||||
become debugger target processes. This actually switches to
|
become debugger target processes. This actually switches to
|
||||||
the terminal specified in the NEW_TTY_PREFORK call. */
|
the terminal specified in the NEW_TTY_PREFORK call. */
|
||||||
|
|
||||||
|
void
|
||||||
new_tty_prefork (ttyname)
|
new_tty_prefork (ttyname)
|
||||||
char *ttyname;
|
char *ttyname;
|
||||||
{
|
{
|
||||||
@ -342,7 +347,11 @@ new_tty ()
|
|||||||
|
|
||||||
/* Now open the specified new terminal. */
|
/* Now open the specified new terminal. */
|
||||||
|
|
||||||
|
#ifdef USE_O_NOCTTY
|
||||||
|
tty = open(inferior_thisrun_terminal, O_RDWR | O_NOCTTY);
|
||||||
|
#else
|
||||||
tty = open(inferior_thisrun_terminal, O_RDWR);
|
tty = open(inferior_thisrun_terminal, O_RDWR);
|
||||||
|
#endif
|
||||||
if (tty == -1)
|
if (tty == -1)
|
||||||
{
|
{
|
||||||
print_sys_errmsg (inferior_thisrun_terminal, errno);
|
print_sys_errmsg (inferior_thisrun_terminal, errno);
|
||||||
@ -483,7 +492,7 @@ Report which ones can be written.");
|
|||||||
#if defined(TIOCGETC) && !defined(TIOCGETC_BROKEN)
|
#if defined(TIOCGETC) && !defined(TIOCGETC_BROKEN)
|
||||||
ioctl (0, TIOCGETC, &tc_ours);
|
ioctl (0, TIOCGETC, &tc_ours);
|
||||||
#endif
|
#endif
|
||||||
#ifdef TIOCGLTC
|
#if defined(TIOCGLTC) && !defined(TIOCGLTC_BROKEN)
|
||||||
ioctl (0, TIOCGLTC, <c_ours);
|
ioctl (0, TIOCGLTC, <c_ours);
|
||||||
#endif
|
#endif
|
||||||
#ifdef TIOCLGET
|
#ifdef TIOCLGET
|
||||||
|
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
|
@ -119,7 +119,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Main loop for the standalone kernel debugger.
|
/* Main loop for the standalone kernel debugger, for GDB, the GNU Debugger.
|
||||||
Copyright (C) 1989, Free Software Foundation, Inc.
|
Copyright 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -18,7 +18,6 @@ along with this program; if not, write to the Free Software
|
|||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
|
|
||||||
static char *args[] = {"kdb", "kdb-symbols", 0};
|
static char *args[] = {"kdb", "kdb-symbols", 0};
|
||||||
|
|
||||||
|
16
gdb/m2-exp.y
16
gdb/m2-exp.y
@ -32,7 +32,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "expression.h"
|
#include "expression.h"
|
||||||
@ -577,10 +576,25 @@ variable: NAME
|
|||||||
case LOC_REGISTER:
|
case LOC_REGISTER:
|
||||||
case LOC_ARG:
|
case LOC_ARG:
|
||||||
case LOC_LOCAL:
|
case LOC_LOCAL:
|
||||||
|
case LOC_REF_ARG:
|
||||||
|
case LOC_REGPARM:
|
||||||
|
case LOC_LOCAL_ARG:
|
||||||
if (innermost_block == 0 ||
|
if (innermost_block == 0 ||
|
||||||
contained_in (block_found,
|
contained_in (block_found,
|
||||||
innermost_block))
|
innermost_block))
|
||||||
innermost_block = block_found;
|
innermost_block = block_found;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LOC_UNDEF:
|
||||||
|
case LOC_CONST:
|
||||||
|
case LOC_STATIC:
|
||||||
|
case LOC_TYPEDEF:
|
||||||
|
case LOC_LABEL: /* maybe should go above? */
|
||||||
|
case LOC_BLOCK:
|
||||||
|
case LOC_CONST_BYTES:
|
||||||
|
/* These are listed so gcc -Wall will reveal
|
||||||
|
un-handled cases. */
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
write_exp_elt_opcode (OP_VAR_VALUE);
|
write_exp_elt_opcode (OP_VAR_VALUE);
|
||||||
write_exp_elt_sym (sym);
|
write_exp_elt_sym (sym);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Print m68k instructions for GDB, the GNU debugger.
|
/* Print Motorola 68k instructions for GDB, the GNU debugger.
|
||||||
Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
|
Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -20,7 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "m68k-opcode.h"
|
#include "m68k-opcode.h"
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
|
@ -1,4 +1,23 @@
|
|||||||
/* This file has been modified by Data General Corporation, November 1989. */
|
/* Print instructions for the Motorola 88000, for GDB and GNU Binutils.
|
||||||
|
Copyright 1986, 1987, 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
|
||||||
|
Contributed by Data General Corporation, November 1989.
|
||||||
|
Partially derived from an earlier printcmd.c.
|
||||||
|
|
||||||
|
This file is part of GDB and the GNU Binutils.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "m88k-opcode.h"
|
#include "m88k-opcode.h"
|
||||||
@ -7,10 +26,6 @@
|
|||||||
|
|
||||||
void sprint_address ();
|
void sprint_address ();
|
||||||
|
|
||||||
/* Changed hashtab to hashtable to avoid naming conflict
|
|
||||||
with libdc.o (used for tdesc) for m88k.
|
|
||||||
*/
|
|
||||||
|
|
||||||
INSTAB *hashtable[HASHVAL] = {0};
|
INSTAB *hashtable[HASHVAL] = {0};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/* Copyright (C) 1988, 1990 Free Software Foundation, Inc.
|
/* Host-dependent Motorola 88xxx support for GDB, the GNU Debugger.
|
||||||
|
Copyright 1988, 1990, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -18,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "signame.h"
|
#include "signame.h"
|
||||||
|
30
gdb/main.c
30
gdb/main.c
@ -1,5 +1,5 @@
|
|||||||
/* Top level for GDB, the GNU debugger.
|
/* Top level `main' program for GDB, the GNU debugger.
|
||||||
Copyright (C) 1986, 1987, 1988, 1989, 1990 Free Software Foundation, Inc.
|
Copyright 1986, 1987, 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -21,7 +21,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
int fclose ();
|
int fclose ();
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "gdbcmd.h"
|
#include "gdbcmd.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "signals.h"
|
#include "signals.h"
|
||||||
@ -604,6 +603,27 @@ GDB manual (available as on-line info or a printed manual).\n", stderr);
|
|||||||
printf_filtered ("\n");
|
printf_filtered ("\n");
|
||||||
error_pre_print = "\n";
|
error_pre_print = "\n";
|
||||||
|
|
||||||
|
/* Set the initial language. */
|
||||||
|
{
|
||||||
|
extern enum language deduce_language_from_filename ();
|
||||||
|
extern struct partial_symtab *find_main_psymtab ();
|
||||||
|
struct partial_symtab *pst = find_main_psymtab ();
|
||||||
|
enum language lang = language_unknown;
|
||||||
|
if (pst == NULL) ;
|
||||||
|
#if 0
|
||||||
|
/* A better solution would set the language when reading the psymtab.
|
||||||
|
This would win for symbol file formats that encode the langauge,
|
||||||
|
such as dwarf. But, we don't do that yet. FIXME */
|
||||||
|
else if (pst->language != language_unknown)
|
||||||
|
lang = pst->language;
|
||||||
|
#endif
|
||||||
|
else if (pst->filename != NULL)
|
||||||
|
lang = deduce_language_from_filename (pst->filename);
|
||||||
|
if (lang == language_unknown) /* Make C the default language */
|
||||||
|
lang = language_c;
|
||||||
|
set_language (lang);
|
||||||
|
}
|
||||||
|
|
||||||
if (corearg != NULL)
|
if (corearg != NULL)
|
||||||
if (!setjmp (to_top_level))
|
if (!setjmp (to_top_level))
|
||||||
core_file_command (corearg, !batch);
|
core_file_command (corearg, !batch);
|
||||||
@ -1685,7 +1705,7 @@ cd_command (dir, from_tty)
|
|||||||
current_directory = dir;
|
current_directory = dir;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
current_directory = concat (current_directory, "/", dir);
|
current_directory = concat (current_directory, "/", dir, NULL);
|
||||||
free (dir);
|
free (dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2021,7 +2041,7 @@ initialize_history()
|
|||||||
/* We include the current directory so that if the user changes
|
/* We include the current directory so that if the user changes
|
||||||
directories the file written will be the same as the one
|
directories the file written will be the same as the one
|
||||||
that was read. */
|
that was read. */
|
||||||
history_filename = concat (current_directory, "/.gdb_history", "");
|
history_filename = concat (current_directory, "/.gdb_history", NULL);
|
||||||
}
|
}
|
||||||
read_history (history_filename);
|
read_history (history_filename);
|
||||||
}
|
}
|
||||||
|
100
gdb/mem-break.c
100
gdb/mem-break.c
@ -1,24 +1,24 @@
|
|||||||
/* Simulate breakpoints by patching locations in the target system.
|
/* Simulate breakpoints by patching locations in the target system, for GDB.
|
||||||
Copyright (C) 1990 Free Software Foundation, Inc.
|
Copyright 1990, 1991 Free Software Foundation, Inc.
|
||||||
|
Contributed by Cygnus Support. Written by John Gilmore.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
GDB is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 1, or (at your option)
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
GDB is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with GDB; see the file COPYING. If not, write to
|
along with this program; if not, write to the Free Software
|
||||||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
|
|
||||||
#ifdef BREAKPOINT
|
#ifdef BREAKPOINT
|
||||||
/* This file is only useful if BREAKPOINT is set. If not, we punt. */
|
/* This file is only useful if BREAKPOINT is set. If not, we punt. */
|
||||||
@ -72,86 +72,8 @@ memory_remove_breakpoint (addr, contents_cache)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
int memory_breakpoint_size = sizeof (break_insn);
|
||||||
/* This should move back into breakpoint.c, sad to say. Encapsulate
|
|
||||||
sizeof (BREAKPOINT) by export it as an int from mem-break.c. */
|
|
||||||
|
|
||||||
/* Like target_read_memory() but if breakpoints are inserted, return
|
|
||||||
the shadow contents instead of the breakpoints themselves. */
|
|
||||||
int
|
|
||||||
read_memory_nobpt (memaddr, myaddr, len)
|
|
||||||
CORE_ADDR memaddr;
|
|
||||||
char *myaddr;
|
|
||||||
unsigned len;
|
|
||||||
{
|
|
||||||
int status;
|
|
||||||
struct breakpoint *b;
|
|
||||||
ALL_BREAKPOINTS (b)
|
|
||||||
{
|
|
||||||
if (b->address == NULL || !b->inserted)
|
|
||||||
continue;
|
|
||||||
else if (b->address + sizeof (break_insn) <= memaddr)
|
|
||||||
/* The breakpoint is entirely before the chunk of memory
|
|
||||||
we are reading. */
|
|
||||||
continue;
|
|
||||||
else if (b->address >= memaddr + len)
|
|
||||||
/* The breakpoint is entirely after the chunk of memory we
|
|
||||||
are reading. */
|
|
||||||
continue;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Copy the breakpoint from the shadow contents, and recurse
|
|
||||||
for the things before and after. */
|
|
||||||
|
|
||||||
/* Addresses and length of the part of the breakpoint that
|
|
||||||
we need to copy. */
|
|
||||||
CORE_ADDR membpt = b->address;
|
|
||||||
unsigned int bptlen = sizeof (break_insn);
|
|
||||||
/* Offset within shadow_contents. */
|
|
||||||
int bptoffset = 0;
|
|
||||||
|
|
||||||
if (membpt < memaddr)
|
|
||||||
{
|
|
||||||
/* Only copy the second part of the breakpoint. */
|
|
||||||
bptlen -= memaddr - membpt;
|
|
||||||
bptoffset = memaddr - membpt;
|
|
||||||
membpt = memaddr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (membpt + bptlen > memaddr + len)
|
|
||||||
{
|
|
||||||
/* Only copy the first part of the breakpoint. */
|
|
||||||
bptlen -= (membpt + bptlen) - (memaddr + len);
|
|
||||||
}
|
|
||||||
|
|
||||||
bcopy (b->shadow_contents + bptoffset,
|
|
||||||
myaddr + membpt - memaddr, bptlen);
|
|
||||||
|
|
||||||
if (membpt > memaddr)
|
|
||||||
{
|
|
||||||
/* Copy the section of memory before the breakpoint. */
|
|
||||||
status = read_memory_nobpt (memaddr, myaddr, membpt - memaddr);
|
|
||||||
if (status != 0)
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (membpt + bptlen < memaddr + len)
|
|
||||||
{
|
|
||||||
/* Copy the section of memory after the breakpoint. */
|
|
||||||
status = read_memory_nobpt
|
|
||||||
(membpt + bptlen,
|
|
||||||
myaddr + membpt + bptlen - memaddr,
|
|
||||||
memaddr + len - (membpt + bptlen));
|
|
||||||
if (status != 0)
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* Nothing overlaps. Just call read_memory_noerr. */
|
|
||||||
return target_read_memory (memaddr, myaddr, len);
|
|
||||||
}
|
|
||||||
#endif /* 0 */
|
|
||||||
|
|
||||||
#else /* BREAKPOINT */
|
#else /* BREAKPOINT */
|
||||||
|
|
||||||
@ -175,4 +97,6 @@ memory_remove_breakpoint (addr, contents_cache)
|
|||||||
return 0; /* lint */
|
return 0; /* lint */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int memory_breakpoint_size = -1;
|
||||||
|
|
||||||
#endif /* BREAKPOINT */
|
#endif /* BREAKPOINT */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Print mips instructions for GDB, the GNU debugger.
|
/* Print mips instructions for GDB, the GNU debugger.
|
||||||
Copyright (C) 1989 Free Software Foundation, Inc.
|
Copyright 1989, 1991 Free Software Foundation, Inc.
|
||||||
Contributed by Nobuyuki Hikichi(hikichi@sra.co.jp)
|
Contributed by Nobuyuki Hikichi(hikichi@sra.co.jp)
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
@ -21,7 +21,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "mips-opcode.h"
|
#include "mips-opcode.h"
|
||||||
|
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
/* Work with core dump and executable files, for GDB on MIPS.
|
/* Target-dependent code for the MIPS architecture, for GDB, the GNU Debugger.
|
||||||
This code would be in core.c if it weren't machine-dependent. */
|
Copyright 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
/* Low level interface to ptrace, for GDB when running under Unix.
|
|
||||||
Copyright (C) 1988, 1989, 1990 Free Software Foundation, Inc.
|
|
||||||
Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
|
Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
|
||||||
and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
|
and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
|
||||||
|
|
||||||
@ -22,16 +19,8 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
/* FIXME: Can a MIPS porter/tester determine which of these include
|
|
||||||
files we still need? -- gnu@cygnus.com */
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#ifdef sgi
|
|
||||||
#include <sys/inst.h>
|
|
||||||
#else
|
|
||||||
#include <mips/inst.h>
|
|
||||||
#endif
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
@ -485,7 +474,7 @@ mips_push_dummy_frame()
|
|||||||
for (ireg = 32; --ireg >= 0; )
|
for (ireg = 32; --ireg >= 0; )
|
||||||
if (PROC_FREG_MASK(proc_desc) & (1 << ireg))
|
if (PROC_FREG_MASK(proc_desc) & (1 << ireg))
|
||||||
{
|
{
|
||||||
buffer = read_register (ireg);
|
buffer = read_register (ireg + FP0_REGNUM);
|
||||||
write_memory (save_address, &buffer, 4);
|
write_memory (save_address, &buffer, 4);
|
||||||
save_address -= 4;
|
save_address -= 4;
|
||||||
}
|
}
|
||||||
@ -531,10 +520,10 @@ mips_pop_frame()
|
|||||||
if (PROC_REG_MASK(proc_desc) & (1 << regnum))
|
if (PROC_REG_MASK(proc_desc) & (1 << regnum))
|
||||||
write_register (regnum,
|
write_register (regnum,
|
||||||
read_memory_integer (frame->saved_regs->regs[regnum], 4));
|
read_memory_integer (frame->saved_regs->regs[regnum], 4));
|
||||||
for (regnum = 64; --regnum >= 32; )
|
for (regnum = 32; --regnum >= 0; )
|
||||||
if (PROC_FREG_MASK(proc_desc) & (1 << regnum))
|
if (PROC_FREG_MASK(proc_desc) & (1 << regnum))
|
||||||
write_register (regnum,
|
write_register (regnum + FP0_REGNUM,
|
||||||
read_memory_integer (frame->saved_regs->regs[regnum], 4));
|
read_memory_integer (frame->saved_regs->regs[regnum + FP0_REGNUM], 4));
|
||||||
}
|
}
|
||||||
write_register (SP_REGNUM, new_sp);
|
write_register (SP_REGNUM, new_sp);
|
||||||
flush_cached_frames ();
|
flush_cached_frames ();
|
||||||
|
@ -26,7 +26,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <mips/inst.h>
|
#include <mips/inst.h>
|
||||||
#endif
|
#endif
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
|
@ -34,15 +34,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
a pointer in the psymtab to do this. */
|
a pointer in the psymtab to do this. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "param.h"
|
|
||||||
#include "obstack.h"
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <sys/file.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
#include "symfile.h"
|
#include "symfile.h"
|
||||||
|
#include "obstack.h"
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <sys/file.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
#ifdef CMUCS
|
#ifdef CMUCS
|
||||||
#include <mips/syms.h>
|
#include <mips/syms.h>
|
||||||
#else /* not CMUCS */
|
#else /* not CMUCS */
|
||||||
@ -1702,7 +1701,8 @@ parse_partial_symbols(end_of_text_seg, objfile)
|
|||||||
|
|
||||||
sh = s_idx + (SYMR *) fh->isymBase;
|
sh = s_idx + (SYMR *) fh->isymBase;
|
||||||
|
|
||||||
if (sh->sc == scUndefined || sh->sc == scNil) {
|
if (sh->sc == scUndefined || sh->sc == scNil ||
|
||||||
|
sh->index == 0xfffff) {
|
||||||
/* FIXME, premature? */
|
/* FIXME, premature? */
|
||||||
s_idx++;
|
s_idx++;
|
||||||
continue;
|
continue;
|
||||||
@ -2400,8 +2400,8 @@ new_psymtab(name, objfile)
|
|||||||
|
|
||||||
/* Chain it to its object file */
|
/* Chain it to its object file */
|
||||||
pst->objfile = objfile;
|
pst->objfile = objfile;
|
||||||
pst->objfile_chain = sym_objfile->psymtabs;
|
pst->objfile_chain = objfile->psymtabs;
|
||||||
sym_objfile->psymtabs = pst;
|
objfile->psymtabs = pst;
|
||||||
|
|
||||||
pst->next = partial_symtab_list;
|
pst->next = partial_symtab_list;
|
||||||
partial_symtab_list = pst;
|
partial_symtab_list = pst;
|
||||||
|
@ -23,7 +23,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Print 32000 instructions for GDB, the GNU debugger.
|
/* Print National Semiconductor 32000 instructions for GDB, the GNU debugger.
|
||||||
Copyright (C) 1986,1988 Free Software Foundation, Inc.
|
Copyright 1986, 1988, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -20,7 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "ns32k-opcode.h"
|
#include "ns32k-opcode.h"
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
|
@ -30,7 +30,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "expression.h"
|
#include "expression.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Print values for GNU debugger GDB.
|
/* Print values for GNU debugger GDB.
|
||||||
Copyright (C) 1986-1991 Free Software Foundation, Inc.
|
Copyright 1986, 1987, 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -20,7 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
@ -1994,7 +1993,7 @@ where FOO is stored, etc. FOO must be an expression whose value\n\
|
|||||||
resides in memory.\n",
|
resides in memory.\n",
|
||||||
"\n\
|
"\n\
|
||||||
EXP may be preceded with /FMT, where FMT is a format letter\n\
|
EXP may be preceded with /FMT, where FMT is a format letter\n\
|
||||||
but no count or size letter (see \"x\" command)."));
|
but no count or size letter (see \"x\" command).", NULL));
|
||||||
add_com_alias ("p", "print", class_vars, 1);
|
add_com_alias ("p", "print", class_vars, 1);
|
||||||
|
|
||||||
add_com ("inspect", class_vars, inspect_command,
|
add_com ("inspect", class_vars, inspect_command,
|
||||||
|
@ -34,7 +34,6 @@ regardless of whether or not the actual target has floating point hardware.
|
|||||||
|
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
|
|
||||||
#ifdef USE_PROC_FS /* Entire file goes away if not using /proc */
|
#ifdef USE_PROC_FS /* Entire file goes away if not using /proc */
|
||||||
|
|
||||||
|
16
gdb/putenv.c
16
gdb/putenv.c
@ -9,21 +9,16 @@
|
|||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
From pacbell!ames!ll-xn!mit-eddie!uw-beaver!ssc-vax!uvicctr!tholm Wed May 4 23:40:52 1988
|
|
||||||
Path: hoptoad!pacbell!ames!ll-xn!mit-eddie!uw-beaver!ssc-vax!uvicctr!tholm
|
Path: hoptoad!pacbell!ames!ll-xn!mit-eddie!uw-beaver!ssc-vax!uvicctr!tholm
|
||||||
From: tholm@uvicctr.UUCP (Terrence W. Holm)
|
From: tholm@uvicctr.UUCP (Terrence W. Holm)
|
||||||
Newsgroups: comp.os.minix
|
Newsgroups: comp.os.minix
|
||||||
Subject: putenv(3)
|
Subject: putenv(3)
|
||||||
Message-ID: <395@uvicctr.UUCP>
|
Message-ID: <395@uvicctr.UUCP>
|
||||||
Date: 5 May 88 06:40:52 GMT
|
Date: 5 May 88 06:40:52 GMT
|
||||||
Reply-To: tholm@uvicctr.UUCP (Terrence W. Holm)
|
|
||||||
Organization: University of Victoria, Victoria B.C. Canada
|
Organization: University of Victoria, Victoria B.C. Canada
|
||||||
Lines: 296
|
|
||||||
|
|
||||||
|
|
||||||
EFTH Minix report #2 - May 1988 - putenv(3)
|
EFTH Minix report #2 - May 1988 - putenv(3)
|
||||||
|
|
||||||
|
|
||||||
This is an implementation of putenv(3) that we
|
This is an implementation of putenv(3) that we
|
||||||
wrote for Minix. Please consider this a public
|
wrote for Minix. Please consider this a public
|
||||||
domain program.
|
domain program.
|
||||||
@ -31,19 +26,16 @@ domain program.
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
#define PSIZE sizeof(char *)
|
#define PSIZE sizeof(char *)
|
||||||
|
|
||||||
|
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
|
||||||
|
|
||||||
char *index();
|
char *index();
|
||||||
char *malloc();
|
char *malloc();
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
/* */
|
/* */
|
||||||
|
/* int */
|
||||||
/* putenv( entry ) */
|
/* putenv( entry ) */
|
||||||
/* */
|
/* */
|
||||||
/* The "entry" should follow the form */
|
/* The "entry" should follow the form */
|
||||||
@ -70,10 +62,10 @@ char *malloc();
|
|||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
putenv( entry )
|
putenv( entry )
|
||||||
char *entry;
|
char *entry;
|
||||||
|
{
|
||||||
{
|
|
||||||
unsigned length;
|
unsigned length;
|
||||||
unsigned size;
|
unsigned size;
|
||||||
char **p;
|
char **p;
|
||||||
@ -114,4 +106,4 @@ putenv( entry )
|
|||||||
environ = new_environ;
|
environ = new_environ;
|
||||||
|
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Disassembler for the Pyramid Technology 90x
|
/* Print Pyramid Technology 90x instructions for GDB, the GNU Debugger.
|
||||||
Copyright (C) 1988,1989 Free Software Foundation, Inc.
|
Copyright 1988, 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB, the GNU disassembler.
|
This file is part of GDB, the GNU disassembler.
|
||||||
|
|
||||||
@ -20,7 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "pyr-opcode.h"
|
#include "pyr-opcode.h"
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
@ -30,8 +29,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
Pyramids. (The Pyramid-dependent handling of register values for
|
Pyramids. (The Pyramid-dependent handling of register values for
|
||||||
windowed registers is known to be buggy.)
|
windowed registers is known to be buggy.)
|
||||||
|
|
||||||
When debugging, these functions supplant the normal definitions of some
|
When debugging, these functions can supplant the normal definitions of some
|
||||||
of the macros in m-pyramid.h The quantity of information produced
|
of the macros in tm-pyramid.h The quantity of information produced
|
||||||
when these functions are used makes the gdb unusable as a
|
when these functions are used makes the gdb unusable as a
|
||||||
debugger for user programs. */
|
debugger for user programs. */
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include "param.h"
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
|
|
||||||
/*** Prettier register printing. ***/
|
/*** Prettier register printing. ***/
|
||||||
|
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
|
|
||||||
|
@ -32,8 +32,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "tm.h"
|
|
||||||
#include "param-no-tm.h"
|
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "wait.h"
|
#include "wait.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
|
@ -27,9 +27,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#define TM_FILE_OVERRIDE
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "tm-29k.h"
|
#include "tm-29k.h"
|
||||||
#include "param-no-tm.h"
|
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "wait.h"
|
#include "wait.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
|
@ -101,7 +101,6 @@ NINDY ROM monitor at the other end of the line.
|
|||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Memory-access and commands for remote VxWorks processes, for GDB.
|
/* Memory-access and commands for remote VxWorks processes, for GDB.
|
||||||
Copyright (C) 1990 Free Software Foundation, Inc.
|
Copyright 1990, 1991 Free Software Foundation, Inc.
|
||||||
Contributed by Wind River Systems and Cygnus Support.
|
Contributed by Wind River Systems and Cygnus Support.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
@ -18,9 +18,9 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
|
#define TM_FILE_OVERRIDE
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "tm-vxworks68.h"
|
#include "tm-vxworks68.h"
|
||||||
#include "param-no-tm.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "wait.h"
|
#include "wait.h"
|
||||||
|
@ -20,7 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "wait.h"
|
#include "wait.h"
|
||||||
|
@ -20,7 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
|
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Convert between signal names and numbers.
|
/* Convert between signal names and numbers, for GDB.
|
||||||
Copyright (C) 1990 Free Software Foundation, Inc.
|
Copyright 1990, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -23,7 +23,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
/* GDB-specific, FIXME. (This is for the SYS_SIGLIST_MISSING define). */
|
/* GDB-specific, FIXME. (This is for the SYS_SIGLIST_MISSING define). */
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
|
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
#define CONST const
|
#define CONST const
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Disassembler for the sparc.
|
/* Print SPARC instructions for GDB, the GNU Debugger.
|
||||||
Copyright (C) 1989 Free Software Foundation, Inc.
|
Copyright 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB, the GNU disassembler.
|
This file is part of GDB, the GNU disassembler.
|
||||||
|
|
||||||
@ -20,7 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "sparc-opcode.h"
|
#include "sparc-opcode.h"
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
/* Machine-dependent code which would otherwise be in inflow.c and core.c,
|
/* Host-dependent code for SPARC host systems, for GDB, the GNU debugger.
|
||||||
for GDB, the GNU debugger, for SPARC host systems.
|
Copyright 1986, 1987, 1989, 1990, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Copyright (C) 1986, 1987, 1989, 1990 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -21,8 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "tm-sparc.h"
|
|
||||||
#include "param-no-tm.h"
|
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#endif /* SIGTSTP and SIGIO defined (must be 4.2) */
|
#endif /* SIGTSTP and SIGIO defined (must be 4.2) */
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "signals.h"
|
#include "signals.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/* Sun-3 Machine-dependent code which would otherwise be in inflow.c and core.c,
|
/* Host-dependent code for Sun-3 for GDB, the GNU debugger.
|
||||||
for GDB, the GNU debugger.
|
Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
|
||||||
Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -20,15 +19,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
|
#include "gdbcore.h"
|
||||||
|
|
||||||
#include <sys/ptrace.h>
|
#include <sys/ptrace.h>
|
||||||
#define KERNEL /* To get floating point reg definitions */
|
#define KERNEL /* To get floating point reg definitions */
|
||||||
#include <machine/reg.h>
|
#include <machine/reg.h>
|
||||||
|
|
||||||
#include "gdbcore.h"
|
|
||||||
|
|
||||||
extern int errno;
|
extern int errno;
|
||||||
|
|
||||||
#if defined (GDB_TARGET_IS_SUN3)
|
#if defined (GDB_TARGET_IS_SUN3)
|
||||||
|
@ -23,7 +23,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "signame.h"
|
#include "signame.h"
|
||||||
|
382
gdb/symfile.c
382
gdb/symfile.c
@ -21,7 +21,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "param.h"
|
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
@ -50,9 +49,12 @@ extern CORE_ADDR startup_file_start; /* From blockframe.c */
|
|||||||
extern CORE_ADDR startup_file_end; /* From blockframe.c */
|
extern CORE_ADDR startup_file_end; /* From blockframe.c */
|
||||||
|
|
||||||
/* Functions this file defines */
|
/* Functions this file defines */
|
||||||
static bfd *symfile_open();
|
static struct objfile *symfile_open ();
|
||||||
static struct sym_fns *symfile_init();
|
static struct sym_fns *symfile_init ();
|
||||||
static void clear_symtab_users_once();
|
static void clear_symtab_users_once ();
|
||||||
|
|
||||||
|
static void free_all_psymtabs ();
|
||||||
|
static void free_all_symtabs ();
|
||||||
|
|
||||||
/* List of all available sym_fns. */
|
/* List of all available sym_fns. */
|
||||||
|
|
||||||
@ -84,17 +86,13 @@ struct obstack obstack2;
|
|||||||
|
|
||||||
struct obstack *psymbol_obstack = &obstack2;
|
struct obstack *psymbol_obstack = &obstack2;
|
||||||
|
|
||||||
/* File name symbols were loaded from. */
|
/* The object file that the main symbol table was loaded from (e.g. the
|
||||||
|
argument to the "symbol-file" or "file" command). */
|
||||||
|
|
||||||
char *symfile = 0;
|
struct objfile *symfile_objfile = 0;
|
||||||
|
|
||||||
/* The modification date of the file when they were loaded. */
|
|
||||||
|
|
||||||
long /* really time_t */ symfile_mtime = 0;
|
|
||||||
|
|
||||||
/* Structures with which to manage partial symbol allocation. */
|
/* Structures with which to manage partial symbol allocation. */
|
||||||
|
|
||||||
#include "param.h"
|
|
||||||
struct psymbol_allocation_list global_psymbols = {0}, static_psymbols = {0};
|
struct psymbol_allocation_list global_psymbols = {0}, static_psymbols = {0};
|
||||||
|
|
||||||
/* Flag for whether user will be reloading symbols multiple times.
|
/* Flag for whether user will be reloading symbols multiple times.
|
||||||
@ -311,6 +309,79 @@ discard_misc_bunches (foo)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* After adding things to the vector, sort or re-sort it into address order. */
|
||||||
|
void
|
||||||
|
sort_misc_function_vector ()
|
||||||
|
{
|
||||||
|
qsort (misc_function_vector, misc_function_count,
|
||||||
|
sizeof (struct misc_function),
|
||||||
|
compare_misc_functions);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Compact duplicate entries out of the misc function vector by walking
|
||||||
|
through the vector and compacting out entries with duplicate addresses
|
||||||
|
and matching names.
|
||||||
|
|
||||||
|
When files contain multiple sources of symbol information, it is
|
||||||
|
possible for the misc function vector to contain many duplicate entries.
|
||||||
|
As an example, SVR4 systems use ELF formatted object files, which
|
||||||
|
usually contain at least two different types of symbol tables (a
|
||||||
|
standard ELF one and a smaller dynamic linking table), as well as
|
||||||
|
DWARF debugging information for files compiled with -g.
|
||||||
|
|
||||||
|
Without compacting, the misc function vector for gdb itself contains
|
||||||
|
over a 1000 duplicates, about a third of the total table size. Aside
|
||||||
|
from the potential trap of not noticing that two successive entries
|
||||||
|
identify the same location, this duplication impacts the time required
|
||||||
|
to linearly scan the table, which is done in a number of places. So
|
||||||
|
just do one linear scan here and toss out the duplicates.
|
||||||
|
|
||||||
|
Note that the strings themselves are allocated on the symbol_obstack,
|
||||||
|
so we can't easily reclaim their memory. They will get automatically
|
||||||
|
freed when the symbol table is freed.
|
||||||
|
|
||||||
|
Also note we only go up to the next to last entry within the loop
|
||||||
|
and then copy the last entry explicitly after the loop terminates.
|
||||||
|
|
||||||
|
Since the different sources of information for each symbol may
|
||||||
|
have different levels of "completeness", we may have duplicates
|
||||||
|
that have one entry with type "mf_unknown" and the other with a
|
||||||
|
known type. So if the one we are leaving alone has type mf_unknown,
|
||||||
|
overwrite it's type with the type from the one we are compacting out.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
compact_misc_function_vector ()
|
||||||
|
{
|
||||||
|
struct misc_function *copyfrom;
|
||||||
|
struct misc_function *copyto;
|
||||||
|
|
||||||
|
copyfrom = copyto = misc_function_vector;
|
||||||
|
while (copyfrom < misc_function_vector + misc_function_count - 1)
|
||||||
|
{
|
||||||
|
if (copyfrom -> address == (copyfrom + 1) -> address
|
||||||
|
&& (strcmp (copyfrom -> name, (copyfrom + 1) -> name) == 0))
|
||||||
|
{
|
||||||
|
if ((copyfrom + 1) -> type == mf_unknown)
|
||||||
|
{
|
||||||
|
(copyfrom + 1) -> type = copyfrom -> type;
|
||||||
|
}
|
||||||
|
copyfrom++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*copyto++ = *copyfrom++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*copyto++ = *copyfrom++;
|
||||||
|
misc_function_count = copyto - misc_function_vector;
|
||||||
|
misc_function_vector = (struct misc_function *)
|
||||||
|
xrealloc (misc_function_vector,
|
||||||
|
misc_function_count * sizeof (struct misc_function));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* INCLINK nonzero means bunches are from an incrementally-linked file.
|
/* INCLINK nonzero means bunches are from an incrementally-linked file.
|
||||||
Add them to the existing bunches.
|
Add them to the existing bunches.
|
||||||
Otherwise INCLINK is zero, and we start from scratch. */
|
Otherwise INCLINK is zero, and we start from scratch. */
|
||||||
@ -365,9 +436,11 @@ condense_misc_bunches (inclink)
|
|||||||
|
|
||||||
/* Sort the misc functions by address. */
|
/* Sort the misc functions by address. */
|
||||||
|
|
||||||
qsort (misc_function_vector, misc_function_count,
|
sort_misc_function_vector ();
|
||||||
sizeof (struct misc_function),
|
|
||||||
compare_misc_functions);
|
/* Compact out any duplicates. */
|
||||||
|
|
||||||
|
compact_misc_function_vector ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -404,14 +477,14 @@ psymtab_to_symtab (pst)
|
|||||||
where the text segment was loaded. */
|
where the text segment was loaded. */
|
||||||
|
|
||||||
void
|
void
|
||||||
syms_from_bfd (sym_bfd, addr, mainline)
|
syms_from_objfile (objfile, addr, mainline)
|
||||||
bfd *sym_bfd;
|
struct objfile *objfile;
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
int mainline;
|
int mainline;
|
||||||
{
|
{
|
||||||
asection *text_sect;
|
asection *text_sect;
|
||||||
struct sym_fns *sf;
|
struct sym_fns *sf;
|
||||||
char *realname;
|
bfd *sym_bfd = objfile->obfd;
|
||||||
|
|
||||||
/* There is a distinction between having no symbol table
|
/* There is a distinction between having no symbol table
|
||||||
(we refuse to read the file, leaving the old set of symbols around)
|
(we refuse to read the file, leaving the old set of symbols around)
|
||||||
@ -439,20 +512,15 @@ syms_from_bfd (sym_bfd, addr, mainline)
|
|||||||
startup_file_end = 0;
|
startup_file_end = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sf = symfile_init (sym_bfd);
|
sf = symfile_init (objfile);
|
||||||
realname = bfd_get_filename (sym_bfd);
|
|
||||||
realname = savestring (realname, strlen (realname));
|
|
||||||
/* FIXME, this probably creates a storage leak... */
|
|
||||||
|
|
||||||
if (mainline)
|
if (mainline)
|
||||||
{
|
{
|
||||||
/* Since no error yet, throw away the old symbol table. */
|
/* Since no error yet, throw away the old symbol table. */
|
||||||
|
|
||||||
if (symfile)
|
if (symfile_objfile)
|
||||||
free (symfile);
|
free_objfile (symfile_objfile);
|
||||||
symfile = 0;
|
symfile_objfile = 0;
|
||||||
free_all_symtabs ();
|
|
||||||
free_all_psymtabs ();
|
|
||||||
|
|
||||||
(*sf->sym_new_init) ();
|
(*sf->sym_new_init) ();
|
||||||
|
|
||||||
@ -475,7 +543,7 @@ syms_from_bfd (sym_bfd, addr, mainline)
|
|||||||
if (mainline)
|
if (mainline)
|
||||||
{
|
{
|
||||||
/* OK, make it the "real" symbol file. */
|
/* OK, make it the "real" symbol file. */
|
||||||
symfile = realname;
|
symfile_objfile = objfile;
|
||||||
symfile_fns = sf;
|
symfile_fns = sf;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -501,17 +569,17 @@ symbol_file_add (name, from_tty, addr, mainline)
|
|||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
int mainline;
|
int mainline;
|
||||||
{
|
{
|
||||||
|
struct objfile *objfile;
|
||||||
bfd *sym_bfd;
|
bfd *sym_bfd;
|
||||||
|
|
||||||
sym_bfd = symfile_open (name);
|
objfile = symfile_open (name);
|
||||||
|
sym_bfd = objfile->obfd;
|
||||||
if (mainline)
|
|
||||||
symfile_mtime = bfd_get_mtime (sym_bfd);
|
|
||||||
|
|
||||||
/* There is a distinction between having no symbol table
|
/* There is a distinction between having no symbol table
|
||||||
(we refuse to read the file, leaving the old set of symbols around)
|
(we refuse to read the file, leaving the old set of symbols around)
|
||||||
and having no debugging symbols in your symbol table (we read
|
and having no debugging symbols in your symbol table (we read
|
||||||
the file and end up with a mostly empty symbol table). */
|
the file and end up with a mostly empty symbol table, but with lots
|
||||||
|
of stuff in the misc function vector). */
|
||||||
|
|
||||||
if (!(bfd_get_file_flags (sym_bfd) & HAS_SYMS))
|
if (!(bfd_get_file_flags (sym_bfd) & HAS_SYMS))
|
||||||
{
|
{
|
||||||
@ -531,7 +599,7 @@ symbol_file_add (name, from_tty, addr, mainline)
|
|||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
syms_from_bfd (sym_bfd, addr, mainline);
|
syms_from_objfile (objfile, addr, mainline);
|
||||||
|
|
||||||
if (from_tty)
|
if (from_tty)
|
||||||
{
|
{
|
||||||
@ -553,15 +621,15 @@ symbol_file_command (name, from_tty)
|
|||||||
|
|
||||||
if (name == 0)
|
if (name == 0)
|
||||||
{
|
{
|
||||||
if ((symtab_list || partial_symtab_list)
|
if (symfile_objfile) {
|
||||||
&& from_tty
|
if ((symtab_list || partial_symtab_list)
|
||||||
&& !query ("Discard symbol table from `%s'? ", symfile))
|
&& from_tty
|
||||||
error ("Not confirmed.");
|
&& !query ("Discard symbol table from `%s'? ",
|
||||||
if (symfile)
|
symfile_objfile->name))
|
||||||
free (symfile);
|
error ("Not confirmed.");
|
||||||
symfile = 0;
|
free_objfile (symfile_objfile);
|
||||||
free_all_symtabs ();
|
}
|
||||||
free_all_psymtabs ();
|
symfile_objfile = 0;
|
||||||
/* FIXME, this does not account for the main file and subsequent
|
/* FIXME, this does not account for the main file and subsequent
|
||||||
files (shared libs, dynloads, etc) having different formats.
|
files (shared libs, dynloads, etc) having different formats.
|
||||||
It only calls the cleanup routine for the main file's format. */
|
It only calls the cleanup routine for the main file's format. */
|
||||||
@ -581,46 +649,112 @@ symbol_file_command (name, from_tty)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Open NAME and hand it off to BFD for preliminary analysis. Result
|
/* Open NAME and hand it off to BFD for preliminary analysis. Result
|
||||||
is a BFD *, which includes a new copy of NAME dynamically allocated
|
is newly malloc'd struct objfile *, which includes a newly malloc'd`
|
||||||
(which will be freed by the cleanup chain). In case of trouble,
|
copy of NAME (tilde-expanded and made absolute).
|
||||||
error() is called. */
|
In case of trouble, error() is called. */
|
||||||
|
|
||||||
static bfd *
|
static struct objfile *
|
||||||
symfile_open (name)
|
symfile_open (name)
|
||||||
char *name;
|
char *name;
|
||||||
{
|
{
|
||||||
bfd *sym_bfd;
|
bfd *sym_bfd;
|
||||||
int desc;
|
int desc;
|
||||||
char *absolute_name;
|
char *absolute_name;
|
||||||
|
struct objfile *objfile;
|
||||||
|
|
||||||
name = tilde_expand (name);
|
name = tilde_expand (name); /* Returns 1st new malloc'd copy */
|
||||||
make_cleanup (free, name);
|
|
||||||
|
|
||||||
|
/* Look down path for it, allocate 2nd new malloc'd copy. */
|
||||||
desc = openp (getenv ("PATH"), 1, name, O_RDONLY, 0, &absolute_name);
|
desc = openp (getenv ("PATH"), 1, name, O_RDONLY, 0, &absolute_name);
|
||||||
if (desc < 0)
|
if (desc < 0) {
|
||||||
|
make_cleanup (free, name);
|
||||||
perror_with_name (name);
|
perror_with_name (name);
|
||||||
else
|
}
|
||||||
{
|
free (name); /* Free 1st new malloc'd copy */
|
||||||
make_cleanup (free, absolute_name);
|
name = absolute_name; /* Keep 2nd malloc'd copy in objfile and bfd */
|
||||||
name = absolute_name;
|
|
||||||
}
|
|
||||||
|
|
||||||
sym_bfd = bfd_fdopenr (name, NULL, desc);
|
sym_bfd = bfd_fdopenr (name, NULL, desc);
|
||||||
if (!sym_bfd)
|
if (!sym_bfd)
|
||||||
{
|
{
|
||||||
close (desc);
|
close (desc);
|
||||||
|
make_cleanup (free, name);
|
||||||
error ("Could not open `%s' to read symbols: %s",
|
error ("Could not open `%s' to read symbols: %s",
|
||||||
name, bfd_errmsg (bfd_error));
|
name, bfd_errmsg (bfd_error));
|
||||||
}
|
}
|
||||||
make_cleanup (bfd_close, sym_bfd);
|
|
||||||
|
|
||||||
if (!bfd_check_format (sym_bfd, bfd_object))
|
if (!bfd_check_format (sym_bfd, bfd_object)) {
|
||||||
|
bfd_close (sym_bfd); /* This also closes desc */
|
||||||
|
make_cleanup (free, name);
|
||||||
error ("\"%s\": can't read symbols: %s.",
|
error ("\"%s\": can't read symbols: %s.",
|
||||||
name, bfd_errmsg (bfd_error));
|
name, bfd_errmsg (bfd_error));
|
||||||
|
}
|
||||||
|
|
||||||
return sym_bfd;
|
objfile = allocate_objfile (sym_bfd, name);
|
||||||
|
return objfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Allocate a new objfile struct, fill it in as best we can, and return it.
|
||||||
|
FIXME-soon! Eventually, the objfile will contain the obstack in which
|
||||||
|
the symtabs and psymtabs are contained, so they can all be blown away
|
||||||
|
cheaply and easily. */
|
||||||
|
|
||||||
|
struct objfile *
|
||||||
|
allocate_objfile (abfd, filename)
|
||||||
|
bfd *abfd;
|
||||||
|
char *filename;
|
||||||
|
{
|
||||||
|
struct objfile *objfile;
|
||||||
|
|
||||||
|
objfile = (struct objfile *) xmalloc (sizeof (struct objfile));
|
||||||
|
bzero (objfile, sizeof (*objfile));
|
||||||
|
|
||||||
|
objfile->obfd = abfd;
|
||||||
|
objfile->name = filename;
|
||||||
|
|
||||||
|
objfile->symtabs = 0; /* Don't have any yet */
|
||||||
|
objfile->psymtabs = 0; /* Don't have any yet */
|
||||||
|
|
||||||
|
objfile->mtime = bfd_get_mtime (abfd);
|
||||||
|
|
||||||
|
/* Chain it to the list. */
|
||||||
|
objfile->next = object_files;
|
||||||
|
object_files = objfile;
|
||||||
|
|
||||||
|
return objfile;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Destroy an objfile and all the symtabs and psymtabs under it. */
|
||||||
|
|
||||||
|
void
|
||||||
|
free_objfile (objfile)
|
||||||
|
struct objfile *objfile;
|
||||||
|
{
|
||||||
|
struct objfile *ofp;
|
||||||
|
|
||||||
|
if (objfile->name)
|
||||||
|
free (objfile->name);
|
||||||
|
if (objfile->obfd)
|
||||||
|
bfd_close (objfile->obfd);
|
||||||
|
|
||||||
|
/* Remove it from the chain of all objfiles. */
|
||||||
|
if (object_files == objfile)
|
||||||
|
object_files = objfile->next;
|
||||||
|
else for (ofp = object_files; ofp; ofp = ofp->next) {
|
||||||
|
if (ofp->next == objfile)
|
||||||
|
ofp->next = objfile->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FIXME! This should only free those associated with the objfile
|
||||||
|
being passed to us. THIS IS A KLUDGE TO BOOTSTRAP US. */
|
||||||
|
free_all_psymtabs ();
|
||||||
|
free_all_symtabs ();
|
||||||
|
|
||||||
|
free (objfile);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Link a new symtab_fns into the global symtab_fns list.
|
/* Link a new symtab_fns into the global symtab_fns list.
|
||||||
Called by various _initialize routines. */
|
Called by various _initialize routines. */
|
||||||
|
|
||||||
@ -638,10 +772,11 @@ add_symtab_fns (sf)
|
|||||||
that contains cached information about the symbol file. */
|
that contains cached information about the symbol file. */
|
||||||
|
|
||||||
static struct sym_fns *
|
static struct sym_fns *
|
||||||
symfile_init (sym_bfd)
|
symfile_init (objfile)
|
||||||
bfd *sym_bfd;
|
struct objfile *objfile;
|
||||||
{
|
{
|
||||||
struct sym_fns *sf, *sf2;
|
struct sym_fns *sf, *sf2;
|
||||||
|
bfd *sym_bfd = objfile->obfd;
|
||||||
|
|
||||||
for (sf = symtab_fns; sf != NULL; sf = sf->next)
|
for (sf = symtab_fns; sf != NULL; sf = sf->next)
|
||||||
{
|
{
|
||||||
@ -650,6 +785,7 @@ symfile_init (sym_bfd)
|
|||||||
sf2 = (struct sym_fns *)xmalloc (sizeof (*sf2));
|
sf2 = (struct sym_fns *)xmalloc (sizeof (*sf2));
|
||||||
/* FIXME, who frees this? */
|
/* FIXME, who frees this? */
|
||||||
*sf2 = *sf;
|
*sf2 = *sf;
|
||||||
|
sf2->objfile = objfile;
|
||||||
sf2->sym_bfd = sym_bfd;
|
sf2->sym_bfd = sym_bfd;
|
||||||
sf2->sym_private = 0; /* Not alloc'd yet */
|
sf2->sym_private = 0; /* Not alloc'd yet */
|
||||||
(*sf2->sym_init) (sf2);
|
(*sf2->sym_init) (sf2);
|
||||||
@ -712,11 +848,13 @@ add_symbol_file_command (arg_string, from_tty)
|
|||||||
symbol_file_add (name, 0, text_addr, 0);
|
symbol_file_add (name, 0, text_addr, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Re-read symbols if the symbol-file has changed. */
|
/* Re-read symbols if a symbol-file has changed. */
|
||||||
void
|
void
|
||||||
reread_symbols ()
|
reread_symbols ()
|
||||||
{
|
{
|
||||||
struct stat symstat;
|
struct objfile *objfile;
|
||||||
|
long new_modtime;
|
||||||
|
int reread_one = 0;
|
||||||
|
|
||||||
/* With the addition of shared libraries, this should be modified,
|
/* With the addition of shared libraries, this should be modified,
|
||||||
the load time should be saved in the partial symbol tables, since
|
the load time should be saved in the partial symbol tables, since
|
||||||
@ -725,16 +863,24 @@ reread_symbols ()
|
|||||||
and see if the symbol table that it originates from has been changed
|
and see if the symbol table that it originates from has been changed
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (stat (symfile, &symstat) < 0)
|
for (objfile = object_files; objfile; objfile = objfile->next) {
|
||||||
/* Can't read symbol-file. Assume it is up to date. */
|
if (objfile->obfd) {
|
||||||
return;
|
objfile->obfd->mtime_set = false; /* Force it to reread. */
|
||||||
|
new_modtime = bfd_get_mtime (objfile->obfd);
|
||||||
if (symstat.st_mtime > symfile_mtime)
|
if (new_modtime != objfile->mtime) {
|
||||||
{
|
printf_filtered ("`%s' has changed; re-reading symbols.\n",
|
||||||
printf_filtered ("Symbol file has changed; re-reading symbols.\n");
|
objfile->name);
|
||||||
symbol_file_command (symfile, 0);
|
/* FIXME, this should use a different command...that would only
|
||||||
breakpoint_re_set ();
|
affect this objfile's symbols. */
|
||||||
|
symbol_file_command (objfile->name, 0);
|
||||||
|
objfile->mtime = new_modtime;
|
||||||
|
reread_one = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reread_one)
|
||||||
|
breakpoint_re_set ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function is really horrible, but to avoid it, there would need
|
/* This function is really horrible, but to avoid it, there would need
|
||||||
@ -770,10 +916,9 @@ fill_in_vptr_fieldno (type)
|
|||||||
static unsigned stop_whining = 0;
|
static unsigned stop_whining = 0;
|
||||||
|
|
||||||
/* Print a complaint about the input symbols, and link the complaint block
|
/* Print a complaint about the input symbols, and link the complaint block
|
||||||
into a chain for later handling. Result is 1 if the complaint was
|
into a chain for later handling. */
|
||||||
printed, 0 if it was suppressed. */
|
|
||||||
|
|
||||||
int
|
void
|
||||||
complain (complaint, val)
|
complain (complaint, val)
|
||||||
struct complaint *complaint;
|
struct complaint *complaint;
|
||||||
char *val;
|
char *val;
|
||||||
@ -784,7 +929,7 @@ complain (complaint, val)
|
|||||||
complaint_root->next = complaint;
|
complaint_root->next = complaint;
|
||||||
}
|
}
|
||||||
if (complaint->counter > stop_whining)
|
if (complaint->counter > stop_whining)
|
||||||
return 0;
|
return;
|
||||||
wrap_here ("");
|
wrap_here ("");
|
||||||
if (!info_verbose) {
|
if (!info_verbose) {
|
||||||
puts_filtered ("During symbol reading...");
|
puts_filtered ("During symbol reading...");
|
||||||
@ -794,7 +939,6 @@ complain (complaint, val)
|
|||||||
wrap_here("");
|
wrap_here("");
|
||||||
if (!info_verbose)
|
if (!info_verbose)
|
||||||
puts_filtered ("\n");
|
puts_filtered ("\n");
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear out all complaint counters that have ever been incremented. */
|
/* Clear out all complaint counters that have ever been incremented. */
|
||||||
@ -808,6 +952,23 @@ clear_complaints ()
|
|||||||
p->counter = 0;
|
p->counter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum language
|
||||||
|
deduce_language_from_filename (filename)
|
||||||
|
char *filename;
|
||||||
|
{
|
||||||
|
char *c = rindex (filename, '.');
|
||||||
|
|
||||||
|
if (!c) ; /* Get default. */
|
||||||
|
else if(!strcmp(c,".mod"))
|
||||||
|
return language_m2;
|
||||||
|
else if(!strcmp(c,".c"))
|
||||||
|
return language_c;
|
||||||
|
else if(!strcmp(c,".cc") || !strcmp(c,".C"))
|
||||||
|
return language_cplus;
|
||||||
|
|
||||||
|
return language_unknown; /* default */
|
||||||
|
}
|
||||||
|
|
||||||
/* allocate_symtab:
|
/* allocate_symtab:
|
||||||
|
|
||||||
Allocate and partly initialize a new symbol table. Return a pointer
|
Allocate and partly initialize a new symbol table. Return a pointer
|
||||||
@ -826,11 +987,11 @@ clear_complaints ()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
struct symtab *
|
struct symtab *
|
||||||
allocate_symtab(name)
|
allocate_symtab(name, objfile)
|
||||||
char *name;
|
char *name;
|
||||||
|
struct objfile *objfile;
|
||||||
{
|
{
|
||||||
register struct symtab *symtab;
|
register struct symtab *symtab;
|
||||||
char *c;
|
|
||||||
|
|
||||||
symtab = (struct symtab *) xmalloc (sizeof (struct symtab));
|
symtab = (struct symtab *) xmalloc (sizeof (struct symtab));
|
||||||
bzero (symtab, sizeof (*symtab));
|
bzero (symtab, sizeof (*symtab));
|
||||||
@ -839,17 +1000,16 @@ allocate_symtab(name)
|
|||||||
symtab->nlines = 0;
|
symtab->nlines = 0;
|
||||||
symtab->line_charpos = 0;
|
symtab->line_charpos = 0;
|
||||||
symtab->version = 0;
|
symtab->version = 0;
|
||||||
symtab->language = language_unknown; /* default */
|
symtab->language = deduce_language_from_filename (name);
|
||||||
|
|
||||||
c = rindex (name, '.');
|
/* Hook it to the objfile it comes from */
|
||||||
|
symtab->objfile = objfile;
|
||||||
if (!c) {
|
symtab->objfile_chain = objfile->symtabs;
|
||||||
; /* Don't know language of file. */
|
objfile->symtabs = symtab;
|
||||||
} else if(!strcmp(c,".mod")) {
|
|
||||||
symtab->language = language_m2;
|
#ifdef INIT_EXTRA_SYMTAB_INFO
|
||||||
} else if(!strcmp(c,".c") || !strcmp(c,".cc")) {
|
INIT_EXTRA_SYMTAB_INFO(symtab);
|
||||||
symtab->language = language_c;
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
return symtab;
|
return symtab;
|
||||||
}
|
}
|
||||||
@ -1041,6 +1201,54 @@ free_named_symtabs (name)
|
|||||||
return blewit;
|
return blewit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Free all partial_symtab storage.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
free_all_psymtabs()
|
||||||
|
{
|
||||||
|
obstack_free (psymbol_obstack, 0);
|
||||||
|
obstack_init (psymbol_obstack);
|
||||||
|
partial_symtab_list = (struct partial_symtab *) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Free all the symtabs that are currently installed,
|
||||||
|
and all storage associated with them.
|
||||||
|
Leaves us in a consistent state with no symtabs installed. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
free_all_symtabs ()
|
||||||
|
{
|
||||||
|
register struct symtab *s, *snext;
|
||||||
|
|
||||||
|
/* All values will be invalid because their types will be! */
|
||||||
|
|
||||||
|
clear_value_history ();
|
||||||
|
clear_displays ();
|
||||||
|
clear_internalvars ();
|
||||||
|
#if defined (CLEAR_SOLIB)
|
||||||
|
CLEAR_SOLIB ();
|
||||||
|
#endif
|
||||||
|
set_default_breakpoint (0, 0, 0, 0);
|
||||||
|
|
||||||
|
current_source_symtab = 0;
|
||||||
|
|
||||||
|
for (s = symtab_list; s; s = snext)
|
||||||
|
{
|
||||||
|
snext = s->next;
|
||||||
|
free_symtab (s);
|
||||||
|
}
|
||||||
|
symtab_list = 0;
|
||||||
|
obstack_free (symbol_obstack, 0);
|
||||||
|
obstack_init (symbol_obstack);
|
||||||
|
|
||||||
|
if (misc_function_vector)
|
||||||
|
free (misc_function_vector);
|
||||||
|
misc_function_count = 0;
|
||||||
|
misc_function_vector = 0;
|
||||||
|
clear_pc_function_cache();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_initialize_symfile ()
|
_initialize_symfile ()
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
|
@ -22,7 +22,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
|
34
gdb/symtab.c
34
gdb/symtab.c
@ -20,7 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "param.h"
|
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
@ -183,9 +182,9 @@ type_name_no_tag (type)
|
|||||||
if(!strncmp(name,"enum ",5))
|
if(!strncmp(name,"enum ",5))
|
||||||
return name + 5;
|
return name + 5;
|
||||||
else return name;
|
else return name;
|
||||||
|
default:
|
||||||
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TYPE_NAME (type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Added by Bryan Boreham, Kewill, Sun Sep 17 18:07:17 1989.
|
/* Added by Bryan Boreham, Kewill, Sun Sep 17 18:07:17 1989.
|
||||||
@ -249,9 +248,11 @@ gdb_mangle_name (type, i, j)
|
|||||||
+ strlen (TYPE_FN_FIELD_PHYSNAME (f, j))
|
+ strlen (TYPE_FN_FIELD_PHYSNAME (f, j))
|
||||||
+ 1);
|
+ 1);
|
||||||
|
|
||||||
|
/* Only needed for GNU-mangled names. ANSI-mangled names
|
||||||
|
work with the normal mechanisms. */
|
||||||
if (OPNAME_PREFIX_P (field_name))
|
if (OPNAME_PREFIX_P (field_name))
|
||||||
{
|
{
|
||||||
char *opname = cplus_mangle_opname (field_name + 3);
|
char *opname = cplus_mangle_opname (field_name + 3, 0);
|
||||||
if (opname == NULL)
|
if (opname == NULL)
|
||||||
error ("No mangling for \"%s\"", field_name);
|
error ("No mangling for \"%s\"", field_name);
|
||||||
mangled_name_len += strlen (opname);
|
mangled_name_len += strlen (opname);
|
||||||
@ -457,17 +458,14 @@ lookup_struct_elt_type (type, name, noerr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Given a type TYPE, return a type of pointers to that type.
|
/* Given a type TYPE, return a type of pointers to that type.
|
||||||
May need to construct such a type if this is the first use.
|
May need to construct such a type if this is the first use. */
|
||||||
|
|
||||||
C++: use TYPE_MAIN_VARIANT and TYPE_CHAIN to keep pointer
|
|
||||||
to member types under control. */
|
|
||||||
|
|
||||||
struct type *
|
struct type *
|
||||||
lookup_pointer_type (type)
|
lookup_pointer_type (type)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
{
|
{
|
||||||
register struct type *ptype = TYPE_POINTER_TYPE (type);
|
register struct type *ptype = TYPE_POINTER_TYPE (type);
|
||||||
if (ptype) return TYPE_MAIN_VARIANT (ptype);
|
if (ptype) return ptype;
|
||||||
|
|
||||||
/* This is the first time anyone wanted a pointer to a TYPE. */
|
/* This is the first time anyone wanted a pointer to a TYPE. */
|
||||||
if (TYPE_FLAGS (type) & TYPE_FLAG_PERM)
|
if (TYPE_FLAGS (type) & TYPE_FLAG_PERM)
|
||||||
@ -477,7 +475,6 @@ lookup_pointer_type (type)
|
|||||||
sizeof (struct type));
|
sizeof (struct type));
|
||||||
|
|
||||||
bzero (ptype, sizeof (struct type));
|
bzero (ptype, sizeof (struct type));
|
||||||
TYPE_MAIN_VARIANT (ptype) = ptype;
|
|
||||||
TYPE_TARGET_TYPE (ptype) = type;
|
TYPE_TARGET_TYPE (ptype) = type;
|
||||||
TYPE_POINTER_TYPE (type) = ptype;
|
TYPE_POINTER_TYPE (type) = ptype;
|
||||||
/* New type is permanent if type pointed to is permanent. */
|
/* New type is permanent if type pointed to is permanent. */
|
||||||
@ -496,7 +493,7 @@ lookup_reference_type (type)
|
|||||||
struct type *type;
|
struct type *type;
|
||||||
{
|
{
|
||||||
register struct type *rtype = TYPE_REFERENCE_TYPE (type);
|
register struct type *rtype = TYPE_REFERENCE_TYPE (type);
|
||||||
if (rtype) return TYPE_MAIN_VARIANT (rtype);
|
if (rtype) return rtype;
|
||||||
|
|
||||||
/* This is the first time anyone wanted a pointer to a TYPE. */
|
/* This is the first time anyone wanted a pointer to a TYPE. */
|
||||||
if (TYPE_FLAGS (type) & TYPE_FLAG_PERM)
|
if (TYPE_FLAGS (type) & TYPE_FLAG_PERM)
|
||||||
@ -506,7 +503,6 @@ lookup_reference_type (type)
|
|||||||
sizeof (struct type));
|
sizeof (struct type));
|
||||||
|
|
||||||
bzero (rtype, sizeof (struct type));
|
bzero (rtype, sizeof (struct type));
|
||||||
TYPE_MAIN_VARIANT (rtype) = rtype;
|
|
||||||
TYPE_TARGET_TYPE (rtype) = type;
|
TYPE_TARGET_TYPE (rtype) = type;
|
||||||
TYPE_REFERENCE_TYPE (type) = rtype;
|
TYPE_REFERENCE_TYPE (type) = rtype;
|
||||||
/* New type is permanent if type pointed to is permanent. */
|
/* New type is permanent if type pointed to is permanent. */
|
||||||
@ -727,6 +723,9 @@ lookup_basetype_type (type, offset, via_virtual, via_public)
|
|||||||
/* In practice, this is never used. */
|
/* In practice, this is never used. */
|
||||||
TYPE_LENGTH (btype) = 1;
|
TYPE_LENGTH (btype) = 1;
|
||||||
TYPE_CODE (btype) = TYPE_CODE_STRUCT;
|
TYPE_CODE (btype) = TYPE_CODE_STRUCT;
|
||||||
|
TYPE_CPLUS_SPECIFIC (btype)
|
||||||
|
= (struct cplus_struct_type *) obstack_alloc (symbol_obstack, sizeof (struct cplus_struct_type)));
|
||||||
|
bzero (TYPE_CPLUS_SPECIFIC (btype), sizeof (struct cplus_struct_type));
|
||||||
|
|
||||||
return btype;
|
return btype;
|
||||||
}
|
}
|
||||||
@ -2765,7 +2764,6 @@ init_type (code, length, uns, name)
|
|||||||
|
|
||||||
type = (struct type *) xmalloc (sizeof (struct type));
|
type = (struct type *) xmalloc (sizeof (struct type));
|
||||||
bzero (type, sizeof *type);
|
bzero (type, sizeof *type);
|
||||||
TYPE_MAIN_VARIANT (type) = type;
|
|
||||||
TYPE_CODE (type) = code;
|
TYPE_CODE (type) = code;
|
||||||
TYPE_LENGTH (type) = length;
|
TYPE_LENGTH (type) = length;
|
||||||
TYPE_FLAGS (type) = uns ? TYPE_FLAG_UNSIGNED : 0;
|
TYPE_FLAGS (type) = uns ? TYPE_FLAG_UNSIGNED : 0;
|
||||||
@ -2774,8 +2772,14 @@ init_type (code, length, uns, name)
|
|||||||
TYPE_NAME (type) = name;
|
TYPE_NAME (type) = name;
|
||||||
|
|
||||||
/* C++ fancies. */
|
/* C++ fancies. */
|
||||||
TYPE_NFN_FIELDS (type) = 0;
|
if (code == TYPE_CODE_STRUCT)
|
||||||
TYPE_N_BASECLASSES (type) = 0;
|
{
|
||||||
|
TYPE_CPLUS_SPECIFIC (type)
|
||||||
|
= (struct cplus_struct_type *) xmalloc (sizeof (struct cplus_struct_type));
|
||||||
|
TYPE_MAIN_VARIANT (type) = type;
|
||||||
|
TYPE_NFN_FIELDS (type) = 0;
|
||||||
|
TYPE_N_BASECLASSES (type) = 0;
|
||||||
|
}
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#if !defined (SYMTAB_H)
|
#if !defined (SYMTAB_H)
|
||||||
#define SYMTAB_H 1
|
#define SYMTAB_H 1
|
||||||
#include <obstack.h>
|
#include "obstack.h"
|
||||||
|
|
||||||
/* An obstack to hold objects that should be freed
|
/* An obstack to hold objects that should be freed
|
||||||
when we load a new symbol table.
|
when we load a new symbol table.
|
||||||
@ -32,12 +32,6 @@ extern struct obstack *psymbol_obstack;
|
|||||||
/* Some definitions and declarations to go with use of obstacks. */
|
/* Some definitions and declarations to go with use of obstacks. */
|
||||||
#define obstack_chunk_alloc xmalloc
|
#define obstack_chunk_alloc xmalloc
|
||||||
#define obstack_chunk_free free
|
#define obstack_chunk_free free
|
||||||
#ifdef __STDC__
|
|
||||||
extern void *xmalloc ();
|
|
||||||
#else
|
|
||||||
extern char *xmalloc ();
|
|
||||||
#endif
|
|
||||||
extern void free ();
|
|
||||||
|
|
||||||
/* Some macros for char-based bitfields. */
|
/* Some macros for char-based bitfields. */
|
||||||
#define B_SET(a,x) (a[x>>3] |= (1 << (x&7)))
|
#define B_SET(a,x) (a[x>>3] |= (1 << (x&7)))
|
||||||
|
@ -1,12 +1,26 @@
|
|||||||
/*
|
/* Print instructions for Tahoe target machines, for GDB.
|
||||||
* Ported by the State University of New York at Buffalo by the Distributed
|
Copyright 1986, 1989, 1991 Free Software Foundation, Inc.
|
||||||
* Computer Systems Lab, Department of Computer Science, 1991.
|
Contributed by the State University of New York at Buffalo, by the
|
||||||
*/
|
Distributed Computer Systems Lab, Department of Computer Science, 1991.
|
||||||
|
|
||||||
|
This file is part of GDB.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "tahoe-opcode.h"
|
#include "tahoe-opcode.h"
|
||||||
|
|
||||||
@ -98,7 +112,7 @@ print_insn_arg (d, p, addr, stream)
|
|||||||
case 0:
|
case 0:
|
||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
case 3: /* Liter>al(short immediate byte) mode */
|
case 3: /* Literal (short immediate byte) mode */
|
||||||
if (d[1] == 'd' || d[1] == 'f' || d[1] == 'g' || d[1] == 'h')
|
if (d[1] == 'd' || d[1] == 'f' || d[1] == 'g' || d[1] == 'h')
|
||||||
{
|
{
|
||||||
*(int *)&floatlitbuf = 0x4000 + ((p[-1] & 0x3f) << 4);
|
*(int *)&floatlitbuf = 0x4000 + ((p[-1] & 0x3f) << 4);
|
||||||
|
@ -19,14 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#define TARGET_BYTE_ORDER BIG_ENDIAN
|
#define TARGET_BYTE_ORDER BIG_ENDIAN
|
||||||
|
|
||||||
/* I don't know if this will work for cross-debugging, even if you do get
|
|
||||||
the right files. */
|
|
||||||
/* Include certain files for dbxread.c */
|
|
||||||
#include <convex/filehdr.h>
|
|
||||||
#include <convex/opthdr.h>
|
|
||||||
#include <convex/scnhdr.h>
|
|
||||||
#include <nlist.h>
|
|
||||||
|
|
||||||
/* Define this if the C compiler puts an underscore at the front
|
/* Define this if the C compiler puts an underscore at the front
|
||||||
of external names before giving them to the linker. */
|
of external names before giving them to the linker. */
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#include HAVE_68881
|
#define HAVE_68881
|
||||||
|
|
||||||
/* Define BPT_VECTOR if it is different than the default.
|
/* Define BPT_VECTOR if it is different than the default.
|
||||||
This is the vector number used by traps to indicate a breakpoint. */
|
This is the vector number used by traps to indicate a breakpoint. */
|
||||||
|
@ -19,10 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#define TARGET_BYTE_ORDER LITTLE_ENDIAN
|
#define TARGET_BYTE_ORDER LITTLE_ENDIAN
|
||||||
|
|
||||||
/* I don't know if this will work for cross-debugging, even if you do get
|
|
||||||
a copy of the right include file. */
|
|
||||||
#include <machine/reg.h>
|
|
||||||
|
|
||||||
/* Define this if the C compiler puts an underscore at the front
|
/* Define this if the C compiler puts an underscore at the front
|
||||||
of external names before giving them to the linker. */
|
of external names before giving them to the linker. */
|
||||||
|
|
||||||
|
@ -86,11 +86,7 @@ extern CORE_ADDR sparc_pc_adjust();
|
|||||||
|
|
||||||
#define SAVED_PC_AFTER_CALL(frame) PC_ADJUST (read_register (RP_REGNUM))
|
#define SAVED_PC_AFTER_CALL(frame) PC_ADJUST (read_register (RP_REGNUM))
|
||||||
|
|
||||||
/* Address of the end of stack space. We get this from the system
|
/* Stack grows downward. */
|
||||||
include files. */
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <machine/vmparam.h>
|
|
||||||
#define STACK_END_ADDR USRSTACK
|
|
||||||
|
|
||||||
#define INNER_THAN <
|
#define INNER_THAN <
|
||||||
|
|
||||||
|
@ -244,10 +244,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
Returns positive address > 1 if pc is between enter/exit,
|
Returns positive address > 1 if pc is between enter/exit,
|
||||||
1 if pc before enter or after exit, 0 otherwise. */
|
1 if pc before enter or after exit, 0 otherwise. */
|
||||||
|
|
||||||
#ifndef CORE_ADDR
|
|
||||||
#include "defs.h" /* Make sure CORE_ADDR is defined. */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern CORE_ADDR ns32k_get_enter_addr ();
|
extern CORE_ADDR ns32k_get_enter_addr ();
|
||||||
|
|
||||||
/* Return number of args passed to a frame.
|
/* Return number of args passed to a frame.
|
||||||
|
@ -21,7 +21,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#define DEBUG
|
#define DEBUG
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
|
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
|
|
||||||
|
62
gdb/utils.c
62
gdb/utils.c
@ -26,7 +26,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "signals.h"
|
#include "signals.h"
|
||||||
#include "gdbcmd.h"
|
#include "gdbcmd.h"
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
@ -46,37 +45,6 @@ extern char *realloc();
|
|||||||
#define ISATTY(FP) (isatty (fileno (FP)))
|
#define ISATTY(FP) (isatty (fileno (FP)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MISSING_VPRINTF
|
|
||||||
#ifdef __GNU_LIBRARY
|
|
||||||
#undef MISSING_VPRINTF
|
|
||||||
#else /* !__GNU_LIBRARY */
|
|
||||||
|
|
||||||
#ifndef vfprintf
|
|
||||||
/* Can't #define it since language.c needs it (though FIXME it shouldn't) */
|
|
||||||
void
|
|
||||||
vfprintf (file, format, ap)
|
|
||||||
FILE *file;
|
|
||||||
char *format;
|
|
||||||
va_list ap;
|
|
||||||
{
|
|
||||||
_doprnt (format, ap, file);
|
|
||||||
}
|
|
||||||
#endif /* vfprintf */
|
|
||||||
|
|
||||||
#ifndef vprintf
|
|
||||||
/* Can't #define it since printcmd.c needs it */
|
|
||||||
void
|
|
||||||
vprintf (format, ap)
|
|
||||||
char *format;
|
|
||||||
va_list ap;
|
|
||||||
{
|
|
||||||
vfprintf (stdout, format, ap);
|
|
||||||
}
|
|
||||||
#endif /* vprintf */
|
|
||||||
|
|
||||||
#endif /* GNU_LIBRARY */
|
|
||||||
#endif /* MISSING_VPRINTF */
|
|
||||||
|
|
||||||
void error ();
|
void error ();
|
||||||
void fatal ();
|
void fatal ();
|
||||||
|
|
||||||
@ -515,18 +483,6 @@ strsave (ptr)
|
|||||||
return savestring (ptr, strlen (ptr));
|
return savestring (ptr, strlen (ptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
|
||||||
concat (s1, s2, s3)
|
|
||||||
char *s1, *s2, *s3;
|
|
||||||
{
|
|
||||||
register int len = strlen (s1) + strlen (s2) + strlen (s3) + 1;
|
|
||||||
register char *val = (char *) xmalloc (len);
|
|
||||||
strcpy (val, s1);
|
|
||||||
strcat (val, s2);
|
|
||||||
strcat (val, s3);
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
print_spaces (n, file)
|
print_spaces (n, file)
|
||||||
register int n;
|
register int n;
|
||||||
@ -1032,14 +988,10 @@ fputs_demangled (linebuffer, stream, arg_mode)
|
|||||||
(since prompt_for_continue may do so) so this routine should not be
|
(since prompt_for_continue may do so) so this routine should not be
|
||||||
called when cleanups are not in place. */
|
called when cleanups are not in place. */
|
||||||
|
|
||||||
#if !defined(MISSING_VPRINTF) || defined (vsprintf)
|
|
||||||
/* VARARGS */
|
/* VARARGS */
|
||||||
void
|
void
|
||||||
vfprintf_filtered (stream, format, args)
|
vfprintf_filtered (stream, format, args)
|
||||||
va_list args;
|
va_list args;
|
||||||
#else
|
|
||||||
void fprintf_filtered (stream, format, arg1, arg2, arg3, arg4, arg5, arg6)
|
|
||||||
#endif
|
|
||||||
FILE *stream;
|
FILE *stream;
|
||||||
char *format;
|
char *format;
|
||||||
{
|
{
|
||||||
@ -1069,16 +1021,11 @@ void fprintf_filtered (stream, format, arg1, arg2, arg3, arg4, arg5, arg6)
|
|||||||
|
|
||||||
/* This won't blow up if the restrictions described above are
|
/* This won't blow up if the restrictions described above are
|
||||||
followed. */
|
followed. */
|
||||||
#if !defined(MISSING_VPRINTF) || defined (vsprintf)
|
|
||||||
(void) vsprintf (linebuffer, format, args);
|
(void) vsprintf (linebuffer, format, args);
|
||||||
#else
|
|
||||||
(void) sprintf (linebuffer, format, arg1, arg2, arg3, arg4, arg5, arg6);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
fputs_filtered (linebuffer, stream);
|
fputs_filtered (linebuffer, stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(MISSING_VPRINTF) || defined (vsprintf)
|
|
||||||
/* VARARGS */
|
/* VARARGS */
|
||||||
void
|
void
|
||||||
fprintf_filtered (va_alist)
|
fprintf_filtered (va_alist)
|
||||||
@ -1112,15 +1059,6 @@ printf_filtered (va_alist)
|
|||||||
(void) vfprintf_filtered (stdout, format, args);
|
(void) vfprintf_filtered (stdout, format, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
void
|
|
||||||
printf_filtered (format, arg1, arg2, arg3, arg4, arg5, arg6)
|
|
||||||
char *format;
|
|
||||||
int arg1, arg2, arg3, arg4, arg5, arg6;
|
|
||||||
{
|
|
||||||
fprintf_filtered (stdout, format, arg1, arg2, arg3, arg4, arg5, arg6);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Easy */
|
/* Easy */
|
||||||
|
|
||||||
|
10
gdb/valops.c
10
gdb/valops.c
@ -1,5 +1,5 @@
|
|||||||
/* Perform non-arithmetic operations on values, for GDB.
|
/* Perform non-arithmetic operations on values, for GDB.
|
||||||
Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
|
Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
@ -1054,7 +1053,7 @@ search_struct_method (name, arg1, args, offset, static_memfuncp, type)
|
|||||||
return (value)value_virtual_fn_field (arg1, f, j, type);
|
return (value)value_virtual_fn_field (arg1, f, j, type);
|
||||||
if (TYPE_FN_FIELD_STATIC_P (f, j) && static_memfuncp)
|
if (TYPE_FN_FIELD_STATIC_P (f, j) && static_memfuncp)
|
||||||
*static_memfuncp = 1;
|
*static_memfuncp = 1;
|
||||||
return (value)value_fn_field (arg1, i, j);
|
return (value)value_fn_field (f, j);
|
||||||
}
|
}
|
||||||
j--;
|
j--;
|
||||||
}
|
}
|
||||||
@ -1169,7 +1168,7 @@ value_struct_elt (argp, args, name, static_memfuncp, err)
|
|||||||
if (!args[1])
|
if (!args[1])
|
||||||
{
|
{
|
||||||
/* destructors are a special case. */
|
/* destructors are a special case. */
|
||||||
return (value)value_fn_field (*argp, 0,
|
return (value)value_fn_field (TYPE_FN_FIELDLIST1 (t, 0),
|
||||||
TYPE_FN_FIELDLIST_LENGTH (t, 0));
|
TYPE_FN_FIELDLIST_LENGTH (t, 0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1206,9 +1205,6 @@ destructor_name_p (name, type)
|
|||||||
if (name[0] == '~')
|
if (name[0] == '~')
|
||||||
{
|
{
|
||||||
char *dname = type_name_no_tag (type);
|
char *dname = type_name_no_tag (type);
|
||||||
|
|
||||||
if (! TYPE_HAS_DESTRUCTOR (type))
|
|
||||||
error ("type `%s' does not have destructor defined", dname);
|
|
||||||
if (strcmp (dname, name+1))
|
if (strcmp (dname, name+1))
|
||||||
error ("name of destructor must equal name of class");
|
error ("name of destructor must equal name of class");
|
||||||
else
|
else
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Print values for GNU debugger gdb.
|
/* Print values for GDB, the GNU debugger.
|
||||||
Copyright (C) 1986, 1988, 1989 Free Software Foundation, Inc.
|
Copyright 1986, 1988, 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -20,7 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
@ -1237,6 +1236,7 @@ typedef_print (type, new, stream)
|
|||||||
{
|
{
|
||||||
#ifdef _LANG_c
|
#ifdef _LANG_c
|
||||||
case language_c:
|
case language_c:
|
||||||
|
case language_cplus:
|
||||||
fprintf_filtered(stream, "typedef ");
|
fprintf_filtered(stream, "typedef ");
|
||||||
type_print(type,"",stream,0);
|
type_print(type,"",stream,0);
|
||||||
if(TYPE_NAME ((SYMBOL_TYPE (new))) == 0
|
if(TYPE_NAME ((SYMBOL_TYPE (new))) == 0
|
||||||
@ -1472,6 +1472,8 @@ type_print_varspec_prefix (type, stream, show, passed_a_ptr)
|
|||||||
case TYPE_CODE_FLT:
|
case TYPE_CODE_FLT:
|
||||||
case TYPE_CODE_VOID:
|
case TYPE_CODE_VOID:
|
||||||
case TYPE_CODE_ERROR:
|
case TYPE_CODE_ERROR:
|
||||||
|
case TYPE_CODE_CHAR:
|
||||||
|
case TYPE_CODE_BOOL:
|
||||||
/* These types need no prefix. They are listed here so that
|
/* These types need no prefix. They are listed here so that
|
||||||
gcc -Wall will reveal any types that haven't been handled. */
|
gcc -Wall will reveal any types that haven't been handled. */
|
||||||
break;
|
break;
|
||||||
@ -1568,6 +1570,8 @@ type_print_varspec_suffix (type, stream, show, passed_a_ptr)
|
|||||||
case TYPE_CODE_FLT:
|
case TYPE_CODE_FLT:
|
||||||
case TYPE_CODE_VOID:
|
case TYPE_CODE_VOID:
|
||||||
case TYPE_CODE_ERROR:
|
case TYPE_CODE_ERROR:
|
||||||
|
case TYPE_CODE_CHAR:
|
||||||
|
case TYPE_CODE_BOOL:
|
||||||
/* These types do not need a suffix. They are listed so that
|
/* These types do not need a suffix. They are listed so that
|
||||||
gcc -Wall will report types that may not have been considered. */
|
gcc -Wall will report types that may not have been considered. */
|
||||||
break;
|
break;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Low level packing and unpacking of values for GDB.
|
/* Low level packing and unpacking of values for GDB, the GNU Debugger.
|
||||||
Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
|
Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -20,7 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Print vax instructions for GDB, the GNU debugger.
|
/* Print VAX instructions for GDB, the GNU debugger.
|
||||||
Copyright (C) 1986, 1989 Free Software Foundation, Inc.
|
Copyright 1986, 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -20,7 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
#include "vax-opcode.h"
|
#include "vax-opcode.h"
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#include <sys/ldr.h>
|
#include <sys/ldr.h>
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "param.h"
|
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
|
@ -21,7 +21,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "bfd.h"
|
#include "bfd.h"
|
||||||
#include "param.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Definitions to make GDB run on Convex Unix (4bsd)
|
/* Definitions to make GDB run on Convex Unix (4bsd)
|
||||||
Copyright (C) 1989 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -44,8 +44,3 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
/* Hook to call after creating inferior process. */
|
/* Hook to call after creating inferior process. */
|
||||||
|
|
||||||
#define CREATE_INFERIOR_HOOK create_inferior_hook
|
#define CREATE_INFERIOR_HOOK create_inferior_hook
|
||||||
|
|
||||||
|
|
||||||
/* Interface definitions for kernel debugger KDB. */
|
|
||||||
|
|
||||||
/* (no kdb) */
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Definitions to make GDB run on a merlin under utek 2.1
|
/* Definitions to make GDB run on a merlin under utek 2.1
|
||||||
Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
|
Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
|
#include <machine/reg.h>
|
||||||
|
|
||||||
/* This machine doesn't have the siginterrupt call. */
|
/* This machine doesn't have the siginterrupt call. */
|
||||||
#define NO_SIGINTERRUPT
|
#define NO_SIGINTERRUPT
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/* Parameters for execution on a Sun 4, for GDB, the GNU debugger.
|
/* Parameters for execution on a Sun 4, for GDB, the GNU debugger.
|
||||||
Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
|
Copyright 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
|
||||||
Contributed by Michael Tiemann (tiemann@mcc.com)
|
Contributed by Michael Tiemann (tiemann@mcc.com)
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
Loading…
Reference in New Issue
Block a user