- gdata
- = (struct gdb_bfd_data *) bfd_zalloc (abfd, sizeof (struct gdb_bfd_data));
- gdata->refc = 1;
- gdata->mtime = bfd_get_mtime (abfd);
- gdata->size = bfd_get_size (abfd);
- gdata->archive_bfd = NULL;
- if (bfd_stat (abfd, &buf) == 0)
- {
- gdata->inode = buf.st_ino;
- gdata->device_id = buf.st_dev;
- }
- else
- {
- /* The stat failed. */
- gdata->inode = 0;
- gdata->device_id = 0;
- }
- bfd_usrdata (abfd) = gdata;
-
+ gdata = new gdb_bfd_data (abfd);
+ bfd_set_usrdata (abfd, gdata);