On 24/03/2008, at 19:15, Simon Marlow wrote:
Ian Lynagh wrote:

On the second one whether it is the right fix. I could be missing something.
I don't think that this will work if we do
   :cd myDir
   :l myFile.hs
Am I wrong?

Pepe - perhaps you could elaborate on exactly what is wrong and how you're trying to fix it.

As I understand it, the problem we have right now is what happens when the program itself calls System.Directory.setCurrentDirectory, and when we stop at a breakpoint, :list doesn't work. I think the right fix for this is to "virtualise" the current working directory for the client program - that is, we save/restore the cwd whenever we run client code. This is more robust than trying to use absolute paths throughout GHC.

Cheers,
        Simon


The problem I am trying to solve is the one you describe; in fact I sent a companion patch for the testsuite including a test list002 which does exactly that. I have indeed encountered this problem in daily use of the debugger, e.g. while debugging a patch for Cabal Install.

On IRC discussion with Igloo some days ago we found that saving the cwd right after :load is used is enough to solve this particular issue, but I agree that your proposal is more robust. I will send a patch as soon as I get some time for it.

Cheers,
pepe

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to