Use GDB with a Multi-Threaded Application II
Explore how to use GDB for debugging multi-threaded Linux applications by examining memory maps, dumping data sections with symbolic info, searching memory, and analyzing loaded modules. This lesson guides you through practical techniques to understand application core dumps and follow function calls effectively.
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
The above command will output the following to the terminal:
We can see that the output is in the following format:
address: value1 value2
Since the size of each value is