Commit Graph

3491 Commits

Author SHA1 Message Date
mrg 5f3d6c38d0 build sim before gdb. 2002-02-02 03:04:22 +00:00
tv 9fbd88883c Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
  sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
2002-01-31 22:43:33 +00:00
tv 6061a17df3 itbl-parse ends in .y; itbl-lex in .l. 2002-01-31 21:15:08 +00:00
tv 5b071d154b Conditionally define M4 so it can be used as a host tool. 2002-01-31 19:12:43 +00:00
tv 3bf9a18e1c Remove extraneous declarations of yyparse() and yylex(). 2002-01-30 20:44:54 +00:00
reinoud f3413b0e75 Back out change on Perry's request... PR 15303 is open again. 2002-01-30 17:43:52 +00:00
reinoud d4d4c95b9e The config file mentiones that if off_t isnt defined its defined in gcc as
`long'. This gives rise to defining `off_t' to a signed 64 bit on LP64
machines giving rise to cross compiling errors.

By explicitly setting it to int32_t its forced to use signed 32 bits
integers as required and expected on the ILP32 ARM processor.

This aparently fixes PR 15303
2002-01-30 17:11:44 +00:00
tv 355d5a06c1 Restore rev. 1.2 (revert reversion). Fixes recent cc1obj bomb. 2002-01-30 15:16:06 +00:00
thorpej 1e51e492fd Sync NetBSD piece with gcc-current. 2002-01-29 18:52:09 +00:00
tv a328e34106 Make almost all tools compile and run properly on non-NetBSD hosts. (In
particular, most tools now run correctly on Solaris 7.)
2002-01-29 10:20:28 +00:00
tv c2f713900d Revert previous; please don't regen .y output using BSD yacc for a file that
should be run through Bison.
2002-01-29 08:12:10 +00:00
thorpej 89458c3940 * Clean up XFmode avoidance.
* If avoiding XFmode, force REAL_ARITHMETIC anyway (which will use
  the software FP emulation).
2002-01-29 01:02:06 +00:00
thorpej 7cf69379df Don't try using XFmode on the 68010. XXX We'd like to make this
determination at compiler run-time, but we can't do that right now.
2002-01-28 22:50:06 +00:00
thorpej 74474e4e91 Patch posted to binutils@sources.redhat.com by Matt Fredette
(should make it into stock binutils as soon as Matt's copyright
assignment paperwork is finalized):

bfd:
	* elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
	EF_M68000.

binutils:
	* readelf.c (get_machine_flags): Recognize EF_M68000.

gas:
	* config/tc-m68k.c (md_show_usage): No longer display a
	hard-coded "68020" for the default CPU, instead display the
	canonical name of the true, configured default CPU.
	(m68k_elf_final_processing): Mark objects for sub-68020
	CPUs with the new EF_M68000 flag.

include/elf:
	* m68k.h (EF_M68000): Define.
2002-01-28 21:39:07 +00:00
thorpej f3121769a7 Add support for m68010-*-netbsdelf* using the existing m68k/netbsd-elf
configuration.
2002-01-28 21:10:51 +00:00
thorpej 872ed866f5 Set the machine architecture in the bfd structure before
parsing the program headers.
2002-01-27 20:12:09 +00:00
thorpej bc7317ef89 Slightly simplified version of a patch I just submitted to the
master binutils sources that fix gprof for LP64 platforms and
also fix some problems with cross-gprof:

        * TODO: Remove "host architecture pointer size" item.
        * gmon.h (GMON_HDRSIZE_BSD44_32): Define.
        (GMON_HDRSIZE_BSD44_64): Ditto.
        (GMON_HDRSIZE_OLDBSD_32): Ditto.
        (GMON_HDRSIZE_OLDBSD_64): Ditto.
        (struct raw_phdr): Wrap in #if 0, keeping it for
        documentation purposes only.
        (struct old_raw_phdr): Likewise.
        (struct raw_arc): Likewise.  Change type/size of
        "count" member to long match 4.4BSD.
        * gmon_io: Update copyright years.
        (gmon_io_read_64): New function.
        (gmon_io_read_vma): Use bfd_arch_bits_per_address to
        determine target pointer size.  Use gmon_io_read_32
        and gmon_io_read_64.
        (gmon_io_write_64): New function.
        (gmon_io_write_vma): Use bfd_arch_bits_per_address to
        determine target pointer size.  Use gmon_io_write_32
        and gmon_io_write_64.
        (get_vma): Remove.
        (put_vma): Ditto.
        (gmon_read_raw_arc): New function.
        (gmon_write_raw_arc): New function.
        (gmon_out_read): Do not use struct raw_phdr or
        struct old_raw_phdr to read the gmon header.  Use
        gmon_read_raw_arc to read call graph records.
        (gmon_out_write): Do not use struct raw_phdr or
        struct old_raw_phdr to write the gmon header.  Use
        gmon_write_raw_arc to write call graph records.

