Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle Solaris Studio 12.3: Debugging a Program With dbx Oracle Solaris Studio 12.3 Information Library |
4. Viewing and Navigating To Code
5. Controlling Program Execution
6. Setting Breakpoints and Traces
8. Evaluating and Displaying Data
11. Debugging Multithreaded Applications
16. Debugging Fortran Using dbx
17. Debugging a Java Application With dbx
18. Debugging at the Machine-Instruction Level
19. Using dbx With the Korn Shell
20. Debugging Shared Libraries
The mmapfile command views the contents of memory mapped files that are missing from a core dump. It is valid only in native mode.
Solaris core files do not contain any memory segments that are read-only. Executable read-only segments (that is, text) are dealt with automatically and dbx resolves memory accesses against these by looking into the executable and the relevant shared objects.
View contents of memory mapped files missing from core dump.
where:
mmapped_file is the file name of a file that was memory mapped during a core dump.
address is the starting address of the address space of the process.
length is length in bytes of the address space to be viewed.
offset is the offset in bytes to the starting address in mmapped_file.
Read-only data segments typically occur when an application memory maps a database. For example:
caddr_t vaddr = NULL; off_t offset = 0; size_t = 10 * 1024; int fd; fd = open("../DATABASE", ...) vaddr = mmap(vaddr, size, PROT_READ, MAP_SHARED, fd, offset); index = (DBIndex *) vaddr;
To be able to access the database through the debugger as memory you would type:
mmapfile ../DATABASE $[vaddr] $[offset] $[size]
Then you could look at your database contents in a structured way by typing:
print *index