[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: python2 and xchat
From: |
Roland McGrath |
Subject: |
Re: python2 and xchat |
Date: |
Sun, 14 Oct 2001 18:48:56 -0400 (EDT) |
[I redirected the CC to bug-hurd, since this is not Debian-related stuff.]
> I'm also looking for a way to start a translator from gdb or
> at least watch the translator run from the start of main().
Use "settrans -a --pause /node /translator args". It will print out the
translator's pid and wait for you to hit return before the fsys_startup
will return to the translator. That is not before main, but should be
pretty soon after. If your program has a problem in main before it calls
fsys_startup, you may be able to debug it just starting it from gdb without
a proper bootstrap port (i.e. if it has a problem that it hits when you
just run the translator program from the command line as if it were a
normal program, then you can debug that like a normal program).
It might well work to use "settrans -a /node /bin/gdb /translator" too.
But I don't know if anyone has tried that.
It's just occurred to me that a straightforward new settrans option would
provide a good way to debug translators more fully. We should add an
option to settrans that takes a PID argument in place of the translator
command line, and then sets that task's bootstrap port as it would for the
new task in settrans -a.
This would allow you to start a translator program from gdb in the normal
way, stop it at main (or anywhere before it does task_get_bootstrap_port),
and then do "settrans --active-pid=NNN /node". When you resume the program
in gdb, it will have a bootstrap port to settrans as it would if settrans
had started it directly.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: python2 and xchat,
Roland McGrath <=