frida/frida.git
6 years agoMake GUI Widget move Comments through the backend properly
Christoph Egger [Fri, 20 Mar 2015 14:29:56 +0000 (15:29 +0100)]
Make GUI Widget move Comments through the backend properly

6 years agoBump Cmake compat version
Christoph Egger [Fri, 20 Mar 2015 12:51:56 +0000 (13:51 +0100)]
Bump Cmake compat version

Cmake before 3.0 failed to properly build out-of-tree with SWIG as it
tries to write the generated wrapper to a non-existent directory in the
build folder

6 years agoDon't save the function we're not using
Christoph Egger [Fri, 20 Mar 2015 12:51:31 +0000 (13:51 +0100)]
Don't save the function we're not using

Silences unused variable compiler warnung

6 years agoRemove whitespace around printed instruction
Christoph Egger [Fri, 20 Mar 2015 12:50:28 +0000 (13:50 +0100)]
Remove whitespace around printed instruction

Also fixes display of calls where the whole string was replaced by the
called function name instead of just the address

6 years agoImplement InformationManager / Comment and ChangeCommentEvent
Christoph Egger [Fri, 20 Mar 2015 11:55:09 +0000 (12:55 +0100)]
Implement InformationManager / Comment and ChangeCommentEvent

Comments can now be passed through the InformationManager who will
properly emit events

6 years agoChange from list to vector
Christoph Egger [Fri, 20 Mar 2015 11:46:55 +0000 (12:46 +0100)]
Change from list to vector

We want to index into that array so a vector is the better data structure

6 years agoRework API for getting at instructions
Christoph Egger [Thu, 19 Mar 2015 16:56:49 +0000 (17:56 +0100)]
Rework API for getting at instructions

Now we don't hand a callback to the Disassembler, instead we just get a
list of Instruction objects and use that

6 years agoInclude pointer to changed function in RenameFunctionEvent
Christoph Egger [Thu, 19 Mar 2015 17:01:28 +0000 (18:01 +0100)]
Include pointer to changed function in RenameFunctionEvent

6 years agoRemove unnecessary include for <string>
Christoph Egger [Thu, 19 Mar 2015 14:08:33 +0000 (15:08 +0100)]
Remove unnecessary include for <string>

6 years agoAllow setting loglevel from commandline
Christoph Egger [Thu, 19 Mar 2015 13:58:44 +0000 (14:58 +0100)]
Allow setting loglevel from commandline

6 years agoFix SWIG generation for maps
Christoph Egger [Thu, 19 Mar 2015 11:32:23 +0000 (12:32 +0100)]
Fix SWIG generation for maps

still, we can't do anything with the resulting iterators untill the
%template stuff works

6 years agoInstall the guile-frida-bindings into system library path
Christoph Egger [Wed, 18 Mar 2015 18:31:55 +0000 (19:31 +0100)]
Install the guile-frida-bindings into system library path

Allows using only name in scm_load_module -- can be overwritten for
testing and works with the final binary. Would be even better if we
could hide the module in a private directory but I haven't found a nice
way so far

6 years agoProperly allow plugins to load for testing
Christoph Egger [Wed, 18 Mar 2015 16:57:29 +0000 (17:57 +0100)]
Properly allow plugins to load for testing

Loads stuff from the cmake binary directory for testing -- so tests use
the newly built plugins and not some old installed ones (or fail if none
exist)

6 years agoAdd new files missing from previous few commits
Christoph Egger [Wed, 18 Mar 2015 13:59:14 +0000 (14:59 +0100)]
Add new files missing from previous few commits

6 years agoBuild working `make install` target
Christoph Egger [Mon, 16 Mar 2015 16:34:13 +0000 (17:34 +0100)]
Build working `make install` target

Should install the frida binary and the libraries into appropriate
places using the Cmake GNUInstallDirs module. Included is some cleanup
in the guile module.

6 years agoRestructure InformationManager
Christoph Egger [Mon, 16 Mar 2015 15:40:18 +0000 (16:40 +0100)]
Restructure InformationManager

  - Signals now all use Event objects to communicate information and all
    share a common sane interface
  - Organize signals consistently and grup by signal name
  - Dynamic and local functions are now handled almost the same
  - Changes all over the place to fix users for these changes
  - proper iterator access for the maps so one can actually iterate over
    all functions (for example a script)
  - ignore these iterators where they would be most usefuill (scripting)
    untill I figure out how to make SWIG compile them properly

