[PATCH] testsuite: Update py-mi-objfile to expect console format print

Catalin-Dan Udma catalin-dan.udma@nxp.com
Tue Apr 5 13:08:00 GMT 2016


> 
> On 04/05/2016 12:45 PM, Catalin-Dan Udma wrote:
> >> On 04/05/2016 11:14 AM, Catalin Udma wrote:
> >>> --- a/gdb/testsuite/gdb.python/py-mi-objfile-gdb.py
> >>> +++ b/gdb/testsuite/gdb.python/py-mi-objfile-gdb.py
> >>> @@ -24,4 +24,4 @@ import gdb
> >>>  gdb.execute("set width 101", to_string=True)
> >>>  # And finally a command that will use the original MI stream, which in a
> >>>  # buggy gdb will use just-freed data.
> >>> -gdb.execute("list")
> >>> +gdb.execute("list main")
> >>
> >> Do the comments in the test still make sense?
> >> From the comment, sounds like the test might no longer be covering
> >> what it intended?  I.e. do we "use the original MI stream" ?
> >>
> >> Thanks,
> >> Pedro Alves
> >
> > [Catalin Udma] Indeed, the original crash is no longer reproducible: I manually
> reverted the fixes
> > for that crash (gdb/cli/cli-logging.c, gdb/mi/mi-out.c) and the crash is not
> reproducible anymore
> > when running py-mi-objfile.exp.
> > It reproduces if I revert also this patch " python: Use console format for
> output of gdb.execute command"
> >
> > Updating the comments would be enough and let the test validate the same
> scenario?
> 
> I think it's good to keep validating the same scenario.
> 
> Though maybe there's something else we could add that uses the
> MI stream, that'd also expose the crash?  Maybe
> 
>  gdb.execute ("interpreter-exec mi \"-gdb-show width\"")
> 
> would work?
> 
> > "+# And finally a command that will use the console stream without
> redirection" ?
> 
> Thanks,
> Pedro Alves

[Catalin Udma] 
gdb.execute ("interpreter-exec mi \"-gdb-show width\"", to_string = True)
would crash the gdb with or without any of the patches in discussion.
(MI patch for crash redirection, and use console for python gdb.execute)

I propose to log this new bug, and for now just update the comments in this test.
When the new bug would be fixed, the this test would be updated with the new
scenario.




More information about the Gdb-patches mailing list