Skip to content

Commit fe13983

Browse files
committed
add tricore-core.xml
fix bap-frames url x x
1 parent 0e0b286 commit fe13983

File tree

6 files changed

+78
-2
lines changed

6 files changed

+78
-2
lines changed

.gitmodules

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@
4545
url = https://gitlab.com/libvirt/libvirt-ci.git
4646
[submodule "contrib/plugins/bap-tracing/bap-frames"]
4747
path = contrib/plugins/bap-tracing/bap-frames
48-
url = [email protected]:BinaryAnalysisPlatform/bap-frames.git
48+
url = https://github.com/b1llow/bap-frames.git
49+
branch = tricore-support
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
TARGET_ARCH=tricore
22
TARGET_LONG_BITS=32
3+
TARGET_XML_FILES= gdb-xml/tricore-core.xml

contrib/plugins/bap-tracing/tracing.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ static struct arch_enum_entry arch_map[] = {
104104
{.name = "8051", .arch = frame_arch_8051, .machine = 0},
105105
{.name = "sm83", .arch = frame_arch_sm83, .machine = 0},
106106
{.name = "hexagon", .arch = frame_arch_hexagon, .machine = 0},
107+
{.name = "tricore", .arch = frame_arch_tricore, .machine = frame_mach_tricore_162},
107108
{.name = NULL, .arch = frame_arch_last, .machine = 0},
108109
};
109110

gdb-xml/tricore-core.xml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?xml version="1.0"?>
2+
<!-- Copyright (C) 2019 Free Software Foundation, Inc.
3+
4+
Copying and distribution of this file, with or without modification,
5+
are permitted in any medium without royalty provided the copyright
6+
notice and this notice are preserved. -->
7+
8+
<!DOCTYPE feature SYSTEM "gdb-target.dtd">
9+
<feature name="org.gnu.gdb.tricore.core">
10+
<reg name="a0" bitsize="32" type="data_ptr"/>
11+
<reg name="a1" bitsize="32" type="uint32"/>
12+
<reg name="a2" bitsize="32" type="uint32"/>
13+
<reg name="a3" bitsize="32" type="uint32"/>
14+
<reg name="a4" bitsize="32" type="uint32"/>
15+
<reg name="a5" bitsize="32" type="uint32"/>
16+
<reg name="a6" bitsize="32" type="uint32"/>
17+
<reg name="a7" bitsize="32" type="uint32"/>
18+
<reg name="a8" bitsize="32" type="uint32"/>
19+
<reg name="a9" bitsize="32" type="uint32"/>
20+
<reg name="a10" bitsize="32" type="uint32"/>
21+
<reg name="a11" bitsize="32" type="uint32"/>
22+
<reg name="a12" bitsize="32" type="uint32"/>
23+
<reg name="a13" bitsize="32" type="uint32"/>
24+
<reg name="a14" bitsize="32" type="uint32"/>
25+
<reg name="a15" bitsize="32" type="uint32"/>
26+
27+
<reg name="d0" bitsize="32" type="data_ptr"/>
28+
<reg name="d1" bitsize="32" type="uint32"/>
29+
<reg name="d2" bitsize="32" type="uint32"/>
30+
<reg name="d3" bitsize="32" type="uint32"/>
31+
<reg name="d4" bitsize="32" type="uint32"/>
32+
<reg name="d5" bitsize="32" type="uint32"/>
33+
<reg name="d6" bitsize="32" type="uint32"/>
34+
<reg name="d7" bitsize="32" type="uint32"/>
35+
<reg name="d8" bitsize="32" type="uint32"/>
36+
<reg name="d9" bitsize="32" type="uint32"/>
37+
<reg name="d10" bitsize="32" type="uint32"/>
38+
<reg name="d11" bitsize="32" type="uint32"/>
39+
<reg name="d12" bitsize="32" type="uint32"/>
40+
<reg name="d13" bitsize="32" type="uint32"/>
41+
<reg name="d14" bitsize="32" type="uint32"/>
42+
<reg name="d15" bitsize="32" type="uint32"/>
43+
44+
<flags id="psw_flags" size="4">
45+
<field name="CDC" start="0" end="6"/>
46+
<field name="CDE" start="7" end="8"/>
47+
<field name="C" start="31" end="31"/>
48+
<field name="V" start="30" end="30"/>
49+
<field name="SV" start="29" end="29"/>
50+
<field name="AV" start="28" end="28"/>
51+
<field name="SAV" start="27" end="27"/>
52+
<field name="RM" start="24" end="25"/>
53+
<field name="PRS" start="12" end="13"/>
54+
<field name="IO" start="10" end="11"/>
55+
<field name="IS" start="9" end="9"/>
56+
<field name="GW" start="8" end="8"/>
57+
</flags>
58+
59+
<reg name="pcxi" bitsize="32" type="data_ptr"/>
60+
<reg name="psw" bitsize="32" type="psw_flags"/>
61+
<reg name="pc" bitsize="32" type="code_ptr"/>
62+
<reg name="syscon" bitsize="32" type="uint32"/>
63+
<reg name="cpu_id" bitsize="32" type="uint32"/>
64+
<reg name="core_id" bitsize="32" type="uint32"/>
65+
<reg name="biv" bitsize="32" type="uint32"/>
66+
<reg name="btv" bitsize="32" type="uint32"/>
67+
<reg name="isp" bitsize="32" type="uint32"/>
68+
<reg name="icr" bitsize="32" type="uint32"/>
69+
<reg name="fcx" bitsize="32" type="uint32"/>
70+
<reg name="lcx" bitsize="32" type="uint32"/>
71+
<reg name="compat" bitsize="32" type="uint32"/>
72+
</feature>

target/tricore/cpu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ static void tricore_cpu_class_init(ObjectClass *c, void *data)
199199
cc->gdb_read_register = tricore_cpu_gdb_read_register;
200200
cc->gdb_write_register = tricore_cpu_gdb_write_register;
201201
cc->gdb_num_core_regs = 44;
202+
cc->gdb_core_xml_file = "tricore-core.xml";
202203
cc->gdb_arch_name = tricore_gdb_arch_name;
203204

204205
cc->dump_state = tricore_cpu_dump_state;

0 commit comments

Comments
 (0)