6 years agoBasic MachO Support
Christoph Egger [Fri, 13 Mar 2015 13:51:29 +0000 (14:51 +0100)]
Basic MachO Support

Currently has no way to find the Entrypoint. Doesn't seem to be too easy
-- we probably need to get it out of the cpu_thread_state struct from
the thread_command in the MachO header.

6 years agoMore logging in LLVMDisassembler
Christoph Egger [Fri, 13 Mar 2015 13:08:36 +0000 (14:08 +0100)]
More logging in LLVMDisassembler

6 years ago[BasicBlockWidget] Adjust inner widget size before drawing
Christoph Egger [Thu, 12 Mar 2015 15:46:00 +0000 (16:46 +0100)]
[BasicBlockWidget] Adjust inner widget size before drawing

Adjust size of the innner QGraphicsTextItem before getting it's size for
drawing the outer parts. That way the BasicBlockWidget always has the
correct size matching it's content

Closes: T20
6 years agoMove the interpreters to the core InformationManager
Christoph Egger [Thu, 12 Mar 2015 12:54:15 +0000 (13:54 +0100)]
Move the interpreters to the core InformationManager

6 years agoComplete accessors for InformationManager managed objects
Christoph Egger [Thu, 12 Mar 2015 12:45:41 +0000 (13:45 +0100)]
Complete accessors for InformationManager managed objects

6 years agoRemove unnecessary Interpreter.cxx
Christoph Egger [Wed, 11 Mar 2015 16:08:45 +0000 (17:08 +0100)]
Remove unnecessary Interpreter.cxx

Should make things build again

6 years agoUser proper hirarchial names for loggers
Christoph Egger [Wed, 11 Mar 2015 16:08:10 +0000 (17:08 +0100)]
User proper hirarchial names for loggers

6 years agoActually build Dockstuff
Christoph Egger [Wed, 11 Mar 2015 16:07:16 +0000 (17:07 +0100)]
Actually build Dockstuff

6 years agoAdd log widget to lower dock
Christoph Egger [Wed, 11 Mar 2015 15:47:05 +0000 (16:47 +0100)]
Add log widget to lower dock

Make the lower dock container agnostic the former ScriptingDock now is
just taking care of the content inside one of the tabs and the FridaDock
is managing the Dock and TabWidget stuff.

Add a Logging Tab that outputs messages from the logging system for
inspection. Could well be improved (T12 T13 T14).

Closes T11

6 years agoCleanup
Christoph Egger [Wed, 11 Mar 2015 13:33:20 +0000 (14:33 +0100)]
Cleanup

6 years agoExport the Guile interpreter as QtPlugin
Christoph Egger [Wed, 11 Mar 2015 13:31:26 +0000 (14:31 +0100)]
Export the Guile interpreter as QtPlugin

The Guile interpreter is now a proper Plugin. Next step is listing +
loading scripting plugins properly

Closes T10

6 years agoProperly move Functionality into FunctionWidget
Christoph Egger [Wed, 11 Mar 2015 13:30:24 +0000 (14:30 +0100)]
Properly move Functionality into FunctionWidget

6 years agoPoC: Add menu item to load script
Christoph Egger [Tue, 10 Mar 2015 16:45:50 +0000 (17:45 +0100)]
PoC: Add menu item to load script

6 years agoAdd SWIG bindings for the guile interpreter
Christoph Egger [Tue, 10 Mar 2015 16:25:59 +0000 (17:25 +0100)]
Add SWIG bindings for the guile interpreter

6 years agoMove Interpreter to its own class
Christoph Egger [Tue, 10 Mar 2015 16:22:38 +0000 (17:22 +0100)]
Move Interpreter to its own class

Moving the actual scripting implementation from the ScriptingDock to its
own class. Includes a guile implementation for the Interpreter class.

Fixes: T4
6 years agoCorrectly handle function rename
Christoph Egger [Tue, 10 Mar 2015 15:34:32 +0000 (16:34 +0100)]
Correctly handle function rename

The GUI now handles function rename events also for the list of
functions. One can now rename a function via scripting or in the loader
or in any other way and it will be properly renamed.

Fixes: T1
6 years agoMove LLVM logic to extra cmake module
Christoph Egger [Tue, 10 Mar 2015 11:38:13 +0000 (12:38 +0100)]
Move LLVM logic to extra cmake module

6 years agoProperly initialize end address in BasicBlock
Christoph Egger [Tue, 10 Mar 2015 11:36:48 +0000 (12:36 +0100)]
Properly initialize end address in BasicBlock

having random data show up there when the block isn't finished yet is
suboptimal

6 years agoUse forward-declaration for QTemporaryFile
Christoph Egger [Tue, 10 Mar 2015 11:36:25 +0000 (12:36 +0100)]
Use forward-declaration for QTemporaryFile

6 years agoFinish current function before starting next one
Christoph Egger [Tue, 10 Mar 2015 11:34:36 +0000 (12:34 +0100)]
Finish current function before starting next one

When BasicBlocks appear in multiple functions, we ran into the situation
where a unfinished basicblock is included in a different function and
causing bad loops as it's end address wasn't set yet

6 years agoActually call finishFuction() when function is finished
Christoph Egger [Tue, 10 Mar 2015 11:33:37 +0000 (12:33 +0100)]
Actually call finishFuction() when function is finished

6 years agoDisable symbolizer
Christoph Egger [Tue, 10 Mar 2015 11:32:34 +0000 (12:32 +0100)]
Disable symbolizer

Didn't work on ELF binaries and makes the LLVM instruction reader crash
on PE binaries

6 years agoDisplay blocks when appearing in different functions
Christoph Egger [Tue, 10 Mar 2015 11:28:19 +0000 (12:28 +0100)]
Display blocks when appearing in different functions

If some block is part of multiple functions now include it in all the
functions and not only in the first one

6 years agoRe-add support for PE binaries
Christoph Egger [Tue, 10 Mar 2015 11:27:24 +0000 (12:27 +0100)]
Re-add support for PE binaries

6 years agoStart geiser server inside the GUILE interpreter
Christoph Egger [Fri, 6 Mar 2015 16:23:46 +0000 (17:23 +0100)]
Start geiser server inside the GUILE interpreter

6 years agoMove ScriptingDock contructor to cxx file
Christoph Egger [Fri, 6 Mar 2015 16:23:11 +0000 (17:23 +0100)]
Move ScriptingDock contructor to cxx file

6 years agoFinish archive loading
Christoph Egger [Thu, 5 Mar 2015 13:39:52 +0000 (14:39 +0100)]
Finish archive loading

Using the deserializers and adding the necessary gui-foo

6 years agoAdd binary to saved archive
Christoph Egger [Thu, 5 Mar 2015 13:39:17 +0000 (14:39 +0100)]
Add binary to saved archive

6 years agoAdd logger for InformationManager
Christoph Egger [Thu, 5 Mar 2015 13:37:52 +0000 (14:37 +0100)]
Add logger for InformationManager

6 years agoAdd extra space in Logging output for Disassembler
Christoph Egger [Thu, 5 Mar 2015 13:36:06 +0000 (14:36 +0100)]
Add extra space in Logging output for Disassembler

6 years agoConvert menu items to new style Qt Signal connects
Christoph Egger [Thu, 5 Mar 2015 13:35:21 +0000 (14:35 +0100)]
Convert menu items to new style Qt Signal connects

6 years agodirectly set function name
Christoph Egger [Thu, 5 Mar 2015 13:30:29 +0000 (14:30 +0100)]
directly set function name

No need to first finish the function with an empty name and rename it
directly afterwards. (related to T1)

6 years agoSet Version
Christoph Egger [Thu, 5 Mar 2015 13:25:12 +0000 (14:25 +0100)]
Set Version

6 years agoSupport for Renaming Groups
Christoph Egger [Wed, 4 Mar 2015 15:20:17 +0000 (16:20 +0100)]
Support for Renaming Groups

