• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Why does this code fail during debugging?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why does this code fail during debugging?


  • Subject: Why does this code fail during debugging?
  • From: "Stephen F. Booth" <email@hidden>
  • Date: Sun, 4 Jun 2006 11:05:09 -0700

I have run into an issue that has me stumped.  The following code runs fine when the standalone application is run from Xcode, but when I run it in the debugger the second ioctl() fails (the DKIOCCDREADTOC):

int fd = -1;


fd = opendev("disk1", O_RDONLY | O_NONBLOCK, 0, NULL);


if(-1 == fd) {
perror("unable to open the drive for reading");
}


dk_cd_read_toc_t cd_read_toc;
uint8_t buffer [2048];


bzero(&cd_read_toc, sizeof(cd_read_toc));
bzero(buffer, sizeof(buffer));


cd_read_toc.format = kCDTOCFormatTOC;
cd_read_toc.formatAsTime = 1;
cd_read_toc.address.track = 0;
cd_read_toc.buffer = buffer;
cd_read_toc.bufferLength = sizeof(buffer);


if(-1 == ioctl(fd, DKIOCCDREADTOC, &cd_read_toc)) {
perror("unable to read TOC");
}


close(fd);

Has anyone experienced issues like this before?

I'm running Xcode 2.3 on a 1.67 GHz PowerBook G4, 10.4.6

Thanks,
Stephen
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Remote gdb for customers?
  • Next by Date: single-object prelink warnings, empty i386 TOC
  • Previous by thread: Re: Remote gdb for customers?
  • Next by thread: single-object prelink warnings, empty i386 TOC
  • Index(es):
    • Date
    • Thread