thanks guys for writing this down! I didn't have the power anymore :( On 2013-03-29, at 02:34, Javier Pimás <elpochodelagente@gmail.com> wrote:
Are we still on time for the party?
*Title:* Smalltalk Native-Code Debugger. *Level*: Intermediate. *Possible mentor:* Guido Chari. *Possible second mentor:* Javier Pimás.
*Description:*
Smalltalk is a powerful environment for software developing. It allows the development of high-level abstractions, and it is highly dynamic and reflective, which promotes analyzing and changing objects at run-time. Debuggers are essential tools, particularly in Smalltalk because they allow developers to understand a program as well as to find and fix defects as they are running.
Debugging native applications, on the other hand, is very hard. Many native applications can't be developed using high level abstractions. Furthermore, as they consist of native-code, debugging them requires understanding and modification of very low-level operations on raw memory at run-time [1], and also a close interaction with the operating system [2][3].
Using Smalltalk to control and debug low-level code would be a great aid in the native-code development process. It would allow not only to control programs status and trace, but also to easily develop a myriad of high-level tools that analyze and modify native-code as it runs.
*Technical Details:*
There are many different kinds of debuggers, and many mechanisms are already mature for implementing features in them[4]. Warp[5] is a recently born project to implement on Pharo a wrapper for the PTrace system call, the essential operating system debugging API. With the addition of already existing powerful high-level tools for low-level programming, as NativeBoost[6] and Waterfall[7], this project will allow to have a native debugger interface for any process from a Smalltalk image, and create a complete ecosystem for Native-Code developing from Smalltalk.
The first steps will include understanding the ptrace system call, and about x86 instructions coding and decoding. This can be done by completing the wrapper of ptrace, which consists of only one function with many different functionalities and improving the disassembler for x86 binary code. After this the student will be able to develop tools for aiding in native-code debugging, like a specialized inspectors and debuggers for watching the value of variables, adding breakpoints, watchpoints, modifying memory and code.
*Benefits to the Student:*
* gain experience in high-level and low-level programming. * learn about how debuggers work under the hood * gain experience on the usage and development of a complete Smalltalk native-code development toolchain. * learn about native-code assembling and disassembling
*Benefits to the Community:*
* Lately, there has been more and more evidence that high-level written software for low-level development is starting to succeed. Smalltalk provides an ideal platform for exploring this domain because of its powerful reflective capabilities. NativeBoost already promotes lot of new possibilities for working dynamically on the Pharo environment with complex low-level tasks. More tools for having a complete and outstanding tool-chain are needed and the native debugging interface is one of the most prominent and promising.
* A native-code debugger will help Smalltalk VM and low-level programmers, because it will leverage all their Smalltalk programming skills into low-level programming. It could even bring closer non-VM programmers to VM code, as it would remove a barrier of entrance to VM programming.
* Having a fully working native-code debugger would be a killer app that can attract lots of low-level developers to Smalltalk, specially Virtual Machine and C/C++ programmers.
Cheers, Guido and Javier.
[1] http://mikecvet.wordpress.com/2010/08/14/ptrace-tutorial/ [2] http://www.ee.ryerson.ca/~courses/coe518/LinuxJournal/elj2002-103-ptrace1.pd... [3] http://www.ee.ryerson.ca/~courses/coe518/LinuxJournal/elj2002-104-ptrace2.pd...
[4] How debuggers work: algorithms, data structures, and architecture, Jonathan B. Rosenberg, ISBN: 0-471-14966-7 [5] http://smalltalkhub.com/#!/~melkyades/Warp [6] https://code.google.com/p/nativeboost/ [7] http://smalltalkhub.com/#!/~mate/Waterfall
On Tue, Mar 26, 2013 at 8:36 AM, Janko Mivšek <janko.mivsek@eranova.si>wrote:
Dear Pharoers,
Ideas are slowly coming, 14 so far, but this is way below the 30+ in previous years. So, stretch your brain, come with some more ideas, which will be interesting for potential students and of course useful for our community. Students you are again welcome to propose such idea by your own. One student idea for now!
Ideas so far: http://gsoc2013.esug.org/ideas
To propose an idea just respond to this post by fulfilling this idea template:
Title:
Level: (beginner, intermediate, advanced)
Possible mentor: (if already known)
Possible second mentor: (if already known)
Description
Technical Details
Benefits to the Student
Benefits to the Community
Best regards Serge and Janko, your this year GSoC admins
-- Janko Mivšek Aida/Web Smalltalk Web Application Server http://www.aidaweb.si
-- Lic. Javier Pimás Ciudad de Buenos Aires