* config.in: Regenerate.
[binutils-gdb.git] / gdb / dsrec.c
index 2d353e7f028576247066158a10bc01fe34892a76..39d3f3c862dd23b0f7e01d16c604184e901d5642 100644 (file)
@@ -1,6 +1,6 @@
 /* S-record download support for GDB, the GNU debugger.
-   Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2004, 2007, 2008
-   Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2004, 2007, 2008,
+   2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -90,6 +90,7 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
     if (s->flags & SEC_LOAD)
       {
        int numbytes;
+
        bfd_vma addr = bfd_get_section_vma (abfd, s) + load_offset;
        bfd_size_type size = bfd_get_section_size (s);
        char *section_name = (char *) bfd_get_section_name (abfd, s);
@@ -97,10 +98,10 @@ load_srec (struct serial *desc, const char *file, bfd_vma load_offset,
            In the below, GDB's is used so that the address is
            consistent with the rest of GDB.  BFD's printf_vma() could
            have also been used. cagney 1999-09-01 */
-       printf_filtered ("%s\t: 0x%s .. 0x%s  ",
+       printf_filtered ("%s\t: %s .. %s  ",
                         section_name,
-                        paddr (addr),
-                        paddr (addr + size));
+                        paddress (target_gdbarch, addr),
+                        paddress (target_gdbarch, addr + size));
        gdb_flush (gdb_stdout);
 
        data_count += size;
@@ -252,8 +253,8 @@ make_srec (char *srec, CORE_ADDR targ_addr, bfd *abfd, asection *sect,
     addr_size = 4;
   else
     internal_error (__FILE__, __LINE__,
-                   _("make_srec:  Bad address (0x%s), or bad flags (0x%x)."),
-                   paddr (targ_addr), flags);
+                   _("make_srec:  Bad address (%s), or bad flags (0x%x)."),
+                   paddress (target_gdbarch, targ_addr), flags);
 
   /* Now that we know the address size, we can figure out how much
      data this record can hold.  */