Giter Site home page Giter Site logo

gleebug's Introduction

GleeBug

Build status

GleeBug is a Debugging Framework for Windows aimed at making debugging enjoyable. It should be complete and easy to use. Feel free to clone and send a pull request or report a bug!

Notice that the project is currently very volatile so for this reason pull requests with new features might be rejected if I feel like they don't fit the current codebase. If you plan on adding major features, please consider consulting me (mrexodia) so there isn't any time wasted.

gleebug's People

Contributors

0xbadc0de1 avatar cw2k avatar duncanisgoed avatar gmh5225 avatar mattiwatti avatar mrexodia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gleebug's Issues

store labels

have an interface for storing label addresses

abstract debug symbol support

there should be an abstract layer around dbghelp so it is possible to add DWARF support later. and caching, lots of caching (up to the point where the PDB files are not loaded in memory at all)

write automated testing

probably quite hard to come up for automated tests with debugging, but I think it's possible

Application Freezes After Period of Time

  • Debugger: Oct 2 2020 (GleeBug)
  • OS: Windows 10 Pro 1903 18362.329

The debugger application locks up after a period of time. This does not appear to be dependent on the executable used. It happens consistently after a period of time using the debugger. The environment is VirtualBox 6.1.14 on macOS 10.15.7.

This behavior does not exist using VMWare Fusion. Is it reproducible on a different set of hardware running the same version of macOS. The operating system does not lock up. Keyboard works and ctrl-alt-delete works. Mouse is able to move, but nothing is clickable and focus does not follow the mouse. Using the keyboard to navigate to Task Manager and then ending debugger task, the mouse is still not usable. However, running the debugger again fresh gets everything working again and after that point the mouse is usable as normal.

good debug event callback system

this is a really hard problem, but the basic idea @Nukem9 came up with was to have some sort of queue that processes registered callbacks sequentially, similar to the Intel PIN tool. Details should be discussed or mentioned here.

loaded libraries

store loaded libraries and their imports/exports also deserialize them using the class from #4 and optionally recursively deserialize their dependencies

GleeBug hardware breakpoint issue

Hello!

I started to use new version with GleeBug engine. Version is "Oct 2 2020"
To reproduce the bug:

  • set any hardware break point on a memory
  • delete this breakpoint
  • set another hardware breakpoint on the same address

image

patches

have support for storing memory modifications so they can be reverted later

StaticEngine doesn't work

When I try to load an exe, it says that file not found.
When I try to load a dll, it crashes.
Let me know if that's just me, I'll try to provide more details.

tracing support

there should be tracing support (with single step/hardware breakpoint/memory breakpoint/software breakpoint) that builds up a buffer with all the useful information (modified registers, complete context, modified memory and some surrounding data)

store bookmarks

have an interface for storing bookmarks on specific addresses

Can not use target<> to check if two std::function are equal

void Thread::StepInto(const StepCallback & cbStep)
{
StepInto();
auto target = cbStep.target<void()>();
for (const auto & cb : stepCallbacks)
{
if (target == cb.target<void()>())
{
puts("duplicate StepInto callback detected!");
return;
}
}
stepCallbacks.push_back(cbStep);
}

I run a test with following code, taget<void()> always return nullptr. So I can't use this to check if two std::function are equal.

#include <vector>
#include <functional>

typedef std::function<void()> StepCallback;

std::vector<StepCallback> stepCallbacks;

void StepInto(const StepCallback& cbStep)
{
	auto target = cbStep.target<void()>();
	for (const auto& cb : stepCallbacks)
	{
                // always get null
		if (target == cb.target<void()>())
		{
			puts("duplicate StepInto callback detected!");
			return;
		}
	}
	stepCallbacks.push_back(cbStep);
}

void fun1() {}

void fun2() {}

int main()
{
	StepInto(fun1);
	StepInto(fun1);
	StepInto(fun2);
	StepInto([]() {});
	StepInto(std::bind([]() {}));
	return 0;
}

output:

duplicate StepInto callback detected!
duplicate StepInto callback detected!
duplicate StepInto callback detected!
duplicate StepInto callback detected!

According to cppreference, the template type of target<> seems very strict. Or there is something wrong with my test?

memory breakpoints

memory breakpoints with a variable size window allowing for accesses in the page to be narrowed down to specific addresses (as an alternative for hardware breakpoints)

Crash while stepping over - thread is a NULL pointer

Hi Duncan :)

So I updated x64dbg and accepted the offer to try out the new engine, GleeBug. I've used it for several hours with no apparent issues, until, at some moment, it crashed. I wasn't prepared for troubleshooting so I didn't have symbols and such, but from the location of the crash and the source code it looks like it crashed here on line 26:

void Process::StepOver(const StepCallback & cbStep)
{
auto gip = Registers(thread->hThread, CONTEXT_CONTROL).Gip();

with thread holding a NULL pointer.

All I did was smashing F8 to step over.

That's not much, but here's a screenshot of handling the exception as a JIT debugger:

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.