gdbserver 7.1 unable to read registers

Pedro Alves pedro@codesourcery.com
Fri Sep 24 14:39:00 GMT 2010


On Friday 24 September 2010 15:05:11, Ulrich Weigand wrote:
> Pedro Alves wrote:
> > On Friday 24 September 2010 13:58:08, Ulrich Weigand wrote:
> > 
> > > Usually, gdbserver will inform GDB via the remote protocol about the
> > > set of registers supported on the platform, and GDB is supposed to
> > > automatically take that information into account.
> > > 
> > > However, this requires that GDB is built to include XML support to
> > > parse this configuration information; if the expat libraries were
> > > not available when you built GDB, the configure process might have
> > > decided to build GDB without XML support instead ...
> > > Can you try rebuilding with the --with-expat configure option?
> > > This will cause the build to fail if XML support is not available.
> > 
> > Note that GDB issues a warning at connect time in that case:
> > 
> >  "Can not parse XML target description; XML support was disabled at compile time"
> 
> As we have more and more platforms where gdbserver simply will not work
> correctly without XML support, maybe we should make --with-expat the
> default mode at some point in time?   Users would still be able to
> build with --without-expat if they really want to ...

I guess.  Most native targets don't need it though.

On the other hand, there's scope for improvement in those warnings.
It's not surprising that users don't know the consequences of not
being able to parse a "XML target description" are.  Making
those clearer in terms of consequences would probably already go a long way
in avoiding surprises.  Something along the lines of:

 "Can not parse XML target description; XML support was disabled at compile time. "
 "GDB may not be able to read registers correctly."

?

-- 
Pedro Alves



More information about the Gdb mailing list