This makes the GMON_PTR_SIZE constant obsolete, however I have not
included the changes to the autoconf machinery that eliminate that
constant completely in order to minimize the changes here (they
will be picked up when we import Binutils 2.12 when it is released).
2002-01-26 23:57:59 +00:00
thorpej 0b621a0221 It's a C program, but it uses libgroff, which uses C++, so we
need to use PROG_CXX here as well.
2002-01-22 23:57:19 +00:00
thorpej a3d761116e Fix some MKGDB=no bugs. 2002-01-22 21:16:28 +00:00
mrg 7cda1e8c92 don't install psim 2002-01-22 17:02:08 +00:00
mrg 47d0b44e4f add PSIM support to gdb and install the stand alone in /usr/bin/psim. this
fixes the rest of port-powerpc/14307.
2002-01-22 16:55:19 +00:00
mrg 6bdbccbb59 regenerate. 2002-01-22 15:52:53 +00:00
tron cb9b650951 Define "HAVE_ERR_H" to fix native build. 2002-01-22 13:50:53 +00:00
mrg e10f2bf04d - get SIM_OBS for GDB.
- build a usr.bin/sim/arch tree, copy sim/ppc/config.h there for powerpc.
2002-01-22 13:13:00 +00:00
mrg f2f685f22a * pull across fixes for PSIM from gdb-current on NetBSD:
2001-03-04  Andrew Cagney  <ac131313@redhat.com>
	* emul_netbsd.c [WITH_NetBSD_HOST]: Include <sys/mount.h> and
	<errno.h>.
	(do_stat): Only do SYS test when SYS_stat defined.
	(do_sigprocmask): Ditto for SYS_sigprocmask.
	(do_fstat): Ditto for SYS_fstat.
	(do_getdirentries): Ditto for SYS_getdirentries.
	(do_lstat): Ditto for SYS_lstat.

	2001-01-15  Geoffrey Keating  <geoffk@redhat.com>
	* emul_netbsd.c (do_open): Translate the flag parameter to the
	open syscall to the numbers supported by the host.

* part of port-powerpc/14307

	2001-10-19  Andrew Cagney  <ac131313@redhat.com>
	* configure.in: When Linux or NetBSD, enable PowerPC simulator.
	* configure: Re-generate.
2002-01-22 12:28:49 +00:00
mrg 858c824a54 * part of port-powerpc/14307: add psim support for nbsd & linux powerpc
gdb targets.

	2001-10-18  Andrew Cagney  <ac131313@redhat.com>
	* config/powerpc/nbsd.mt (SIM_OBS, SIM): Define.
	* config/powerpc/linux.mt (SIM, SIM_OBS): Ditto
2002-01-22 12:25:56 +00:00
thorpej 3ef3a0aa2f Be a little more careful when calling _mcount() (to prevent
clobbering $27).
2002-01-22 02:09:39 +00:00
thorpej aaa59fa5b0 Need to set NOOBJ= before bsd.own.mk is included. 2002-01-22 00:59:46 +00:00
tv 0d0a440269 Kill this directory so that it's more amenable to a case insensitive fs. 2002-01-21 20:50:13 +00:00
tv 5c99654526 Add hooks for cross-hosting on non-NetBSD platforms. 2002-01-21 19:22:53 +00:00
thorpej 2667ee3c74 Fix handling of FP registers. 2002-01-18 22:00:11 +00:00
thorpej 6c608f3110 When removing a single-step breakpoint, fix-up the PC, since GDB does
not do for us in this case.

This fixes all sorts of random lossage with the new Alpha GDB, which,
as far as I can tell, works just fine now.
2002-01-18 06:15:32 +00:00
thorpej 47193736cf NetBSD does not mark the outermost frame, so define FRAME_CHAIN_VALID
to func_frame_chain_valid() so that the traceback will stop at the
entry point.
2002-01-18 04:30:54 +00:00
thorpej 7be6f45635 Comment out token after #endif. 2002-01-18 04:15:02 +00:00
tv f7bea0ea1e Some sanity fixes (including a possible buffer overflow in makeinfo), plus
some fixed proper support for Cygwin hosts.
2002-01-16 17:22:37 +00:00
itojun 815ede9ef4 gzip long filename buffer overrun vulnerability. from 1.2.4 -> 1.2.4b fix
http://www.securityfocus.com/bid/3712
2002-01-15 09:18:15 +00:00
wiz 589623fe7c Add a trailing dot. 2002-01-13 11:44:27 +00:00
thorpej 5903d82b00 Pretty-print the machine-dependent NetBSD ELF core note types. 2002-01-09 05:02:44 +00:00
thorpej 3699fe0e3a Add support for printing of NetBSD ELF core file note types. 2002-01-09 04:46:31 +00:00
wdk f401e7e08b getopt_long option list was incorrect. Apply rev 1.20 diffs from
binutils-current respository.

    2001-06-24  H.J. Lu  <hjl@gnu.org>
        * objcopy.c (strip_main): Revert the change made on 2001-05-30
        by accident.
        (copy_main): Apply the the change made to strip_main on
        2001-05-30 by accident.

