Our code does response to qXfer packet. Here is dump from Linaro debugger:

Sending packet: $qXfer:features:read:target.xml:0,fff#7d...Packet received: l<?x
ml version="1.0"?>\n<!DOCTYPE target SYSTEM "gdb-target.dtd">\n<target version="
1.0">\n<feature name="org.gnu.gdb.aarch64.core">\n<reg name="x0" bitsize="64" re
gnum="0" save-restore="no" type="uint64" group="general"/>\n<reg name="x1" bitsi
ze="64" regnum="1" save-restore="no" type="uint64" group="general"/>\n<reg name=
"x2" bitsize="64" regnum="2" save-restore="no" type="uint64" group="general"/>\n
<reg name="x3" bitsize="64" regnum="3" save-restore="no" type="uint64" group="ge
neral"/>\n<reg name="x4" bitsize="64" regnum="4" save-restore="no" type="uint64"
 group="general"/>\n<reg name="x5" bitsize="64" regnum="5" save-restore="no" typ
e="uint64" group="general"/>\n<reg name="x6" bitsize="64" regnum="6" save-restor
e="no" type="uint64" group="general"/>\n<reg name="x7" bitsize="64" regnum="7" s
ave-restore="no" type="uint64" group="general"/>\n<reg name="x8" bitsize="64" re
gnum="8" save-restore="no" type="uint64" group="general"/>\n<reg name="x9" bitsi
ze="64" regnum="9" save-restore="no" type="uint64" group="general"/>\n<reg name=
"x10" bitsize="64" regnum="10" save-restore="no" type="uint64" group="general"/>
\n<reg name="x11" bitsize="64" regnum="11" save-restore="no" type="uint64" group
="general"/>\n<reg name="x12" bitsize="64" regnum="12" save-restore="no" type="u
int64" group="general"/>\n<reg name="x13" bitsize="64" regnum="13" save-restore=
"no" type="uint64" group="general"/>\n<reg name="x14" bitsize="64" regnum="14" s
ave-restore="no" type="uint64" group="general"/>\n<reg name="x15" bitsize="64" r
egnum="15" save-restore="no" type="uint64" group="general"/>\n<reg name="x16" bi
tsize="64" regnum="16" save-restore="no" type="uint64" group="general"/>\n<reg n
ame="x17" bitsize="64" regnum="17" save-restore="no" type="uint64" group="genera
l"/>\n<reg name="x18" bitsize="64" regnum="18" save-restore="no" type="uint64" g
roup="general"/>\n<reg name="x19" bitsize="64" regnum="19" save-restore="no" typ
e="uint64" group="general"/>\n<reg name="x20" bitsize="64" regnum="20" save-rest
ore="no" type="uint64" group="general"/>\n<reg name="x21" bitsize="64" regnum="2
1" save-restore="no" type="uint64" group="general"/>\n<reg name="x22" bitsize="6
4" regnum="22" save-restore="no" type="uint64" group="general"/>\n<reg name="x23
" bitsize="64" regnum="23" save-restore="no" type="uint64" group="general"/>\n<r
eg name="x24" bitsize="64" regnum="24" save-restore="no" type="uint64" group="ge
neral"/>\n<reg name="x25" bitsize="64" regnum="25" save-restore="no" type="uint6
4" group="general"/>\n<reg name="x26" bitsize="64" regnum="26" save-restore="no"
 type="uint64" group="general"/>\n<reg name="x27" bitsize="64" regnum="27" save-
restore="no" type="uint64" group="general"/>\n<reg name="x28" bitsize="64" regnu
m="28" save-restore="no" type="uint64" group="general"/>\n<reg name="x29" bitsiz
e="64" regnum="29" save-restore="no" type="uint64" group="general"/>\n<reg name=
"lr" bitsize="64" regnum="30" save-restore="no" type="code_ptr" group="general"/
>\n<reg name="sp" bitsize="64" regnum="31" save-restore="no" type="data_ptr" gro
up="general"/>\n<reg name="pc" bitsize="64" regnum="32" save-restore="no" type="
code_ptr" group="general"/>\n<reg name="cpsr" bitsize="32" regnum="33" save-rest
ore="no" type="uint32" group="general"/>\n</feature>\n</target>\n
warning: Architecture rejected target-supplied description

I don't understand why Linaro gdb debugger print the last warning message.
Anyway, currently I added code to return value of fpsr and fpcr and so far 
everything seems ok.

Thanks,
Strong Qu