6 years agoAllow tests to properly run from out-of-tree build directories
Christoph Egger [Wed, 4 Mar 2015 15:10:43 +0000 (16:10 +0100)]
Allow tests to properly run from out-of-tree build directories

Fixup gtest so it still finds the testcases if testing is started in a
out-of-tree build.

6 years agoAllow creation of custom groups
Christoph Egger [Wed, 4 Mar 2015 14:42:01 +0000 (15:42 +0100)]
Allow creation of custom groups

Users can now create Groups of functions and move individual functions
there

6 years agoMake "Add Function" generally available
Christoph Egger [Wed, 4 Mar 2015 14:17:50 +0000 (15:17 +0100)]
Make "Add Function" generally available

Allows to create new Functions even if point is over an existing
function

6 years agoreadSections() already in Disassembler constructor
Christoph Egger [Wed, 4 Mar 2015 14:15:00 +0000 (15:15 +0100)]
readSections() already in Disassembler constructor

this is the one part we also need when loading from a saved file

6 years agoChange from QListWidget to QTreeWidget
Christoph Egger [Wed, 4 Mar 2015 14:12:46 +0000 (15:12 +0100)]
Change from QListWidget to QTreeWidget

This way we can group functions on the left plane. Allows to group and
hide some groups of items. As a first take, group the external
functions. This also places them at the top where they stay together.

6 years agoUse -Wextra and be -Wextra-clean
Christoph Egger [Tue, 3 Mar 2015 19:15:18 +0000 (20:15 +0100)]
Use -Wextra and be -Wextra-clean

6 years agoMake `make test` work
Christoph Egger [Tue, 3 Mar 2015 17:42:58 +0000 (18:42 +0100)]
Make `make test` work

6 years agoAdd support for deserializing functions
Christoph Egger [Tue, 3 Mar 2015 17:30:25 +0000 (18:30 +0100)]
Add support for deserializing functions

Includes a first testcase

6 years agoimplement basic deserialization of BasicBlock's
Christoph Egger [Tue, 3 Mar 2015 16:36:10 +0000 (17:36 +0100)]
implement basic deserialization of BasicBlock's

6 years agoAdd testcase for serializing / deserializing BasicBlocks
Christoph Egger [Tue, 3 Mar 2015 16:59:23 +0000 (17:59 +0100)]
Add testcase for serializing / deserializing BasicBlocks

6 years agoMove org files to doc/ subdirectory
Christoph Egger [Tue, 3 Mar 2015 14:05:25 +0000 (15:05 +0100)]
Move org files to doc/ subdirectory

6 years agoMake pieces of information serialize themselves
Christoph Egger [Tue, 3 Mar 2015 13:26:10 +0000 (14:26 +0100)]
Make pieces of information serialize themselves

Moving responsibility of serialization to the individual pieces of
Information.

6 years agoFix Loading of symbolless files
Christoph Egger [Tue, 3 Mar 2015 13:10:31 +0000 (14:10 +0100)]
Fix Loading of symbolless files

The last commit unconditionally enabled disassembling from the start of
the text section. On a sample binary (/bin/true) this resulted in a
BasicBlock with a size of several TiB which won't terminate properly.

6 years agoReoganize Function/BasicBlock creation
Christoph Egger [Tue, 24 Feb 2015 22:19:13 +0000 (23:19 +0100)]
Reoganize Function/BasicBlock creation

More control in the hand of the information manager. Mid-Term goal is
to support loading of files so the Disassembler shouldn't have
separate storage of all BasicBlocks and Functions that we would have
to also populate upon loading saves

6 years agoProperly HTML Escape function names
Christoph Egger [Mon, 23 Feb 2015 15:43:51 +0000 (16:43 +0100)]
Properly HTML Escape function names

6 years agoName functions in BasicBlock view
Christoph Egger [Mon, 23 Feb 2015 15:36:31 +0000 (16:36 +0100)]
Name functions in BasicBlock view

Now call instructions have a symbolic name in the CFG view which is
updated upon function renaming

6 years agoAdd link handler only once for each basic block
Christoph Egger [Mon, 23 Feb 2015 15:33:59 +0000 (16:33 +0100)]
Add link handler only once for each basic block

