Use GDB with a Multi-Threaded Application II
Let's continue with our analysis of the multi-threaded application and learn how to examine its data and environment.
Using a memory map
To examine the data section of a running application, we can use the pmap
command with the PID of the application. For your convenience, we’ve already captured the memory map for App1
that you can view with the following command:
cat App1.pmap.253
The above command will output the following to the terminal:
Note: At this point, we should reload the core dump we loaded in the previous task, using the command:
gdb -c App1.core.253 -se App1
We can now compare with the section information present in the core dump with the following command:
maintenance info sections
The above command will output the following to the terminal:
Dumping the .data
section for symbolic info
We can dump the .data
section with possible symbolic information with the following command:
x/256a 0x004bf100