Changeset 32450 in vbox
- Timestamp:
- Sep 13, 2010 2:33:41 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 65821
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/DBGFCoreWrite.cpp
r32341 r32450 80 80 static const int s_NoteAlign = 4; /* @todo see #5211 comment 3 */ 81 81 static const int s_cbNoteName = 16; 82 static const char *s_pcszCoreVBoxCore = "VBOXCORE"; 83 static const char *s_pcszCoreVBoxCpu = "VBOXCPU"; 82 83 /* These strings *HAVE* to be 8-byte aligned */ 84 static const char *s_pcszCoreVBoxCore = "VBCORE"; 85 static const char *s_pcszCoreVBoxCpu = "VBCPU"; 86 84 87 85 88 /** … … 215 218 uint64_t cbDataAlign = RT_ALIGN_64(cbData, s_NoteAlign); 216 219 220 /* 221 * Yell loudly and bail if we are going to be writing a core file that is not compatible with 222 * both Solaris and the 64-bit ELF spec. which dictates 8-byte alignment. See #5211 comment 3. 223 */ 224 if (cbNameAlign % 8) 225 { 226 LogRel((DBGFLOG_NAME ":Elf64WriteNoteHdr pszName=%s cbNameAlign=%u, not 8-byte aligned!\n", pszName, cbNameAlign)); 227 return VERR_INVALID_PARAMETER; 228 } 229 230 if (cbDataAlign % 8) 231 { 232 LogRel((DBGFLOG_NAME ":Elf64WriteNoteHdr pszName=%s cbDataAlign=%u, not 8-byte aligned!\n", pszName, cbDataAlign)); 233 return VERR_INVALID_PARAMETER; 234 } 235 217 236 static const char s_achPad[7] = { 0, 0, 0, 0, 0, 0, 0 }; 218 237 AssertCompile(sizeof(s_achPad) >= s_NoteAlign - 1); … … 220 239 Elf64_Nhdr ElfNoteHdr; 221 240 RT_ZERO(ElfNoteHdr); 222 ElfNoteHdr.n_namesz = (Elf64_Word)cbName ; /* @todo fix this later to NOT include NULL terminator*/241 ElfNoteHdr.n_namesz = (Elf64_Word)cbName - 1; /* Again a discrepancy between Elf64 and Solaris (#5211 comment 3) */ 223 242 ElfNoteHdr.n_type = Type; 224 243 ElfNoteHdr.n_descsz = (Elf64_Word)cbDataAlign; … … 322 341 CoreDescriptor.cCpus = pVM->cCpus; 323 342 324 Log Rel((DBGFLOG_NAME ":CoreDescriptor Version=%u Revision=%u\n", CoreDescriptor.u32VBoxVersion, CoreDescriptor.u32VBoxRevision));343 Log((DBGFLOG_NAME ":CoreDescriptor Version=%u Revision=%u\n", CoreDescriptor.u32VBoxVersion, CoreDescriptor.u32VBoxRevision)); 325 344 326 345 /* … … 394 413 uint64_t cbFileRange = fIsMmio ? 0 : cbMemRange; 395 414 396 Log Rel((DBGFLOG_NAME ": PGMR3PhysGetRange iRange=%u GCPhysStart=%#x GCPhysEnd=%#x cbMemRange=%u\n",415 Log((DBGFLOG_NAME ": PGMR3PhysGetRange iRange=%u GCPhysStart=%#x GCPhysEnd=%#x cbMemRange=%u\n", 397 416 iRange, GCPhysStart, GCPhysEnd, cbMemRange)); 398 417
Note:
See TracChangeset
for help on using the changeset viewer.