-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate the wosdb debugger #9
Comments
Looking at the source of wosdb reveals functions still missing in the sonnet.library. All poolmem functions to begin with. These have to be implemented first. Then task exception functionality has to be build into the sonnet.library. This cannot be done before the implementation of a scheduler. |
Some debug tool would be useful, but I think bringing wosdb as application-level debugged is not a high priority task. This can wait. |
As I run into more and more complex WarpOS programs (and bugs) i'm going to make the sonnet.library ready to be debugged by wosdb the coming weeks. |
Okay! I'll import wosdb into separate CVS module. |
Hmm, actually wosdb source license does not allow modification. I'll negotiate with Frank to change the license terms. |
Looking at a first glance at the source i'm not sure if it needs modification. Maybe to recognize hunk memory attributes. First the following needs to be done at my end:
After that I can see what is needed from Frank. |
Getting close to start testing with wosdb. Can you look at the source code and assess whether or not it needs adjustments regarding hunk recognition? |
I think minor changes are necessary, although I admit that I didn't yet dig deep enough into wosdb source. |
Frank Wille allowed for us to modify and release the source under following conditions: With this mail, I, the author, give you the official permission to use the PPC disassembler and the WarpOS debugger (wosdb) source in your Sonnet project. I give you also the permission to modify the sources, but you have to mark everything modified with your name and that I take no responsibility for it. |
Haven't looked at it very recently, but I think it pre-loads the program before debuggig/executing. Which means it needs to recognize the special hunks (if it doesn't load it with LoadSeg) |
Having looked at the source of wosdb again it actually needs only the pool memory functions, signalling system and exception handler functions (SetExcHandler etc) in place. So this weekend I should be able to try to get it all working. |
I wonder if we should make a separate repository for wosdb modifications? Or should the source just go into SonnetAmiga repo in a separate directory? |
I decided to just import it into SonnetAmiga repository: af0f7a2 . Now that it's here, I'll see what's needed to plug it into our build system. |
After manually adjusting the executable to get in running on the sonnet (see issue regarding sonnetpatch) I got some first output of the program. Too bad it was only the version number and Frank's email address (and then it exits), which shouldn't have happened. Same thing happens with a variery of arguments (?, h etc.) so I am guessing a bug somewhere in the sonnet library :-). As the output is unexpected, I suspect Run68K at fault. The program itself is 99% PPC, it calls 68K functions to output. |
The |
Also, when I plug wosdb into our build system, I intend to:
If I understand correctly, patching won't be necessary then. I think our build system on the server doesn't have the necessary |
You are correct. I also changed powerpc.library to sonnet.library and V15 to V1 in addition to the hunkheader changes. wosdb actually uses LoadSeg to load in executables so they should go automatically to the correct memory if the correct flags are set in the hunk header of those executables |
Exception handlers are a bit more complex than I thought. Working on the Program Exception now as a template for the others (also wosdb installs a handler here to capture the first run PPC task). Run68K debugging will follow afterwards. |
A little whoops. The output of wosdb is actually as it should be...mostly. It reacts correctly on -v -h and -? ( i just forgot to use the '-'......) |
Looking at the source it quits when the AllocSignalPPC functions returns a negative number. It turns out that a bug in this function in the sonnet library causes the function to always give -1 as a result. Fixed it and now we get a wosdb> prompt. The help option from the prompt works. All other options crash. So onward to the next bug fix... |
In other news, I looked at compiling the code directly for sonnet.library. But currently I have no idea how to produce a PPC object file with |
Got some output now. But the program crashes on SysBase->MemList.lh_Head which is a read from Amiga memory. Have to figure out how to circumvent this. |
Sweet! Congratulations! |
There are still some minor issues, but these are also in the original WarpOS (e.g. intercepting or skipping function calls which wosdb uses itself too -> resulting in a hang). |
I'd say this still needs plugging into our build system, so that we can have correct binary built (and improve upon the codebase in the future). I intend to do that ;). |
Frank is going to add new features to |
The new source snapshot of This way, at least in theory, we can build any WarpOS application from source, to be Sonnet-compatible, with minimal changes to the build process. Will proceed to update toolchain on the server (soon 😛). |
While here I updated PPC disassembler used by wosdb to the latest version ( commit 274a720). |
@DvdBoon The wosdb executable from latest server build needs testing... 😃 |
Tested it. Works correctly.Now I need to rebuild vlink, I guess :-) |
Yes, just use latest source snapshot from Frank's site. |
I'm still not getting all 2005 hunks. Did I miss something? |
Did you update the source? Did you clean .o from previous builds? Do you use Makefile to build it? Note that in wosdb there are special sections hand-crafted in assembly, so VBCC config is not enough to link properly. Check out |
I made a clean directory with the newest vlink. Build it, manually changed the 2 hunks (the one with 4 and 6 Longs) placed it in the vbcc bin directory and deleted all the .o files again and also vlink in the build directory. Then rebuild, but the resulting binary still has the 2 hunks without $2005 |
Ah, so you are building vlink, not wosdb? This is wrong issue then 😄. There 2 hunks are from what sections? Is it perhaps a case of missing |
D'oh! 2016-02-07 23:53 GMT+01:00 Radosław Kujawa notifications@github.com:
|
Works perfectly now! :-D |
Frank Wille once wrote a WarpOS debugger called wosdb. Apparently it does everything with WarpOS API. Not sure if it would be useful for debugging sonnet.library itself, but definitely would help fixing applications running on top of it.
Investigate and make necessary adjustments to make it compatible with sonnet.library.
The text was updated successfully, but these errors were encountered: