Christoph Egger [Tue, 2 Jun 2015 21:11:18 +0000 (23:11 +0200)]
Make LogDock and LogDockAppender communicate by signals
This way the Appender can work in a different thread from the gui dock
without causing problems. Also we no longer need to make the Appender
a friend of the gui dock and instead make the dock handle it's own
affairs
Christoph Egger [Tue, 2 Jun 2015 19:31:28 +0000 (21:31 +0200)]
Make requestNewFunction pass a signal
With the Disassembler being assigned to a different thread soon, this
should allow the gui to stay alive while the disassembler is busy
working.
Christoph Egger [Tue, 2 Jun 2015 19:18:41 +0000 (21:18 +0200)]
Actually set frida version
Christoph Egger [Tue, 2 Jun 2015 18:50:42 +0000 (20:50 +0200)]
Add freebsd names for llvm-config
Thanks to Ed Maste for the report!
Christoph Egger [Wed, 27 May 2015 11:47:41 +0000 (13:47 +0200)]
Reenable Qt Signal keywords
As we're not using any boost signals any more no need to hide the
special keywords.
Christoph Egger [Tue, 26 May 2015 19:51:53 +0000 (21:51 +0200)]
Cleanup documentation
Christoph Egger [Tue, 26 May 2015 19:23:49 +0000 (21:23 +0200)]
properly terminate guile thread
Christoph Egger [Tue, 26 May 2015 19:23:25 +0000 (21:23 +0200)]
Create a Settings object in fridatest as well
Otherwise it just segfaults!
Christoph Egger [Tue, 26 May 2015 19:23:00 +0000 (21:23 +0200)]
Always keep log scrolled to the bottom
Christoph Egger [Tue, 26 May 2015 18:42:37 +0000 (20:42 +0200)]
Alwas make the first BasicBlock visible
Christoph Egger [Tue, 26 May 2015 18:38:47 +0000 (20:38 +0200)]
Fix redraw bug -- call prepareGeometryChange()
"If you want to change the item's bounding rectangle, you must first
call prepareGeometryChange()." -- we are now doing so
Christoph Egger [Tue, 26 May 2015 16:06:59 +0000 (18:06 +0200)]
Remove adjustSize() hack -- doesn't seem to be necessary any more
Christoph Egger [Tue, 26 May 2015 16:04:24 +0000 (18:04 +0200)]
in populateWidget create new TextDocument and attach it at the end
This is a *huge* performance improvement. Instead of using the
QTextDocument already attached to the QGraphicsTextItem, we create a
new QTextDocument and fill it. Only at the end of populateWidget() we
attach it to the QGraphicsTextItem. This way it will only be layouted
once and not per insert (three times per instruction).
Christoph Egger [Tue, 26 May 2015 13:48:21 +0000 (15:48 +0200)]
Make signals from geiser work
Move geiser to a proper QThread instead of a guile-only thread. This
way it can properly send/receive signals. Also for some obscure reason
the QVector<int> hack is needed for things to work
Closes T24
Christoph Egger [Mon, 25 May 2015 13:21:38 +0000 (15:21 +0200)]
Move to Qt Signal/Slots
It's actually fun! And was less pain than expected.
Seems receiving commands from geiser is still kind-of broken but we'll
see
Ref T24
Christoph Egger [Mon, 25 May 2015 11:37:26 +0000 (13:37 +0200)]
Lazy layout CFGs
Wait for the Widget to actually be shown before starting to
layout. Good candidate for a background-worker-thread later!
Christoph Egger [Mon, 25 May 2015 11:18:04 +0000 (13:18 +0200)]
Multiply stepsize by 3
As profiling show rather some time spent in that are, cut down number
of iterations to one third. Shouldn't impact quality at all
Christoph Egger [Mon, 25 May 2015 11:17:05 +0000 (13:17 +0200)]
Add comments on how the graph is drawn
Christoph Egger [Mon, 25 May 2015 09:02:09 +0000 (11:02 +0200)]
Add basic Backlog to ScriptingDock
Christoph Egger [Mon, 25 May 2015 05:37:00 +0000 (07:37 +0200)]
Do proper errorhandling for fileload
Sharing code with evaluation of strings, now proper error handling is
done and frida won't crash if an invalid scheme file is loaded.
Christoph Egger [Mon, 25 May 2015 05:23:35 +0000 (07:23 +0200)]
Use protected domainsocket for geiser
Instead of opening a TCP port on localhost, use a UNIX domainsocket to
listen for connections. This way frida is properly protected against
other users on the same system.
Christoph Egger [Mon, 25 May 2015 05:20:42 +0000 (07:20 +0200)]
Add settings Class
Singleton class that keeps track of settings. First thing it has a
RuntimeDirectory to place things like sockets into.
Christoph Egger [Mon, 25 May 2015 04:28:32 +0000 (06:28 +0200)]
Fix formating of comments. Should not start with a linebreak
When displaying a comment, an additional linebreak was inserted right
after the ";;" mark and before the first comment. This linebreak is
removed here.
Christoph Egger [Mon, 25 May 2015 04:14:06 +0000 (06:14 +0200)]
Annotate function address
When the user manually annotates an address from the context menu, add
a special placeholder comment to put the function name there.
Christoph Egger [Mon, 25 May 2015 04:12:36 +0000 (06:12 +0200)]
Some comments
Christoph Egger [Sun, 24 May 2015 23:54:16 +0000 (01:54 +0200)]
Add missing Include-Guards to dialogs
Christoph Egger [Sun, 24 May 2015 23:55:52 +0000 (01:55 +0200)]
Move qt.hxx up one directory
We're using Qt now a lot more than only for GUI purposes. Reflect
reality in location of qt.hxx headerfile
Ref T24
Christoph Egger [Sun, 24 May 2015 12:27:55 +0000 (14:27 +0200)]
Script files are not actually binaries but scripts!
Christoph Egger [Sun, 24 May 2015 12:26:24 +0000 (14:26 +0200)]
add logging to the Guile module
Christoph Egger [Sun, 24 May 2015 12:26:09 +0000 (14:26 +0200)]
Fix segfault when loading a sceme file
Christoph Egger [Tue, 19 May 2015 17:55:35 +0000 (19:55 +0200)]
Color logmessages according to severity
Closes T12
Christoph Egger [Tue, 19 May 2015 17:02:13 +0000 (19:02 +0200)]
Highlight jumptargets
+ Properly handle jmps at the right place in the gui
+ Try to center on the relevant BasicBlock
+ Change color of the BasicBlock
Centering needs us to increase the actual Scene size as well so we can
also center on widgets at the rim of the scene. Bug should only be
closed once this is implemented
Ref T31
Christoph Egger [Tue, 19 May 2015 15:57:43 +0000 (17:57 +0200)]
Don't create empty blocks for unconditional jumps out of the text segment
These are most likely optimized tail-calls and should be handles as
such.
Ref T34
Christoph Egger [Sat, 16 May 2015 13:59:50 +0000 (15:59 +0200)]
Remove deprecated printEachInstruction function
replaced by getInstructions, no users left
Christoph Egger [Sat, 16 May 2015 12:05:10 +0000 (14:05 +0200)]
Move each widget exactly once per layout iteration
BasicBlocks with many incoming edges were pushed downwards faster than
those with less incoming edges resulting in unnatural graph layouting.
Now we move each widget exactly once (move the widget on collissions,
not its successors) keeping the basic ordering by addresses.
The result is not perfect -- there's quite some room for further
improvements though!
Ref 5
Christoph Egger [Fri, 15 May 2015 23:32:37 +0000 (01:32 +0200)]
Allow Drag-Scrolling in CFG-View
One can now drag the viewpoint on the CFGScene around with the mouse
-- press left mousebutton and drag the canvas.
Closes T32
Christoph Egger [Fri, 15 May 2015 23:25:20 +0000 (01:25 +0200)]
Handle cancel on InterpreterMenu
getOpenFileName() will return a Null-QString on cancel. Feeding that
filename to guile will die (reasonably) with an exception. Instead, we
now just exit from the handler in the gui if the Null-QString is
returned
Closes T33
Christoph Egger [Tue, 12 May 2015 11:31:12 +0000 (13:31 +0200)]
Adapt Licensing
Christoph Egger [Sat, 25 Apr 2015 16:47:32 +0000 (18:47 +0200)]
Officially support LLVM-3.6
LLVM-3.6 now passes all the tests and seems to work. Therefore removing
the loud warning message.
Christoph Egger [Sat, 25 Apr 2015 16:42:18 +0000 (18:42 +0200)]
Some code cleanup
Christoph Egger [Sat, 25 Apr 2015 16:42:01 +0000 (18:42 +0200)]
Fix logic flaw preventing us from handling symbols in the llvm-3.6 path
Christoph Egger [Wed, 1 Apr 2015 15:41:26 +0000 (17:41 +0200)]
Create helper to generate disassembler tests
Christoph Egger [Wed, 1 Apr 2015 14:53:50 +0000 (16:53 +0200)]
Add armel testcase
This one doesn't do thumb so it's easy
Christoph Egger [Thu, 26 Mar 2015 16:59:46 +0000 (17:59 +0100)]
Add (failing) mipsel test
Christoph Egger [Thu, 26 Mar 2015 16:47:10 +0000 (17:47 +0100)]
Comments in BasicBlockWidget for the magic
Christoph Egger [Thu, 26 Mar 2015 16:45:34 +0000 (17:45 +0100)]
Properly fail if no appropriate Disassembler can be constructed
Currently, for mipsel there is no InstructionAnalysis available for some
reason. frida gives now a errormessage and survives instead of just
segfaulting
Christoph Egger [Thu, 26 Mar 2015 16:44:56 +0000 (17:44 +0100)]
Set Loglevel to ERROR for testcases
Everything lower is just noise for this purpose
Christoph Egger [Thu, 26 Mar 2015 16:43:24 +0000 (17:43 +0100)]
Add testcases for disassembler
Testing basic functionality of the LLVM-based disassembler on amd64/elf
and amd64/MachO. More tests will follow as soon as I get reasonable test
binaries, we should at least also cover PE and arm (maybe ppc, mips, ..)
Christoph Egger [Thu, 26 Mar 2015 13:57:52 +0000 (14:57 +0100)]
Properly add StreamReader class
It already comes in via the inclusion of BasicBlock but Function needs
it on it's own
Christoph Egger [Wed, 25 Mar 2015 17:13:20 +0000 (18:13 +0100)]
Preliminary LLVM-3.6 support
Allows llvm-3.6 in cmake and does compile with 3.6. However it
does *not* work! It will segfault right away. One of the suspects is
different base for addresses used in llvm's getInstruction() and family.
Christoph Egger [Wed, 25 Mar 2015 14:26:10 +0000 (15:26 +0100)]
Also allow libquazip.so
Should work if it's already the qt5 version and even if no qt5 version
is available
Christoph Egger [Wed, 25 Mar 2015 13:55:38 +0000 (14:55 +0100)]
Disable buildModule
seems unneeded for everything frida does and it makes opening arm files
die in an endless loop
Christoph Egger [Wed, 25 Mar 2015 13:54:32 +0000 (14:54 +0100)]
Set minimum width to prevent endless loop on empty block
Fixes an infinite loop when looking at armhf binaries. armhf doesn't
look fully functional but actually does *something*
Christoph Egger [Wed, 25 Mar 2015 13:05:12 +0000 (14:05 +0100)]
Handle opening of invalid FrIDa file
Christoph Egger [Wed, 25 Mar 2015 13:04:21 +0000 (14:04 +0100)]
Properly handle abort of open dialog
Christoph Egger [Wed, 25 Mar 2015 12:40:51 +0000 (13:40 +0100)]
Proper error handling when opening binary
Fail properly when the supplied file is not a recognized binary
Closes T25
Christoph Egger [Tue, 24 Mar 2015 17:27:07 +0000 (18:27 +0100)]
Fix stupid Qt adjustSize() behavior
Christoph Egger [Tue, 24 Mar 2015 15:58:37 +0000 (16:58 +0100)]
Fix last commit
Test after doing fancy rewrite foo!
Christoph Egger [Tue, 24 Mar 2015 15:45:27 +0000 (16:45 +0100)]
(De)serialization of Comments
serialization and deserialization of global comments. Local comments
need to go within the function and are not yet implemented. Also
includes several tests
Christoph Egger [Tue, 24 Mar 2015 15:31:58 +0000 (16:31 +0100)]
Use QString::arg to construct testcase filenames
Christoph Egger [Fri, 20 Mar 2015 15:25:08 +0000 (16:25 +0100)]
Save dynamic attribute of functions
Christoph Egger [Fri, 20 Mar 2015 14:29:56 +0000 (15:29 +0100)]
Make GUI Widget move Comments through the backend properly
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
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
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
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
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
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
Christoph Egger [Thu, 19 Mar 2015 17:01:28 +0000 (18:01 +0100)]
Include pointer to changed function in RenameFunctionEvent
Christoph Egger [Thu, 19 Mar 2015 14:08:33 +0000 (15:08 +0100)]
Remove unnecessary include for <string>
Christoph Egger [Thu, 19 Mar 2015 13:58:44 +0000 (14:58 +0100)]
Allow setting loglevel from commandline
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
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
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)
Christoph Egger [Wed, 18 Mar 2015 13:59:14 +0000 (14:59 +0100)]
Add new files missing from previous few commits
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.
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
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.
Christoph Egger [Fri, 13 Mar 2015 13:08:36 +0000 (14:08 +0100)]
More logging in LLVMDisassembler
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
Christoph Egger [Thu, 12 Mar 2015 12:54:15 +0000 (13:54 +0100)]
Move the interpreters to the core InformationManager
Christoph Egger [Thu, 12 Mar 2015 12:45:41 +0000 (13:45 +0100)]
Complete accessors for InformationManager managed objects
Christoph Egger [Wed, 11 Mar 2015 16:08:45 +0000 (17:08 +0100)]
Remove unnecessary Interpreter.cxx
Should make things build again
Christoph Egger [Wed, 11 Mar 2015 16:08:10 +0000 (17:08 +0100)]
User proper hirarchial names for loggers
Christoph Egger [Wed, 11 Mar 2015 16:07:16 +0000 (17:07 +0100)]
Actually build Dockstuff
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
Christoph Egger [Wed, 11 Mar 2015 13:33:20 +0000 (14:33 +0100)]
Cleanup
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
Christoph Egger [Wed, 11 Mar 2015 13:30:24 +0000 (14:30 +0100)]
Properly move Functionality into FunctionWidget
Christoph Egger [Tue, 10 Mar 2015 16:45:50 +0000 (17:45 +0100)]
PoC: Add menu item to load script
Christoph Egger [Tue, 10 Mar 2015 16:25:59 +0000 (17:25 +0100)]
Add SWIG bindings for the guile interpreter
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
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
Christoph Egger [Tue, 10 Mar 2015 11:38:13 +0000 (12:38 +0100)]
Move LLVM logic to extra cmake module
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
Christoph Egger [Tue, 10 Mar 2015 11:36:25 +0000 (12:36 +0100)]
Use forward-declaration for QTemporaryFile
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
Christoph Egger [Tue, 10 Mar 2015 11:33:37 +0000 (12:33 +0100)]
Actually call finishFuction() when function is finished
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
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