This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] fix py-inferior.exp for remote cross-endian testing


On Fri, Oct 29, 2010 at 07:49:44PM +0000, Doug Evans wrote:
> Hi.  This patch is ok with me.
> 
> [btw, one could get the value of endianness from python with
> gdb.parameter("endian").
> Or at least should.  On my machine it returns "".
> We probably want to fix that.  Your patch is fine with me as is though.]

(gdb) py print gdb.parameter("endian")

(gdb) set endian big
The target is assumed to be big endian
(gdb) py print gdb.parameter("endian")
big
(gdb) set endian little
The target is assumed to be little endian
(gdb) py print gdb.parameter("endian")
little
(gdb) set endian auto
The target endianness is set automatically (currently little endian)
(gdb) py print gdb.parameter("endian")
auto
(gdb) show endian
The target endianness is set automatically (currently little endian)

So that's at least one obvious bug ("" vs "auto"), and one more
complex bug (what should it return for auto?).  I'm inclined to say
that it should return auto, and there should be some other way to find
out "auto what?"; OTOH, it's a general problem with parameters...

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]