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: [RFC 6/6] Fix remaining failures in gdb.base/printcmds.exp for mingw hosts.



> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Keith Seitz
> Envoyé : mardi 1 octobre 2013 03:20
> À : Pierre Muller
> Cc : 'gdb-patches'
> Objet : Re: [RFC 6/6] Fix remaining failures in gdb.base/printcmds.exp for
> mingw hosts.
> 
> Hi, Pierre,
> 
> On 09/26/2013 01:04 PM, Pierre Muller wrote:
> >    The first part has to do with the fact that GDB prints
> > the memory address and the closest symbol while the test
> > doesn't cope for this.
> >    I simply fixed this by setting/unsetting printing of
> > addresses and symbols at specific locations.
> 
> Can you provide an example? I notice no difference on linux with/without
> those options set. Is the output really different on MinGW? [I wouldn't
> have guessed that they are.]
This is what I get if I remove this part 6 of the patch series:

$ grep -C 3 FAIL gdb.log
(gdb) PASS: gdb.base/printcmds.exp: p 1.5l
p 0x1.1
Invalid number "0x1.1".
(gdb) XFAIL: gdb.base/printcmds.exp: p 0x1.1
p 123DEADBEEF
Invalid number "123DEADBEEF".
(gdb) PASS: gdb.base/printcmds.exp: reject p 123DEADBEEF
--
(gdb) PASS: gdb.base/printcmds.exp: set print elements 0
p teststring
$554 = <__cygwin_cxx_malloc+128> "teststring contents"
(gdb) FAIL: gdb.base/printcmds.exp: p teststring with elements set to 0
set print elements 1
(gdb) PASS: gdb.base/printcmds.exp: set print elements 1
p teststring
$555 = <__cygwin_cxx_malloc+128> "t"...
(gdb) FAIL: gdb.base/printcmds.exp: p teststring with elements set to 1
set print elements 5
(gdb) PASS: gdb.base/printcmds.exp: set print elements 5
p teststring
$556 = <__cygwin_cxx_malloc+128> "tests"...
(gdb) FAIL: gdb.base/printcmds.exp: p teststring with elements set to 5
set print elements 19
(gdb) PASS: gdb.base/printcmds.exp: set print elements 19
p teststring
$557 = <__cygwin_cxx_malloc+128> "teststring contents"
(gdb) FAIL: gdb.base/printcmds.exp: p teststring with elements set to 19
set print elements 20
(gdb) PASS: gdb.base/printcmds.exp: set print elements 20
p teststring
$558 = <__cygwin_cxx_malloc+128> "teststring contents"
(gdb) FAIL: gdb.base/printcmds.exp: p teststring with elements set to 20
set print elements 8
(gdb) PASS: gdb.base/printcmds.exp: set print elements 8
p &ctable1[0]
--
(gdb) PASS: gdb.base/printcmds.exp: set print null-stop off
p int1dim[0]@2
Invalid character '' in expression.
(gdb) FAIL: gdb.base/printcmds.exp: p int1dim[0]@2
p int1dim[0]@2@3
Invalid character '' in expression.
(gdb) FAIL: gdb.base/printcmds.exp: p int1dim[0]@2@3
p/x (short [])0x12345678
$607 = {0x5678, 0x1234}
(gdb) set print elements 24
 

The last two are due to the Ctrl-V problem,
the others are due to the fact that the teststring
is close to an address __cygwin_cxx_malloc (this is with
the cygwin gcc used instead of the i686-w64-mingw32-gcc...)
Well, in fact, those 5 errors disappear with the cross-compiler,
but they are also present when I run the test for a native cygwin debugger.

> In any case, this bit seems harmless enough. If you say it fixes
> problems, I believe you, and I'm all for it!
> 
> >    The last errors were generated by the use of Ctrl-V
> > to avoid problems with possible association of @ to kill command.
> >    mingw GDB doesn't handle this Ctrl-V, so I conditionally removed it
for
> > *-*-mingw* hosts.
> 
> This isn't so much a question for you specifically, but I thought I'd
> throw this out to the greater wisdom of the list.
> 
> I searched around the test suite and found a bunch of places where this
> character is used without the ^V hack. Is it (still) necessary at all?
> Perhaps we can just get rid of it entirely?

  I have no idea...
I just played it save by disabling only for MinGW hosts...

 
> Otherwise, given the harmless nature of the changes, I'd recommend that
> a maintainer approve this.

   Thanks again for all this reviews,

Pierre


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