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
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
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.
Christoph Egger [Tue, 3 Mar 2015 19:15:18 +0000 (20:15 +0100)]
Use -Wextra and be -Wextra-clean
Christoph Egger [Tue, 3 Mar 2015 17:42:58 +0000 (18:42 +0100)]
Make `make test` work
Christoph Egger [Tue, 3 Mar 2015 17:30:25 +0000 (18:30 +0100)]
Add support for deserializing functions
Includes a first testcase
Christoph Egger [Tue, 3 Mar 2015 16:36:10 +0000 (17:36 +0100)]
implement basic deserialization of BasicBlock's
Christoph Egger [Tue, 3 Mar 2015 16:59:23 +0000 (17:59 +0100)]
Add testcase for serializing / deserializing BasicBlocks
Christoph Egger [Tue, 3 Mar 2015 14:05:25 +0000 (15:05 +0100)]
Move org files to doc/ subdirectory
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.
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.
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
Christoph Egger [Mon, 23 Feb 2015 15:43:51 +0000 (16:43 +0100)]
Properly HTML Escape function names
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
Christoph Egger [Mon, 23 Feb 2015 15:33:59 +0000 (16:33 +0100)]
Add link handler only once for each basic block
Christoph Egger [Mon, 23 Feb 2015 13:03:04 +0000 (14:03 +0100)]
Add our own FindQuaZip.cmake untill debian ships a useable one
Christoph Egger [Fri, 20 Feb 2015 17:28:25 +0000 (18:28 +0100)]
constify function in 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)
Christoph Egger [Fri, 20 Feb 2015 16:46:16 +0000 (17:46 +0100)]
Mainwindow: group by public/private
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)
Christoph Egger [Fri, 20 Feb 2015 16:37:49 +0000 (17:37 +0100)]
Create Logger for BasicBlockWidgets
Christoph Egger [Fri, 20 Feb 2015 16:35:49 +0000 (17:35 +0100)]
constify accessors in BasicBlock
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
Christoph Egger [Fri, 20 Feb 2015 16:29:13 +0000 (17:29 +0100)]
Remove unused LLVMBasicBlock class
Christoph Egger [Fri, 20 Feb 2015 16:23:09 +0000 (17:23 +0100)]
Remove unused LLVMFunction class
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.
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.
Christoph Egger [Fri, 20 Feb 2015 11:36:20 +0000 (12:36 +0100)]
Fix CMakeList
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.
Christoph Egger [Thu, 19 Feb 2015 15:50:39 +0000 (16:50 +0100)]
Compile fix for last commit
Christoph Egger [Wed, 18 Feb 2015 15:38:18 +0000 (16:38 +0100)]
Add option to comment on instructions (in GUI)
Christoph Egger [Tue, 17 Feb 2015 16:53:39 +0000 (17:53 +0100)]
Add context menu to create Functions
Christoph Egger [Tue, 17 Feb 2015 15:30:54 +0000 (16:30 +0100)]
Compactify BasicBlockWidget header
Christoph Egger [Tue, 17 Feb 2015 13:27:32 +0000 (14:27 +0100)]
Add missing space to log message
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.
Christoph Egger [Mon, 16 Feb 2015 12:17:29 +0000 (13:17 +0100)]
Add some hotkeys
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.
Christoph Egger [Fri, 6 Feb 2015 15:13:22 +0000 (16:13 +0100)]
Fix width of basic blocks
Christoph Egger [Fri, 6 Feb 2015 14:59:12 +0000 (15:59 +0100)]
Add test Framework
Christoph Egger [Fri, 6 Feb 2015 14:58:16 +0000 (15:58 +0100)]
Clean up .gitignore -- we should build out-of-tree anyway
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.
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
Christoph Egger [Thu, 22 Jan 2015 18:54:14 +0000 (19:54 +0100)]
Cleanup includes
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
Christoph Egger [Thu, 22 Jan 2015 18:50:09 +0000 (19:50 +0100)]
Fix layout of basicblock with just one instruction
Christoph Egger [Wed, 21 Jan 2015 16:19:47 +0000 (17:19 +0100)]
Add dynamically linked symbols
Christoph Egger [Wed, 21 Jan 2015 12:20:30 +0000 (13:20 +0100)]
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
Christoph Egger [Wed, 21 Jan 2015 12:17:12 +0000 (13:17 +0100)]
Create ObjectFile only once and store it with full type
ObjectFiles was created twice, once to check the type it has and then
again to store and use it in the disassembler. We now create it only
once and store it with full type information for additional use
Christoph Egger [Wed, 21 Jan 2015 12:09:12 +0000 (13:09 +0100)]
Cleanup <iostream> in main()
Christoph Egger [Tue, 20 Jan 2015 15:34:37 +0000 (16:34 +0100)]
Fix startup if no binary is specified on the commandline
Christoph Egger [Thu, 15 Jan 2015 16:39:05 +0000 (17:39 +0100)]
Move back to QTableWidget so we get proper programmatic access to rows/cells
Christoph Egger [Wed, 14 Jan 2015 17:00:28 +0000 (18:00 +0100)]
Make function/jump targets clickable
Christoph Egger [Wed, 14 Jan 2015 16:51:01 +0000 (17:51 +0100)]
implement entryAddress()
at least silences warning and is not (really) more work than eliminating
the function
Christoph Egger [Wed, 14 Jan 2015 16:35:51 +0000 (17:35 +0100)]
Make LLVMDisassembler a template class
Christoph Egger [Sat, 10 Jan 2015 16:45:14 +0000 (17:45 +0100)]
Logging improvements
Christoph Egger [Sat, 10 Jan 2015 16:44:50 +0000 (17:44 +0100)]
Also add blocks to function when splitting
Christoph Egger [Sat, 10 Jan 2015 16:44:12 +0000 (17:44 +0100)]
Add logging infrastructure for mainwindow
Christoph Egger [Sat, 10 Jan 2015 16:43:23 +0000 (17:43 +0100)]
Make name accessible in BasicBlockWidgets
Christoph Egger [Sat, 10 Jan 2015 16:43:04 +0000 (17:43 +0100)]
Fix layout if functions include blocks before entry
If a function contained a block with a lower address than it's entry a
integer overflow occured resulting in bad layout. Handled now
correctly.
Christoph Egger [Thu, 8 Jan 2015 17:45:43 +0000 (18:45 +0100)]
formating improvements
Christoph Egger [Thu, 8 Jan 2015 17:44:54 +0000 (18:44 +0100)]
remove more madness from llvm-config flags
Christoph Egger [Thu, 8 Jan 2015 17:43:41 +0000 (18:43 +0100)]
More bugs
Christoph Egger [Thu, 8 Jan 2015 17:42:04 +0000 (18:42 +0100)]
Split blocks before finishing function
Christoph Egger [Thu, 8 Jan 2015 17:40:21 +0000 (18:40 +0100)]
Properly color text part of basic block widgets
If the text was smaller than the minimum, rendering was ugly
Christoph Egger [Wed, 7 Jan 2015 20:44:04 +0000 (21:44 +0100)]
BUGS file
Christoph Egger [Wed, 7 Jan 2015 20:41:22 +0000 (21:41 +0100)]
Use QGraphicsProxyWidget
This way the qlabel widget can be accessed properly (clicking and stuff)
Christoph Egger [Wed, 7 Jan 2015 20:38:37 +0000 (21:38 +0100)]
Remove debug output left in unintentionally
Christoph Egger [Tue, 6 Jan 2015 21:26:57 +0000 (22:26 +0100)]
Whitespace cleanup
Christoph Egger [Tue, 6 Jan 2015 21:23:25 +0000 (22:23 +0100)]
Add in an Information Manager
Now individual functions are added to the GUI via signals. This is the
way it was alwasys supposed to work. Now Information flow is cleaner,
we can add support to save things and we can properly tag things as
functions and rerun the disassembler.
Also includes some whitespace cleanup for technical reasons
Christoph Egger [Mon, 5 Jan 2015 16:19:13 +0000 (17:19 +0100)]
Cleanup sourcetree
Christoph Egger [Sat, 3 Jan 2015 17:51:56 +0000 (18:51 +0100)]
Consistently use include-guards
Christoph Egger [Sat, 3 Jan 2015 10:43:34 +0000 (11:43 +0100)]
Add some simple samples for screenshots and similar stuff
Christoph Egger [Sat, 3 Jan 2015 10:38:00 +0000 (11:38 +0100)]
change QT signals to QT_NO_KEYWORDS
making room for bost::signal as core messaging infrastructure (it's
more flexible than Qt's signals).
Christoph Egger [Thu, 18 Dec 2014 12:25:14 +0000 (13:25 +0100)]
Consistent coloring
Christoph Egger [Thu, 18 Dec 2014 12:19:51 +0000 (13:19 +0100)]
QTableWidget -> QLabel + HTML
Christoph Egger [Thu, 18 Dec 2014 11:57:42 +0000 (12:57 +0100)]
Space table widget appropriately for Qt < 5.3
Works this way at least with 5.2 from Ubuntu 14.04
Note: this is a backup commit before replacing the whole thing by QLabel
+ HTML just in case we want to get back to this implementation one
day
Christoph Egger [Thu, 18 Dec 2014 11:21:33 +0000 (12:21 +0100)]
Only disassemble the text segment
Christoph Egger [Fri, 12 Dec 2014 23:40:37 +0000 (00:40 +0100)]
Split disassemble()
disassemble() still does take care of initial disassembling of the
binary. However parts needed to (interactively) start disassembling
further parts are now separated.
Christoph Egger [Mon, 8 Dec 2014 16:15:07 +0000 (17:15 +0100)]
Update TODO with all kinds of fancy ideas on what might be done
Christoph Egger [Sun, 7 Dec 2014 16:59:09 +0000 (17:59 +0100)]
properly include std::array
Christoph Egger [Sun, 7 Dec 2014 16:54:04 +0000 (17:54 +0100)]
Fallbacks if we do not have symbols
try to use the ELF entry address or start of .text
Christoph Egger [Sun, 7 Dec 2014 16:52:34 +0000 (17:52 +0100)]
Correctly handle the case where we do not have Instruction Analysis
Christoph Egger [Thu, 4 Dec 2014 18:56:15 +0000 (19:56 +0100)]
Add support for backward edges
Christoph Egger [Sat, 29 Nov 2014 00:22:34 +0000 (01:22 +0100)]
Add horizontal space between BasicBlockWidgets
Christoph Egger [Fri, 28 Nov 2014 23:19:58 +0000 (00:19 +0100)]
Horizontally distribute BasicBlockWidgets
We still need to add a bit of space between them but the currently
used QT API doesn't trivially allow that
Christoph Egger [Fri, 28 Nov 2014 21:52:02 +0000 (22:52 +0100)]
Add CFGScene QGraphicsScene taking care of BasicBlock stuff
Rearranges BasicBlocks to look nicely and draws the arrows. There is
lots of stuff left here like backwards edges that are just ignored for
now.
Christoph Egger [Fri, 28 Nov 2014 21:50:23 +0000 (22:50 +0100)]
Change BasicBlockWidget and assume upperLeft is (0, 0) in local coordinates
Christoph Egger [Thu, 27 Nov 2014 12:19:59 +0000 (13:19 +0100)]
untabify
Christoph Egger [Thu, 27 Nov 2014 12:18:03 +0000 (13:18 +0100)]
Fix widget setup for scripting
Christoph Egger [Thu, 27 Nov 2014 12:16:05 +0000 (13:16 +0100)]
Properly handle errors in sceme
Catch exceptions, no longer exit on them and print the content on the
console
Christoph Egger [Wed, 26 Nov 2014 19:32:54 +0000 (20:32 +0100)]
Clean up LLVM Linking and use LLVM.so
LLVM.so prevents segfaults when running with an llvmized graphics
driver as it avoids linking against LLVM multiple times (and using
incompatible versions).
Christoph Egger [Wed, 26 Nov 2014 19:28:59 +0000 (20:28 +0100)]
Add guile scripting
Christoph Egger [Wed, 19 Nov 2014 15:48:55 +0000 (16:48 +0100)]
Remove -O2 from llvmflags. it's none of libllvm's business
Christoph Egger [Wed, 19 Nov 2014 15:46:36 +0000 (16:46 +0100)]
Make commandline parser optional to build against cip qt 5.1
Christoph Egger [Wed, 19 Nov 2014 15:46:18 +0000 (16:46 +0100)]
Forward-port to LLVM 3.5 release
Christoph Egger [Tue, 3 Jun 2014 17:19:51 +0000 (19:19 +0200)]
Distinguish single edges from double edges
Christoph Egger [Tue, 3 Jun 2014 17:05:30 +0000 (19:05 +0200)]
Draw edges between BasicBlockWidgets while handling loops
Christoph Egger [Tue, 3 Jun 2014 17:04:37 +0000 (19:04 +0200)]
Include absolute branch address
Christoph Egger [Tue, 3 Jun 2014 17:03:19 +0000 (19:03 +0200)]
properly preserve edges
The address behind the basic block is always another basic block. This
does not imply we should split this block.