From: R. B. <ro...@pa...> - 2007-05-09 01:45:18
|
SourceForge.net writes: > > Read and respond to this message at: > https://sourceforge.net/forum/message.php?msg_id=4302500 > By: jploski > > Thanks for the explanations. I think that the -x/--cmdfile option would > be insufficient for the purpose of controlling the debugger backend from a frontend > application. However, reimplementing -t/--tty to match gdb would help. I think > I'll look into that on the weekend. The question is whether the meaning of -t/--tty > should be changed or a new option introduced, as such a change would not be > backwards-compatible. I do appreciate your concern for keeping compatibility, in this particular case I don't think it warrants it. If there is a project/community that relies on bashdb (let alone the behavior of --tty), I am not aware of it. Before for a release I generally send an announcement of what's changed and ask folks to try things out. So people who miss this posting will get another reminder. Furthermore, It always was a stated goal to be compatibile with *gdb* (not bashdb ;-) unless there's good reason not to. My not reading/understanding the gdb and its manual properly doesn't constitute a good reason. Lastly this kind of incompatible change has some precident. Initially the thing that made debugging even conceivable (trap DEBUG) was a bit flawed in that initially you stopped after the statement rather than before. (For other signals like HUP or INT stopping after is of course the right thing to do.) But I too was concerned about compatibility and recall suggesting inventing another psuedo signal. What was done was just to change the semantics of trap DEBUG, and I don't recall in that situation anyone being annoyed. - - - As for redoing the code, if you undertake to make the correction, thanks! I think/hope it's pretty straightforward and possibly even easier than what's there now. Currently the code does a check tty-ness. Instead I'd just check to make sure that what was given is readable and writable (-r -w) and then redirect stdin and stout to that. Note that redirecting stdin and stdout won't always be effective becuase scripts may do their own redirection. An important case in point is configure scripts. However one should keep the *debugger's* tty the same which may mean setting them to the current tty if the debugger is using stdin and stdout for its output or has a tty associated with it. The debugger's output routines already understand one may write to a tty. See files dbg-log.inc and dbg-io.inc and _Dbg_msg. Some regression test will have to get changed. In particular test/misc.cmd, test/misc.right and test/lopts.right since the meaning of --tty will change. Good luck! |