aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2010-10-08 14:00:50 +0000
committerAlan Modra <amodra@gmail.com>2010-10-08 14:00:50 +0000
commit9ccb8af972518810c66317c6c942d2268bfb5123 (patch)
tree1acdeaaf802f3b87c42d584da4c113d548301124
parentec3d575a7a6516a1b3065312d228d706de6c49c7 (diff)
downloadgdb-9ccb8af972518810c66317c6c942d2268bfb5123.zip
gdb-9ccb8af972518810c66317c6c942d2268bfb5123.tar.gz
gdb-9ccb8af972518810c66317c6c942d2268bfb5123.tar.bz2
Fix build with -DDEBUG=7
-rw-r--r--bfd/ChangeLog15
-rw-r--r--bfd/elf.c5
-rw-r--r--bfd/elf32-rx.c4
-rw-r--r--bfd/elf32-xtensa.c2
-rw-r--r--bfd/elflink.c10
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/nlmheader.y10
-rw-r--r--cpu/ChangeLog4
-rw-r--r--cpu/frv.opc3
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/obj-coff.c4
-rw-r--r--opcodes/ChangeLog9
-rw-r--r--opcodes/frv-opc.c3
-rw-r--r--opcodes/or32-dis.c20
-rw-r--r--opcodes/or32-opc.c6
15 files changed, 76 insertions, 29 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c21a0f9..39a5c98 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,6 +1,18 @@
+2010-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
+ Alan Modra <amodra@gmail.com>
+
+ Fix build with -DDEBUG=7
+ * elf.c (_bfd_elf_symbol_from_bfd_symbol): Remove call
+ to deleted function elf_symbol_flags. Add typecast to avoid warning.
+ * elf32-rx.c (dump_symbol) : Rename to..
+ (rx_dump_symbol): ..this to avoid link errors.
+ * elflink.c (elf_link_input_bfd): Add typecast to avoid warnings.
+ (bfd_elf_perform_complex_relocation): Likewise.
+ * elf32-xtensa.c (print_action_list): Likewise.
+
2010-10-06 Nathan Sidwell <nathan@codesourcery.com>
- * elf32-arm.c (elf32_arm_stub_long_branch_any_arm_pic,
+ * elf32-arm.c (elf32_arm_stub_long_branch_any_arm_pic,
elf32_arm_stub_long_branch_any_arm_pic): Use a consistent name for
ip/r12.
(arm_type_of_stub): Remove superfluous braces.
@@ -240,7 +252,6 @@
2010-09-09 Bernd Schmidt <bernds@codesourcery.com>
- bfd/
* elflink.c (bfd_elf_final_link): Correct calculation of
max_external_reloc_size.
diff --git a/bfd/elf.c b/bfd/elf.c
index 85d4c18..4df0007 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -5217,9 +5217,8 @@ _bfd_elf_symbol_from_bfd_symbol (bfd *abfd, asymbol **asym_ptr_ptr)
#if DEBUG & 4
{
fprintf (stderr,
- "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%s\n",
- (long) asym_ptr, asym_ptr->name, idx, flags,
- elf_symbol_flags (flags));
+ "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx\n",
+ (long) asym_ptr, asym_ptr->name, idx, (long) flags);
fflush (stderr);
}
#endif
diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c
index 7d9dbc1..4b31a35 100644
--- a/bfd/elf32-rx.c
+++ b/bfd/elf32-rx.c
@@ -29,7 +29,7 @@
#ifdef DEBUG
char * rx_get_reloc (long);
-void dump_symtab (bfd *, void *, void *);
+void rx_dump_symtab (bfd *, void *, void *);
#endif
#define RXREL(n,sz,bit,shift,complain,pcrel) \
@@ -2962,7 +2962,7 @@ rx_elf_object_p (bfd * abfd)
#ifdef DEBUG
void
-dump_symtab (bfd * abfd, void * internal_syms, void * external_syms)
+rx_dump_symtab (bfd * abfd, void * internal_syms, void * external_syms)
{
size_t locsymcount;
Elf_Internal_Sym * isymbuf;
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index f9ecde5..6cd396a 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -5710,7 +5710,7 @@ print_action_list (FILE *fp, text_action_list *action_list)
fprintf (fp, "%s: %s[0x%lx] \"%s\" %d\n",
r->sec->owner->filename,
- r->sec->name, r->offset, t, r->removed_bytes);
+ r->sec->name, (unsigned long) r->offset, t, r->removed_bytes);
}
}
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 2c45649..cda897e 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -7884,7 +7884,8 @@ bfd_elf_perform_complex_relocation (bfd *input_bfd,
"chunksz %ld, start %ld, len %ld, oplen %ld\n"
" dest: %8.8lx, mask: %8.8lx, reloc: %8.8lx\n",
lsb0_p, signed_p, trunc_p, wordsz, chunksz, start, len,
- oplen, x, mask, relocation);
+ oplen, (unsigned long) x, (unsigned long) mask,
+ (unsigned long) relocation);
#endif
r = bfd_reloc_ok;
@@ -7904,8 +7905,8 @@ bfd_elf_perform_complex_relocation (bfd *input_bfd,
" shifted mask: %8.8lx\n"
" shifted/masked reloc: %8.8lx\n"
" result: %8.8lx\n",
- relocation, (mask << shift),
- ((relocation & mask) << shift), x);
+ (unsigned long) relocation, (unsigned long) (mask << shift),
+ (unsigned long) ((relocation & mask) << shift), (unsigned long) x);
#endif
/* FIXME: octets_per_byte. */
put_value (wordsz, chunksz, input_bfd, x, contents + rel->r_offset);
@@ -9464,7 +9465,8 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
#ifdef DEBUG
printf ("Encountered a complex symbol!");
printf (" (input_bfd %s, section %s, reloc %ld\n",
- input_bfd->filename, o->name, rel - internal_relocs);
+ input_bfd->filename, o->name,
+ (long) (rel - internal_relocs));
printf (" symbol: idx %8.8lx, name %s\n",
r_symndx, sym_name);
printf (" reloc : info %8.8lx, addr %8.8lx\n",
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index ada4761..1ad5a7a 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ Fix build with -DDEBUG=7
+ * nlmheader.y (DEBUG token): Rename to DEBUG_K.
+
2010-10-06 Alan Modra <amodra@gmail.com>
* bucomm.c (bfd_nonfatal, bfd_nonfatal_message): Don't clobber errno.
diff --git a/binutils/nlmheader.y b/binutils/nlmheader.y
index f42ae90..86744c4 100644
--- a/binutils/nlmheader.y
+++ b/binutils/nlmheader.y
@@ -1,6 +1,6 @@
%{/* nlmheader.y - parse NLM header specification keywords.
- Copyright 1993, 1994, 1995, 1997, 1998, 2001, 2002, 2003, 2005, 2007
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1997, 1998, 2001, 2002, 2003, 2005, 2007,
+ 2010 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -117,7 +117,7 @@ static char *xstrdup (const char *);
/* The reserved words. */
-%token CHECK CODESTART COPYRIGHT CUSTOM DATE DEBUG DESCRIPTION EXIT
+%token CHECK CODESTART COPYRIGHT CUSTOM DATE DEBUG_K DESCRIPTION EXIT
%token EXPORT FLAG_ON FLAG_OFF FULLMAP HELP IMPORT INPUT MAP MESSAGES
%token MODULE MULTIPLE OS_DOMAIN OUTPUT PSEUDOPREEMPTION REENTRANT
%token SCREENNAME SHARELIB STACK START SYNCHRONIZE
@@ -202,7 +202,7 @@ command:
if (version_hdr->year < 1900 || version_hdr->year > 3000)
nlmheader_warn (_("illegal year"), -1);
}
- | DEBUG
+ | DEBUG_K
{
debug_info = TRUE;
}
@@ -593,7 +593,7 @@ static struct keyword_tokens_struct keyword_tokens[] =
{ "COPYRIGHT", COPYRIGHT },
{ "CUSTOM", CUSTOM },
{ "DATE", DATE },
- { "DEBUG", DEBUG },
+ { "DEBUG", DEBUG_K },
{ "DESCRIPTION", DESCRIPTION },
{ "EXIT", EXIT },
{ "EXPORT", EXPORT },
diff --git a/cpu/ChangeLog b/cpu/ChangeLog
index 667538a..459e07a 100644
--- a/cpu/ChangeLog
+++ b/cpu/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * frv.opc: #undef DEBUG.
+
2010-07-03 DJ Delorie <dj@delorie.com>
* m32c.cpu (f-dsp-8-s24): Mask high byte after shifting it.
diff --git a/cpu/frv.opc b/cpu/frv.opc
index 3dfadb3..f81cef0 100644
--- a/cpu/frv.opc
+++ b/cpu/frv.opc
@@ -81,6 +81,9 @@ int spr_valid (long);
#include "elf/frv.h"
#include <stdio.h>
+/* DEBUG appears below as argument of OP macro. */
+#undef DEBUG
+
/* Returns TRUE if {MAJOR,MACH} is a major branch of the FRV
development tree. */
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ad16b9e..b14aa6c 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ Fix build with -DDEBUG=7
+ * config/obj-coff.c (s_get_name, symbol_dump): Add prototypes.
+
2010-10-07 Bernd Schmidt <bernds@codesourcery.com>
* config/tc-tic6x.c (tic6x_try_encode): Correct encoding of fstg field
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c
index b71040a..d0a4999 100644
--- a/gas/config/obj-coff.c
+++ b/gas/config/obj-coff.c
@@ -1829,12 +1829,16 @@ obj_coff_init_stab_section (segT seg)
}
#ifdef DEBUG
+const char * s_get_name (symbolS *);
+
const char *
s_get_name (symbolS *s)
{
return ((s == NULL) ? "(NULL)" : S_GET_NAME (s));
}
+void symbol_dump (void);
+
void
symbol_dump (void)
{
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index fe700ed..b8535af 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,12 @@
+2010-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ Fix build with -DDEBUG=7
+ * frv-opc.c: Regenerate.
+ * or32-dis.c (DEBUG): Don't redefine.
+ (find_bytes_big, or32_extract, or32_opcode_match, or32_print_register):
+ Adapt DEBUG code to some type changes throughout.
+ * or32-opc.c (or32_extract): Likewise.
+
2010-10-07 Bernd Schmidt <bernds@codesourcery.com>
* tic6x-dis.c (print_insn_tic6x): Correct decoding of fstg field
diff --git a/opcodes/frv-opc.c b/opcodes/frv-opc.c
index 3d0d1e0..e7107a8 100644
--- a/opcodes/frv-opc.c
+++ b/opcodes/frv-opc.c
@@ -34,6 +34,9 @@ This file is part of the GNU Binutils and/or GDB, the GNU debugger.
#include "elf/frv.h"
#include <stdio.h>
+/* DEBUG appears below as argument of OP macro. */
+#undef DEBUG
+
/* Returns TRUE if {MAJOR,MACH} is a major branch of the FRV
development tree. */
diff --git a/opcodes/or32-dis.c b/opcodes/or32-dis.c
index d639fb3..a0dc92a 100644
--- a/opcodes/or32-dis.c
+++ b/opcodes/or32-dis.c
@@ -20,7 +20,9 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
+#ifndef DEBUG
#define DEBUG 0
+#endif
#include "dis-asm.h"
#include "opcode/or32.h"
@@ -41,7 +43,7 @@ find_bytes_big (unsigned char *insn_ch, unsigned long *insn)
((unsigned long) insn_ch[2] << 8) +
((unsigned long) insn_ch[3]);
#if DEBUG
- printf ("find_bytes_big3: %x\n", *insn);
+ printf ("find_bytes_big3: %lx\n", *insn);
#endif
}
@@ -88,7 +90,7 @@ or32_extract (char param_ch, char *enc_initial, unsigned long insn)
{
unsigned long tmp = strtoul (enc, NULL, 16);
#if DEBUG
- printf (" enc=%s, tmp=%x ", enc, tmp);
+ printf (" enc=%s, tmp=%lx ", enc, tmp);
#endif
if (param_ch == '0')
tmp = 15 - tmp;
@@ -108,7 +110,7 @@ or32_extract (char param_ch, char *enc_initial, unsigned long insn)
opc_pos--;
param_pos--;
#if DEBUG
- printf ("\n ret=%x opc_pos=%x, param_pos=%x\n", ret, opc_pos, param_pos);
+ printf ("\n ret=%lx opc_pos=%x, param_pos=%x\n", ret, opc_pos, param_pos);
#endif
ret += ((insn >> opc_pos) & 0x1) << param_pos;
@@ -117,12 +119,12 @@ or32_extract (char param_ch, char *enc_initial, unsigned long insn)
&& ret >> (letter_range (param_ch) - 1))
{
#if DEBUG
- printf ("\n ret=%x opc_pos=%x, param_pos=%x\n",
+ printf ("\n ret=%lx opc_pos=%x, param_pos=%x\n",
ret, opc_pos, param_pos);
#endif
ret |= 0xffffffff << letter_range(param_ch);
#if DEBUG
- printf ("\n after conversion to signed: ret=%x\n", ret);
+ printf ("\n after conversion to signed: ret=%lx\n", ret);
#endif
}
enc++;
@@ -141,7 +143,7 @@ or32_extract (char param_ch, char *enc_initial, unsigned long insn)
enc++;
#if DEBUG
- printf ("ret=%x\n", ret);
+ printf ("ret=%lx\n", ret);
#endif
return ret;
}
@@ -158,8 +160,8 @@ or32_opcode_match (unsigned long insn, char *encoding)
zeros = or32_extract ('0', encoding, insn);
#if DEBUG
- printf ("ones: %x \n", ones);
- printf ("zeros: %x \n", zeros);
+ printf ("ones: %lx \n", ones);
+ printf ("zeros: %lx \n", zeros);
#endif
if ((insn & ones) != ones)
{
@@ -194,7 +196,7 @@ or32_print_register (char param_ch,
int regnum = or32_extract (param_ch, encoding, insn);
#if DEBUG
- printf ("or32_print_register: %c, %s, %x\n", param_ch, encoding, insn);
+ printf ("or32_print_register: %c, %s, %lx\n", param_ch, encoding, insn);
#endif
if (param_ch == 'A')
(*info->fprintf_func) (info->stream, "r%d", regnum);
diff --git a/opcodes/or32-opc.c b/opcodes/or32-opc.c
index ff624e7..94a1ace 100644
--- a/opcodes/or32-opc.c
+++ b/opcodes/or32-opc.c
@@ -898,7 +898,7 @@ or32_extract (char param_ch, char *enc_initial, unsigned long insn)
{
unsigned long tmp = strtol (enc, NULL, 16);
#if DEBUG
- printf (" enc=%s, tmp=%x ", enc, tmp);
+ printf (" enc=%s, tmp=%lx ", enc, tmp);
#endif
if (param_ch == '0')
tmp = 15 - tmp;
@@ -918,7 +918,7 @@ or32_extract (char param_ch, char *enc_initial, unsigned long insn)
opc_pos--;
param_pos--;
#if DEBUG
- printf ("\n ret=%x opc_pos=%x, param_pos=%x\n", ret, opc_pos, param_pos);
+ printf ("\n ret=%lx opc_pos=%x, param_pos=%x\n", ret, opc_pos, param_pos);
#endif
if (ISLOWER (param_ch))
ret -= ((insn >> opc_pos) & 0x1) << param_pos;
@@ -940,7 +940,7 @@ or32_extract (char param_ch, char *enc_initial, unsigned long insn)
enc++;
#if DEBUG
- printf ("ret=%x\n", ret);
+ printf ("ret=%lx\n", ret);
#endif
return ret;
}