Skip to content

Commit a49fa55

Browse files
committed
support ieee_single and ieee_double gdbtypes for registers
1 parent 72df546 commit a49fa55

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4783,7 +4783,8 @@ bool ParseRegisters(
47834783
} else if (gdb_type == "data_ptr" || gdb_type == "code_ptr") {
47844784
reg_info.format = eFormatAddressInfo;
47854785
reg_info.encoding = eEncodingUint;
4786-
} else if (gdb_type == "float") {
4786+
} else if (gdb_type == "float" || gdb_type == "ieee_single" ||
4787+
gdb_type == "ieee_double") {
47874788
reg_info.format = eFormatFloat;
47884789
reg_info.encoding = eEncodingIEEE754;
47894790
} else if (gdb_type == "aarch64v" ||

lldb/test/API/functionalities/gdb_remote_client/TestGDBServerTargetXML.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,9 @@ class MyResponder(MockGDBServerResponder):
692692
"0102030405060708" # t4
693693
"0102030405060708" # t5
694694
"0102030405060708" # t6
695+
"6162636465666768" # pc
696+
"0000C03F" # ft0
697+
"e07a6147a8a40940" # ft1
695698
)
696699

697700
def qXferRead(self, obj, annex, offset, length):
@@ -737,6 +740,10 @@ def qXferRead(self, obj, annex, offset, length):
737740
<reg name="t6" bitsize="64" type="int"/>
738741
<reg name="pc" bitsize="64" type="code_ptr"/>
739742
</feature>
743+
<feature name='org.gnu.gdb.riscv.fpu'>
744+
<reg name='ft0' bitsize='32' type='ieee_single'/>
745+
<reg name='ft1' bitsize='64' type='ieee_double'/>
746+
</feature>
740747
</target>""",
741748
False,
742749
)
@@ -799,6 +806,10 @@ def haltReason(self):
799806
self.match("register read x29", ["t4 = 0x0807060504030201"])
800807
self.match("register read x30", ["t5 = 0x0807060504030201"])
801808
self.match("register read x31", ["t6 = 0x0807060504030201"])
809+
self.match("register read pc", ["pc = 0x6867666564636261"])
810+
# test FPU registers
811+
self.match("register read ft0", ["ft0 = 1.5"])
812+
self.match("register read ft1", ["ft1 = 3.2053990913985757"])
802813

803814
@skipIfXmlSupportMissing
804815
@skipIfRemote

0 commit comments

Comments
 (0)