[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
DDD 3.3.11 for beginners in assembly programming
From: |
Zarko Zivanov |
Subject: |
DDD 3.3.11 for beginners in assembly programming |
Date: |
Sat, 25 Feb 2006 10:47:02 +0100 |
My colleagues and I are teaching an 80386 assembly course at the
Faculty of technical sciences, Novi Sad, Serbia and Montenegro. We
have a class room with 32 GNU/Linux workstations and a few servers.
Our choice for a debugger was (and still is) DDD. During the last
year, we encountered the most common problems that our students had
when using DDD, and this is an attempt to make DDD more user-friendly
for beginners in assembly programming. Changes were made in original
DDD 3.3.11 sources because we wanted to give the students an easy to
install version, without any need for adjustments after installation.
List of changes:
1. Clicking on any register in Registers window will put "/x $reg_name"
in the argument field, which is good if you want to display it's value
as a hex number. But, if you want to change a register value, this way
you first need to delete the "/x" part, and then to click on Set. Because
the Registers window already shows all register's values in hex and dec,
the default behavior when clicking on register in Registers window
was changed to put only a "$reg_name" in argument field.
2. DDD can directly show 32-bit registers, but not 8 or 16-bit, nor the values
of
individual flags (as far as I know). For example, you can show "$eax >> 8 &
255"
as a %ah register value, but the name of the data display will be "$eax >> 8
& 255",
not ah. Same thing is for flags values. Several changes were made to achieve
this.
Also, to allow easier access to these registers and flags, some default data
buttons were added (see
http://ccd.ns.ac.yu/csi/download/02%20ESE2%20502/8/dddsnapshot.png).
Notice: data displayed in this way cannot be changed with Set button.
3. When you have an assembly line like this:
movw array(,%ecx,2), %ax
there is no easy way to show memory addressed by "array(,%ecx,2)",
which is very useful for debugging. This was solved via Data/Memory
dialog, which was changed to handle these expressions.
This way, by putting "array(,%ecx,2)" in the argument field, and calling
Data/Memory dialog, correct value(s) will be shown. But, there is a catch:
all data displays shown this way will have "X" as their name. I didn't
figure out how to name them correctly (or, in fact, now to name them at all).
If someone knows how to define a name of data display, please let me know.
4. Some default settings were changed, because students were confused by them
(like
Suppress X warnings, keyboard focus : click to type, and so on). Also, some
default
source buttons were added (for displaying strings and 8-bit data)
I am aware that most of these changes may be called "quick and dirty"
programming, and that they may corrupt DDD behavior with non-386
assembly programs, but I don't know enough about DDD internals to make
them cleaner. I didn't found much documentation about DDD (especially
about writing themes and using data displays) and currently I don't
have the time to analyze it in details. If someone has any suggestions
about cleaning up this code, or finds it useful, please let me know.
Changed version was named ddd-3.3.11.018 (018 is number of our class
room) and can be found at
http://ccd.ns.ac.yu/csi/fo/predmet.jsp?p=29&pp=130
The file ddd-3.3.11.018-diff.tar.bz2 includes only changed files
(overwrite original ddd 3.3.11 files with them before compiling).
Archive also includes complete list of changes in files.
Best regards,
Zarko Zivanov
- DDD 3.3.11 for beginners in assembly programming,
Zarko Zivanov <=