Here is my problem:
I am looking for a way to get inside PETSc gmres method, I want to return the basis spanning the Krylov subspace at the convergence.
Thank you for your help
Yes, you can do this. It is possible to get the PETSc objects directly from the dolfin wrappers. You can get the PETSc KSP object by calling PETScKrylovSolver::ksp().
KSP
PETScKrylovSolver::ksp()