-----Original Message-----
From: Omair Javaid [mailto:omair.jav...@linaro.org] 
Sent: Tuesday, November 11, 2014 5:43 AM
To: Will Newton
Cc: Qu, Strong; linaro-toolchain@lists.linaro.org
Subject: Re: [Question] Should gdb client query FP registers even if gdb server 
does not report having org.gnu.gdb.aarch64.fpu feature?

There was discussion to put with-expat in default config options not sure if 
that has been done or not.

On 11 November 2014 13:39, Will Newton <will.new...@linaro.org> wrote:
> Do we know if the Windows gdb binary links against expat? Without 
> expat XML support is disabled.
>
> On 11 November 2014 06:51, Omair Javaid <omair.jav...@linaro.org> wrote:
>> Have you implemented a qXfer packet response if not you can do so to 
>> use xml description provided by target.
>>
>> Here is a gdb help link that describe how to client can query target.xml.
>>
>> https://sourceware.org/gdb/onlinedocs/gdb/Retrieving-Descriptions.htm
>> l#Retrieving-Descriptions
>>
>>
>> On 10 November 2014 19:42, Qu, Strong <stro...@qti.qualcomm.com> wrote:
>>> Thanks, Omair. I did check xml files in Linaro's source 
>>> (gdb-linaro-7.6.1-2013.10). In the target.xml file our gdb server sends 
>>> back to gdb client, we only include regsiters X0~X30, sp, pc and cpsr. It's 
>>> close to gdb-linaro-7.6.1-2013.10\gdb\features\aarch64-core.xml, which is 
>>> included in aarch64-without-fpu.xml. I don't know how the server can notify 
>>> the client that it does not have FPU supported. So I assume if the 
>>> target.xml does not claim feature 'org.gnu.gdb.aarch64.fpu’, it would be 
>>> deemed as no FPU supporting.
>>> For now, I added some code in our code to return the value of fpsr and fpcr 
>>> to make the gdb client happy.
>>>
>>> Regards,
>>> Strong
>>>
>>> -----Original Message-----
>>> From: Omair Javaid [mailto:omair.jav...@linaro.org]
>>> Sent: Monday, November 10, 2014 3:30 AM
>>> To: Qu, Strong
>>> Cc: linaro-toolchain@lists.linaro.org
>>> Subject: Re: [Question] Should gdb client query FP registers even if gdb 
>>> server does not report having org.gnu.gdb.aarch64.fpu feature?
>>>
>>> On 7 November 2014 02:27, Qu, Strong <stro...@qti.qualcomm.com> wrote:
>>>> Hello,
>>>>
>>>>
>>>>
>>>> We have implemented gdb server in one of our project and we are 
>>>> using Linaro aarch64-none-elf-gdb.exe as gdb client. Our gdb server 
>>>> will response to packet 'qXfer:features:read:target.xml:0,fff' with 
>>>> a xml file which only claims feature ‘org.gnu.gdb.aarch64.core’. However, 
>>>> when I issue ‘info reg’
>>>> command with the gdb client, it actually sends out a packet 
>>>> ‘$p42#d6’, which is trying to read fpsr if I understand correctly. 
>>>> Is this an expected behavior or not? I just want to figure out 
>>>> whether our gdb server send some bad info to the gdb client and 
>>>> made the client thinks FP registers are valid. I hope I made my 
>>>> question clear and I’m really appreciate if anybody can help us on this 
>>>> again.
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>>
>>>>
>>>> Strong
>>>>
>>>>
>>>> _______________________________________________
>>>> linaro-toolchain mailing list
>>>> linaro-toolchain@lists.linaro.org
>>>> http://lists.linaro.org/mailman/listinfo/linaro-toolchain
>>>>
>>>
>>> Hi Strong,
>>>
>>> GDB server will receive a register read request based on registers 
>>> information given in xml target description on the client side.
>>>
>>> You can find these xml in gdb sources under: 
>>> binutils-gdb/gdb/features
>>>
>>> If GDB is requesting a read for certain register that you expect it should 
>>> not then you have to verify if its there in the xml description or not.
>>>
>>> There is a chance you might have developed your gdbserver implementation 
>>> with some version that doesnt match with current version of linaro-gdb.
>>>
>>> I hope this helps. Let me know if you need to know anything further.
>>>
>>> Thanks!
>>>
>>> --
>>> Omair
>>
>> _______________________________________________
>> linaro-toolchain mailing list
>> linaro-toolchain@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/linaro-toolchain
>
>
>
> --
> Will Newton
> Toolchain Working Group, Linaro
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to