issue-#142 adding a disassembler to the ocf importer

Merged to the master branch

issue-#142 adding a disassembler to the ocf importer

Postby Josef Templ » Fri Nov 04, 2016 9:35 am

My proposal for an extended ocf importer is available in branch issue-#142.
For testing download the build from http://blackboxframework.org/unstable/issue-%23142/blackbox-1.7.1-a1.729.zip.

You can click on a code file under Info->Repository,
or you can open an ocf file using File->Open.

The decoded instructions are grouped by procedure.
The procedure heading is a link to the procedure's detail view.
The detail view displays the code of a single procedure merged with its source code.
The source code is again a link to the related module.

Note: The compiler stores only the start position of a statement and in case of a
compound statement this is after the leading keyword (e.g. IF, WHILE).
It would require a lot of additional coding to move this position to the start
of the leading keyword. It can also not be changed easily in the compiler because then
the trap handler would be confused.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#142 adding a disassembler to the ocf importer

Postby Ivan Denisov » Fri Nov 11, 2016 7:03 pm

I tested this version
http://blackboxframework.org/unstable/i ... a1.729.zip
From my point of view, all works fine.

Can we vote for this issue?
Ivan Denisov
 
Posts: 1698
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#142 adding a disassembler to the ocf importer

Postby DGDanforth » Fri Nov 11, 2016 11:48 pm

Ivan Denisov wrote:I tested this version
http://blackboxframework.org/unstable/i ... a1.729.zip
From my point of view, all works fine.

Can we vote for this issue?

Do we have a diffs file?
I tried going to redmine and could not find the way to a diffs even though on
other issues I was able to do that. I do not remember the sequence of steps
needed to see a diffs file.

In the process of searching I mistakenly changed the topic type to "documentation"
and then changed it back to "feature".

How do I find a diffs file for issue-#142?
-Doug
User avatar
DGDanforth
 
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA

Re: issue-#142 adding a disassembler to the ocf importer

Postby Ivan Denisov » Sat Nov 12, 2016 2:41 am

DGDanforth wrote:Do we have a diffs file?

http://redmine.blackboxframework.org/pr ... 65730f0320
Ivan Denisov
 
Posts: 1698
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#142 adding a disassembler to the ocf importer

Postby Ivan Denisov » Sun Nov 20, 2016 6:58 am

I think, that we should discuss this:
http://community.blackboxframework.org/ ... p=810#p809
Ivan Denisov
 
Posts: 1698
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#142 adding a disassembler to the ocf importer

Postby Ivan Denisov » Mon Nov 21, 2016 3:45 am

I suggest to use this realization of decoder by Trurl
http://oberoncore.ru/bbcc/subs/dev/decoder
Ivan Denisov
 
Posts: 1698
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#142 adding a disassembler to the ocf importer

Postby Ivan Denisov » Wed Nov 23, 2016 6:01 am

Anyway we need to fix Unicode issue here. The names of Unicode procedure names shown wrong way.

Josef, I think we need to correct your realization for it shows correct addresses or to switch to the ready one.
Ivan Denisov
 
Posts: 1698
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#142 adding a disassembler to the ocf importer

Postby Josef Templ » Wed Nov 23, 2016 8:45 am

The Unicode issue needs to be fixed, of course.

Regarding the other extensions:
It is of course possible to decode all sections of an ocf file
but it needs additional code. Since so far we never needed to look into the
fixup table etc this is not yet included. I tried to keep it simple.
Note: when we change the compiler we change only the instructions that
are generated, not the way the loader handles the fixups.

If there is an agreement that all sections of an ocf file should be decoded
we can switch to the original ominc decoder that I recently got access to
(thanks to Bernhard). (You see, BTW, a decoder is used by anybody
working on a compiler ;)).
The ominc decoder consists of 3 modules and does not contain the source merge feature
and is not integrated with the converters.
Giving up the source merge feature for more or less unneeded extensions
is a bad deal for me. So it would either require additional work to combine the features
or It would also be an option to provided the original ominc decoder as an AppStore package.

Instructions that need fixups can not be displayed "correctly" because the fixups are done
after loading the module. They refer to addresses only known at runtime, that's why
they need to be "fixed up" by the loader.
The only thing that may be possible in some cases is to add the target as a comment.
With the source merge feature, however, you see the target anyway from the source.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#142 adding a disassembler to the ocf importer

Postby Ivan Denisov » Wed Nov 23, 2016 12:46 pm

Josef, maybe for this version of the disassembler we can hide addresses? We should not show wrong information, we can show only the instructions without addresses for this case...
Ivan Denisov
 
Posts: 1698
Joined: Tue Sep 17, 2013 12:21 am
Location: Russia

Re: issue-#142 adding a disassembler to the ocf importer

Postby Josef Templ » Thu Nov 24, 2016 8:09 pm

I will look into the ominc/trurl sources but it may take a couple of days.

- Josef
User avatar
Josef Templ
 
Posts: 2038
Joined: Tue Sep 17, 2013 6:50 am

Next

Return to Resolved (Features)

Who is online

Users browsing this forum: No registered users and 1 guest

cron