How does one write system-level tools such as debuggers and profilers by reflection?
Reflection makes it easy to write system-level tools such as debuggers and profilers.
I know that C debuggers uses the ptrace
syscall to implement themselves.
How can one implement a debugger by reflection?
UPDATE
What's the principle to implemen开发者_高级运维t a debugger with reflection?
Do you have a specific use case for writing your own java debugger?
Java comes with a debugger, jdb. There are plenty of debugger interfaces out there that are very powerful that can be run locally and remotely. In a development environment, most IDEs (eclipse, intelliJ, NetBeans, ...etc) have built-in debugger interfaces that provide excellent functionality and use jdb.
精彩评论