This article describes in general how QEMU handles requests from the gdb client. For the purpose of this analysis, I will use compiled bare bone Raspb

Welcome to the Corner of Excellence

submited by
Style Pass
2021-05-20 13:18:19

This article describes in general how QEMU handles requests from the gdb client. For the purpose of this analysis, I will use compiled bare bone Raspberry PI described in earlier article.

As you can see, the response from QEMU is based on the presence of gdb_core_xml_file. This data is retrieved from first_cpu variable. This variable is the result of macro expansion of cpus global variable. Below is the declaration of cpus global variable:

The returned variable is obtained from the parent_obj member of CPUState structure. It is of Object structure type and form a nested structure inside the CPUClass structure. So, the CPUClass will contain DeviceClass which in turn contain ObjectClass.

By tracing the type structure above, the CPU can be identified from object -> cpu -> arm-cpu -> aarch64-cpu -> cortext-a53-arm-cpu.

This entry was posted on May 20, 2021 at 9:18 am and is filed under QEMU. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Comment