6 years agoAdd our own FindQuaZip.cmake untill debian ships a useable one
Christoph Egger [Mon, 23 Feb 2015 13:03:04 +0000 (14:03 +0100)]
Add our own FindQuaZip.cmake untill debian ships a useable one

6 years agoconstify function in Function
Christoph Egger [Fri, 20 Feb 2015 17:28:25 +0000 (18:28 +0100)]
constify function in Function

6 years agoProperly rename function
Christoph Egger [Fri, 20 Feb 2015 17:25:54 +0000 (18:25 +0100)]
Properly rename function

Renaming a function now also changes the Function object and therefor is
represented in the saved data (and available for forther processing)

6 years agoMainwindow: group by public/private
Christoph Egger [Fri, 20 Feb 2015 16:46:16 +0000 (17:46 +0100)]
Mainwindow: group by public/private

6 years agoRemodel CustomQGraphicsTextItem being friend of BasicBlockWidget
Christoph Egger [Fri, 20 Feb 2015 16:38:04 +0000 (17:38 +0100)]
Remodel CustomQGraphicsTextItem being friend of BasicBlockWidget

The CustomQGraphicsTextItem is just an implementation detail of
BasicBlockWidget and can use its private members (mostly the logger and
mainwindow members)

6 years agoCreate Logger for BasicBlockWidgets
Christoph Egger [Fri, 20 Feb 2015 16:37:49 +0000 (17:37 +0100)]
Create Logger for BasicBlockWidgets

6 years agoconstify accessors in BasicBlock
Christoph Egger [Fri, 20 Feb 2015 16:35:49 +0000 (17:35 +0100)]
constify accessors in BasicBlock

6 years agoPass the InformationManager inside the BasicBlock and Function classes
Christoph Egger [Fri, 20 Feb 2015 16:34:23 +0000 (17:34 +0100)]
Pass the InformationManager inside the BasicBlock and Function classes

All models should know the InformationManager so we can forward changes
to any kind of information to the manager, who then is responsible to
update all stakeholders of this information

6 years agoRemove unused LLVMBasicBlock class
Christoph Egger [Fri, 20 Feb 2015 16:29:13 +0000 (17:29 +0100)]
Remove unused LLVMBasicBlock class

6 years agoRemove unused LLVMFunction class
Christoph Egger [Fri, 20 Feb 2015 16:23:09 +0000 (17:23 +0100)]
Remove unused LLVMFunction class

6 years agoMake InformationManager responsible for cleaning Blocks / Functions
Christoph Egger [Fri, 20 Feb 2015 16:06:32 +0000 (17:06 +0100)]
Make InformationManager responsible for cleaning Blocks / Functions

As BasicBlocks and Functions are now considered part of the core, the
InformationManager should be responsible for cleaning them up
afterwards. Maybe it should generate them as well -- we will see.

6 years agoMove Function/BasicBlock to core and clean up includes
Christoph Egger [Fri, 20 Feb 2015 16:03:45 +0000 (17:03 +0100)]
Move Function/BasicBlock to core and clean up includes

Function and BasicBlock are considered part od the Data Model and part
of the core. Move them there.

Also remove lots of #include from the headers and replace them by
forward declarations. This should make compilation units smaller and
remove the huge number of users for each header -- speeding up
compilation and making users explicitely include stuff they use.

6 years agoFix CMakeList
Christoph Egger [Fri, 20 Feb 2015 11:36:20 +0000 (12:36 +0100)]
Fix CMakeList

6 years agoAdd basic save support (Infrastructure)
Christoph Egger [Thu, 19 Feb 2015 15:51:41 +0000 (16:51 +0100)]
Add basic save support (Infrastructure)

This is some start on save infrastructure. To complete save/load we now
need to add all relevant information to the save() function and the
implement load(). Also fileformat is not really setteled by now.

6 years agoCompile fix for last commit
Christoph Egger [Thu, 19 Feb 2015 15:50:39 +0000 (16:50 +0100)]
Compile fix for last commit

6 years agoAdd option to comment on instructions (in GUI)
Christoph Egger [Wed, 18 Feb 2015 15:38:18 +0000 (16:38 +0100)]
Add option to comment on instructions (in GUI)

