Code Monkey home page Code Monkey logo

idados's People

Contributors

csnover avatar lowlevelmahn avatar wjp 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

idados's Issues

Doesn't compile for IDA 6.8 on OSX 10.11

Not sure if this is a regression, as I never attempted to build idados before. I followed the IDA instructions for building the SDK. This was a success. I am also able to build the example plugins without any problems. I followed the idados BUILD instructions and set __MAC__=1 and IDA=<path-to-ida>, substituting my actual IDA path, of course.

The problem seems to be that the idados build is trying to including headers or building objects that are unnecessary, resulting in a number of redefinition errors:

In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/signal.h:65:0,
                 from tcpip.cpp:58:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/_pthread/_pthread_types.h:57:8: error: redefinition of 'struct __darwin_pthread_handler_rec'
 struct __darwin_pthread_handler_rec {
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/_types.h:27:0,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/stdlib.h:63,
                 from ../../include/pro.h:74,
                 from tcpip.h:4,
                 from tcpip.cpp:11:
../../ldr/mach-o/h/sys/_types.h:58:8: error: previous definition of 'struct __darwin_pthread_handler_rec'
 struct __darwin_pthread_handler_rec
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/signal.h:65:0,
                 from tcpip.cpp:58:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/_pthread/_pthread_types.h:63:8: error: redefinition of 'struct _opaque_pthread_attr_t'
 struct _opaque_pthread_attr_t {
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/_types.h:27:0,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/stdlib.h:63,
                 from ../../include/pro.h:74,
                 from tcpip.h:4,
                 from tcpip.cpp:11:
../../ldr/mach-o/h/sys/_types.h:64:8: error: previous definition of 'struct _opaque_pthread_attr_t'
 struct _opaque_pthread_attr_t { long __sig; char __opaque[__PTHREAD_ATTR_SIZE__]; };
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/signal.h:65:0,
                 from tcpip.cpp:58:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/_pthread/_pthread_types.h:68:8: error: redefinition of 'struct _opaque_pthread_cond_t'
 struct _opaque_pthread_cond_t {
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/_types.h:27:0,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/stdlib.h:63,
                 from ../../include/pro.h:74,
                 from tcpip.h:4,
                 from tcpip.cpp:11:
../../ldr/mach-o/h/sys/_types.h:65:8: error: previous definition of 'struct _opaque_pthread_cond_t'
 struct _opaque_pthread_cond_t { long __sig; char __opaque[__PTHREAD_COND_SIZE__]; };
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/signal.h:65:0,
                 from tcpip.cpp:58:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/_pthread/_pthread_types.h:73:8: error: redefinition of 'struct _opaque_pthread_condattr_t'
 struct _opaque_pthread_condattr_t {
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/_types.h:27:0,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/stdlib.h:63,
                 from ../../include/pro.h:74,
                 from tcpip.h:4,
                 from tcpip.cpp:11:
../../ldr/mach-o/h/sys/_types.h:66:8: error: previous definition of 'struct _opaque_pthread_condattr_t'
 struct _opaque_pthread_condattr_t { long __sig; char __opaque[__PTHREAD_CONDATTR_SIZE__]; };
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/signal.h:65:0,
                 from tcpip.cpp:58:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/_pthread/_pthread_types.h:78:8: error: redefinition of 'struct _opaque_pthread_mutex_t'
 struct _opaque_pthread_mutex_t {
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/_types.h:27:0,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/stdlib.h:63,
                 from ../../include/pro.h:74,
                 from tcpip.h:4,
                 from tcpip.cpp:11:
../../ldr/mach-o/h/sys/_types.h:67:8: error: previous definition of 'struct _opaque_pthread_mutex_t'
 struct _opaque_pthread_mutex_t { long __sig; char __opaque[__PTHREAD_MUTEX_SIZE__]; };
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/signal.h:65:0,
                 from tcpip.cpp:58:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/_pthread/_pthread_types.h:83:8: error: redefinition of 'struct _opaque_pthread_mutexattr_t'
 struct _opaque_pthread_mutexattr_t {
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/_types.h:27:0,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/stdlib.h:63,
                 from ../../include/pro.h:74,
                 from tcpip.h:4,
                 from tcpip.cpp:11:
../../ldr/mach-o/h/sys/_types.h:68:8: error: previous definition of 'struct _opaque_pthread_mutexattr_t'
 struct _opaque_pthread_mutexattr_t { long __sig; char __opaque[__PTHREAD_MUTEXATTR_SIZE__]; };
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/signal.h:65:0,
                 from tcpip.cpp:58:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/_pthread/_pthread_types.h:88:8: error: redefinition of 'struct _opaque_pthread_once_t'
 struct _opaque_pthread_once_t {
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/_types.h:27:0,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/stdlib.h:63,
                 from ../../include/pro.h:74,
                 from tcpip.h:4,
                 from tcpip.cpp:11:
../../ldr/mach-o/h/sys/_types.h:69:8: error: previous definition of 'struct _opaque_pthread_once_t'
 struct _opaque_pthread_once_t { long __sig; char __opaque[__PTHREAD_ONCE_SIZE__]; };
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/signal.h:65:0,
                 from tcpip.cpp:58:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/_pthread/_pthread_types.h:93:8: error: redefinition of 'struct _opaque_pthread_rwlock_t'
 struct _opaque_pthread_rwlock_t {
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/_types.h:27:0,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/stdlib.h:63,
                 from ../../include/pro.h:74,
                 from tcpip.h:4,
                 from tcpip.cpp:11:
../../ldr/mach-o/h/sys/_types.h:70:8: error: previous definition of 'struct _opaque_pthread_rwlock_t'
 struct _opaque_pthread_rwlock_t { long __sig; char __opaque[__PTHREAD_RWLOCK_SIZE__]; };
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/signal.h:65:0,
                 from tcpip.cpp:58:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/_pthread/_pthread_types.h:98:8: error: redefinition of 'struct _opaque_pthread_rwlockattr_t'
 struct _opaque_pthread_rwlockattr_t {
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/_types.h:27:0,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/stdlib.h:63,
                 from ../../include/pro.h:74,
                 from tcpip.h:4,
                 from tcpip.cpp:11:
../../ldr/mach-o/h/sys/_types.h:71:8: error: previous definition of 'struct _opaque_pthread_rwlockattr_t'
 struct _opaque_pthread_rwlockattr_t { long __sig; char __opaque[__PTHREAD_RWLOCKATTR_SIZE__]; };
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/signal.h:65:0,
                 from tcpip.cpp:58:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/_pthread/_pthread_types.h:103:8: error: redefinition of 'struct _opaque_pthread_t'
 struct _opaque_pthread_t {
        ^
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/_types.h:27:0,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/stdlib.h:63,
                 from ../../include/pro.h:74,
                 from tcpip.h:4,
                 from tcpip.cpp:11:
../../ldr/mach-o/h/sys/_types.h:72:8: error: previous definition of 'struct _opaque_pthread_t'
 struct _opaque_pthread_t { long __sig; struct __darwin_pthread_handler_rec  *__cleanup_stack; char __opaque[__PTHREAD_SIZE__]; };
        ^
make[1]: *** [obj/x86_mac_gcc_32/tcpip.o32] Error 1
make: *** [/Users/pgiblock/src/idasdk/idasdk68//plugins/debugger/obj/x86_mac_gcc_32/tcpip.o32] Error 1

A brief comparison of the sample plugin makefiles and idados's shows significant differences. For instance, findcrypt/makefile only includes plugin.mak instead of allmake.unx, and doesn't bother specifying any of IDA's libraries (such as tcpip) in the object list.

Can the makefile get some love? I'd help, but I'm unsure of its intent.

Thanks

Doesn't run in IDA 6.8

This idados remote debugger plugin fails to initialize on IDA 6.8. An error is displayed upon selecting the debugger from the debugger dropdown on the toolbar, or through the "Debugger -> Switch Debugger ..." menu option. IDA immediately exits upon dismissing the error dialog. The message is:

" Wrong DBG_RESMOD_STEP_... bits "

I imagine this is due to the plugin not initializing some value. Most likely debugger_t::resume_modes is not filled. I'm still struggling to determine how this plugin initializes the debugger structure and how it assigns it to the global dbg variable.

Header file area.hpp file missing

Hi. Where can I find the file area.hpp? It's not found anywhere (tried with SDK from IDA Pro 7.0 and got nothing). Thank you.
EDIT: appologies, it's not present in IDA 7.0+, it seems.

Add support for Linear Executable (LE)

Hi

My team and I are currently remaking a classic dos game called OMF 2097 at https://github.com/omf2097/openomf

We are desperately in need of a debugger that can handle the linear executable (LE) format.

We have some knowledge of x86 asm. We are able to reverse engineer about 10% of the omf game binary using only a dissembler. But static analysis isn't enough.

I want to ask how hard is it to add support for LE debugging to idados?

Thank you

Stack View and Call Stack

Is it known that the Stack View seems... incorrect? Or at least the values seem misleading. Also, Call Stack seems to be unimplemented.

Are they expected to work? Or is this unfinished business? If the later, I'm willing to help try to improve this aspect of the plugin.

Can't build with IDA 6.8

DOSBox with IDADos debugger can't be built with IDA 6.8 SDK on Linux.

Function prototype in idados/dosbox_debmod.h looks as follows:
virtual int idaapi dbg_attach_process(pid_t process_id, int event_id, int flags);

But it should be the same as in idasdk68/plugins/debugger/debmod.h:
virtual int idaapi dbg_attach_process(pid_t process_id, int event_id) = 0;

Fixing it makes dosbox to compile and run successfully.

Restarting freezes IDA

It is not possible to restart emulation by pressing Stop in IDA, and then pressing Run again.

Mixed loader and debugging segments

It confuses IDA when it's needed to point some offset to dseg.
After pointing to such offset (Alt+R -> dseg), try to double click it. You will jump to seg004 offset. But not at dseg.

You should delete Loader segments, and only use debugger's ones.

Trouble building DOSBox for IDA 6.8 with fresh MSys2 installation

I have several issues being able to build IdaDOS and DOSBox on a fresh MSys2 installation when strictly following BUILD.md as I'm new to MSys2. There are some things which can be tricky for a beginner like me, which I bolded. I still can't compile DOSBox correctly eventually.

Sorry that I can't even teach Github to continue my list numbers when using code blocks.

Preparations

  1. Install MSys2 from http://msys2.github.io/ (msys2-i686-20160205.exe) and running it.
  2. Running pacman -S mingw-w64-i686-toolchain (installing all members)
  3. Running pacman -S mingw-w64-i686-SDL as I need to build DOSBox too later on.
  4. Copying my idasdk68 to /d/idasdk68.

Compiling IdaDOS

  1. Download idados into /d/idados.
  2. Since I use IDA 6.8, change two lines back to what was changed here: 8b0ef6a
  3. Editing build_mingw.sh to use ../idasdk68 rather than ../idasdk69
  4. Starting MSys2 with the "MinGW-w64 Win32 Shell" shortcut in the MSys2 folder in the start menu.
  5. Switching to /d/idados and executing ./build_mingw.sh.
  6. Getting the following error:
In file included from ../idasdk68/plugins/debugger/tcpip.h:4:0,
from dosbox_rstub.cpp:15:
../idasdk68/include/pro.h:735:84: error: conflicting declaration of C function 'int memicmp(const void*, const void*, size_t)'
idaman THREAD_SAFE int ida_export memicmp(const void *x, const void *y, size_t size);
  1. Thinking this is the issue actually described under the "DOSBox" compilation section in BUILD.md.
    Thus, changing #ifdef __GNUC__ in pro.h to #if 0 so it looks like this:
#if 0
idaman THREAD_SAFE int ida_export memicmp(const void *x, const void *y, size_t size);
#endif
  1. Executing ./build_mingw.sh again. Getting the error:
C:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/5.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lida
collect2.exe: error: ld returned 1 exit status
  1. Also copying over ida.wll into /d/idasdk68/bin/ida.dll as actually described under the "DOSBox" section in BUILD.md.
  2. Now, compiling the IdaDOS plugin works flawlessy.
  3. Copying dosbox_rstub.plw to my IDA plugin directory.
  4. Copying C:\msys32\mingw32\bin\libwinpthread-1.dll to my IDA installation directory.

The notes about __GNUC__ and ida.dll should probably go under the IdaDOS section already.

Compiling DOSBox

  1. Download DOSBox repository from https://github.com/wjp/dosbox into /d/dosbox.
  2. Switching into that directory with MSys2.
  3. Running .autogen-sh. Getting the following output:
Generating build information using aclocal, autoheader, automake and autoconf
This may take a while ...
./autogen.sh: line 8: aclocal: command not found
./autogen.sh: line 9: autoheader: command not found
./autogen.sh: line 10: automake: command not found
./autogen.sh: line 11: autoconf: command not found
Now you are ready to run ./configure.
You can also run  ./configure --help for extra features to enable/disable.
  1. Trying to install the missing commands with pacman -Su automake and pacman -Su autoconf.
  2. Re-running ./autogen-sh. Getting quite a few warnings about source files being in subdirectories (if required, I can upload the warnings). But no errors.
  3. Running ./configure --enable-debug=ida32 --with-ida-sdk=/d/idasdk68 --with-ida-plugin=/d/idados, no errors.
  4. Running make. Noticing it's not installed. Installing it with pacman -Su make.
  5. Getting the following error:
In file included from debug.cpp:47:0:
debug_inc.h:22:20: fatal error: curses.h: No such file or directory
compilation terminated.
  1. Looking up how to get curses.h, following the instructions found in http://www.dosbox.com/wiki/BuildingDOSBox under the "Enabling the debugger (You probably don't want this)" section (requiring to install tar too).
  2. Switching back to the DOSBox directory and re-running make, now running without errors (build log on request).
  3. Copying src/DOSBox.exe into my DOSBox 0.74 directory.
  4. Trying to start it, missing some DLLs, requiring me to copy over libgcc_s_dw2-1.dll and libwinpthread-1.dll from C:\msys32\mingw32\bin as it is not in my PATH. Also having to copy over IDA.WLL from my IDA directory.
  5. Starting DOSBox again. Getting following error:
The procedure entry point _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13find_first_ofEPKcjj could not be located in the dynamic link library D:\Archive\Games\Emulators\DOSBox Debug\DOSBox.exe. 

I'm out of ideas, I had a similar error yesterday about a missing symbol. What do I have to do to correctly compile DOSBox?

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.