[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Implementing a Soft-ICE like debugger for Linux
Is anybody familiar with Soft-ICE for Windows? (the company's site is
http://www.numega.com/) In any case, I'm talking about a debugger in which
one can set a breakpoint on a certain line or address in a program, a
shared library, and perhaps even kernel modules or the kernel itself.
Afterwards, whenever this address is reached on any process in the system,
the debugger window is invoked, and you can continue debugging from the
breakpoints using the standard debugging commands. This can be useful for
debugging CGI scripts, some DLLs and stuff like that.
Is there already such a debugger for Linux, at least for programs and
DLLs?
In Win95, Soft-ICE is very low-level: it's loaded in the config.sys file
and the memory it uses is taken out of the memory report in the System
applet (e.g. 14 MB instead of 16 MB of RAM).
I'm not an expert in this field, but I suppose this debugger will have to
be a kernel patch or maybe a module, that will monitor the EXECVE system
call. If it loaded a program in which a breakpoint was set, it will also
set it in the memory that will be used to store it (using INT #3 or
something). For shared libraries it may be simpler because their physical
location in the memory is always the same. It will have to monitor its
loading and unloading, though.
As for debugging the kernel and its modules: maybe the only solution is to
include the source of a full-screen debugger inside the kernel, and then
use it to debug the other part of the kernel which is active.
All this is just speculation, and I'd be grateful if a person with a
better understanding of this subject will enlighten us.
Shlomi Fish
Off topic BTW: I've composed a humouros page about Win95 and you can find
it on my homepage at:
http://t2.technion.ac.il/~shlomif/wysiwyt.html
Stas Bekman read it and said he thought it was good. You can read it too
and mail me your comments. Enjoy!
----------------------------------------------------------------------
Shlomi Fish shlomif@t2.technion.ac.il
Home Page: http://t2.technion.ac.il/~shlomif/
Home E-mail: shlomif@ibm.net
The American Lottery - All you need is a dollar and a dream. We will
take the dollar, but you can keep the dream.