6 years agoAdd context menu to create Functions
Christoph Egger [Tue, 17 Feb 2015 16:53:39 +0000 (17:53 +0100)]
Add context menu to create Functions

6 years agoCompactify BasicBlockWidget header
Christoph Egger [Tue, 17 Feb 2015 15:30:54 +0000 (16:30 +0100)]
Compactify BasicBlockWidget header

6 years agoAdd missing space to log message
Christoph Egger [Tue, 17 Feb 2015 13:27:32 +0000 (14:27 +0100)]
Add missing space to log message

6 years agoSwitch again BasicBlockWidget base -- to QGraphicsTextItem
Christoph Egger [Tue, 17 Feb 2015 13:25:47 +0000 (14:25 +0100)]
Switch again BasicBlockWidget base -- to QGraphicsTextItem

That one seems to be the final word here -- we'll see. Anyway it has
proper TextDocument / TextCursor support, can render HTML and is a
GraphicsItem so no playing to get scrollbars away -- it doesn't have
any.

6 years agoAdd some hotkeys
Christoph Egger [Mon, 16 Feb 2015 12:17:29 +0000 (13:17 +0100)]
Add some hotkeys

6 years agoRenaming functions
Christoph Egger [Mon, 16 Feb 2015 12:16:03 +0000 (13:16 +0100)]
Renaming functions

It's now possible to arbitrarily rename functions. Currently only the
name displayed in the sidebar is updated.

6 years agoFix width of basic blocks
Christoph Egger [Fri, 6 Feb 2015 15:13:22 +0000 (16:13 +0100)]
Fix width of basic blocks

6 years agoAdd test Framework
Christoph Egger [Fri, 6 Feb 2015 14:59:12 +0000 (15:59 +0100)]
Add test Framework

6 years agoClean up .gitignore -- we should build out-of-tree anyway
Christoph Egger [Fri, 6 Feb 2015 14:58:16 +0000 (15:58 +0100)]
Clean up .gitignore -- we should build out-of-tree anyway

6 years agoMake link to local functions clickable
Christoph Egger [Thu, 29 Jan 2015 22:08:56 +0000 (23:08 +0100)]
Make link to local functions clickable

call instructions now have a clickable target address that gets you to
the corresponding function iff this function is local to the object.

It still does just nothing on functions that are linked in from shared
objects or functionsthat were not created (shouldn't happen right now)

This also adds yet another map to the MainWindow with key/value pairs
that are not quite semantically nice but made implementation easy. We
need to think about how which objects are referenced from ithin the
mainwindow some tim in the future.

6 years agoProperly implement plane selection
Christoph Egger [Thu, 22 Jan 2015 18:54:23 +0000 (19:54 +0100)]
Properly implement plane selection

Does no longer rely on proper indexes (corresponding index in the listWidget and
in the stackedWidget) but actually remebers which plane belongs to which
list entry

6 years agoCleanup includes
Christoph Egger [Thu, 22 Jan 2015 18:54:14 +0000 (19:54 +0100)]
Cleanup includes

6 years agoAllow addition of new functions
Christoph Egger [Thu, 22 Jan 2015 18:53:27 +0000 (19:53 +0100)]
Allow addition of new functions

The ListWidget now displays a ContextMenu where the user can add a new
function by typing the address

6 years agoFix layout of basicblock with just one instruction
Christoph Egger [Thu, 22 Jan 2015 18:50:09 +0000 (19:50 +0100)]
Fix layout of basicblock with just one instruction

6 years agoAdd dynamically linked symbols
Christoph Egger [Wed, 21 Jan 2015 16:19:47 +0000 (17:19 +0100)]
Add dynamically linked symbols

6 years agoMarke BUG as fixed
Christoph Egger [Wed, 21 Jan 2015 12:20:30 +0000 (13:20 +0100)]
Marke BUG as fixed

Relevant commit: 9252262693432b33dbe4ffc60d79bbdc6fbb5f66

6 years agoGet entry address from llvm
Christoph Egger [Wed, 21 Jan 2015 12:19:18 +0000 (13:19 +0100)]
Get entry address from llvm

Replace magic offset + endianess-correction with proper LLVM functions
now that we have the full typed ELF Object available