/* Dump-to-file commands, for GDB, the GNU debugger.
- Copyright 2002, 2005 Free Software Foundation, Inc.
+ Copyright (c) 2002, 2005, 2007 Free Software Foundation, Inc.
Contributed by Red Hat.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#include "defs.h"
#include "gdb_string.h"
bfd_set_section_size (obfd, osection, len);
bfd_set_section_vma (obfd, osection, vaddr);
bfd_set_section_alignment (obfd, osection, 0);
- bfd_set_section_flags (obfd, osection, 0x203);
+ bfd_set_section_flags (obfd, osection, (SEC_HAS_CONTENTS
+ | SEC_ALLOC
+ | SEC_LOAD));
osection->entsize = 0;
bfd_set_section_contents (obfd, osection, buf, 0, len);
}
&& c->doc[3] == 't'
&& c->doc[4] == 'e'
&& c->doc[5] == ' ')
- c->doc = concat ("Append ", c->doc + 6, NULL);
+ c->doc = concat ("Append ", c->doc + 6, (char *)NULL);
}
/* Opaque data for restore_section_callback. */
bfd_size_type sec_offset = 0;
bfd_size_type sec_load_count = size;
struct cleanup *old_chain;
- char *buf;
+ gdb_byte *buf;
int ret;
/* Ignore non-loadable sections, eg. from elf files. */
{
FILE *file = fopen_with_cleanup (filename, FOPEN_RB);
int status;
- char *buf;
+ gdb_byte *buf;
long len;
/* Get the file size for reading. */