⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bfdio.texi

📁 gdb-6.0 linux 下的调试工具
💻 TEXI
字号:
@findex bfd_get_mtime@subsubsection @code{bfd_get_mtime}@strong{Synopsis}@examplelong bfd_get_mtime(bfd *abfd);@end example@strong{Description}@*Return the file modification time (as read from the file system, orfrom the archive header for archive members).@findex bfd_get_size@subsubsection @code{bfd_get_size}@strong{Synopsis}@examplelong bfd_get_size(bfd *abfd);@end example@strong{Description}@*Return the file size (as read from file system) for the fileassociated with BFD @var{abfd}.The initial motivation for, and use of, this routine is notso we can get the exact size of the object the BFD applies to, sincethat might not be generally possible (archive members for example).It would be ideal if someone could eventually modifyit so that such results were guaranteed.Instead, we want to ask questions like "is this NNN byte sizedobject I'm about to try read from file offset YYY reasonable?"As as example of where we might do this, some object formatsuse string tables for which the first @code{sizeof (long)} bytes of thetable contain the size of the table itself, including the size bytes.If an application tries to read what it thinks is one of thesestring tables, without some way to validate the size, and forsome reason the size is wrong (byte swapping error, wrong locationfor the string table, etc.), the only clue is likely to be a readerror when it tries to read the table, or a "virtual memoryexhausted" error when it tries to allocate 15 bazillon bytesof space for the 15 bazillon byte table it is about to read.This function at least allows us to answer the quesion, "is thesize reasonable?".

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -