sync with in-tree binutils
Add dis-init.c from gdb 6.1.
This commit is contained in:
parent
ca27018957
commit
618289bb9f
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.28 2004/03/01 00:10:38 brad Exp $
|
||||
# $OpenBSD: Makefile,v 1.29 2004/05/20 23:11:58 brad Exp $
|
||||
|
||||
COMMENT= "GNU development tools"
|
||||
|
||||
@ -77,6 +77,7 @@ post-extract:
|
||||
@cp -f ${FILESDIR}/${f} ${WRKSRC}/ld/emulparams
|
||||
.endfor
|
||||
@cp -f ${FILESDIR}/te-obsd.h ${WRKSRC}/gas/config
|
||||
@cp -f ${FILESDIR}/dis-init.c ${WRKSRC}/opcodes
|
||||
|
||||
post-patch:
|
||||
@-cd ${WRKSRC}/bfd && { automake; AUTOCONF_VERSION=${AUTOCONF_VERSION} autoconf; }
|
||||
|
42
devel/binutils/stable/files/dis-init.c
Normal file
42
devel/binutils/stable/files/dis-init.c
Normal file
@ -0,0 +1,42 @@
|
||||
/* Initialize "struct disassemble_info".
|
||||
|
||||
Copyright 2003 Free Software Foundation, Inc.
|
||||
|
||||
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., 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "dis-asm.h"
|
||||
#include "bfd.h"
|
||||
|
||||
void
|
||||
init_disassemble_info (struct disassemble_info *info, void *stream,
|
||||
fprintf_ftype fprintf_func)
|
||||
{
|
||||
memset (info, 0, sizeof (*info));
|
||||
|
||||
info->flavour = bfd_target_unknown_flavour;
|
||||
info->arch = bfd_arch_unknown;
|
||||
info->endian = BFD_ENDIAN_UNKNOWN;
|
||||
info->octets_per_byte = 1;
|
||||
info->fprintf_func = fprintf_func;
|
||||
info->stream = stream;
|
||||
info->read_memory_func = buffer_read_memory;
|
||||
info->memory_error_func = perror_memory;
|
||||
info->print_address_func = generic_print_address;
|
||||
info->symbol_at_address_func = generic_symbol_at_address;
|
||||
info->display_endian = BFD_ENDIAN_UNKNOWN;
|
||||
}
|
||||
|
54
devel/binutils/stable/patches/patch-include_dis-asm_h
Normal file
54
devel/binutils/stable/patches/patch-include_dis-asm_h
Normal file
@ -0,0 +1,54 @@
|
||||
$OpenBSD: patch-include_dis-asm_h,v 1.1 2004/05/20 23:11:58 brad Exp $
|
||||
--- include/dis-asm.h.orig 2004-05-20 17:22:16.000000000 -0400
|
||||
+++ include/dis-asm.h 2004-05-20 17:26:46.000000000 -0400
|
||||
@@ -284,42 +284,16 @@ extern void generic_print_address
|
||||
extern int generic_symbol_at_address
|
||||
PARAMS ((bfd_vma, struct disassemble_info *));
|
||||
|
||||
-/* Macro to initialize a disassemble_info struct. This should be called
|
||||
- by all applications creating such a struct. */
|
||||
-#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \
|
||||
- (INFO).flavour = bfd_target_unknown_flavour, \
|
||||
- (INFO).arch = bfd_arch_unknown, \
|
||||
- (INFO).mach = 0, \
|
||||
- (INFO).insn_sets = 0, \
|
||||
- (INFO).endian = BFD_ENDIAN_UNKNOWN, \
|
||||
- (INFO).octets_per_byte = 1, \
|
||||
- INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC)
|
||||
-
|
||||
-/* Call this macro to initialize only the internal variables for the
|
||||
- disassembler. Architecture dependent things such as byte order, or machine
|
||||
- variant are not touched by this macro. This makes things much easier for
|
||||
- GDB which must initialize these things separately. */
|
||||
+/* Method to initialize a disassemble_info struct. This should be
|
||||
+ called by all applications creating such a struct. */
|
||||
+extern void init_disassemble_info
|
||||
+ PARAMS ((struct disassemble_info *, void *, fprintf_ftype));
|
||||
|
||||
+/* For compatibility with existing code. */
|
||||
+#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \
|
||||
+ init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC))
|
||||
#define INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) \
|
||||
- (INFO).fprintf_func = (fprintf_ftype)(FPRINTF_FUNC), \
|
||||
- (INFO).stream = (PTR)(STREAM), \
|
||||
- (INFO).section = NULL, \
|
||||
- (INFO).symbols = NULL, \
|
||||
- (INFO).num_symbols = 0, \
|
||||
- (INFO).private_data = NULL, \
|
||||
- (INFO).buffer = NULL, \
|
||||
- (INFO).buffer_vma = 0, \
|
||||
- (INFO).buffer_length = 0, \
|
||||
- (INFO).read_memory_func = buffer_read_memory, \
|
||||
- (INFO).memory_error_func = perror_memory, \
|
||||
- (INFO).print_address_func = generic_print_address, \
|
||||
- (INFO).symbol_at_address_func = generic_symbol_at_address, \
|
||||
- (INFO).flags = 0, \
|
||||
- (INFO).bytes_per_line = 0, \
|
||||
- (INFO).bytes_per_chunk = 0, \
|
||||
- (INFO).display_endian = BFD_ENDIAN_UNKNOWN, \
|
||||
- (INFO).disassembler_options = NULL, \
|
||||
- (INFO).insn_info_valid = 0
|
||||
+ init_disassemble_info (&(INFO), (STREAM), (fprintf_ftype) (FPRINTF_FUNC))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
@ -1,7 +1,24 @@
|
||||
$OpenBSD: patch-opcodes_Makefile_am,v 1.1 2004/01/18 23:48:24 brad Exp $
|
||||
--- opcodes/Makefile.am.orig 2004-01-16 05:30:39.000000000 -0500
|
||||
+++ opcodes/Makefile.am 2004-01-16 05:31:24.000000000 -0500
|
||||
@@ -478,17 +478,17 @@ dep.sed: dep-in.sed config.status
|
||||
$OpenBSD: patch-opcodes_Makefile_am,v 1.2 2004/05/20 23:11:58 brad Exp $
|
||||
--- opcodes/Makefile.am.orig 2003-04-01 10:50:30.000000000 -0500
|
||||
+++ opcodes/Makefile.am 2004-05-20 17:29:14.000000000 -0400
|
||||
@@ -63,6 +63,7 @@ CFILES = \
|
||||
d30v-opc.c \
|
||||
dlx-dis.c \
|
||||
dis-buf.c \
|
||||
+ dis-init.c \
|
||||
disassemble.c \
|
||||
fr30-asm.c \
|
||||
fr30-desc.c \
|
||||
@@ -281,7 +282,7 @@ INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir)
|
||||
disassemble.lo: disassemble.c $(INCDIR)/dis-asm.h
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c @archdefs@ $(srcdir)/disassemble.c
|
||||
|
||||
-libopcodes_la_SOURCES = dis-buf.c disassemble.c
|
||||
+libopcodes_la_SOURCES = dis-buf.c dis-init.c disassemble.c
|
||||
libopcodes_la_DEPENDENCIES = $(OFILES)
|
||||
libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@
|
||||
libopcodes_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
|
||||
@@ -478,17 +479,17 @@ dep.sed: dep-in.sed config.status
|
||||
dep: DEP
|
||||
sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile
|
||||
cat DEP >> tmp-Makefile
|
||||
@ -22,3 +39,12 @@ $OpenBSD: patch-opcodes_Makefile_am,v 1.1 2004/01/18 23:48:24 brad Exp $
|
||||
|
||||
.PHONY: dep dep-in dep-am
|
||||
|
||||
@@ -547,6 +548,8 @@ dlx-dis.lo: dlx-dis.c sysdep.h config.h
|
||||
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/dlx.h
|
||||
dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h
|
||||
+dis-init.lo: dis-buf.c sysdep.h config.h $(INCDIR)/ansidecl.h \
|
||||
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
|
||||
disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
|
||||
fr30-asm.lo: fr30-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
|
||||
|
Loading…
Reference in New Issue
Block a user