ppc xml fix

This commit is contained in:
0xMirasio
2025-11-04 16:23:35 +01:00
parent 8d52304ddd
commit 4810ad7cfb
4 changed files with 12 additions and 15 deletions
+3 -1
View File
@@ -183,6 +183,7 @@ class QlGdb(QlDebugger):
from unicorn.arm_const import UC_ARM_REG_R11
from unicorn.arm64_const import UC_ARM64_REG_X29
from unicorn.mips_const import UC_MIPS_REG_INVALID
from unicorn.ppc_const import UC_PPC_REG_31
arch_uc_bp = {
QL_ARCH.X86 : UC_X86_REG_EBP,
@@ -191,7 +192,8 @@ class QlGdb(QlDebugger):
QL_ARCH.ARM64 : UC_ARM64_REG_X29,
QL_ARCH.MIPS : UC_MIPS_REG_INVALID, # skipped
QL_ARCH.A8086 : UC_X86_REG_EBP,
QL_ARCH.CORTEX_M : UC_ARM_REG_R11
QL_ARCH.CORTEX_M : UC_ARM_REG_R11,
QL_ARCH.PPC : UC_PPC_REG_31
}[self.ql.arch.type]
def __get_reg_idx(ucreg: int) -> int:
+8 -3
View File
@@ -6,7 +6,7 @@
notice and this notice are preserved. -->
<!DOCTYPE feature SYSTEM "gdb-target.dtd">
<feature name="org.gnu.gdb.ppc.core">
<feature name="org.gnu.gdb.power.core">
<reg name="r0" bitsize="32" type="uint32"/>
<reg name="r1" bitsize="32" type="uint32"/>
<reg name="r2" bitsize="32" type="uint32"/>
@@ -39,8 +39,13 @@
<reg name="r29" bitsize="32" type="uint32"/>
<reg name="r30" bitsize="32" type="uint32"/>
<reg name="r31" bitsize="32" type="uint32"/>
<reg name="sp" bitsize="32" type="data_ptr"/>
<reg name="lr" bitsize="32"/>
<reg name="cr" bitsize="32" type="uint32"/>
<reg name="lr" bitsize="32" type="code_ptr"/>
<reg name="pc" bitsize="32" type="code_ptr"/>
<reg name="msr" bitsize="32" type="uint32"/>
<reg name="ctr" bitsize="32" type="uint32"/>
<reg name="xer" bitsize="32" type="uint32"/>
</feature>
+1 -2
View File
@@ -7,7 +7,6 @@
<!DOCTYPE target SYSTEM "gdb-target.dtd">
<target xmlns:xi="http://www.w3.org/2001/XInclude">
<architecture>ppc</architecture>
<architecture>powerpc:common</architecture>
<xi:include href="ppc-core.xml"/>
<feature name="org.gnu.gdb.ppc.linux"/>
</target>
-9
View File
@@ -61,12 +61,3 @@ def collect_coverage(ql: Qiling, name: str, coverage_file: str):
finally:
cov.deactivate()
cov.dump_coverage(coverage_file)
def collect_coverage_no_yield(ql: Qiling, name: str, coverage_folder: str):
cov = factory.get_coverage_collector(ql, name)
cov.coverage_folder = coverage_folder
cov.activate()
return cov
def get_coverage_instance(ql, name):
return factory.get_coverage_collector(ql, name)