Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4783,7 +4783,8 @@ bool ParseRegisters(
} else if (gdb_type == "data_ptr" || gdb_type == "code_ptr") {
reg_info.format = eFormatAddressInfo;
reg_info.encoding = eEncodingUint;
} else if (gdb_type == "float") {
} else if (gdb_type == "float" || gdb_type == "ieee_single" ||
gdb_type == "ieee_double") {
reg_info.format = eFormatFloat;
reg_info.encoding = eEncodingIEEE754;
} else if (gdb_type == "aarch64v" ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,9 @@ class MyResponder(MockGDBServerResponder):
"0102030405060708" # t4
"0102030405060708" # t5
"0102030405060708" # t6
"6162636465666768" # pc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that we just didn't provide data for the PC before? Surprised that the test worked at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test also was't validating for pc before. the stop reply packet (from haltReason func) has the PC

"0000C03F" # ft0
"e07a6147a8a40940" # ft1
)

def qXferRead(self, obj, annex, offset, length):
Expand Down Expand Up @@ -737,6 +740,10 @@ def qXferRead(self, obj, annex, offset, length):
<reg name="t6" bitsize="64" type="int"/>
<reg name="pc" bitsize="64" type="code_ptr"/>
</feature>
<feature name='org.gnu.gdb.riscv.fpu'>
<reg name='ft0' bitsize='32' type='ieee_single'/>
<reg name='ft1' bitsize='64' type='ieee_double'/>
</feature>
</target>""",
False,
)
Expand Down Expand Up @@ -799,6 +806,10 @@ def haltReason(self):
self.match("register read x29", ["t4 = 0x0807060504030201"])
self.match("register read x30", ["t5 = 0x0807060504030201"])
self.match("register read x31", ["t6 = 0x0807060504030201"])
self.match("register read pc", ["pc = 0x6867666564636261"])
# test FPU registers
self.match("register read ft0", ["ft0 = 1.5"])
self.match("register read ft1", ["ft1 = 3.2053990913985757"])

@skipIfXmlSupportMissing
@skipIfRemote
Expand Down
Loading