strip now passes the argument list as documented.
2002-01-08 06:58:32 +00:00
wiz 6041ec37c2 then -> than.
Diffs already sent back to binutils maintainers.
2002-01-07 14:54:09 +00:00
wiz ca93d68d44 then -> than. 2002-01-07 14:47:37 +00:00
thorpej 92aa2889ec Use mips* rather than mipsel* or mipseb* to set gdb_host_cpu. From
gdb-current.
2002-01-04 21:45:54 +00:00
thorpej 1e7aef64f9 Set gdb_host_cpu to "mips" if mipsel. 2002-01-04 18:41:42 +00:00
thorpej 65b12946ac Overhaul, and add support for ELF core files. 2002-01-04 06:19:31 +00:00
thorpej 6c4e00eadf Apply the patch from:
http://gcc.gnu.org/ml/gcc-patches/2000-06/msg00389.html

ChangeLog for this change (which was never committed to the master
GCC sources; the bug still exists in GCC 3.x!):

2000-05-09  Ethan Solomita  ethan@cs.columbia.edu

	* config/mips/mips.h (FUNCTION_PROFILER): Deal with
	the case where jal is expanded as a macro.

This is done by removing the .reorder/.noreorder, and moving the
call to _mcount to after the stack adjust, thereby letting the
assembler deal with the delay slot, etc.

This fixes profiling with libraries built -mabicalls (default on
NetBSD).

I can't believe how long this problem has been discussed-but-not-fixed
on the GCC mailing list...
2002-01-04 05:29:39 +00:00
cgd 6d4088dbde Convert this code to use read/write rather than mmap followed by read
into the mmap'd region.  (reviewed by thorpej.)

This is done to facilitate use as a host tool on not-necessarily-NetBSD
host systems.  Specifically, it works around problems discovered on
linux (mostly tested on 2.4.2-smp / RH 7.1, but also seen on other
variants) in which mmap(...MAP_SHARED...) on NFS files doesn't work
properly:

74 [hardy] RAMDISK.EB % uname -a
Linux hardy 2.4.2-2smp #1 SMP Sun Apr 8 20:21:34 EDT 2001 i686 unknown
75 [hardy] RAMDISK.EB % cat /etc/issue

Red Hat Linux release 7.1 (Seawolf)
Kernel 2.4.2-2smp on a 2-processor i686

76 [hardy] RAMDISK.EB % df .
Filesystem           1k-blocks      Used Available Use% Mounted on
fs:/home/cgd
                     104857600  98764968   6092632  95% /home/cgd
77 [hardy] RAMDISK.EB % date ; md5sum netbsd
Thu Dec 27 17:31:41 PST 2001
a1f35f085f130983892933df92d23be4  netbsd
78 [hardy] RAMDISK.EB % nbmdsetimage netbsd ~/proj-local/rd
79 [hardy] RAMDISK.EB % date ; md5sum netbsd
Thu Dec 27 17:31:49 PST 2001
740cbfb0a8432b7d3a6bf3421655e270  netbsd
80 [hardy] RAMDISK.EB % date ; md5sum netbsd
Thu Dec 27 17:31:51 PST 2001
a8c60aae879ead6893f074e83c23d70a  netbsd
81 [hardy] RAMDISK.EB % date ; md5sum netbsd
Thu Dec 27 17:31:54 PST 2001
a8c60aae879ead6893f074e83c23d70a  netbsd
82 [hardy] RAMDISK.EB % date ; md5sum netbsd
Thu Dec 27 17:31:55 PST 2001
a1f35f085f130983892933df92d23be4  netbsd
83 [hardy] RAMDISK.EB % date ; md5sum netbsd
Thu Dec 27 17:31:57 PST 2001
a1f35f085f130983892933df92d23be4  netbsd
84 [hardy] RAMDISK.EB %

("isn't that cool?")
2002-01-03 06:21:47 +00:00
tron 2ece7637b1 Add "_eh.c" to list of files which are supposed to get cleaned. 2002-01-02 09:17:48 +00:00
thorpej 2135cbaadd Oops, this is NOT a C++ program. 2002-01-01 05:16:18 +00:00
thorpej d68ee9d8e3 Per a suggestion from matthew green, PROG_CXX takes the place of
PROG for C++ programs.
2002-01-01 01:38:25 +00:00