GDB - hardware server

Mahesh Bodapati
Mon May 3 06:19:23 GMT 2021

Thank You.
It looks like I didn't frame my problem correctly.
server is sending the target descriptions but I have the problem when there
is a mismatch between the "expected number of bytes" and "got number of
for instance,
gdb has been built for 32 bit abi by default then
case 1:
if server send 32 bit target description then we didn't see any error

case 2 :
if server send 64 bit target descriptions then it results an error saying
mismatch between  "expected number of bytes" and "got number of bytes"

and my question is "how can we support 2nd case ? "
can we switch the ABI when we receive 64 bit target description from server
? if yes, how can we do that?
or do we need to build a different gdb for 64 bit ABI?

Note : We can read the ABI from executable but here we are not giving
executable file to the gdb.

Mahesh B

On Fri, Apr 30, 2021 at 11:36 PM Simon Marchi <>

> On 2021-04-29 1:59 a.m., Mahesh Bodapati via Gdb wrote:
> > Hi,
> > we have 3 different target descriptions for the same target.
> >
> > gdb has been built for all the 3 configurations but the 1st target
> > configuration is the default description. we are able to set
> configurations
> > from executable files but how to set the target descriptions from the
> > contents of the server.
> >
> > tar remote host:port ,can I set the target description based on the
> > contents[like arch,register size..]  from the hardware server.I can only
> > see the comparison of what gdb is expecting and what gdb is getting from
> > the server. is there a way to change the gdb target descriptions from the
> > contents of server ?
> I'm not sure I understand the problem correctly, but the server can send
> the XML target description to GDB.
> Simon

More information about the Gdb mailing list