Applied patch from Philip Blundell <pb@nexus.co.uk>: Make address variables

unsigned to avoid problems when disassembling code at high-bit-set addresses.
This commit is contained in:
Nick Clifton
1998-10-27 22:40:43 +00:00
parent fe146542dd
commit 32dc84ef55
2 changed files with 16 additions and 9 deletions

View File

@ -1,3 +1,9 @@
Tue Oct 27 14:39:00 1998 Nick Clifton <nickc@cygnus.com>
* objdump.c (disassemble_bytes): Applied this patch from Philip
Blundell <pb@nexus.co.uk>: Make address variables unsigned to
avoid problems when disassembling code at high-bit-set addresses.
Mon Oct 26 14:07:59 1998 Mumit Khan <khan@xraylith.wisc.edu> Mon Oct 26 14:07:59 1998 Mumit Khan <khan@xraylith.wisc.edu>
* dllwrap.c (strhash): New function. * dllwrap.c (strhash): New function.

View File

@ -178,8 +178,8 @@ show_line PARAMS ((bfd *, asection *, bfd_vma));
static void static void
disassemble_bytes PARAMS ((struct disassemble_info *, disassembler_ftype, disassemble_bytes PARAMS ((struct disassemble_info *, disassembler_ftype,
boolean, bfd_byte *, long, long, arelent ***, boolean, bfd_byte *, unsigned long, unsigned long,
arelent **)); arelent ***, arelent **));
static void static void
disassemble_data PARAMS ((bfd *)); disassemble_data PARAMS ((bfd *));
@ -376,7 +376,7 @@ slurp_symtab (abfd)
if (!(bfd_get_file_flags (abfd) & HAS_SYMS)) if (!(bfd_get_file_flags (abfd) & HAS_SYMS))
{ {
printf (_("No symbols in \"%s\".\n"), bfd_get_filename (abfd)); fprintf (stderr, _("%s: no symbols\n"), bfd_get_filename (abfd));
symcount = 0; symcount = 0;
return NULL; return NULL;
} }
@ -393,8 +393,7 @@ slurp_symtab (abfd)
if (symcount < 0) if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd)); bfd_fatal (bfd_get_filename (abfd));
if (symcount == 0) if (symcount == 0)
fprintf (stderr, _("%s: %s: No symbols\n"), fprintf (stderr, _("%s: no symbols\n"), bfd_get_filename (abfd));
program_name, bfd_get_filename (abfd));
return sy; return sy;
} }
@ -1153,8 +1152,8 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
disassembler_ftype disassemble_fn; disassembler_ftype disassemble_fn;
boolean insns; boolean insns;
bfd_byte *data; bfd_byte *data;
long start; unsigned long start;
long stop; unsigned long stop;
arelent ***relppp; arelent ***relppp;
arelent **relppend; arelent **relppend;
{ {
@ -1163,7 +1162,7 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
int bytes_per_line; int bytes_per_line;
boolean done_dot; boolean done_dot;
int skip_addr_chars; int skip_addr_chars;
long i; unsigned long i;
aux = (struct objdump_disasm_info *) info->application_data; aux = (struct objdump_disasm_info *) info->application_data;
section = aux->sec; section = aux->sec;
@ -1200,7 +1199,7 @@ disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp,
i = start; i = start;
while (i < stop) while (i < stop)
{ {
long z; unsigned long z;
int bytes; int bytes;
boolean need_nl = false; boolean need_nl = false;
@ -2627,7 +2626,9 @@ main (argc, argv)
char *target = default_target; char *target = default_target;
boolean seenflag = false; boolean seenflag = false;
#ifdef HAVE_SETLOCALE
setlocale (LC_MESSAGES, ""); setlocale (LC_MESSAGES, "");
#endif
bindtextdomain (PACKAGE, LOCALEDIR); bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE); textdomain (PACKAGE);