aboutsummaryrefslogtreecommitdiff
path: root/opcodes/dis-buf.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1994-02-08 09:12:06 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1994-02-08 09:12:06 +0000
commit5c9b5f58f30bc472f69578c8702aeea408a4433e (patch)
tree9deabdf58d03a5ec2c12e892ff8b9cbdb466ecfb /opcodes/dis-buf.c
parent4c1b6b07eaabec2efbe3d7145aaa57ef2338e6dd (diff)
downloadgdb-5c9b5f58f30bc472f69578c8702aeea408a4433e.zip
gdb-5c9b5f58f30bc472f69578c8702aeea408a4433e.tar.gz
gdb-5c9b5f58f30bc472f69578c8702aeea408a4433e.tar.bz2
* dis-buf.c, i386-dis.c: Include <string.h>.
Diffstat (limited to 'opcodes/dis-buf.c')
-rw-r--r--opcodes/dis-buf.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/opcodes/dis-buf.c b/opcodes/dis-buf.c
index 279aa24..c46dad3 100644
--- a/opcodes/dis-buf.c
+++ b/opcodes/dis-buf.c
@@ -1,5 +1,5 @@
/* Disassemble from a buffer, for GNU.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994 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
@@ -16,6 +16,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "dis-asm.h"
+#include <string.h>
#include <errno.h>
/* Get LENGTH bytes from info's buffer, at target address memaddr.
@@ -52,3 +53,18 @@ perror_memory (status, memaddr, info)
(*info->fprintf_func) (info->stream,
"Address 0x%x is out of bounds.\n", memaddr);
}
+
+/* This could be in a separate file, to save miniscule amounts of space
+ in statically linked executables. */
+
+/* Just print the address is hex. This is included for completeness even
+ though both GDB and objdump provide their own (to print symbolic
+ addresses). */
+
+void
+generic_print_address (addr, info)
+ bfd_vma addr;
+ struct disassemble_info *info;
+{
+ (*info->fprintf_func) (info->stream, "0x%x", addr);
+}