Skip to content
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

Allow users to organize procedures and functions freely #74

Open
uxmal opened this issue Nov 13, 2015 · 2 comments
Open

Allow users to organize procedures and functions freely #74

uxmal opened this issue Nov 13, 2015 · 2 comments
Labels
discussion This issue requests input from interested parties enhancement This is a feature request

Comments

@uxmal
Copy link
Owner

uxmal commented Nov 13, 2015

Today, reko allows users to rename functions to more meaningful names than
fn01231230. These renamings are stored in the *.dcproject file. In
issue #73 I discuss output file organization, where output files are defined by
the binary executable sections/segments.

Iit would be beneficial for the user to also be able to reorganize functions
(and global data) into files that she has defined herself. Assume that reko has
been fed foo.exe; after decompilation. I propose the following in the GUI:

foo.exe
+- x86 real mode
+- MS-DOS
+- Image
+- 0800
   +- fn0800_0000       # the first procedure found in segment 0800
   +- fn0800_0134       # the next procedure, and so on...
   ...
+- 1E71
   +- fn1E71_0000       # first procedure found in segment 0800
   +- close_all_files   # procedure was renamed by user.
   ....

Here we see the files appearing under the segments (and therefore, according
to #73, files) that they would appear under. The user could add output files to the
project, including any arbitrary folder structure:

foo.exe
+- x86 real mode
+- MS-DOS
+- Image
+- 0800
   +- fn0800_0000       
   +- fn0800_0134       
+- 1E71
   +- fn1E71_0000
   +- close_all_files   
+ io                    # user-created folder for placing IO files.
  +- fileio.c           # user-created file for placing file IO routines.

Now the user can drag close_all_files into the fileio.c file:

foo.exe
+- x86 real mode
+- MS-DOS
+- Image
+- 0800
   +- fn0800_0000       
   +- fn0800_0134       
+- 1E71
   +- fn1E71_0000
   +- (close_all_files) # procedure grayed out, indicating it's been moved
+ io                
  +- fileio.c
     +- close_all_files # new location of the procedure

If all procedures are dragged out of segment 0800, reko won't generate a foo.0800.c file.
User should be able to revert the location of a procedure back to the originating segment/section
if they wish.

@uxmal uxmal added enhancement This is a feature request discussion This issue requests input from interested parties labels Nov 13, 2015
@nemerle
Copy link
Collaborator

nemerle commented Nov 14, 2015

Basically tagging each function with it's intended 'source-tree' location ?
I like this very much, especially since some executable formats have this kind of data embedded in debugging segments.

@uxmal
Copy link
Owner Author

uxmal commented Nov 14, 2015

That's exactly right. Once reko acquires debug symbol-reading capabilities, it would fit in very nicely with this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This issue requests input from interested parties enhancement This is a feature request
Projects
None yet
Development

No branches or pull requests

2 participants