* PATCH: Use generic_print_address for address @ 2005-02-12 10:46 H. J. Lu 2005-02-13 2:06 ` Andreas Schwab 0 siblings, 1 reply; 4+ messages in thread From: H. J. Lu @ 2005-02-12 10:46 UTC (permalink / raw) To: binutils Diassembler should use generic_print_address to print out address. Otherwise, it doesn't work with 64bit address. H.J. ---- 2005-02-11 H.J. Lu <hongjiu.lu@intel.com> * dis-buf.c (perror_memory): Use generic_print_address to print out address. --- opcodes/dis-buf.c.vma 2003-11-17 12:30:30.000000000 -0800 +++ opcodes/dis-buf.c 2005-02-11 15:28:58.787914148 -0800 @@ -56,10 +56,13 @@ perror_memory (status, memaddr, info) /* Can't happen. */ info->fprintf_func (info->stream, _("Unknown error %d\n"), status); else - /* Actually, address between memaddr and memaddr + len was - out of bounds. */ - info->fprintf_func (info->stream, - _("Address 0x%x is out of bounds.\n"), memaddr); + { + /* Actually, address between memaddr and memaddr + len was + out of bounds. */ + info->fprintf_func (info->stream, _("Address 0x")); + generic_print_address (memaddr, info); + info->fprintf_func (info->stream, _(" is out of bounds.\n")); + } } /* This could be in a separate file, to save miniscule amounts of space ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH: Use generic_print_address for address 2005-02-12 10:46 PATCH: Use generic_print_address for address H. J. Lu @ 2005-02-13 2:06 ` Andreas Schwab [not found] ` <20050211234902.GA11119@lucon.org> 0 siblings, 1 reply; 4+ messages in thread From: Andreas Schwab @ 2005-02-13 2:06 UTC (permalink / raw) To: H. J. Lu; +Cc: binutils "H. J. Lu" <hjl@lucon.org> writes: > + info->fprintf_func (info->stream, _("Address 0x")); > + generic_print_address (memaddr, info); > + info->fprintf_func (info->stream, _(" is out of bounds.\n")); This is very i18n unfriendly. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20050211234902.GA11119@lucon.org>]
[parent not found: <jesm42mz2z.fsf@sykes.suse.de>]
* Re: PATCH: Use generic_print_address for address [not found] ` <jesm42mz2z.fsf@sykes.suse.de> @ 2005-02-13 12:44 ` H. J. Lu 2005-02-14 14:58 ` Nick Clifton 0 siblings, 1 reply; 4+ messages in thread From: H. J. Lu @ 2005-02-13 12:44 UTC (permalink / raw) To: Andreas Schwab; +Cc: binutils On Sat, Feb 12, 2005 at 12:55:16AM +0100, Andreas Schwab wrote: > "H. J. Lu" <hjl@lucon.org> writes: > > > On Sat, Feb 12, 2005 at 12:39:12AM +0100, Andreas Schwab wrote: > >> "H. J. Lu" <hjl@lucon.org> writes: > >> > >> > + info->fprintf_func (info->stream, _("Address 0x")); > >> > + generic_print_address (memaddr, info); > >> > + info->fprintf_func (info->stream, _(" is out of bounds.\n")); > >> > >> This is very i18n unfriendly. > >> > > > > Do you have any suggestions? > > If there is a way to format the address into a buffer then the format > string can be combined again. > Like this? H.J. ---- 2005-02-11 H.J. Lu <hongjiu.lu@intel.com> * dis-buf.c (perror_memory): Use sprintf_vma to print out address. --- opcodes/dis-buf.c.vma 2003-11-17 12:30:30.000000000 -0800 +++ opcodes/dis-buf.c 2005-02-11 16:20:38.508542555 -0800 @@ -56,10 +56,15 @@ perror_memory (status, memaddr, info) /* Can't happen. */ info->fprintf_func (info->stream, _("Unknown error %d\n"), status); else - /* Actually, address between memaddr and memaddr + len was - out of bounds. */ - info->fprintf_func (info->stream, - _("Address 0x%x is out of bounds.\n"), memaddr); + { + char buf[30]; + + /* Actually, address between memaddr and memaddr + len was + out of bounds. */ + sprintf_vma (buf, memaddr); + info->fprintf_func (info->stream, + _("Address 0x%s is out of bounds.\n"), buf); + } } /* This could be in a separate file, to save miniscule amounts of space ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH: Use generic_print_address for address 2005-02-13 12:44 ` H. J. Lu @ 2005-02-14 14:58 ` Nick Clifton 0 siblings, 0 replies; 4+ messages in thread From: Nick Clifton @ 2005-02-14 14:58 UTC (permalink / raw) To: H. J. Lu; +Cc: Andreas Schwab, binutils Hi H. J. > 2005-02-11 H.J. Lu <hongjiu.lu@intel.com> > > * dis-buf.c (perror_memory): Use sprintf_vma to print out > address. Approved - please apply. Cheers Nick ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-02-14 10:38 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-02-12 10:46 PATCH: Use generic_print_address for address H. J. Lu 2005-02-13 2:06 ` Andreas Schwab [not found] ` <20050211234902.GA11119@lucon.org> [not found] ` <jesm42mz2z.fsf@sykes.suse.de> 2005-02-13 12:44 ` H. J. Lu 2005-02-14 14:58 ` Nick Clifton
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).